Advertisement
Fooksie

bootcamp44

Jul 19th, 2013
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.98 KB | None | 0 0
  1. mice=0
  2. round=0
  3. places=0
  4. data={
  5.     skips={}
  6.     }
  7. players={}
  8. admins={
  9.     "Betelgueze",
  10.     "Browndown",
  11.     "Charleezy",
  12.     "Colinzzd",
  13.     "Fxie",
  14.     "Hopmaster",
  15.     "Shamousey",
  16.     "Shininha",
  17.     "Simosc"
  18.     }
  19. skillmaps={
  20.     {   code="@2566248",
  21.         time=105,
  22.         medals={
  23.             {330,365,true},
  24.             {230,365,true},
  25.             {130,365,true}
  26.             }
  27.         },
  28.     {   code="@2589629",
  29.         medals={
  30.             {1120,375},
  31.             {980,375},
  32.             {880,375}
  33.             }
  34.         },
  35.     {   code="@4087474",
  36.         medals={
  37.             {140,170},
  38.             {380,50},
  39.             {740,200}
  40.             }
  41.         },
  42.     {   code="@4092254",
  43.         medals={
  44.             {110,60,true},
  45.             {360,60,true},
  46.             {680,60,true}
  47.             }
  48.         },
  49.     {   code="@4087721",
  50.         medals={
  51.             {290,140},
  52.             {590,140},
  53.             {710,140}
  54.             }
  55.         },
  56.     {   code="@4098337",
  57.         medals={
  58.             {410,120},
  59.             {500,120},
  60.             {700,120}
  61.             }
  62.         },
  63.     {   code="@4103105",
  64.         medals={
  65.             {670,240},
  66.             {130,110},
  67.             {720,110}
  68.             }
  69.         },
  70.     {   code="@4069077",
  71.         medals={
  72.             {120,70},
  73.             {390,70},
  74.             {760,70,true}
  75.             }
  76.         },
  77.     {   code="@4114121",
  78.         medals={
  79.             {505,80},
  80.             {625,80},
  81.             {745,80}
  82.             }
  83.         },
  84.     {   code="@4131345",
  85.         medals={
  86.             {320,320},
  87.             {580,320},
  88.             {750,320}
  89.             }
  90.         },
  91.     {   code="@4140045",
  92.         medals={
  93.             {520,125},
  94.             {650,275},
  95.             {730,365}
  96.             }
  97.         },
  98.     {   code="@4147347",
  99.         medals={
  100.             {320,270},
  101.             {515,270},
  102.             {740,270}
  103.             }
  104.         }
  105.     }
  106.  
  107. text={
  108.     greet="Welcome to %s, a better bootcamp.",
  109.     greetSub="As always, type %s if you need it. Enjoy your stay, newbie.",
  110.     tkJoin="Timekeeper %s has joined.",
  111.     iEmpty="You must type a command!",
  112.     timeAdd="%d more seconds, just for you!",
  113.     timeMax="%d minutes isn't enough?!",
  114.     timeWait="Wait 'til next round!",
  115.     timeError="Time must be a number, dummy!",
  116.     skipVote="Your vote has been added.",
  117.     skipMap="The mice have spoken! This map will end in %d seconds...",
  118.     skipVoted="You already voted!",
  119.     skipAlready="The map is already being skipped!",
  120.     betPlace="Think %s can win eh? We'll see...",
  121.     betWon="You got %d points for your lucky bet!",
  122.     betLose="Lucked out!",
  123.     betLate="You can only place bets in the first %d seconds!",
  124.     betBroke="You need at least %d points to place a bet!",
  125.     betNobody="Hey buddy, you can't bet on people who aren't here!",
  126.     wonRecord="New personal record!",
  127.     wonLegit="%s completed the map without checkpoints!",
  128.     topTime="The top time for %s was %s by %s!",
  129.     checkpointSet="Checkpoint set!",
  130.     checkpointError="Stand still to set a checkpoint!",
  131.     checkpointCleared="Checkpoint cleared!",
  132.     checkpointOverload="You died pretty fast! If you set a bad checkpoint, press %s to clear it!",
  133.     skillmap="Think you got what it takes?",
  134.     skillmapCountdown="Get ready! Timed skillmap in %d...",
  135.     medal1="bronze",
  136.     medal2="silver",
  137.     medal3="gold",
  138.     medalGet="%s just scored the %s medal!"
  139.     }
  140.  
  141. --new Player
  142. Player=function(name)
  143.     return {
  144.         name=name,
  145.         topscore=0,
  146.         toptimes=0,
  147.         spawn=os.time(),
  148.         settings={
  149.             instaspawn=true,
  150.             checkpoints=true
  151.             },
  152.         checkpoint={
  153.             x=0,
  154.             y=0,
  155.             cheese=false,
  156.             set=false,
  157.             uses=0,
  158.             last=0
  159.             },
  160.         CPset=P_CPset,
  161.         CPuse=P_CPuse
  162.         }
  163.     end
  164.    
  165. --Player:CPset(x,y,cheese)
  166. function P_CPset(p)
  167.     local me=tfm.get.room.playerList[p.name]
  168.     p.checkpoint.x=me.x
  169.     p.checkpoint.y=me.y
  170.     p.checkpoint.cheese=me.hasCheese
  171.     p.checkpoint.set=true
  172.     ui.addTextArea(4,"",p.name,me.x-2,me.y-2,4,4,0x44cc44,0xffffff,0.5)
  173.     end
  174.    
  175. --Player:CPuse(died)
  176. function P_CPuse(p,died)
  177.     p.checkpoint.uses=p.checkpoint.uses+1
  178.     tfm.exec.movePlayer(p.name,p.checkpoint.x,p.checkpoint.y,false,1,1,false)
  179.     if p.checkpoint.cheese then
  180.         system.newTimer(function()
  181.             tfm.exec.giveCheese(p.name)
  182.             end,1000)
  183.         end
  184.     if died then
  185.         p.checkpoint.last=os.time()
  186.         end
  187.     end
  188.  
  189. --Sign my ass
  190. function isAdmin(name)
  191.     for i=1,#admins do
  192.         if admins[i]==name then
  193.             return true
  194.             end
  195.         end
  196.     return false
  197.     end
  198.  
  199. --Sign my ass
  200. function haveAdmin()
  201.     for i=1,#admins do
  202.         if tfm.get.room.playerList[admins[i]] then
  203.             return true
  204.             end
  205.         end
  206.     return false
  207.     end
  208.  
  209. --Olympics automated
  210. function checkMedals(name,x,y)
  211.     if timeSpent>=3 then
  212.         for i=1,#skillmap.medals do
  213.             local medal=skillmap.medals[i]
  214.             if math.abs(x-medal.x)<15 and math.abs(y-medal.y)<15 and (not medal.cheese or tfm.get.room.playerList[name].hasCheese) then
  215.                 tfm.exec.chatMessage("<J>"..text.medalGet:format(name,"<N>"..text["medal"..medal.id].."<J>"))
  216.                 --tfm.exec.setPlayerScore(name,medal.id*10,true)
  217.                 end
  218.             end
  219.         end
  220.     end
  221.  
  222. --New beginnings
  223. function eventNewGame()
  224.     bets={}
  225.     voteskip={}
  226.     votetime={}
  227.     places=0
  228.     timeSpent=0
  229.     timeLeft=3*60
  230.     tfm.exec.setGameTime(timeLeft)
  231.     ui.removeTextArea(2)
  232.     ui.removeTextArea(3)
  233.     ui.removeTextArea(4)
  234.     skillmap=nil
  235.     local timestamp=os.time()
  236.     for name,player in pairs(players) do
  237.         players[name].spawn=timestamp
  238.         players[name].checkpoint.set=false
  239.         end
  240.     for name,player in pairs(tfm.get.room.playerList) do
  241.         if player.score>players[name].topscore then
  242.             players[name].topscore=player.score
  243.             end
  244.         tfm.exec.setPlayerScore(name,-math.floor(player.score/10),true)
  245.         end
  246.     local wind,gravity=0,10
  247.     if tfm.get.room.xmlMapInfo then
  248.         for w,g in tfm.get.room.xmlMapInfo.xml:gmatch('<P[^/]+G="([-%d.]+),([-%d.]+)"') do
  249.             wind,gravity=w,g
  250.             end
  251.         local medals={}
  252.         for object in tfm.get.room.xmlMapInfo.xml:gmatch("<O [^/]+/>") do
  253.             type=tonumber(object:match('C="(%d+)"'))
  254.             if type==14 or type==22 or type==11 then
  255.                 table.insert(medals,{
  256.                     x=tonumber(object:match('X="(%d+)"')) or 0,
  257.                     y=tonumber(object:match('Y="(%d+)"')) or 0,
  258.                     id=type==11 and 1 or type==14 and 2 or 3
  259.                     })
  260.                 end
  261.             end
  262.         if #medals==3 then
  263.             skillmap={
  264.                 code=tfm.get.room.xmlMapInfo.mapCode,
  265.                 medals=medals
  266.                 }
  267.             tfm.exec.chatMessage("<CH>"..text.skillmap)
  268.             end
  269.         end
  270.     tfm.exec.setUIShamanName("<N>Wind <CH>"..wind.."<N> Gravity <CH>"..gravity)
  271.     grounds={}
  272.     if tfm.get.room.xmlMapInfo then
  273.         local ground,p
  274.         local gAttrs={"c","T","X","Y","L","H"}
  275.         local gTypes={"Wood","Ice","Trampoline","Lava","Chocolate","Earth","Grass","Sand","Cloud","Water","Stone"}
  276.         local gProps={"Dynamic","Mass","Friction","Restitution","Rotation"}
  277.         for sol in tfm.get.room.xmlMapInfo.xml:gmatch("<S [^/]+/>") do
  278.             p=0
  279.             ground={
  280.                 id=#grounds,
  281.                 P=tostring(sol:match('P="([^"]+)"'))
  282.                 }
  283.             for i,attribute in ipairs(gAttrs) do
  284.                 ground[attribute]=tonumber(sol:match(attribute..'="([-%d.]+)"')) or 0
  285.                 end
  286.             if ground.c~=2 and ground.c~=4 then
  287.                 if gTypes[ground.T+1] then
  288.                     ground.T=gTypes[ground.T+1]
  289.                     end
  290.                 for property in ground.P:gmatch("[^,]+") do
  291.                     p=p+1
  292.                     if gProps[p] then
  293.                         ground[gProps[p]]=property
  294.                     else
  295.                         break
  296.                         end
  297.                     end
  298.                 table.insert(grounds,1,ground)
  299.                 end
  300.             end
  301.         end
  302.     end
  303.  
  304. --A continuum
  305. function eventLoop(time,remaining,queue)
  306.     timeSpent=time/1000
  307.     timeLeft=remaining/1000
  308.     if remaining<=500 then
  309.         local map="#13"
  310.         if queue then
  311.             map=queue
  312.         else
  313.             round=round+1
  314.             local modulo=math.fmod(round,7)
  315.             if modulo==2 or modulus==5 then
  316.                 map="#3"
  317.             elseif modulo==6 then
  318.                 --map=skillmaps[math.random(#skillmaps)]
  319.                 end
  320.             end
  321.         if toptime then
  322.             local player=players[toptime.name]
  323.             player.toptimes=player.toptimes+1
  324.             tfm.exec.chatMessage("<J>"..text.topTime:format(tfm.get.room.currentMap,"<N>"..(toptime.time/1000).."<J>",toptime.name))
  325.             toptime=nil
  326.             end
  327.         tfm.exec.setGameTime(5)
  328.         tfm.exec.newGame(map)
  329.         end
  330.     end
  331.  
  332. --Welcome to the jungle
  333. function eventNewPlayer(name)
  334.     mice=mice+1
  335.     tfm.exec.chatMessage("<VP>"..text.greet:format("<N>bootcamp44<VP>"),name)
  336.     tfm.exec.chatMessage("<T>"..text.greetSub:format("<N>!help<T>"),name)
  337.     if isAdmin(name) then
  338.         tfm.exec.chatMessage("<V>"..text.tkJoin:format(name))
  339.         end
  340.     players[name]=Player(name)
  341.     system.bindMouse(name)
  342.     for i,key in ipairs({8,46,65,69,70}) do
  343.         tfm.exec.bindKeyboard(name,key,true,true)
  344.         end
  345.     end
  346.  
  347. --Welcome to suburbia
  348. function eventPlayerLeft(name)
  349.     mice=mice-1
  350.     --players[name]=nil
  351.     end
  352.  
  353. --Not gravity master material
  354. function eventPlayerDied(name)
  355.     if players[name].settings.instaspawn then
  356.         tfm.exec.respawnPlayer(name)
  357.         end
  358.     end
  359.  
  360. --Welcome back
  361. function eventPlayerRespawn(name)
  362.     local player=players[name]
  363.     player.spawn=os.time()
  364.     if player.checkpoint.set then
  365.         if player.spawn-player.checkpoint.last<1000 then
  366.             tfm.exec.chatMessage("<BL>"..text.checkpointOverload:format("<N>Q<BL>"),name)
  367.         elseif timeLeft>5 then
  368.             player:CPuse(true)
  369.             end
  370.     else
  371.         player.checkpoint.uses=0
  372.         end
  373.     end
  374.  
  375. --Good job champ
  376. function eventPlayerWon(name)
  377.     local player=players[name]
  378.     ui.removeTextArea(4,name)
  379.     player.checkpoint.set=false
  380.     if player.checkpoint.uses>0 then
  381.         tfm.exec.setPlayerScore(name,math.max(10-player.checkpoint.uses,2),true)
  382.         player.checkpoint.uses=0
  383.     else
  384.         local wintime=os.time()-player.spawn
  385.         if not toptime or wintime<toptime.time then
  386.             toptime={
  387.                 name=name,
  388.                 time=wintime
  389.                 }
  390.             end
  391.         places=places+1
  392.         tfm.exec.setPlayerScore(name,10+math.max(0,8-places*2),true)
  393.         if places==1 then
  394.             tfm.exec.chatMessage("<J>"..text.wonLegit:format(name))
  395.             local winners={}
  396.             local winnings=0
  397.             for player,bet in pairs(bets) do
  398.                 if bet==name then
  399.                     table.insert(winners,player)
  400.                 elseif tfm.get.room.playerList[player] then
  401.                     winnings=winnings+5
  402.                     tfm.exec.setPlayerScore(player,-5,true)
  403.                     tfm.exec.chatMessage("<BL>"..text.betLose,player)
  404.                     end
  405.                 end
  406.             winnings=math.ceil(winnings/#winners)+1
  407.             for i=1,#winners do
  408.                 tfm.exec.setPlayerScore(winners[i],winnings,true)
  409.                 tfm.exec.chatMessage("<VP>"..text.betWon:format(winnings),winners[i])
  410.                 end
  411.             end
  412.         end
  413.     if player.settings.instaspawn then
  414.         tfm.exec.respawnPlayer(name)
  415.         end
  416.     end
  417.  
  418. --Floor check
  419. function eventMouse(name,x,y)
  420.     local theta,c,s,cx,cy
  421.     for i,ground in ipairs(grounds) do
  422.         theta=math.rad(ground.Rotation)
  423.         c,s=math.cos(-theta),math.sin(-theta)
  424.         cx=ground.X+c*(x-ground.X)-s*(y-ground.Y)
  425.         cy=ground.Y+s*(x-ground.X)+c*(y-ground.Y)
  426.         if math.abs(cx-ground.X)<ground.L/2 and math.abs(cy-ground.Y)<ground.H/2 then
  427.             ui.addTextArea(2,"<font size='12'>"
  428.                 .."<N>Ground ID "..ground.id
  429.                 .."\n"
  430.                 .."\n<N>Type <VP>"..ground.T
  431.                 .."\n<N>Friction <VP>"..ground.Friction
  432.                 .."\n<N>Restitution <VP>"..ground.Restitution
  433.                 .."\n"
  434.                 .."\n<N>X <VP>"..ground.X
  435.                 .."\n<N>Y <VP>"..ground.Y
  436.                 .."\n<N>Width <VP>"..ground.L
  437.                 .."\n<N>Height <VP>"..ground.H
  438.                 .."\n<N>Rotation <VP>"..ground.Rotation
  439.                 .."</font>"
  440.                 ,name,20,40,120,nil,0x324650,0x212F36,0.8)
  441.             return
  442.             end
  443.         end
  444.     ui.removeTextArea(2,name)
  445.     end
  446.  
  447. --Checkpoint newbs
  448. function eventKeyboard(name,key,down,x,y)
  449.     local player=players[name]
  450.     if key==69 then
  451.         if skillmap then
  452.             checkMedals(name,x,y)
  453.         elseif player.settings.checkpoints and timeLeft>5 and not tfm.get.room.playerList[name].isJumping then
  454.             player:CPset()
  455.             end
  456.     elseif key==70 then
  457.         if player.checkpoint.set then
  458.             if tfm.get.room.playerList[name].hasCheese and not player.checkpoint.cheese then
  459.                 tfm.exec.killPlayer(name)
  460.             elseif timeLeft>5 then
  461.                 player:CPuse()
  462.                 end
  463.             end
  464.     elseif key==65 then
  465.         player.checkpoint.set=false
  466.         ui.removeTextArea(4,name)
  467.     elseif key==8 or key==46 then
  468.         tfm.exec.killPlayer(name)
  469.         end
  470.     end
  471.  
  472. --Say what?
  473. function eventChatCommand(name,message)
  474.     local args={}
  475.     local admin=isAdmin(name)
  476.     for arg in message:gmatch("[^%s]+") do
  477.         table.insert(args,arg:lower())
  478.         end
  479.     message=message:match("%s(.*)") or ""
  480.     if args[1]=="i" then
  481.         if message~="" then
  482.             eventChatCommand(name,message)
  483.         else
  484.             tfm.exec.chatMessage("<R>"..text.iEmpty,name)
  485.             end
  486.     elseif args[1]=="blind" then
  487.         if args[2]=="off" then
  488.             ui.removeTextArea(3,name)
  489.         else
  490.             ui.addTextArea(3,"",name,0,0,800,400,0x242424,0x242424,1)
  491.             end
  492.     elseif args[1]=="help" then
  493.         ui.addPopup(1,0,"<font size='16'>Bootcamp44 Stuff</font><font size='12'>\n\n"..table.concat({
  494.             "Press <i>E</i> to set a checkpoint",
  495.             "Press <i>F</i> to go to a checkpoint",
  496.             "Press <i>Q</i> to clear a checkpoint",
  497.             "Press <i>backspace</i> to die",
  498.             "Type <i>!time</i> to add time to the current map\nType <i>!skip</i> to skip the current map",
  499.             "Click on a ground to view its properties\nClick somewhere else to make the popup go away",
  500.             },"\n\n").."</font>",name,200,80,400)
  501.     elseif args[1]=="timekeepers" then
  502.         local output,haveAdmin="<VP>Timekeepers: <N>",false
  503.         for i=1,#admins do
  504.             output=output..admins[i]
  505.             if tfm.get.room.playerList[admins[i]] then
  506.                 output=output.."*"
  507.                 haveAdmin=true
  508.                 end
  509.             if i~=#admins then
  510.                 output=output..", "
  511.                 end
  512.             end
  513.         tfm.exec.chatMessage(output,name)
  514.         if haveAdmin then
  515.             tfm.exec.chatMessage("<VP><font size='10'> * online in this room!</font>",name)
  516.             end
  517.     elseif args[1]=="enable" or args[1]=="disable" then
  518.         if players[name].settings[args[2]] then
  519.             local toggle=args[1]=="enable"
  520.             players[name].settings[args[2]]=toggle
  521.             toggle=toggle and "Enabled" or "Disabled"
  522.             tfm.exec.chatMessage(toggle.." : "..args[2],name)
  523.             end
  524.     elseif args[1]=="bet" then
  525.         if timeSpent<30 then
  526.             if tfm.get.room.playerList[name].score>=5 then
  527.                 local player=args[2] and args[2]:gsub("^%l",string.upper)
  528.                 if tfm.get.room.playerList[player] then
  529.                     bets[name]=player
  530.                     tfm.exec.chatMessage("<VP>"..text.betPlace:format(player),name)
  531.                 else
  532.                     tfm.exec.chatMessage("<R>"..text.betNobody,name)
  533.                     end
  534.             else
  535.                 tfm.exec.chatMessage("<R>"..text.betBroke:format(5),name)
  536.                 end
  537.         else
  538.             tfm.exec.chatMessage("<R>"..text.betLate:format(30),name)
  539.             end
  540.     elseif args[1]=="stats" then
  541.         local toptimes,topscores={},{}
  542.         for name,player in pairs(players) do
  543.             table.insert(toptimes,{
  544.                 name=name,
  545.                 value=player.toptimes
  546.                 })
  547.             table.insert(topscores,{
  548.                 name=name,
  549.                 value=player.topscore
  550.                 })
  551.             end
  552.         table.sort(toptimes,function(a,b)
  553.             return a.value>b.value
  554.             end)
  555.         table.sort(topscores,function(a,b)
  556.             return a.value>b.value
  557.             end)
  558.         local ttString,tsString={},{}
  559.         for i=1,math.min(5,#toptimes) do
  560.             table.insert(ttString,"<li>"..toptimes[i].value.." - "..toptimes[i].name.."</li>")
  561.             table.insert(tsString,"<li>"..topscores[i].value.." - "..topscores[i].name.."</li>")
  562.             end
  563.         ui.addPopup(1,0,"<font size='16'>Temporary Stats</font><font size='12'>"
  564.             .."\n\nTop Times\n<ul>"..table.concat(ttString).."</ul>"
  565.             .."\n\nHigh Scores\n<ul>"..table.concat(tsString).."</ul>"
  566.             .."</font>",name,300,80,200)
  567.     elseif args[1]=="die" then
  568.         tfm.exec.killPlayer(name)
  569.     elseif args[1]=="time" then
  570.         if args[2] and admin then
  571.             local time=tonumber(args[2])
  572.             if time then
  573.                 tfm.exec.setGameTime(time*(args[3]=="min" and 60 or 1))
  574.             else
  575.                 tfm.exec.chatMessage("<R>"..text.timeError,name)
  576.                 end
  577.         elseif (not skillmap or not skillmap.time) and not votetime[name] and not voteskip.set then
  578.             votetime[name]=true
  579.             local votes=0
  580.             for name,vote in pairs(votetime) do
  581.                 votes=votes+1
  582.                 end
  583.             if votes<=12 then
  584.                 tfm.exec.setGameTime(timeLeft+30)
  585.                 tfm.exec.chatMessage("<J>"..text.timeAdd:format(30),name)
  586.             else
  587.                 tfm.exec.chatMessage("<R>"..text.timeMax:format(9),name)
  588.                 end
  589.         else
  590.             tfm.exec.chatMessage("<R>"..text.timeWait,name)
  591.             end
  592.     elseif args[1]=="skip" then
  593.         if admin and args[2]=="now" then
  594.             eventLoop(0,0)
  595.         elseif voteskip.set then
  596.             tfm.exec.chatMessage("<R>"..text.skipAlready,name)
  597.         else
  598.             for i,player in ipairs(voteskip) do
  599.                 if player==name then
  600.                     tfm.exec.chatMessage("<R>"..text.skipVoted,name)
  601.                     return
  602.                     end
  603.                 end
  604.             table.insert(voteskip,name)
  605.             tfm.exec.chatMessage("<BL>"..text.skipVote,name)
  606.             if #voteskip>=math.ceil(mice/2) then
  607.                 tfm.exec.chatMessage("<J>"..text.skipMap:format(10))
  608.                 tfm.exec.setGameTime(10)
  609.                 voteskip.set=true
  610.                 local map=tfm.get.room.currentMap
  611.                 if not data.skips[map] then
  612.                     data.skips[map]=1
  613.                 else
  614.                     data.skips[map]=data.skips[map]+1
  615.                     end
  616.                 end
  617.             end
  618.     elseif args[1]=="get" then
  619.         if args[2]=="skipdata" then
  620.             local output={}
  621.             for map,skips in pairs(data.skips) do
  622.                 table.insert(output,map.." - "..skips.." times")
  623.                 end
  624.             tfm.exec.chatMessage(table.concat(output,"\n"),name)
  625.             end
  626.     elseif admin then
  627.         if args[1]=="tk" then
  628.             tfm.exec.chatMessage("<ROSE><b>[Timekeeper]</b><N> "..message)
  629.         elseif args[1]=="tkc" then
  630.             for i=1,#admins do
  631.                 tfm.exec.chatMessage("<ROSE>• <VI>["..name.."]<ROSE> "..message,admins[i])
  632.                 end
  633.         elseif args[1]=="play" then
  634.             eventLoop(0,0,args[2])
  635.         elseif args[1]=="shaman" then
  636.             tfm.exec.setShaman(name)
  637.         elseif args[1]=="test" then
  638.             tfm.exec.chatMessage(" > "..message:gsub("&lt;","<"):gsub("&gt;",">"))
  639.         elseif args[1]=="popup" then
  640.             ui.addPopup(2,0,message:gsub("&lt;","<"):gsub("&gt;",">"),name,300,80,200)
  641.             end
  642.         end
  643.     end
  644.  
  645. --Hide spammands
  646. for i,command in ipairs({"i","tk","tkc","die","get","set","help","timekeepers"}) do
  647.     system.disableChatCommandDisplay(command)
  648.     end
  649.  
  650. --Disability check
  651. tfm.exec.disableAutoScore(true)
  652. tfm.exec.disableAutoShaman(true)
  653. tfm.exec.disableAutoNewGame(true)
  654.  
  655. --Let's go!
  656. eventLoop(0,0)
  657. for name,player in pairs(tfm.get.room.playerList) do
  658.     eventNewPlayer(name)
  659.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement