Advertisement
Boeing747-8

Untitled

Aug 9th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.77 KB | None | 0 0
  1. tfm.exec.setGameTime(3,true)
  2. dp={}
  3. roles={0,1}
  4. maps={7489629}
  5. data={}
  6. text={}
  7. lang={}
  8. players={}
  9. ids={
  10. 0,
  11. 0,
  12. 0,
  13. 0
  14. }
  15. alive=0
  16. lang.en={
  17. menu="Menu",
  18. profile2="Profile",
  19. help2="Help",
  20. 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.",
  21. wins="Total Wins",
  22. wins_Bomber="Wins As Kidnapper",
  23. wins_Protector="Wins As Protector",
  24. close="Close",
  25. health=100,
  26. bomber_Wins="Kidnapper Wins!",
  27. protector_Wins="Protectors Win!",
  28. powerups2="Powerups",
  29. powerup1="[Normal Attack]</J> Is activated by pressing space. Only works for Protectors when they are near the bomber.",
  30. powerup2="[Mega Jump]</J> Is activated by the down arrow.",
  31. mouseStolen="kidnapped the mouse!",
  32. buy="Buy",
  33. bought="Bought",
  34. shop="Shop",
  35. points="Points",
  36. notEnough="Not enough points!"
  37. }
  38. for _, s in next, {'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'AutoShaman', 'AutoNewGame'} do
  39. tfm.exec['disable' .. s]()
  40. end
  41. function Dp(name)
  42. name = name:sub(1,1):upper()..name:sub(2):lower()
  43. for i,dp in ipairs(dp) do
  44. if name==dp then
  45. return true
  46. end
  47. end
  48. return false
  49. end
  50. function stolen(n)
  51. data[n].p=player
  52. data[n].stolen="<R>"..data[n].p.."<J> "..text[n].mouseStolen
  53. tfm.exec.chatMessage(data[n].stolen,n)
  54. end
  55. function particles(x,y)
  56. tfm.exec.displayParticle(9,x,y+10,-0.4,0.1,0.2,0.3,nil)
  57. tfm.exec.displayParticle(9,x,y+10,-0.6,0.2,0.6,0.2,nil)
  58. tfm.exec.displayParticle(9,x,y+10,-0.8,0.3,0.8,0.1,nil)
  59. tfm.exec.displayParticle(9,x,y+10,0.4,0.4,-0.4,0.3,nil)
  60. tfm.exec.displayParticle(9,x,y+10,0.6,0.5,-0.6,0.2,nil)
  61. tfm.exec.displayParticle(9,x,y+10,0.8,0.6,-0.8,0.1,nil)
  62. end
  63. function bigJump(n,x,y)
  64. tfm.exec.movePlayer(n,0,0,false,0,-80,true)
  65. tfm.exec.displayParticle(3,x-5,y+10,-0.8,0,0,0,n)
  66. tfm.exec.displayParticle(3,x+5,y+10,0.8,0,0,0,n)
  67. tfm.exec.displayParticle(3,x-10,y+10,-1.7,0,0,0,n)
  68. tfm.exec.displayParticle(3,x+10,y+10,1.7,0,0,0,n)
  69. particles(x,y)
  70. end
  71. function identifyBomber(n)
  72. if data[n].role==0 then
  73. tfm.exec.setNameColor(n,0x00FF00)
  74. tfm.exec.movePlayer(n,1023,432,false,0,50,false)
  75. elseif data[n].role==1 then
  76. tfm.exec.setNameColor(n,0xFF0000)
  77. end
  78. end
  79. function countAlive()
  80. alive=0
  81. for n,player in pairs(tfm.get.room.playerList) do
  82. if tfm.get.room.playerList[n].isDead==false then
  83. alive=alive+1
  84. end
  85. end
  86. end
  87. function removeWinner()
  88. ui.removeTextArea(20,nil)
  89. ui.removeTextArea(30,nil)
  90. ui.removeTextArea(40,nil)
  91. ui.removeTextArea(50,nil)
  92. ui.removeTextArea(60,nil)
  93. ui.removeTextArea(19,nil)
  94. end
  95.  
  96. function win(n)
  97. if tfm.get.room.playerList[n].isDead==false and data[n].role==0 then
  98. data[n].wins=data[n].wins+1
  99. data[n].points=data[n].points+7
  100. data[n].wins_Protector=data[n].wins_Protector+1
  101. end
  102. end
  103. function insertName(n)
  104. table.insert(players,n)
  105. end
  106. function setLang(n)
  107. text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  108. end
  109. function setData(n)
  110. data[n]=
  111. {
  112. wins=0,
  113. role=0,
  114. health=100,
  115. spawn=1,
  116. wins_Protector=0,
  117. wins_Bomber=0,
  118. p="",
  119. stolen="",
  120. shopItems={propellerMouse=0,greenMouse=0,lightningMouse=0,tigerMouse=0},
  121. buy1=text[n].buy,
  122. buy2=text[n].buy,
  123. buy3=text[n].buy,
  124. buy4=text[n].buy,
  125. using="1651b5bc86d.png",
  126. points=1220
  127. }
  128. end
  129. function chooseRole()
  130. for n,player in pairs(tfm.get.room.playerList) do
  131. data[n].role=0
  132. end
  133. player=players[math.random(#players)]
  134. data[player].role=1
  135. player=""..player
  136. end
  137. function bindKeyboard(n)
  138. for i=0,150 do
  139. tfm.exec.bindKeyboard(n,i,true,true)
  140. end
  141. end
  142. function showMenu(n)
  143. 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)
  144. end
  145. function showMenu2(n)
  146. 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)
  147. end
  148. function removeImage(n)
  149. for i=1,4 do
  150. tfm.exec.removeImage(ids[i])
  151. end
  152. end
  153. function removeShop(n)
  154. for i=1000,10000 do
  155. ui.removeTextArea(i)
  156. end
  157. end
  158. function showHealth(n)
  159. ui.addTextArea(-3, "", n, 319, 27, 100, 18, 0xffffff, 0xffffff, 1, true)
  160. ui.addTextArea(-1, "", n, 319, 27, data[n].health, 18, 0x1aff00, 0x1aff00, 1, true)
  161. ui.addTextArea(-2, "<p align='center'><b><font color='#000000'>"..data[n].health.."%", n, 345, 27, 54, 18, 0x324650, 0x000000, 0, true)
  162. end
  163. function displayTab(n,info,subject)
  164. ui.addTextArea(2, "", n, 262, 72, 360, 290, 0x331f15, 0x331f15, 1, true)
  165. ui.addTextArea(3, "", n, 262, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  166. ui.addTextArea(5, "", n, 295, 72, 290, 4, 0x6b4231, 0x6b4231, 1, true)
  167. ui.addTextArea(4, "", n, 618, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  168. ui.addTextArea(6, "", n, 295, 358, 295, 4, 0x6b4231, 0x6b4231, 1, true)
  169. 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)
  170. 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)
  171. end
  172. function profile(n,info)
  173. ui.addTextArea(2, "", n, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
  174. ui.addTextArea(3, "", n, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  175. ui.addTextArea(5, "", n, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  176. ui.addTextArea(4, "", n, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  177. ui.addTextArea(6, "", n, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  178. 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)
  179. 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)
  180. end
  181. function profile2(n,info,l)
  182. ui.addTextArea(2, "", l, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
  183. ui.addTextArea(3, "", l, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  184. ui.addTextArea(5, "", l, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  185. ui.addTextArea(4, "", l, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  186. ui.addTextArea(6, "", l, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  187. 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)
  188. 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)
  189. end
  190. function close(n)
  191. for i=1,7 do
  192. ui.removeTextArea(i,n)
  193. end
  194. end
  195. function nearBomber(n,x,y,p)
  196. 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
  197. tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  198. data[p].health=data[p].health-12.5
  199. tfm.exec.displayParticle(1,x,y,0.2,0,0.2,0,nil)
  200. tfm.exec.displayParticle(1,x,y,0.4,0,0.4,0,nil)
  201. tfm.exec.displayParticle(1,x,y,0.6,0,0.6,0,nil)
  202. tfm.exec.displayParticle(1,x,y,0.8,0,0.8,0,nil)
  203. tfm.exec.displayParticle(1,x,y,1,0,1,0,nil)
  204. tfm.exec.displayParticle(1,x,y-10,0.2,0,0.2,0,nil)
  205. tfm.exec.displayParticle(1,x,y-10,0.4,0,0.4,0,nil)
  206. tfm.exec.displayParticle(1,x,y-10,0.6,0,0.6,0,nil)
  207. tfm.exec.displayParticle(1,x,y-10,0.8,0,0.8,0,nil)
  208. tfm.exec.displayParticle(1,x,y-10,1,0,1,0,nil)
  209. tfm.exec.displayParticle(1,x,y+10,0.2,0,0.2,0,nil)
  210. tfm.exec.displayParticle(1,x,y+10,0.4,0,0.4,0,nli)
  211. tfm.exec.displayParticle(1,x,y+10,0.6,0,0.6,0,nil)
  212. tfm.exec.displayParticle(1,x,y+10,0.8,0,0.8,0,nil)
  213. tfm.exec.displayParticle(1,x,y+10,1,0,1,0,nil)
  214. end
  215. 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
  216. tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  217. data[p].health=data[p].health-12.5
  218. tfm.exec.displayParticle(1,x,y,-0.2,0,-0.2,0,nil)
  219. tfm.exec.displayParticle(1,x,y,-0.4,0,-0.4,0,nil)
  220. tfm.exec.displayParticle(1,x,y,-0.6,0,-0.6,0,nil)
  221. tfm.exec.displayParticle(1,x,y,-0.8,0,-0.8,0,nil)
  222. tfm.exec.displayParticle(1,x,y,-1,0,-1,0,nil)
  223. tfm.exec.displayParticle(1,x,y-10,-0.2,0,-0.2,0,nil)
  224. tfm.exec.displayParticle(1,x,y-10,-0.4,0,-0.4,0,nil)
  225. tfm.exec.displayParticle(1,x,y-10,-0.6,0,-0.6,0,nil)
  226. tfm.exec.displayParticle(1,x,y-10,-0.8,0,-0.8,0,nil)
  227. tfm.exec.displayParticle(1,x,y-10,-1,0,-1,0,nil)
  228. tfm.exec.displayParticle(1,x,y+10,-0.2,0,-0.2,0,nil)
  229. tfm.exec.displayParticle(1,x,y+10,-0.4,0,-0.4,0,nli)
  230. tfm.exec.displayParticle(1,x,y+10,-0.6,0,-0.6,0,nil)
  231. tfm.exec.displayParticle(1,x,y+10,-0.8,0,-0.8,0,nil)
  232. tfm.exec.displayParticle(1,x,y+10,-1,0,-1,0,nil)
  233. end
  234. if data[p].health<1 then
  235. tfm.exec.killPlayer(p)
  236. end
  237. end
  238. operation={-110,110}
  239. function nearProtector(n,p,x,y)
  240. if not (n==p) and data[p].health>0 and data[n].health>0 then
  241. tfm.exec.displayParticle(13,x,y,-0.2,0.1,-0.2,0.1,nil)
  242. tfm.exec.displayParticle(13,x,y,-0.4,0,-0.4,0,nil)
  243. tfm.exec.displayParticle(13,x,y,-0.6,0,-0.6,0,nil)
  244. tfm.exec.displayParticle(3,x,y,-0.8,0,-0.8,0,nil)
  245. tfm.exec.displayParticle(3,x,y,-8,0,-1,0,nil)
  246. tfm.exec.displayParticle(3,x,y-10,-0.2,0.1,-0.2,0.1,nil)
  247. tfm.exec.displayParticle(13,x,y-10,-0.4,0,-0.4,0,nil)
  248. tfm.exec.displayParticle(13,x,y-10,-0.6,0,-0.6,0,nil)
  249. tfm.exec.displayParticle(13,x,y-10,-0.8,0,-0.8,0,nil)
  250. tfm.exec.displayParticle(13,x,y-10,-1,0,-1,0,nil)
  251. tfm.exec.displayParticle(13,x,y+10,-0.2,0.1,-0.2,0.1,nil)
  252. tfm.exec.displayParticle(13,x,y+10,-0.4,0,-0.4,0,nli)
  253. tfm.exec.displayParticle(13,x,y+10,-0.6,0,-0.6,0,nil)
  254. tfm.exec.displayParticle(13,x,y+10,-0.8,-0.1,-0.8,-0.1,nil)
  255. tfm.exec.displayParticle(13,x,y+10,-1,0,-1,0,nil)
  256. tfm.exec.displayParticle(13,x,y,0.2,0,0.2,0,nil)
  257. tfm.exec.displayParticle(13,x,y,0.4,0,0.4,0,nil)
  258. tfm.exec.displayParticle(13,x,y,0.6,0,0.6,0,nil)
  259. tfm.exec.displayParticle(13,x,y,0.8,0,0.8,0,nil)
  260. tfm.exec.displayParticle(13,x,y,1,0,1,0,nil)
  261. tfm.exec.displayParticle(13,x,y-10,0.2,0.1,0.2,0.1,nil)
  262. tfm.exec.displayParticle(13,x,y-10,0.4,0,0.4,0,nil)
  263. tfm.exec.displayParticle(13,x,y-10,0.6,0,0.6,0,nil)
  264. tfm.exec.displayParticle(13,x,y-10,0.8,0,0.8,0,nil)
  265. tfm.exec.displayParticle(13,x,y-10,1,0,1,0,nil)
  266. tfm.exec.displayParticle(13,x,y+10,0.2,0,0.2,0,nil)
  267. tfm.exec.displayParticle(13,x,y+10,0.4,0,0.4,0,nli)
  268. tfm.exec.displayParticle(13,x,y+10,0.6,0,0.6,0,nil)
  269. tfm.exec.displayParticle(3,x,y+10,0.8,0,0.8,0,nil)
  270. tfm.exec.displayParticle(3,x,y+10,8,0,1,0,nil)
  271. end
  272. 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
  273. data[n].health=data[n].health-12.5
  274. tfm.exec.movePlayer(n,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  275. end
  276. if data[n].health<1 then
  277. tfm.exec.killPlayer(n)
  278. end
  279. end
  280.  
  281. for n,player in pairs(tfm.get.room.playerList) do
  282. bindKeyboard(n)
  283. setLang(n)
  284. insertName(n)
  285. setData(n)
  286. showMenu(n)
  287. table.insert(dp,n)
  288. end
  289. chooseRole()
  290. for n,player in pairs(tfm.get.room.playerList) do
  291. identifyBomber(n)
  292. end
  293. function allInfo(n)
  294. bindKeyboard(n)
  295. setLang(n)
  296. insertName(n)
  297. setData(n)
  298. showMenu(n)
  299. identifyBomber(n)
  300. table.insert(dp,n)
  301. end
  302. function eventNewGame()
  303. players={}
  304. for n,player in pairs(tfm.get.room.playerList) do
  305. insertName(n)
  306. end
  307. chooseRole()
  308. countAlive()
  309. removeWinner()
  310. for n,player in pairs(tfm.get.room.playerList) do
  311. identifyBomber(n)
  312. data[n].health=100
  313. stolen(n)
  314. end
  315. id=tfm.exec.addImage(data[player].using,"$"..player, -40, -25)
  316. end
  317. function eventTextAreaCallback(txt, n, a)
  318. if a=="Menu" then
  319. showMenu(n)
  320. elseif a=="menu2" then
  321. showMenu2(n)
  322. elseif a=="Help" then
  323. displayTab(n,text[n].help,text[n].help2)
  324. elseif a=="close" then
  325. close(n)
  326. removeImage(n)
  327. removeShop(n)
  328. elseif a=="Profile" then
  329. 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)
  330. elseif a=="Powerups" then
  331. displayTab(n,"<J>"..text[n].powerup1.."\n\n<J>"..text[n].powerup2,text[n].powerups2)
  332. elseif a=="Shop" then
  333. shop(n)
  334. elseif a=="buy1" and data[n].points>=80 then
  335. data[n].buy1="</a><G>"..text[n].bought
  336. data[n].using="1651ca2b636.png"
  337. data[n].points=data[n].points-80
  338. shop(n)
  339. elseif a=="buy2" and data[n].points>=150 then
  340. data[n].buy2="</a><G>"..text[n].bought
  341. data[n].using="1651ca29934.png"
  342. data[n].points=data[n].points-150
  343. shop(n)
  344. elseif a=="buy1" and not (data[n].points>=80) then
  345. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  346. elseif a=="buy3" and data[n].points>=200 then
  347. data[n].buy3="</a><G>"..text[n].bought
  348. data[n].using="1651ca27c02.png"
  349. data[n].points=data[n].points-200
  350. shop(n)
  351. elseif a=="buy2" and not (data[n].points>=300) then
  352. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  353. elseif a=="buy4" and data[n].points>=300 then
  354. data[n].buy4="</a><G>"..text[n].bought
  355. data[n].points=data[n].points-300
  356. data[n].using="1651ca26129.png"
  357. shop(n)
  358. elseif a=="buy3" and not (data[n].points>=200) then
  359. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  360. elseif a=="buy4" and not (data[n].points>=150) then
  361. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  362. end
  363. end
  364. function eventNewPlayer(n)
  365. allInfo(n)
  366. end
  367. function eventLoop(time,timeRemaining)
  368. for n,player in pairs(tfm.get.room.playerList) do
  369. data[n].spawn=data[n].spawn+0.5
  370. showHealth(n)
  371. end
  372. if timeRemaining<=0 then
  373. tfm.exec.newGame(maps[math.random(#maps)])
  374. end
  375. end
  376.  
  377. function eventKeyboard(n, k, d, x, y)
  378. if k==32 and data[n].role==0 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
  379. nearBomber(n,x,y,player)
  380. data[n].spawn=-1
  381. elseif k==32 and data[n].role==1 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
  382. data[n].spawn=-1.5
  383. player=player
  384. for n in pairs(tfm.get.room.playerList) do
  385. nearProtector(n,player,tfm.get.room.playerList[player].x,tfm.get.room.playerList[player].y)
  386. end
  387. elseif k==3 and data[n].spawn>0 then
  388. data[n].spawn=-2
  389. player=player
  390. bigJump(n,x,y)
  391. elseif k==112 then
  392.  
  393. end
  394. end
  395. function eventPlayerDied(n)
  396. for n,player in pairs(tfm.get.room.playerList) do
  397. win(n)
  398. end
  399. countAlive()
  400. data[n].health=0
  401. if data[n].role==1 then
  402. for n,player in pairs(tfm.get.room.playerList) do
  403. ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
  404. ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  405. ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  406. ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  407. ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  408. ui.addTextArea(19, "<p align='center'><font size='20'><VP>"..text[n].protector_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
  409. tfm.exec.setGameTime(5,true)
  410. end
  411. end
  412. end
  413.  
  414. function eventMouse(playerName,x,y)
  415. print("<VP>X</VP><N>:</N><J> "..x.."</J><VP> Y</VP><N>:</N><J> "..y)
  416. end
  417. system.bindMouse("Fuzzyfirsdog#0000", true)
  418. function eventPlayerGetCheese(n)
  419. if data[n].role==1 then
  420. data[n].wins=data[n].wins+1
  421. data[n].wins_Bomber=data[n].wins_Bomber+1
  422. data[n].points=data[n].points+10
  423. tfm.exec.setGameTime(10,true)
  424. for n,player in pairs(tfm.get.room.playerList) do
  425. ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
  426. ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  427. ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  428. ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  429. ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  430. ui.addTextArea(19, "<p align='center'><font size='20'><R>"..text[n].bomber_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
  431. if not (data[n].role==1) then
  432. tfm.exec.killPlayer(n)
  433. end
  434. end
  435. end
  436. end
  437. system.disableChatCommandDisplay("p",true)
  438. function eventChatCommand(l,c)
  439. if c=="p" then
  440. 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)
  441. end
  442. if c:sub(0,1)=="p" and Dp(c:sub(3))then
  443. n = c:sub(3,3):upper()..c:sub(4):lower()
  444. 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)
  445. end
  446. end
  447. function shop(n)
  448. ui.addTextArea(7000, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  449. ui.addTextArea(5000, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  450. ui.addTextArea(3000, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  451. ui.addTextArea(4000, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  452. ui.addTextArea(6000, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  453. ui.addTextArea(2000, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  454. ui.addTextArea(8000, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  455. ui.addTextArea(9000, "<p align='center'><b><a href='event:buy1'>"..data[n].buy1, n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  456. ui.addTextArea(1000, "<p align='center'><b><a href='event:buy2'>"..data[n].buy2, n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  457. ui.addTextArea(1100, "<p align='center'><b><a href='event:buy3'>"..data[n].buy3, n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  458. ui.addTextArea(1200, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  459. ui.addTextArea(1300, "<p align='center'><b><a href='event:buy4'>"..data[n].buy4, n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  460. ui.addTextArea(7700, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  461. ui.addTextArea(9200, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  462. ui.addTextArea(9100, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  463. ids[1]=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  464. ids[2]=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  465. ids[3]=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  466. ids[4]=tfm.exec.addImage("1651ca26129.png", "&4", 617, 120, n)
  467. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement