New Paste

 

Recent Pastes

Administrate




pzt.me

/p'eɪːzt.miː/
A simple, multi-purpose pastebin for sharing and collaborating with text, code, images, video and URLs over miscellaneous messaging and microblogging media.
PZT.Me or PZTMe is a short-url pastebin and image-bin with video embedding capabilities. It supports Syntax Highlighting, made available through GeSHi. The sole purpose of this pastebin is to create a quick, easy pastebin that provides the user with a short url, suitable for Twitter, Facebook, IRC and a number of other microblogging and instant messaging clients. It's a free pastebin, it is quick and has it's own JSON API. There is a bookmarklet plugin that works on most browsers, powered by Javascript, allowing you to easily paste text to the pastebin anywhere and quickly retrieve a short-url address in seconds!
 
PasteID: 2rl2c
Pasted by Someone, Tue, 27 Jul 2010 13:39:56 +0000 GMT
Expires in 46 weeks 3 days
Paste size 17.51 Kb
Toggle Expand   Wrap   Style   Raw
Copy Contents   Copy URL
  1. /* 
  2. <mdata.ini> 
  3. [game] 
  4. status=0                      || 0 = None | 1 = Starting | 2 = On-going 
  5. gstatus=0                     || 1 = Morning | 2 = Night 
  6. stimer=0                      || The timer number used when starting the game. 
  7.  
  8. <musers.ini> 
  9. [Someone]                     || Nickname. 
  10. alive=1                       || 0 = Dead | 1 = Alive 
  11. alignment=1                   || 0 = Non-aligned | 1 = Town | 2 = Mafia 
  12. role=0                        || t = Townie | rb = Roleblocker | c = Cop | ic = Insane Cop | m = Mafioso | sk = Serial Killer | rd = Redirector | v = Vigilante | d = doctor 
  13. nightaction=0                 || 0 = Unused | 1 = Used. 
  14. votedfor=outsomnia            || Person they voted for. 
  15. votes=5                       || Number of votes against the user. 
  16. vkicks=2                      || Number of votes to kick the user. 
  17. vkicked=null                  || Whether or not the played has voted to kick somebody. Only one kick can be made a game. 
  18. vstopped=null                 || Whether or not the player has voted to stop the game. 
  19.  
  20. <mrank.ini> 
  21. [Someone]                     || Username. 
  22. password=12345                || Character limit: 4-14. 
  23. twlt=0/0/0                    || Town. wins/loses/ties 
  24. mwlt=0/0/0                    || Mafia. wins/loses/ties 
  25. swlt=0/0/0                    || Serial Killer. wins/loses/ties 
  26. level=0                       || 0 = user | 1 = moderator | 2 = admin 
  27. */ 
  28.  
  29. ON *:TEXT:*:#dmsmafia:{ 
  30.   if ($me == Someone) { 
  31.     var %status $readini(mdata.ini,game,status) 
  32.     var %timer $readini(mdata.ini,game,stimer) 
  33.     var %alive $readini(musers.ini,$nick,alive) 
  34.     var %gstatus $readini(mdata.ini,game,gstatus) 
  35.     if ($1 == !in) { 
  36.       if (%status == 1) { 
  37.         if (%alive != $null) { notice $nick You are already in this game! | halt } 
  38.         writeini musers.ini $nick alive 1 
  39.         mode $chan +v $nick 
  40.         notice $nick You are now in this game! If you want to leave, use !out. 
  41.     else if ($1 == !start) { 
  42.       if (%status == 0 || %status == $null) { 
  43.         mode $chan +v $nick 
  44.         mmsg $chan A game of Mafia is now starting. Please type !in to join the game. 
  45.         notice $nick You are now in this game! If you want to leave, use !out. 
  46.         writeini mdata.ini game status 1 
  47.         writeini mdata.ini game starter $nick 
  48.         writeini mdata.ini game round 0 
  49.         timer 1 180 startMafia $chan         
  50.         writeini mdata.ini game stimer $ltimer 
  51.         writeini musers.ini $nick alive 1 
  52.     else if ($1 == !go) { 
  53.       if (%status == 1) { 
  54.         mmsg $chan Mafia will start in 10 seconds. 
  55.         $+(timer,%timer) 1 10 startMafia $chan         
  56.       }   
  57.     else if ($1 == !vote) { 
  58.       if (%status == 2 && %gstatus == 1) { 
  59.       }  
  60.     else if ($1 == !out) { 
  61.       if (%status == 1) { 
  62.         if (%alive == $null) { notice $nick You are not in this game! | halt } 
  63.         notice $nick You have left the game! 
  64.         remini musers.ini $nick 
  65.         mode $chan -v $nick 
  66.         if ($nick == $readini(mdata.ini,game,starter)) { 
  67.           mmsg $chan The game has ended due to the Game Starter leaving. 
  68.           stopMafia $chan 
  69.           $+(timer,%timer) off 
  70.     else if ($1 == !wait) { 
  71.       if (%status == 1) { 
  72.         var %newtime $calc($+($timer(%timer).secs) + 60) 
  73.         mmsg $chan The game has been extended 60 seconds. Mafia will start in $+(,%newtime,) seconds. 
  74.         $+(timer,%timer) 1 %newtime startMafia $chan 
  75.       }       
  76.     else if ($1 == !stop) { 
  77.       if (%status == 1) { 
  78.       else if (%status == 2) { 
  79.     else if ($1 == !alive) { 
  80.       if (%status == 2 || %status == 1) { 
  81.         if ($getalive != $null) { 
  82.           mmsg $chan Alive players: $+(,$getalive,.) 
  83.     else if ($1 == !votes) { 
  84.       if (%status == 2 && %gstatus == 1) { 
  85.     else if ($1 == !vkick) { 
  86.       if ($2 == $null) halt 
  87.       if (%alive == 1) { 
  88.         var %vkicks $readini(musers.ini,$2,vkicks) 
  89.         if (%vkicks == $null) { notice $nick $+(,$2,) does not exist. | halt } 
  90.         var %newvkicks $calc(%kicks + 1) 
  91.         writeini musers.ini $2 vkicks %newvkicks 
  92.         mmsg $chan $+(,$nick,) has voted to kick $+(,$2,). Vote %newvkicks of 3. 
  93.     else if ($1 == !coin) { 
  94.       mmsg $chan The coin came up $+($iif($r(1,2) == 1,heads,tails),.) 
  95.     else if ($1 == !status) { 
  96.       if (%status == 1) { 
  97.         mmsg $chan A game of Mafia is currently starting. Use !in to go in. Time left: $+(,$timer($readini(mdata.ini,game,stimer)).secs,secs.) 
  98.       else if (%status == 2) { 
  99.         if (%gstatus == 1) { 
  100.           var %m %m It takes $+(,$floor($calc($ini(musers.ini,0) / 2 + 1)),) votes to lynch. 
  101.         mmsg $1 %m        
  102.       else { 
  103.         mmsg $chan No games are currently active. Use !start to start one. 
  104.     else if ($1 == !mod) { 
  105.       if ($2 == tbn) { 
  106.         /* 
  107.         if ($0 > 4 || $3 !isnum) { notice $nick Syntax: !mod tbn <minutes> <name> <reason> | halt } 
  108.         var %time $calc($3 * 60)  
  109.         quote tban $chan %time $address($4,2)  
  110.         kick $chan $4 5Temp banned for $+(,$duration(%time),) Reason: $+(,$iif($5- != $null, $5-, No reason specified.),) 
  111.         */       
  112.       else if ($2 == modkill) { 
  113.       else if ($2 == forceend) { 
  114.         /* 
  115.         stopmafia $chan 
  116.         mmsg $chan Moderator $+(,$nick,) has force-ended the game. 
  117.         */ 
  118.       else { 
  119.         notice $nick Syntax: !mod [command]. [command] can be 
  120.         notice $nick tbn [nick] [minutes] (reason) - Tempbans [nick] for [minutes] and then kicks [nick] out of the channel. User must be in the IRC server. 
  121.         notice $nick modkill [nick] (reveal) - Modkills [nick]. [reveal] can be true or false. If true, the kill reveals the user's role. If [reveal] is not specified, it will reveal the role automatically. 
  122.         notice $nick forceend - Force ends the current game (if one is going on). Reveals all roles. 
  123.     else if ($1 == !admin) { 
  124.       if ($2 == addmod) { 
  125.       else if ($2 == delmod) { 
  126.       else { 
  127.         notice $nick Syntax: !admin [command]. [command] can be 
  128.         notice $nick addmod [username] - Makes [username] a moderator. 
  129.         notice $nick delmod [username] - Removes [username] from the mod list. 
  130.  
  131. ON *:TEXT:*:?:{ 
  132.   if ($me == Someone) { 
  133.     if ($1 == !help) { 
  134.       if ($2 == commands) { 
  135.         notice $nick !in, !out, !start, !go, !wait, !stop, !vkick [name] - Joins a game if it is starting.; Leaves a game if it is starting.; Starts a game if none are active.; Forces the game to start early.; Extends the waiting time.; Vote to stop the game. (If you started it, you can end it without voting if it is still starting); Kicks [name] from the game. (Total Players/2) votes are required. 
  136.         notice $nick !vote [name], !unvote, !votes, !alive, !status - Votes for [name].; Unvotes; Shows the voting results.; Shows the people alive.; Shows the status (Day/Morning/Night and Round). 
  137.         notice $nick !coin - Flips a coin. 
  138.         notice $nick PM Commands: !help [category], !rank [name], !mods - Gets help on [category].; Checks the w/l/t of [name].; Gives you the list of mods. 
  139.       else if ($2 == rules) { 
  140.         notice $nick 1. Do not spam the bot! 
  141.         notice $nick 2. Only join games that you can complete. 
  142.         notice $nick 3. Play to win! Do not reveal your role if you are mafia. 
  143.         notice $nick 4. Do not quote the bot to prove your innocence. You are allowed to paraphrase what your role does. 
  144.         notice $nick 5. Do not talk with other players at night UNLESS you are mafia. 
  145.         notice $nick 6. Do not go AFK in a game without getting a replacement or letting the other players know. 
  146.         notice $nick If it is your first time playing, feel free to ask anything about the game. Use !help first! 
  147.         notice $nick If anybody is breaking rules or idling too long, query a moderator and report them. Use !mods for a list of moderators. Moderators can temp ban, modkill and force end the game.  
  148.       else if ($2 == basics) { 
  149.         notice $nick A tutorial of mafia can be found here: http://cataldo.freeshell.org/mafia/mafiascum04.swf 
  150.         notice $nick The roles in this game are different. Use !help roles for information on each role! 
  151.         notice $nick If there are 3 players, the game starts in the day. If there are 4+, the game starts at night. 
  152.         notice $nick The periods of time are Morning and Night. 
  153.       else if ($2 == roles) { 
  154.         if ($3 == Townie) { 
  155.           notice $nick Townie (town, common) - Has no special actions or abilities. 
  156.         else if ($3 == Roleblocker) { 
  157.           notice $nick Roleblocker (town/mafia, common) - Able to block one person from doing their night action. Abilities: block [target]. 
  158.         else if ($3 == Mafioso) { 
  159.           notice $nick Mafioso (mafia, common) - Has no special actions or abilities other than 'mafiakill [target]'. 
  160.         else if ($3 == Godfather) { 
  161.           notice $nick Godfather (mafia, uncommon) - Shows up with 'town' on death and cop inspects. Unable to be killed by night actions. Otherwise has no other special abilities. 
  162.         else if ($3 == Serial) { 
  163.           notice $nick Serial Killer (sk, uncommon) - Serial Killer. Able to kill one user each night. Abilities: kill [target]. 
  164.         else if ($3 == Watcher) { 
  165.           notice $nick Watcher (town/mafia, uncommon) - Able to target one person at night and see whether they were targeted or who they targetted. Abilities: watch [target]. 
  166.         else if ($3 == Redirector) { 
  167.           notice $nick Redirector (town/mafia, uncommon) - Able to redirect one player's action to another player at night. Abilities: redirect [target] [target2] 
  168.         else if ($3 == Cop) { 
  169.           notice $nick Cop (town, common) - Able to inspect one person each night to learn their alignment. Results are not guaranteed to be accurate. Abilities: inspect [target] 
  170.           notice $nick Cops can be Sane or Insane. Insane cops get the opposite of the player's alignment. Sanity is revealed on death. 
  171.         else if ($3 == Coward) { 
  172.           notice $nick Coward (town, uncommon) - Able to hide once at night during the game. During this night, all actions targetted player will do nothing. Abilities: hide (1 use) 
  173.         else if ($3 == Super-Saint) { 
  174.           notice $nick Super-Saint (town, uncommon) - Whoever places the finishing vote on this player dies along with him/her. 
  175.         else if ($3 == Vigilante) { 
  176.           notice $nick Vigilante (town, uncommon) - Able to kill one person per night. Abilities: kill [target] 
  177.         else if ($3 == Doctor) { 
  178.           notice $nick Doctor (town, common) - Able to protect one person each night. Abilities: protect [target] 
  179.         else { 
  180.           notice $nick To get help on any of them, use !help roles [role]. 
  181.           notice $nick The avaliable roles are Townie, Doctor, Roleblocker, Cop, Mafioso, Godfather, Serial Killer, Watcher, Redirector, Coward, Super-Saint, Vigilante. 
  182.           notice $nick The roles which are not bolded are currently disabled. 
  183.         }   
  184.       else if ($2 == todo) { 
  185.         notice $nick -Make it so that you know who your mafia group is. 
  186.         notice $nick -Complete gameplay. 
  187.         notice $nick -Complete rank system.  
  188.         notice $nick -Complete Admin/Moderator system. 
  189.       else { 
  190.         notice $nick Welcome to Mafia! To get help on a category, Use 
  191.         notice $nick !help [category] 
  192.         notice $nick Avaliable categories: basics, rules, roles, todo, commands. 
  193.     else if ($1 == !rank) { 
  194.       var %target $iif($2 != $null, $2, $nick) 
  195.       var %w $readini(mranks.ini,%target,w) 
  196.       var %l $readini(mranks.ini,%target,l) 
  197.       var %t $readini(mranks.ini,%target,t) 
  198.       if (%w == $null) { var %w 0 } 
  199.       if (%l == $null) { var %l 0 } 
  200.       if (%t == $null) { var %t 0 } 
  201.       notice $nick User Ranking: $+(,%target,) Wins: %w | Loses: %l | Ties: %t 
  202.     else if ($1 == !mods) { 
  203.  
  204. ON *:JOIN:#dmsmafia:{ 
  205.   if ($me == Someone && $nick != Someone) { 
  206.     var %status $readini(mdata.ini,game,status) 
  207.     var %alive $readini(musers.ini,$nick,alive)	 
  208.     if (%status == 0) { 
  209.       notice $nick Hi there. Welcome to Mafia. No games are currently active. 
  210.     if (%status == 1) { 
  211.       if (%alive == $null) { 
  212.         notice $nick Hey there! A game of Mafia is currently starting. Use !in if you want to join! 
  213.       else { 
  214.         notice $nick Welcome back! The game is still starting. Time left: $+(,$timer($readini(mdata.ini,game,stimer)).secs,secs.) 
  215.     else if (%status == 2) { 
  216.       if (%alive == 1) { 
  217.         mode #dmsmafia +v $nick 
  218.         notice $nick Welcome back! Alive players: $+(,$getalive,.) Round: $getgstatus $+ $readini(mdata.ini,game,round) 
  219.  
  220. alias getalive { 
  221.   var %z 1 
  222.   while (%z <= $ini(musers.ini,0)) { 
  223.     var %player $ini(musers.ini,%z) 
  224.     if ($readini(musers.ini,%player,alive) == 1) {  
  225.       var %m %m %player 
  226.     inc %z 
  227.   return %m 
  228.  
  229. alias startmafia { 
  230.   var %users $ini(musers.ini,0) 
  231.   if (%users < 3) { 
  232.     mmsg $1 Mafia has been cancelled due to a lack of players. You need at least 3 players to play the game. 
  233.     stopmafia $1 
  234.     halt 
  235.   writeini mdata.ini game status 2 
  236.   writeini mdata.ini game gstatus $iif(%users == 3,1,2) 
  237.   mmsg $1 Mafia has started! It is $+(,$getgstatus,0,.) 
  238.   mode $1 +m 
  239.   var %m Alive players: $+(,$getalive,.) 
  240.   if (%users > 3) { 
  241.     mvoice $1 - 
  242.   else { 
  243.     var %m %m It takes $+(,$floor($calc(%users / 2 + 1)),) votes to lynch. 
  244.   mmsg $1 %m 
  245.   hmake mids 14 
  246.   var %counter 1 
  247.   var %mafia $floor($calc(%users / 3)) 
  248.   var %mrb $iif(%mafia > 1,1,0) 
  249.   var %mrd $floor($calc(%mafia / 3)) 
  250.   var %trb $iif(%users > 6, $r(0,1), 0) 
  251.   var %tv $iif(%users > 6, 1, 0) 
  252.   var %td $iif(%users > 4, 1, 0) 
  253.   var %trd $iif(%users > 6 && %trb < 1, 1, 0) 
  254.   var %tc $floor($calc(%users / 8 + 1)) 
  255.   var %sk 1 
  256.   while (%counter <= %users) { 
  257.     var %id $r(1,%users) 
  258.     if ($hget(mids,%id) == $null) { 
  259.       if (%mafia > 0) { 
  260.         if (%mrb > 0) { 
  261.           var %role rb 
  262.           dec %mrb 
  263.         else if (%mrd > 0) { 
  264.           var %role rd 
  265.           dec %mrd 
  266.         else { 
  267.           var %role m 
  268.         dec %mafia 
  269.         var %alignment 2 
  270.         if ($r(1,4) == 1 && %sk > 0) { 
  271.           var %role sk 
  272.           var %alignment 0 
  273.           dec %sk 
  274.       else if (%trb > 0) { 
  275.         var %role rb 
  276.         var %alignment 1 
  277.         dec %trb 
  278.       else if (%trd > 0) { 
  279.         var %role rd 
  280.         var %alignment 1 
  281.         dec %trd 
  282.       else if (%tv > 0) { 
  283.         var %role v 
  284.         var %alignment 1 
  285.         dec %tv 
  286.       else if (%td > 0) { 
  287.         var %role d 
  288.         var %alignment 1 
  289.         dec %td 
  290.       else if (%tc > 0) { 
  291.         var %role $iif($r(1,3) != 3, c, ic) 
  292.         var %alignment 1 
  293.         dec %tc 
  294.       else { 
  295.         var %role t 
  296.         var %alignment 1 
  297.       writeini musers.ini $ini(musers.ini,%id) role %role 
  298.       writeini musers.ini $ini(musers.ini,%id) alignment %alignment 
  299.       writeini musers.ini $ini(musers.ini,%id) nightaction 0 
  300.       mmsg $1 $+(,$ini(musers.ini,%id),) is a $+(,$getrole(%role),,$chr(40),$getalignment(%alignment),$chr(41)) 
  301.       notice $ini(musers.ini,%id) $getrolepm(%role,%alignment) 
  302.       inc %counter 
  303.       hadd mids %id Used 
  304.     }   
  305.   hfree mids  
  306.  
  307. alias getrolepm { 
  308.   var %role $1 
  309.   var %alignment $2 
  310.   var %msg Night Actions: 
  311.   if (%role == rb) { 
  312.     var %msg %msg block [user] : Blocks [user] from using his/her night action 
  313.   else if (%role == rd) { 
  314.     var %msg %msg redirect [user] [target] : Changes [user]'s target to [target]. 
  315.   else if (%role == v) { 
  316.     var %msg %msg kill [user] : Kills [user]. 
  317.   else if (%role == d) {  
  318.     var %msg %msg protect [user] : Protects [user] from nightkills. 
  319.   else if (%role == c || %role == ic) {  
  320.     var %msg %msg inspect [user] : Inspects [user] to find out their alignment. Note: Results are not guaranteed to be accurate. 
  321.   else if (%role == sk) { 
  322.     var %msg %msg kill [user] : Kills [user]. 
  323.   else if (%role == t) { 
  324.     var %msg You do not have any special actions or abilities. 
  325.   if (%alignment == 2) { 
  326.     var %msg %msg mafiakill [user] : Kills [user]. Note: The mafia can only make ONE kill each night! 
  327.   return You are a $+(,$getrole(%role),,$chr(40),$getalignment(%alignment),$chr(41),.) %msg 
  328.  
  329. alias stopmafia { 
  330.   if ($readini(mdata.ini,game,gstatus) != 2) { 
  331.     mvoice $1 - 
  332.   mode $1 -m 
  333.   writeini mdata.ini game status 0 
  334.   var %z $ini(musers.ini,0) 
  335.   remini mdata.ini game stimer 
  336.   .remove musers.ini 
  337.   .remove mdata.ini 
  338.  
  339. alias mvoice { 
  340.   var %alive $getalive 
  341.   mode $1 $+($2,$str(v,$numtok(%alive,32))) %alive 
  342.  
  343. alias getgstatus { 
  344.   var %gstatus $readini(mdata.ini,game,gstatus) 
  345.   if (%gstatus == 1) return Morning 
  346.   else if (%gstatus == 2) return Night 
  347.   else return None 
  348.  
  349. alias getalignment { 
  350.   if ($1 == 0) return sk 
  351.   else if ($1 == 1) return town 
  352.   else if ($1 == 2) return mafia 
  353.   else return None 
  354.  
  355. alias getrole { 
  356.   if ($1 == rb) return Roleblocker 
  357.   else if ($1 == rd) return Redirector 
  358.   else if ($1 == v) return Vigilante 
  359.   else if ($1 == d) return Doctor 
  360.   else if ($1 == c) return Cop 
  361.   else if ($1 == ic && $2 != true) return Cop 
  362.   else if ($1 == ic) return Insane Cop 
  363.   else if ($1 == m) return Mafioso 
  364.   else if ($1 == sk) return Serial Killer 
  365.   else if ($1 == t) return Townie 
  366.   else return None  
  367.  

 
 

 
 
 
 
 
Written for RPM-Productions.org by Knoxious.co.uk, 2010.   [ Valid HTML5 ]
YOU NEED FLASH!   YOU NEED FLASH!