Advertisement
Guest User

#CHBC 5.2.0 - Basterfeild

a guest
Oct 22nd, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.28 KB | None | 0 0
  1. ------Global Options----
  2.  
  3.              --DisableCommandDisplays--
  4.  
  5. system.disableChatCommandDisplay("cheese",true)
  6. system.disableChatCommandDisplay("win",true)
  7. system.disableChatCommandDisplay("mort",true)
  8. system.disableChatCommandDisplay("left1",true)
  9. system.disableChatCommandDisplay("left2",true)
  10. system.disableChatCommandDisplay("left3",true)
  11. system.disableChatCommandDisplay("left4",true)
  12. system.disableChatCommandDisplay("jump1",true)
  13. system.disableChatCommandDisplay("jump2",true)
  14. system.disableChatCommandDisplay("jump3",true)
  15. system.disableChatCommandDisplay("jump4",true)
  16. system.disableChatCommandDisplay("right4",true)
  17. system.disableChatCommandDisplay("right3",true)
  18. system.disableChatCommandDisplay("right2",true)
  19. system.disableChatCommandDisplay("right1",true)
  20. system.disableChatCommandDisplay("off",true)
  21. system.disableChatCommandDisplay("help",true)
  22. system.disableChatCommandDisplay("pomoc",true)
  23. tfm.exec.disableAutoTimeLeft (true)
  24. tfm.exec.disableAutoShaman(true)
  25. tfm.exec.disableAutoNewGame(true)
  26. tfm.exec.disableAutoScore(false)
  27. tfm.exec.disableAfkDeath(true)
  28.  
  29. -----Maps-----
  30.  
  31. maps={"@1427980","@161434","@216173","@2178800 ","@172621","@500000","@3908151","@168754","@512887","@306365","@1384078","@2130169","@410045","@3038589","@528032 ","@511136","@166032","@315666 ","@162482","@684566","@171480","@166271","@587501","@467137","@113156","@166333","@172605","@169228","@250153"}
  32. tfm.exec.newGame(maps[math.random(#maps)])
  33. function eventLoop(time,remaining)
  34.     if remaining<=0 then
  35.         tfm.exec.newGame(maps[math.random(#maps)])
  36.     end
  37. end
  38.  
  39. ---Fly by Shamousey--
  40.  
  41. function eventNewPlayer(name)
  42.     tfm.exec.bindKeyboard(name,32,true,true)
  43. end
  44.  
  45. function eventKeyboard(name,key,down,x,y)
  46.     if key==32 then
  47.         tfm.exec.movePlayer(name,0,0,true,0,-60,false)
  48.  
  49.     end
  50. end
  51.  
  52.  
  53. ----New Player----
  54.  
  55. function eventNewPlayer(playerName)
  56.  
  57.          --Callbacks Yes, Easter Egg.---
  58.  
  59.        ui.addTextArea(11, '<a href="event:left2"><CH>←2</CH></a>', playerName, 100, 25, 25, 15, nil, nil, 0.5)
  60.        ui.addTextArea(10, '<a href="event:left1"><CH>←1</CH></a>', playerName, 60, 25, 25, 15, nil, nil, 0.5)
  61.        ui.addTextArea(13, '<a href="event:left3"><CH>←3</CH></a>', playerName, 140, 25, 25, 15, nil, nil, 0.5)
  62.        ui.addTextArea(12, '<a href="event:left4"><CH>←4</CH></a>', playerName, 180, 25, 25, 15, nil, nil, 0.5)
  63.  
  64.  
  65.        ui.addTextArea(21, '<a href="event:right1"><CH>→1</CH></a>', playerName, 260, 25, 25, 15, nil, nil, 0.5)
  66.        ui.addTextArea(22, '<a href="event:right2"><CH>→2</CH></a>', playerName, 300, 25, 25, 15, nil, nil, 0.5)
  67.        ui.addTextArea(23, '<a href="event:right3"><CH>→3</CH></a>', playerName, 340, 25, 25, 15, nil, nil, 0.5)
  68.        ui.addTextArea(24, '<a href="event:right4"><CH>→4</CH></a>', playerName, 380, 25, 25, 15, nil, nil, 0.5)
  69.  
  70.  
  71.        ui.addTextArea(31, '<a href="event:jump1"><CH>↑1</CH></a>', playerName, 15, 60, 25, 15, nil, nil, 0.5)
  72.        ui.addTextArea(32, '<a href="event:jump2"><CH>↑2</CH></a>', playerName, 15, 100, 25, 15, nil, nil, 0.5)
  73.        ui.addTextArea(33, '<a href="event:jump3"><CH>↑3</CH></a>', playerName, 15, 140, 25, 15, nil, nil, 0.5)
  74.        ui.addTextArea(34, '<a href="event:jump4"><CH>↑4</CH></a>', playerName, 15, 180, 25, 15, nil, nil, 0.5)
  75.  
  76.        ui.addTextArea(1111, '<a href="event:on"><j><B>ON</B></J></a>', playerName, 0, 220, 25, 15, nil, nil, nil)
  77.        ui.addTextArea(1000, '<a href="event:off"><r><B>OFF</B></R></a>', playerName, 0, 260, 30, 15, nil, nil, nil)
  78.         tfm.exec.respawnPlayer(playerName)
  79.          tfm.exec.setUIShamanName("<J>Bootcamp</J>")
  80.                  ui.addPopup(1,0,"<b><font size='20'color='#E9BF23'>Welcome in <i><u>Cheat Bootcamp!</u></i></font></b><br /><br /><font size='12'color='#13A8B7'><b>To get informations for this room - click  <B><font color='#98E2EB'>[•]</CH></B></font><color='#13A8B7'> in left map corner.",playerName,175,200,450)
  81.                     ui.addTextArea(0, '<a href="event:menu"><b><CH>[<u>o</u><CH>]</CH></b></a>', playerName, 15, 25, 25, 20, nil, nil, nil)
  82. end
  83.  
  84. ----Main options----
  85.  
  86. function main()
  87.  
  88.         tfm.exec.disableAllShamanSkills(true)
  89.         tfm.exec.disableAutoNewGame (true);
  90.         tfm.exec.disableAutoShaman(true);
  91.         tfm.exec.disableAutoTimeLeft (true);
  92.         tfm.exec.disableAutoScore (true);
  93.         tfm.exec.disableAfkDeath (true);
  94. end
  95.  
  96. ----New Game----
  97.  
  98. function eventNewGame()
  99.  
  100.         tfm.exec.setUIMapName("<CH>Cheat")
  101.         tfm.exec.setGameTime (60*6);
  102.         tfm.exec.setUIShamanName ("<J>Bootcamp</J>")
  103. end
  104.  
  105. ---Commands---
  106.  
  107. function eventChatCommand(playerName,command)
  108.  
  109.          if command=="mort" then
  110.         tfm.exec.killPlayer(playerName)
  111.  
  112.      elseif command=="cheese" then
  113.     tfm.exec.giveCheese(playerName)
  114.  
  115.      elseif command=="win" then
  116.     tfm.exec.giveCheese(playerName)
  117.     tfm.exec.playerVictory(playerName)
  118.        
  119.               --JUMP--
  120.  
  121.        elseif command=="jump1" then
  122.            tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  123.  
  124.        elseif command=="jump2" then
  125.            tfm.exec.movePlayer(playerName,0,0,true,0,-100,false)
  126.  
  127.        elseif command=="jump3" then
  128.            tfm.exec.movePlayer(playerName,0,0,true,0,-150,false)
  129.  
  130.        elseif command=="jump4" then
  131.            tfm.exec.movePlayer(playerName,0,0,true,0,-150,false)
  132.  
  133.                   --LEFT--
  134.  
  135.         elseif command=="left1" then
  136.            tfm.exec.movePlayer(playerName,0,0,true,-50,0,false)
  137.  
  138.         elseif command=="left2" then
  139.            tfm.exec.movePlayer(playerName,0,0,true,-100,0,false)
  140.  
  141.         elseif command=="left3" then
  142.            tfm.exec.movePlayer(playerName,0,0,true,-150,0,false)
  143.  
  144.         elseif command=="left4" then
  145.            tfm.exec.movePlayer(playerName,0,0,true,-200,0,false)
  146.  
  147.                  --RIGHT--
  148.  
  149.  
  150.         elseif command=="right1" then
  151.            tfm.exec.movePlayer(playerName,0,0,true,50,0,false)
  152.  
  153.         elseif command=="right2" then
  154.            tfm.exec.movePlayer(playerName,0,0,true,100,0,false)
  155.  
  156.         elseif command=="right3" then
  157.            tfm.exec.movePlayer(playerName,0,0,true,150,0,false)
  158.  
  159.         elseif command=="right4" then
  160.            tfm.exec.movePlayer(playerName,0,0,true,200,0,false)
  161. end
  162. end
  163.  
  164. ---Player Won/Player Died---
  165.  
  166. function eventPlayerWon(name)
  167.     tfm.exec.respawnPlayer(name)
  168. end
  169.  
  170. function eventPlayerDied(name)
  171.     tfm.exec.respawnPlayer(name)
  172. end
  173.  
  174. ---Event with mouse----
  175.  
  176. ----NOL----
  177.  
  178. ---Event with Emotes----
  179.  
  180. function eventEmotePlayed(playerName,emote)
  181.     if emote==3 then
  182.         tfm.exec.giveCheese(playerName)
  183.         tfm.exec.playerVictory(playerName)
  184.     end
  185. end
  186.  
  187. --Player=All--
  188.  
  189.  
  190. for name,player in pairs(tfm.get.room.playerList) do
  191.     eventNewPlayer(name)
  192. end
  193.  
  194. ---With LUA started---
  195.  
  196. print(" <BR /><T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=-<T>=<N>-<T>=<BR /><CH>#CheatBootcamp</CH><J>By Basterfeild<BR /><T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=<T>-<N>=-<T>=<N>-<T>=")
  197.  
  198. ---Callbacks----
  199.  
  200. ui.addTextArea(0, '<a href="event:menu"><b><CH>[<u>o</u><CH>]</CH></b></a>', playerName, 15, 25, 25, 20, nil, nil, nil)
  201.  
  202. function eventTextAreaCallback(id, playerName, text)
  203.  
  204.     if text == 'menu' then
  205.     ui.addTextArea(1, '<font size="18">Welcome in <B><font face ="Elephant"><J>#CheatBootcamp!</J></font></B></font><BR /><font size="12">There, <B>You</B> have <j><b>cheats!</b></j>Press <B><a href="event:win">Kiss</a></b>, to <j><b>win!</b></j>Press <b>Space</b>, to <j><B>fly!</B></j><BR /><B>By</B> <j><i><B>Basterfeild</B>!</i></j><BR /><a href="event:global"><T><B>Page 2</B></T></a><BR /><a href="event:exit"><R><B>Exit</R></a>', playerName, 40, 40, 300, 200, nil, 0xD97922, nil)
  206.  
  207.     else if text == 'exit' then
  208.     ui.removeTextArea(1, playerName)
  209.  
  210.     else if text == 'win' then
  211.     tfm.exec.giveCheese(playerName)
  212.     tfm.exec.playerVictory(playerName)
  213.  
  214.     else if text == 'global' then
  215.     ui.addTextArea(2, '<font size="20"><J><B><I>Options</I></B></J></font><N><BR /><a href="event:cheese"><font size="12"><b>Give cheese</b></a><BR /><a href="event:win2"><b>Give win</b></a><BR /><a href="event:jump"><B>Jump</B></a><BR /><a href="event:die"><B>Die</B></a><BR /><BR /><a href="event:m"><T><B>Page 1</B></T></a><a href="event:commands"><T><B>Page 3</B></T></a><BR /><BR /></a><a href="event:exit2"><R><B>Exit</R></a><BR />',playerName, 40, 40, 300, 200, nil, 0xD97922, nil)
  216.         ui.removeTextArea(1, playerName)
  217.  
  218.     else if text == 'cheese' then
  219.     tfm.exec.giveCheese(playerName)
  220.  
  221.          else if text == 'exit2' then
  222.     ui.removeTextArea(2, playerName)
  223.  
  224.        else if text == 'win2' then
  225.     tfm.exec.giveCheese(playerName)
  226.     tfm.exec.playerVictory(playerName)
  227.  
  228.        else if text == 'jump' then
  229.             tfm.exec.movePlayer(playerName,0,0,true,0,-80,false)
  230.  
  231.         else if text == 'die' then
  232.             tfm.exec.killPlayer(playerName)
  233.  
  234.         else if text == 'm' then
  235.              ui.addTextArea(1, '<font size="18">Welcome in <B><font face ="Elephant"><J>#CheatBootcamp!</J></font></B></font><BR /><font size="12">There, <B>You</B> have <j><b>cheats!</b></j>Press <B><a href="event:win">Kiss</a></b>, to <j><b>win!</b></j>Press <b>Space</b>, to <j><B>fly!</B></j><BR /><B>By</B> <j><i><B>Basterfeild</B>!</i></j><BR /><a href="event:global"><T><B>Page 2</B></T></a><BR /><a href="event:exit"><R><B>Exit</R></a>', playerName, 40, 40, 300, 200, nil, 0xD97922, nil)
  236.        ui.removeTextArea(2, playerName)
  237.  
  238.         else if text == 'commands' then
  239.               ui.addTextArea(3, '<font size="20"><J><B><I>Commands</I></B></J></font><BR /><font size="12"><a href="event:die"><B>!mort</B></a> to die.<BR /><a href="event:cheese"><B>!cheese</B></a> to get cheese.<BR /><a href="event:win2"><B>!win</B></a> to win.<BR /><BR /><a href="event:jump1"><B>!jump1</B></a> to jump (1 lvl)<BR /><a href="event:jump2"><B>!jump2</B></a> to jump (2 lvl)<BR /><a href="event:jump3"><B>!jump3</B></a> to jump (3 lvl)<BR /><a href="event:jump4"><B>!jump4</B></a> to jump (4 lvl)<BR /><BR /><a href="event:left1"><B>!left1</B></a> to go left (1 lvl)<BR /><a href="event:left2"><B>!left2</B></a> to go left (2 lvl)<BR /><a href="event:left3"><B>!left3</B></a> to go left (3 lvl)<BR /><a href="event:left4"><B>!left4</B></a> to go left (4 lvl)<BR /><BR /><a href="event:right1"><B>!right1</B></a> to go right (1 lvl)<BR /><a href="event:right2"><B>!right2</B></a> to go right (2 lvl)<BR /><a href="event:right3"><B>!right3</B></a> to go right (3 lvl)<BR /><a href="event:right4"><B>!right4</B></a> to go right (4 lvl)<BR /><BR /><a href="event:p1"><T><B>Page 1</B></T></a><a href="event:p2"><T><B>Page 2</B></T></a><BR /><a href="event:exit3"><R><B>Exit</B></R></a>', playerName, 40, 40, 225, 350, nil, 0xD97922, 80)
  240.        ui.removeTextArea(2, playerName)
  241.  
  242. ---Jump----
  243.  
  244.                else if text== 'jump1' then
  245.            tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  246.  
  247.        else if text== 'jump2' then
  248.            tfm.exec.movePlayer(playerName,0,0,true,0,-100,false)
  249.  
  250.        else if text== 'jump3' then
  251.            tfm.exec.movePlayer(playerName,0,0,true,0,-150,false)
  252.  
  253.        else if text== 'jump4' then
  254.            tfm.exec.movePlayer(playerName,0,0,true,0,-150,false)
  255.  
  256. ----Left----
  257.  
  258.        else if text== 'left1' then
  259.            tfm.exec.movePlayer(playerName,0,0,true,-50,0,false)
  260.  
  261.        else if text== 'left2' then
  262.            tfm.exec.movePlayer(playerName,0,0,true,-100,0,false)
  263.  
  264.         else if text== 'left3' then
  265.            tfm.exec.movePlayer(playerName,0,0,true,-150,0,false)
  266.  
  267.         else if text== 'left4' then
  268.            tfm.exec.movePlayer(playerName,0,0,true,-200,0,false)
  269.  
  270. -----Right---
  271.  
  272.         else if text== "right1" then
  273.            tfm.exec.movePlayer(playerName,0,0,true,50,0,false)
  274.  
  275.         else if text== 'right2' then
  276.            tfm.exec.movePlayer(playerName,0,0,true,100,0,false)
  277.  
  278.         else if text== 'right4' then
  279.            tfm.exec.movePlayer(playerName,0,0,true,200,0,false)
  280.  
  281.         else if text== 'right3' then
  282.            tfm.exec.movePlayer(playerName,0,0,true,150,0,false)
  283.  
  284.  
  285.                  else if text == 'exit3' then
  286.     ui.removeTextArea(3, playerName)
  287.  
  288.                  else if text == 'p1' then
  289.     ui.removeTextArea(3, playerName)
  290.              ui.addTextArea(1, '<font size="18">Welcome in <B><font face ="Elephant"><J>#CheatBootcamp!</J></font></B></font><BR /><font size="12">There, <B>You</B> have <j><b>cheats!</b></j>Press <B><a href="event:win">Kiss</a></b>, to <j><b>win!</b></j>Press <b>Space</b>, to <j><B>fly!</B></j><BR /><B>By</B> <j><i><B>Basterfeild</B>!</i></j><BR /><a href="event:global"><T><B>Page 2</B></T></a><BR /><a href="event:exit"><R><B>Exit</R></a>', playerName, 40, 40, 300, 200, nil, 0xD97922, nil)
  291.  
  292.                  else if text == 'p2' then
  293.     ui.removeTextArea(3, playerName)
  294.        ui.addTextArea(2, '<font size="20"><J><B><I>Options</I></B></J></font><N><BR /><a href="event:cheese"><font size="12"><b>Give cheese</b></a><BR /><a href="event:win2"><b>Give win</b></a><BR /><a href="event:jump"><B>Jump</B></a><BR /><a href="event:die"><B>Die</B></a><BR /><BR /><a href="event:m"><T><B>Page 1</B></T></a><a href="event:commands"><T><B>Page 3</B></T></a><BR /><BR /></a><a href="event:exit2"><R><B>Exit</R></a><BR />',playerName, 40, 40, 300, 200, nil, 0xD97922, nil)
  295.  
  296. --Ons/OFFs---
  297.  
  298.               else if text == 'off' then
  299.  
  300.     ui.removeTextArea(11, playerName)
  301.     ui.removeTextArea(12, playerName)
  302.     ui.removeTextArea(13, playerName)
  303.     ui.removeTextArea(14, playerName)
  304.     ui.removeTextArea(21, playerName)
  305.     ui.removeTextArea(22, playerName)
  306.     ui.removeTextArea(23, playerName)
  307.     ui.removeTextArea(24, playerName)
  308.     ui.removeTextArea(31, playerName)
  309.     ui.removeTextArea(32, playerName)
  310.     ui.removeTextArea(33, playerName)
  311.     ui.removeTextArea(34, playerName)
  312.     ui.removeTextArea(10, playerName)
  313.  
  314.    else if text == 'on' then
  315.  
  316.        ui.addTextArea(11, '<a href="event:left2"><CH>←2</CH></a>', playerName, 100, 25, 25, 15, nil, nil, 0.5)
  317.        ui.addTextArea(10, '<a href="event:left1"><CH>←1</CH></a>', playerName, 60, 25, 25, 15, nil, nil, 0.5)
  318.        ui.addTextArea(13, '<a href="event:left3"><CH>←3</CH></a>', playerName, 140, 25, 25, 15, nil, nil, 0.5)
  319.        ui.addTextArea(12, '<a href="event:left4"><CH>←4</CH></a>', playerName, 180, 25, 25, 15, nil, nil, 0.5)
  320.  
  321.  
  322.        ui.addTextArea(21, '<a href="event:right1"><CH>→1</CH></a>', playerName, 260, 25, 25, 15, nil, nil, 0.5)
  323.        ui.addTextArea(22, '<a href="event:right2"><CH>→2</CH></a>', playerName, 300, 25, 25, 15, nil, nil, 0.5)
  324.        ui.addTextArea(23, '<a href="event:right3"><CH>→3</CH></a>', playerName, 340, 25, 25, 15, nil, nil, 0.5)
  325.        ui.addTextArea(24, '<a href="event:right4"><CH>→4</CH></a>', playerName, 380, 25, 25, 15, nil, nil, 0.5)
  326.  
  327.  
  328.        ui.addTextArea(31, '<a href="event:jump1"><CH>↑1</CH></a>', playerName, 15, 60, 25, 15, nil, nil, 0.5)
  329.        ui.addTextArea(32, '<a href="event:jump2"><CH>↑2</CH></a>', playerName, 15, 100, 25, 15, nil, nil, 0.5)
  330.        ui.addTextArea(33, '<a href="event:jump3"><CH>↑3</CH></a>', playerName, 15, 140, 25, 15, nil, nil, 0.5)
  331.        ui.addTextArea(34, '<a href="event:jump4"><CH>↑4</CH></a>', playerName, 15, 180, 25, 15, nil, nil, 0.5)
  332.  
  333. end        
  334. end
  335. end
  336. end
  337. end
  338. end
  339. end
  340. end
  341. end
  342. end
  343. end
  344. end
  345. end
  346. end
  347. end
  348. end
  349. end
  350. end
  351. end
  352. end
  353. end
  354. end
  355. end
  356. end
  357. end
  358. end
  359. end
  360. end
  361. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement