Boeing747-8

Untitled

Aug 9th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.65 KB | None | 0 0
  1. tfm.exec.newGame(7489132)
  2. --300,80,150,200
  3. tfm.exec.setGameTime(3,true)
  4. dp={}
  5. roles={0,1}
  6. maps={7489629}
  7. data={}
  8. text={}
  9. lang={}
  10. players={}
  11. ids={
  12. 0,
  13. 0,
  14. 0,
  15. 0
  16. }
  17. alive=0
  18. lang.en={
  19. menu="Menu",
  20. profile2="Profile",
  21. help2="Help",
  22. help="In #kidnapper the goal of the game is for protectors to catch the mouse with the bomb before the mouse gets to the hole. The mouse with the bomb can use attacks to shield off protectors.",
  23. wins="Total Wins",
  24. wins_Bomber="Wins As Kidnapper",
  25. wins_Protector="Wins As Protector",
  26. close="Close",
  27. health=100,
  28. bomber_Wins="Kidnapper Wins!",
  29. protector_Wins="Protectors Win!",
  30. powerups2="Powerups",
  31. powerup1="[Normal Attack]</J> Is activated by pressing space. Only works for Protectors when they are near the bomber.",
  32. powerup2="[Mega Jump]</J> Is activated by the down arrow.",
  33. mouseStolen="kidnapped the mouse!",
  34. buy="Buy",
  35. bought="Equip",
  36. unequip="Unequip",
  37. shop="Shop",
  38. points="Points",
  39. notEnough="Not enough points!"
  40. }
  41. lastKidnapper=""
  42. for _, s in next, {'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'AutoShaman', 'AutoNewGame'} do
  43. tfm.exec['disable' .. s]()
  44. end
  45. function Dp(name)
  46. name = name:sub(1,1):upper()..name:sub(2):lower()
  47. for i,dp in ipairs(dp) do
  48. if name==dp then
  49. return true
  50. end
  51. end
  52. return false
  53. end
  54. function stolen(n)
  55. data[n].p=player
  56. data[n].stolen="<R>"..data[n].p.."<J> "..text[n].mouseStolen
  57. tfm.exec.chatMessage(data[n].stolen,n)
  58. end
  59. function particles(x,y)
  60. tfm.exec.displayParticle(9,x,y+10,-0.4,0.1,0.2,0.3,nil)
  61. tfm.exec.displayParticle(9,x,y+10,-0.6,0.2,0.6,0.2,nil)
  62. tfm.exec.displayParticle(9,x,y+10,-0.8,0.3,0.8,0.1,nil)
  63. tfm.exec.displayParticle(9,x,y+10,0.4,0.4,-0.4,0.3,nil)
  64. tfm.exec.displayParticle(9,x,y+10,0.6,0.5,-0.6,0.2,nil)
  65. tfm.exec.displayParticle(9,x,y+10,0.8,0.6,-0.8,0.1,nil)
  66. end
  67. function bigJump(n,x,y)
  68. tfm.exec.movePlayer(n,0,0,false,0,-80,true)
  69. tfm.exec.displayParticle(3,x-5,y+10,-0.8,0,0,0,n)
  70. tfm.exec.displayParticle(3,x+5,y+10,0.8,0,0,0,n)
  71. tfm.exec.displayParticle(3,x-10,y+10,-1.7,0,0,0,n)
  72. tfm.exec.displayParticle(3,x+10,y+10,1.7,0,0,0,n)
  73. particles(x,y)
  74. end
  75. function identifyBomber(n)
  76. if data[n].role==0 then
  77. tfm.exec.setNameColor(n,0x00FF00)
  78. tfm.exec.movePlayer(n,1023,432,false,0,50,false)
  79. elseif data[n].role==1 then
  80. tfm.exec.setNameColor(n,0xFF0000)
  81. end
  82. end
  83. function countAlive()
  84. alive=0
  85. for n,player in pairs(tfm.get.room.playerList) do
  86. if tfm.get.room.playerList[n].isDead==false then
  87. alive=alive+1
  88. end
  89. end
  90. end
  91. function removeWinner()
  92. ui.removeTextArea(20,nil)
  93. ui.removeTextArea(30,nil)
  94. ui.removeTextArea(40,nil)
  95. ui.removeTextArea(50,nil)
  96. ui.removeTextArea(60,nil)
  97. ui.removeTextArea(19,nil)
  98. end
  99.  
  100. function win(n)
  101. if tfm.get.room.playerList[n].isDead==false and data[n].role==0 then
  102. data[n].wins=data[n].wins+1
  103. data[n].points=data[n].points+7
  104. data[n].wins_Protector=data[n].wins_Protector+1
  105. end
  106. end
  107. function insertName(n)
  108. table.insert(players,n)
  109. end
  110. function setLang(n)
  111. text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  112. end
  113. function setData(n)
  114. data[n]=
  115. {
  116. wins=0,
  117. role=0,
  118. health=100,
  119. spawn=1,
  120. wins_Protector=0,
  121. wins_Bomber=0,
  122. p="",
  123. stolen="",
  124. shopItems={propellerMouse=0,greenMouse=0,lightningMouse=0,tigerMouse=0},
  125. buy1=text[n].buy,
  126. buy2=text[n].buy,
  127. buy3=text[n].buy,
  128. buy4=text[n].buy,
  129. using="1651b5bc86d.png",
  130. points=0
  131. }
  132. end
  133. function chooseRole()
  134. mice=0
  135. for n,player in pairs(tfm.get.room.playerList) do
  136. mice=mice+1
  137. data[n].role=0
  138. end
  139. player=players[math.random(#players)]
  140. while player==lastKidnapper do
  141. player=players[math.random(#players)]
  142. end
  143. lastKidnapper=player
  144. data[player].role=1
  145. player=""..player
  146. end
  147. function bindKeyboard(n)
  148. for i=0,150 do
  149. tfm.exec.bindKeyboard(n,i,true,true)
  150. end
  151. end
  152. function showMenu(n)
  153. ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:menu2'>"..text[n].menu, n, 10, 30, 42, 20, 0x000001, 0xFFFFFF, 1, true)
  154. end
  155. function showMenu2(n)
  156. ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:Menu'>"..text[n].menu.." </a>| <a href='event:Help'>"..text[n].help2.."</a> | <a href='event:Profile'>"..text[n].profile2.."</a> | <a href='event:Powerups'>"..text[n].powerups2.."</a> | <a href='event:Shop'>"..text[n].shop, n, 10, 30, 210, 20, 0x000001, 0xffffff, 1, true)
  157. end
  158. function removeImage(n)
  159. tfm.exec.removeImage(id1)
  160. tfm.exec.removeImage(id2)
  161. tfm.exec.removeImage(id3)
  162. tfm.exec.removeImage(id4)
  163. end
  164. function removeShop(n)
  165. for i=1020,1050 do
  166. ui.removeTextArea(i,n)
  167. end
  168. end
  169. function showHealth(n)
  170. ui.addTextArea(-3, "", n, 319, 27, 100, 18, 0xffffff, 0xffffff, 1, true)
  171. ui.addTextArea(-1, "", n, 319, 27, data[n].health, 18, 0x1aff00, 0x1aff00, 1, true)
  172. ui.addTextArea(-2, "<p align='center'><b><font color='#000000'>"..data[n].health.."%", n, 345, 27, 54, 18, 0x324650, 0x000000, 0, true)
  173. end
  174. function displayTab(n,info,subject)
  175. ui.addTextArea(2, "", n, 262, 72, 360, 290, 0x331f15, 0x331f15, 1, true)
  176. ui.addTextArea(3, "", n, 262, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  177. ui.addTextArea(5, "", n, 295, 72, 290, 4, 0x6b4231, 0x6b4231, 1, true)
  178. ui.addTextArea(4, "", n, 618, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  179. ui.addTextArea(6, "", n, 295, 358, 295, 4, 0x6b4231, 0x6b4231, 1, true)
  180. ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>#KIDNAPPER - "..subject.."</b></font></font><font size='14'>\n\n"..info, n, 271, 80, 342, 270, 0x1b262b, 0x131c21, 1, true)
  181. ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 272, 330, 339, 20, 0x324650, 0x324650, 1, true)
  182. end
  183. function profile(n,info)
  184. ui.addTextArea(2, "", n, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
  185. ui.addTextArea(3, "", n, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  186. ui.addTextArea(5, "", n, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  187. ui.addTextArea(4, "", n, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  188. ui.addTextArea(6, "", n, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  189. ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>"..n.."</b></font></font></p><font size='14'>\n<font face='calibri'>\n"..info, n, 270, 82, 252, 270, 0x1b262b, 0x131c21, 1, true)
  190. ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 272, 330, 248, 20, 0x324650, 0x324650, 1, true)
  191. end
  192. function profile2(n,info,l)
  193. ui.addTextArea(2, "", l, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
  194. ui.addTextArea(3, "", l, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  195. ui.addTextArea(5, "", l, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  196. ui.addTextArea(4, "", l, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  197. ui.addTextArea(6, "", l, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  198. ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>"..n.."</b></font></font></p><font size='14'>\n<font face='calibri'>\n"..info, l, 270, 82, 252, 270, 0x1b262b, 0x131c21, 1, true)
  199. ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[l].close.."</a></font>", l, 272, 330, 248, 20, 0x324650, 0x324650, 1, true)
  200. end
  201. function close(n)
  202. for i=1,7 do
  203. ui.removeTextArea(i,n)
  204. end
  205. end
  206. function nearBomber(n,x,y,p)
  207. if ((tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x+100 and tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x) and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+50 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-50) and not (n==p) and data[p].health>0 and tfm.get.room.playerList[n].isFacingRight==true then
  208. tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  209. data[p].health=data[p].health-12.5
  210. tfm.exec.displayParticle(1,x,y,0.2,0,0.2,0,nil)
  211. tfm.exec.displayParticle(1,x,y,0.4,0,0.4,0,nil)
  212. tfm.exec.displayParticle(1,x,y,0.6,0,0.6,0,nil)
  213. tfm.exec.displayParticle(1,x,y,0.8,0,0.8,0,nil)
  214. tfm.exec.displayParticle(1,x,y,1,0,1,0,nil)
  215. tfm.exec.displayParticle(1,x,y-10,0.2,0,0.2,0,nil)
  216. tfm.exec.displayParticle(1,x,y-10,0.4,0,0.4,0,nil)
  217. tfm.exec.displayParticle(1,x,y-10,0.6,0,0.6,0,nil)
  218. tfm.exec.displayParticle(1,x,y-10,0.8,0,0.8,0,nil)
  219. tfm.exec.displayParticle(1,x,y-10,1,0,1,0,nil)
  220. tfm.exec.displayParticle(1,x,y+10,0.2,0,0.2,0,nil)
  221. tfm.exec.displayParticle(1,x,y+10,0.4,0,0.4,0,nli)
  222. tfm.exec.displayParticle(1,x,y+10,0.6,0,0.6,0,nil)
  223. tfm.exec.displayParticle(1,x,y+10,0.8,0,0.8,0,nil)
  224. tfm.exec.displayParticle(1,x,y+10,1,0,1,0,nil)
  225. end
  226. if ((tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x-100 and tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x) and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+50 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-50) and not (n==p) and data[p].health>0 and tfm.get.room.playerList[n].isFacingRight==false then
  227. tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  228. data[p].health=data[p].health-12.5
  229. tfm.exec.displayParticle(1,x,y,-0.2,0,-0.2,0,nil)
  230. tfm.exec.displayParticle(1,x,y,-0.4,0,-0.4,0,nil)
  231. tfm.exec.displayParticle(1,x,y,-0.6,0,-0.6,0,nil)
  232. tfm.exec.displayParticle(1,x,y,-0.8,0,-0.8,0,nil)
  233. tfm.exec.displayParticle(1,x,y,-1,0,-1,0,nil)
  234. tfm.exec.displayParticle(1,x,y-10,-0.2,0,-0.2,0,nil)
  235. tfm.exec.displayParticle(1,x,y-10,-0.4,0,-0.4,0,nil)
  236. tfm.exec.displayParticle(1,x,y-10,-0.6,0,-0.6,0,nil)
  237. tfm.exec.displayParticle(1,x,y-10,-0.8,0,-0.8,0,nil)
  238. tfm.exec.displayParticle(1,x,y-10,-1,0,-1,0,nil)
  239. tfm.exec.displayParticle(1,x,y+10,-0.2,0,-0.2,0,nil)
  240. tfm.exec.displayParticle(1,x,y+10,-0.4,0,-0.4,0,nli)
  241. tfm.exec.displayParticle(1,x,y+10,-0.6,0,-0.6,0,nil)
  242. tfm.exec.displayParticle(1,x,y+10,-0.8,0,-0.8,0,nil)
  243. tfm.exec.displayParticle(1,x,y+10,-1,0,-1,0,nil)
  244. end
  245. if data[p].health<1 then
  246. tfm.exec.killPlayer(p)
  247. end
  248. end
  249. operation={-110,110}
  250. function nearProtector(n,p,x,y)
  251. if not (n==p) and data[p].health>0 and data[n].health>0 then
  252. tfm.exec.displayParticle(13,x,y,-0.2,0.1,-0.2,0.1,nil)
  253. tfm.exec.displayParticle(13,x,y,-0.4,0,-0.4,0,nil)
  254. tfm.exec.displayParticle(13,x,y,-0.6,0,-0.6,0,nil)
  255. tfm.exec.displayParticle(3,x,y,-0.8,0,-0.8,0,nil)
  256. tfm.exec.displayParticle(3,x,y,-8,0,-1,0,nil)
  257. tfm.exec.displayParticle(3,x,y-10,-0.2,0.1,-0.2,0.1,nil)
  258. tfm.exec.displayParticle(13,x,y-10,-0.4,0,-0.4,0,nil)
  259. tfm.exec.displayParticle(13,x,y-10,-0.6,0,-0.6,0,nil)
  260. tfm.exec.displayParticle(13,x,y-10,-0.8,0,-0.8,0,nil)
  261. tfm.exec.displayParticle(13,x,y-10,-1,0,-1,0,nil)
  262. tfm.exec.displayParticle(13,x,y+10,-0.2,0.1,-0.2,0.1,nil)
  263. tfm.exec.displayParticle(13,x,y+10,-0.4,0,-0.4,0,nli)
  264. tfm.exec.displayParticle(13,x,y+10,-0.6,0,-0.6,0,nil)
  265. tfm.exec.displayParticle(13,x,y+10,-0.8,-0.1,-0.8,-0.1,nil)
  266. tfm.exec.displayParticle(13,x,y+10,-1,0,-1,0,nil)
  267. tfm.exec.displayParticle(13,x,y,0.2,0,0.2,0,nil)
  268. tfm.exec.displayParticle(13,x,y,0.4,0,0.4,0,nil)
  269. tfm.exec.displayParticle(13,x,y,0.6,0,0.6,0,nil)
  270. tfm.exec.displayParticle(13,x,y,0.8,0,0.8,0,nil)
  271. tfm.exec.displayParticle(13,x,y,1,0,1,0,nil)
  272. tfm.exec.displayParticle(13,x,y-10,0.2,0.1,0.2,0.1,nil)
  273. tfm.exec.displayParticle(13,x,y-10,0.4,0,0.4,0,nil)
  274. tfm.exec.displayParticle(13,x,y-10,0.6,0,0.6,0,nil)
  275. tfm.exec.displayParticle(13,x,y-10,0.8,0,0.8,0,nil)
  276. tfm.exec.displayParticle(13,x,y-10,1,0,1,0,nil)
  277. tfm.exec.displayParticle(13,x,y+10,0.2,0,0.2,0,nil)
  278. tfm.exec.displayParticle(13,x,y+10,0.4,0,0.4,0,nli)
  279. tfm.exec.displayParticle(13,x,y+10,0.6,0,0.6,0,nil)
  280. tfm.exec.displayParticle(3,x,y+10,0.8,0,0.8,0,nil)
  281. tfm.exec.displayParticle(3,x,y+10,8,0,1,0,nil)
  282. end
  283. if (tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x+70 and tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x-70 and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+30 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-30) and not (n==p) and data[p].health>0 and data[n].health>0 then
  284. data[n].health=data[n].health-12.5
  285. tfm.exec.movePlayer(n,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  286. end
  287. if data[n].health<1 then
  288. tfm.exec.killPlayer(n)
  289. end
  290. end
  291.  
  292. for n,player in pairs(tfm.get.room.playerList) do
  293. bindKeyboard(n)
  294. setLang(n)
  295. insertName(n)
  296. setData(n)
  297. showMenu(n)
  298. table.insert(dp,n)
  299. end
  300. chooseRole()
  301. for n,player in pairs(tfm.get.room.playerList) do
  302. identifyBomber(n)
  303. end
  304. function allInfo(n)
  305. bindKeyboard(n)
  306. setLang(n)
  307. insertName(n)
  308. setData(n)
  309. showMenu(n)
  310. identifyBomber(n)
  311. table.insert(dp,n)
  312. end
  313. function eventNewGame()
  314. if mice>1 then
  315. players={}
  316. for n,player in pairs(tfm.get.room.playerList) do
  317. insertName(n)
  318. end
  319. chooseRole()
  320. countAlive()
  321. removeWinner()
  322. for n,player in pairs(tfm.get.room.playerList) do
  323. identifyBomber(n)
  324. data[n].health=100
  325. stolen(n)
  326. end
  327. id=tfm.exec.addImage(data[player].using,"$"..player, -40, -25)
  328. end
  329. end
  330. function eventTextAreaCallback(txt, n, a)
  331. removeImage(n)
  332. if a=="Menu" then
  333. showMenu(n)
  334. elseif a=="menu2" then
  335. showMenu2(n)
  336. elseif a=="Help" then
  337. displayTab(n,text[n].help,text[n].help2)
  338. elseif a=="close" then
  339. close(n)
  340. removeImage(n)
  341. removeShop(n)
  342. elseif a=="Profile" then
  343. profile(n,text[n].wins..": <J>"..data[n].wins.."\n\n</J>"..text[n].wins_Bomber..": <J>"..data[n].wins_Bomber.."\n\n</J>"..text[n].wins_Protector..": <J>"..data[n].wins_Protector.."</J>\n\n"..text[n].points..": <J>"..data[n].points)
  344. elseif a=="Powerups" then
  345. displayTab(n,"<J>"..text[n].powerup1.."\n\n<J>"..text[n].powerup2,text[n].powerups2)
  346. elseif a=="Shop" then
  347. shop(n)
  348. elseif a=="buy1" and data[n].points>=80 then
  349. data[n].buy1="</a><G><a href='event:unequip1'>"..text[n].unequip
  350. data[n].using="1651ca2b636.png"
  351. data[n].shopItems.propellerMouse=1
  352. data[n].points=data[n].points-80
  353. shop1(n)
  354. elseif a=="buy2" and data[n].points>=150 then
  355. data[n].buy2="</a><G><a href='event:unequip2'>"..text[n].unequip
  356. data[n].using="1651ca29934.png"
  357. data[n].points=data[n].points-150
  358. shop2(n)
  359. elseif a=="buy1" and not (data[n].points>=80) then
  360. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  361. elseif a=="buy3" and data[n].points>=200 then
  362. data[n].buy3="</a><G><a href='event:unequip3'>"..text[n].unequip
  363. data[n].using="1651ca27c02.png"
  364. data[n].points=data[n].points-200
  365. shop3(n)
  366. elseif a=="buy2" and not (data[n].points>=300) then
  367. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  368. elseif a=="buy4" and data[n].points>=300 then
  369. data[n].buy4="</a><G><a href='event:unequip4'>"..text[n].unequip
  370. data[n].points=data[n].points-300
  371. data[n].using="1651ca26129.png"
  372. shop4(n)
  373. elseif a=="buy3" and not (data[n].points>=200) then
  374. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  375. elseif a=="buy4" and not (data[n].points>=150) then
  376. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  377. elseif a=="unequip1" then
  378. data[n].using="1651b5bc86d.png"
  379. data[n].buy1="</a><VP><a href='event:equip1'>"..text[n].bought
  380. shop(n)
  381. elseif a=="unequip2" then
  382. data[n].using="1651b5bc86d.png"
  383. data[n].buy2="</a><VP><a href='event:equip2'>"..text[n].bought
  384. shop(n)
  385. elseif a=="unequip3" then
  386. data[n].using="1651b5bc86d.png"
  387. data[n].buy3="</a><VP><a href='event:equip3'>"..text[n].bought
  388. shop(n)
  389. elseif a=="unequip4" then
  390. data[n].using="1651b5bc86d.png"
  391. data[n].buy4="</a><VP><a href='event:equip4'>"..text[n].bought
  392. shop(n)
  393. elseif a=="equip1" then
  394. data[n].using="1651ca2b636.png"
  395. data[n].buy1="</a><G><a href='event:unequip1'>"..text[n].unequip
  396. shop1(n)
  397. elseif a=="equip2" then
  398. data[n].using="1651ca29934.png"
  399. data[n].buy2="</a><G><a href='event:unequip2'>"..text[n].unequip
  400. shop2(n)
  401. elseif a=="equip3" then
  402. data[n].using="1651ca27c02.png"
  403. data[n].buy3="</a><G><a href='event:unequip3'>"..text[n].unequip
  404. shop3(n)
  405. elseif a=="equip4" then
  406. data[n].using="1651ca26129.png"
  407. data[n].buy4="</a><G><a href='event:unequip4'>"..text[n].unequip
  408. shop4(n)
  409. end
  410. end
  411. function eventNewPlayer(n)
  412. if mice<2 then
  413. tfm.exec.newGame(7489132)
  414. end
  415. allInfo(n)
  416. end
  417. function eventLoop(time,timeRemaining)
  418. if mice>1 then
  419. for n,player in pairs(tfm.get.room.playerList) do
  420. data[n].spawn=data[n].spawn+0.5
  421. showHealth(n)
  422. end
  423. if timeRemaining<=0 then
  424. tfm.exec.newGame(maps[math.random(#maps)])
  425. end
  426. end
  427. end
  428.  
  429. function eventKeyboard(n, k, d, x, y)
  430. if mice>1 then
  431. if k==32 and data[n].role==0 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
  432. nearBomber(n,x,y,player)
  433. data[n].spawn=-1
  434. elseif k==32 and data[n].role==1 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
  435. data[n].spawn=-1.5
  436. player=player
  437. for n in pairs(tfm.get.room.playerList) do
  438. nearProtector(n,player,tfm.get.room.playerList[player].x,tfm.get.room.playerList[player].y)
  439. end
  440. elseif k==3 and data[n].spawn>0 then
  441. data[n].spawn=-2
  442. player=player
  443. bigJump(n,x,y)
  444. elseif k==112 then
  445.  
  446. end
  447. end
  448. end
  449. function eventPlayerDied(n)
  450. for n,player in pairs(tfm.get.room.playerList) do
  451. win(n)
  452. end
  453. countAlive()
  454. data[n].health=0
  455. if data[n].role==1 then
  456. for n,player in pairs(tfm.get.room.playerList) do
  457. ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
  458. ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  459. ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  460. ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  461. ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  462. ui.addTextArea(19, "<p align='center'><font size='20'><VP>"..text[n].protector_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
  463. tfm.exec.setGameTime(5,true)
  464. end
  465. end
  466. end
  467.  
  468. function eventMouse(playerName,x,y)
  469. print("<VP>X</VP><N>:</N><J> "..x.."</J><VP> Y</VP><N>:</N><J> "..y)
  470. end
  471. system.bindMouse("Fuzzyfirsdog#0000", true)
  472. function eventPlayerGetCheese(n)
  473. if data[n].role==1 then
  474. data[n].wins=data[n].wins+1
  475. data[n].wins_Bomber=data[n].wins_Bomber+1
  476. data[n].points=data[n].points+10
  477. tfm.exec.setGameTime(10,true)
  478. for n,player in pairs(tfm.get.room.playerList) do
  479. ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
  480. ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  481. ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  482. ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  483. ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  484. ui.addTextArea(19, "<p align='center'><font size='20'><R>"..text[n].bomber_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
  485. if not (data[n].role==1) then
  486. tfm.exec.killPlayer(n)
  487. end
  488. end
  489. end
  490. end
  491. system.disableChatCommandDisplay("p",true)
  492. function eventChatCommand(l,c)
  493. if c=="p" then
  494. profile(l,text[l].wins..": <J>"..data[l].wins.."\n\n</J>"..text[l].wins_Bomber..": <J>"..data[l].wins_Bomber.."\n\n</J>"..text[l].wins_Protector..": <J>"..data[l].wins_Protector)
  495. end
  496. if c:sub(0,1)=="p" and Dp(c:sub(3))then
  497. n = c:sub(3,3):upper()..c:sub(4):lower()
  498. profile2(n,text[l].wins..": <J>"..data[n].wins.."\n\n</J>"..text[l].wins_Bomber..": <J>"..data[n].wins_Bomber.."\n\n</J>"..text[l].wins_Protector..": <J>"..data[n].wins_Protector.."</J>\n\n"..text[l].points..": <J>"..data[n].points,l)
  499. end
  500. end
  501. function shop(n)
  502. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  503. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  504. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  505. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  506. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  507. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  508. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  509. ui.addTextArea(1027, "<p align='center'><b><a href='event:buy1'>"..data[n].buy1, n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  510. ui.addTextArea(1028, "<p align='center'><b><a href='event:buy2'>"..data[n].buy2, n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  511. ui.addTextArea(1029, "<p align='center'><b><a href='event:buy3'>"..data[n].buy3, n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  512. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  513. ui.addTextArea(1031, "<p align='center'><b><a href='event:buy4'>"..data[n].buy4, n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  514. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  515. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  516. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  517. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  518. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  519. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  520. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  521. end
  522. function shop1(n)
  523. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  524. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  525. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  526. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  527. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  528. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  529. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  530. ui.addTextArea(1027, "<p align='center'><b><a href='event:buy1'>"..data[n].buy1, n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  531. ui.addTextArea(1028, "", n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  532. ui.addTextArea(1029, "", n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  533. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  534. ui.addTextArea(1031, "", n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  535. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  536. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  537. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  538. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  539. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  540. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  541. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  542. end
  543. function shop2(n)
  544. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  545. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  546. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  547. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  548. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  549. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  550. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  551. ui.addTextArea(1027, "", n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  552. ui.addTextArea(1028, "<p align='center'><b><a href='event:buy2'>"..data[n].buy2, n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  553. ui.addTextArea(1029, "", n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  554. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  555. ui.addTextArea(1031, "", n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  556. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  557. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  558. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  559. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  560. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  561. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  562. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  563. end
  564. function shop3(n)
  565. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  566. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  567. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  568. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  569. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  570. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  571. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  572. ui.addTextArea(1027, "", n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  573. ui.addTextArea(1028, "", n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  574. ui.addTextArea(1029, "<p align='center'><b><a href='event:buy3'>"..data[n].buy3, n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  575. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  576. ui.addTextArea(1031, "", n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  577. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  578. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  579. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  580. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  581. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  582. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  583. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  584. end
  585. function shop4(n)
  586. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  587. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  588. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  589. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  590. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  591. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  592. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  593. ui.addTextArea(1027, "", n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  594. ui.addTextArea(1028, "", n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  595. ui.addTextArea(1029, "", n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  596. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  597. ui.addTextArea(1031, "<p align='center'><b><a href='event:buy4'>"..data[n].buy4, n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  598. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  599. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  600. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  601. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  602. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  603. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  604. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  605. end
Advertisement
Add Comment
Please, Sign In to add comment