Advertisement
Guest User

[LTM] v1.9 RACING MINIGAME! (beta)

a guest
Apr 15th, 2014
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 63.15 KB | None | 0 0
  1. --LuaTribeManager [LTM]
  2. SuperAdmin={"Nickname"}
  3. admins={"Nickname","Nickname"}
  4. --!fly and !flyoff
  5. function start()
  6. char = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z","0","1","2","3","4","5","6","7","8","9"}
  7. math.randomseed(os.time())
  8. pass = {}
  9. function generate(s, l)
  10. pass = {}
  11.         size = math.random(s,l)
  12.  
  13.         for z = 1,size do
  14.  
  15.                 case = math.random(1)
  16.                 a = math.random(1,#char)
  17.                 if case == 1 then
  18.                         x=string.upper(char[a])
  19.                 elseif case == 2 then
  20.                         x=string.lower(char[a])
  21.                 end
  22.         table.insert(pass, x)
  23.         end
  24.         return(table.concat(pass))
  25. end
  26. system.disableChatCommandDisplay("m#", true)
  27. generate(9,9);
  28. oj=20
  29. oj=oj*2
  30. rouF=-1
  31. rempver=-500
  32. proverenniy={}
  33. Banned={}
  34. mor="<font color='#2ECF73'>ON</font>"
  35. far=false
  36. faro="<font color='#CB546B'>OFF</font>"
  37. tear=false
  38. tea="<font color='#CB546B'>OFF</font>"
  39. xClick=000
  40. yClick=000
  41. info=false
  42. idName={}
  43. Module_Shamanhunt=false
  44. Module_Survivor=false
  45. Module_Bootcamp=false
  46. Module_Racing=false
  47. fire=false
  48. firew="<font color='#CB546B'>OFF</font>"
  49. adminfly={}
  50. log={}
  51.  
  52. popu=true
  53. popuset="<font color='#2ECF73'>ON</font>"
  54.  
  55. pabla=0
  56. gafra=10
  57. ui.addPopup(42,0, "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>",nil,-5000,-900,10200)
  58. ui.addTextArea(41,"<p align='center'><a href='event:NOWAYBAY'><font face='soopafresh' size='40'><font color='#879efe'><b>Lua</font><font color='#ffd667'>TribeManager</font></font></b></a></p>",nil,200,200,400,nil,nil,0x324650,99999999,true)
  59.  
  60. for name in pairs (admins) do
  61.         adminfly[name]=false
  62.                 print(adminfly[name])
  63. end
  64. for name in pairs (SuperAdmin) do
  65. adminfly[name]=false
  66.         print(adminfly[name])
  67. end
  68.  
  69. function Log(element)
  70. abr=table.maxn(log)
  71. if abr<=23 then
  72. table.insert(log, element)
  73. elseif abr>=24 then
  74. table.remove(log,1)
  75. table.insert(log,element)
  76. end
  77. end
  78. function textarea(player,msg)
  79. ui.addTextArea(77777,"<p align='center'><a href='event:close'> <font size='11'>"..msg.."</font></p></a>",player,6,368,800,30,0x1C3C41,0x1C3C41,0.7,true)
  80. end
  81. textt="<font color='#CB546B'>Администраторы: </font><font color='#ED67EA'>"..table.concat(admins, ", ").."</font>"
  82. textarea(player,textt)
  83. for name,player in pairs(tfm.get.room.playerList) do
  84. idName[name]=0
  85. end
  86. ralF={4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4061,4062,4063,4064,4065,4066,4067,4068,4069,4070}
  87. function eventNewPlayer(playerName)
  88. for name,player in pairs(tfm.get.room.playerList) do
  89. idName[name]=0
  90. end
  91. system.bindMouse(playerName, true)
  92. tfm.exec.bindKeyboard(playerName, 32, true, true)
  93. tfm.exec.bindKeyboard(playerName, 80, true, true)
  94. tfm.exec.bindKeyboard(playerName, 72, true, true)
  95. tfm.exec.bindKeyboard(playerName, 76, true, true)
  96. tfm.exec.bindKeyboard(playerName, 17, true, true)
  97. tfm.exec.bindKeyboard(playerName, 17, false, true)
  98. end
  99. function eventKeyboard(playerName, keyCode, down, xPosition, yPosition)
  100. if Module_Shamanhunt==true and sec<0 then--НАЧАЛО ШАМАНХАНТ
  101. if tfm.get.room.playerList[playerName].isShaman then
  102.     if keyCode == 81 then
  103.             keyCodeUserName[playerName] = 20
  104.         elseif keyCode == 37 then
  105.         keyCodeUserName[playerName] = 20
  106.     elseif keyCode == 39 then
  107.         keyCodeUserName[playerName] = 19
  108.         elseif keyCode == 68 then
  109.         keyCodeUserName[playerName] = 19
  110.     elseif keyCode == 40 or keyCode == 83 then
  111.         if os.time() - keyCodeULastTime[playerName] >= 1000 then
  112.             tfm.exec.addShamanObject(keyCodeUserName[playerName], xPosition, yPosition + 15, 0, 0, 0, false)
  113.             keyCodeULastTime[playerName] = os.time()
  114.         end
  115.     end
  116. end
  117. end--КОНЕЦ ШАМАНХАНТ
  118. if adminfly[playerName]==true then
  119. if keyCode==32 then
  120. tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  121. tfm.exec.displayParticle(26, xPosition-15, yPosition-35, 0, 0, 0, 0, nil)
  122. end
  123. end
  124. if far==true then
  125. if keyCode==32 then
  126. tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  127. tfm.exec.displayParticle(26, xPosition-15, yPosition-35, 0, 0, 0, 0, nil)
  128. end
  129. end
  130. for _,recv in pairs (admins) do
  131.     if (recv == playerName) then
  132. -----------------------------------LOG
  133. if keyCode == 76 and down == true then
  134. ui.addTextArea(08502, "<p align='center'><font color='#2ECF73'>----ADMIN LOG----</p><br><p align='left'>"..table.concat(log,"<br>").."</p></font>", playerName, 200, 40, 400, 340, 0x1C3C41, 0x1C3C41, 0.6)
  135. tfm.exec.bindKeyboard(playerName, 76, false, true)
  136. elseif keyCode == 76 and down == false then
  137. ui.removeTextArea(08502, playerName)
  138. tfm.exec.bindKeyboard(playerName, 76, true, true)
  139. end
  140. --
  141. if keyCode == 17 and down == true then
  142. key17=true
  143. else
  144. key17=false
  145. end
  146. -----------------------------------LOG END
  147.         if keyCode==80 then
  148.         ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",recv,22,36,53,16,nil,0x324650,nil,true)
  149.         end
  150.         end
  151.         end
  152.         for _,govno in pairs (SuperAdmin) do
  153.     if (govno == playerName) then
  154. ------------------------------LOG SPADMIN
  155. if keyCode == 76 and down == true then
  156. ui.addTextArea(08502, "<p align='center'><font color='#2ECF73'>----ADMIN LOG----</p><br><p align='left'>"..table.concat(log,"<br>").."</p></font>", playerName, 200, 40, 400, 340, 0x1C3C41, 0x1C3C41, 0.6)
  157. tfm.exec.bindKeyboard(playerName, 76, false, true)
  158. elseif keyCode == 76 and down == false then
  159. ui.removeTextArea(08502, playerName)
  160. tfm.exec.bindKeyboard(playerName, 76, true, true)
  161. end
  162. --
  163. if keyCode == 17 and down == true then
  164. key17=true
  165. else
  166. key17=false
  167. end
  168. ------------------------------LOGEND SPADMIN
  169.         if keyCode==80 then
  170.         ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",govno,22,36,53,16,nil,0x324650,nil,true)
  171.         end
  172.         end
  173.         end
  174.         for _,recv in pairs (admins) do
  175.     if (recv == playerName) then
  176.         if keyCode==72 then
  177.         ui.addTextArea(403,"| Пароль: |<p align='center'><a href='event:parol'><b>"..table.concat(pass).."</b></a></p>",recv,628,363,153,20,nil,0x324650,nil,true)
  178. rouF=oj
  179. end
  180. end
  181. end
  182. for _,govno in pairs (SuperAdmin) do
  183.     if (govno == playerName) then
  184.         if keyCode==72 then
  185.         ui.addTextArea(403,"| Пароль: |<p align='center'><a href='event:parol'><b>"..table.concat(pass).."</b></a></p>",govno,628,363,153,20,nil,0x324650,nil,true)
  186. rouF=oj
  187. end
  188. end
  189. end
  190. end
  191. idd=ralF[math.random(#ralF)]
  192. function eventMouse(playerName, xC, yC)
  193. for _,recv in pairs (admins) do
  194.     if (recv == playerName) then
  195. --ADMIN CNTRL TELEPORT
  196. if key17==true then
  197. tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
  198. tfm.exec.displayParticle(3, xC-10, yC-5, 0, 0, 0, 0, nil)
  199. tfm.exec.displayParticle(3, xC, yC, 0, 0, 0, 0, nil)
  200. tfm.exec.displayParticle(3, xC+3, yC+2, 0, 0, 0, 0, nil)
  201. tfm.exec.displayParticle(3, xC+6, yC+4, 0, 0, 0, 0, nil)
  202. tfm.exec.displayParticle(3, xC-5, yC+6, 0, 0, 0, 0, nil)
  203. tfm.exec.displayParticle(3, xC-2, yC+8, 0, 0, 0, 0, nil)
  204. tfm.exec.displayParticle(3, xC-10, yC+15, 0, 0, 0, 0, nil)
  205. tfm.exec.displayParticle(3, xC-10, yC+8, 0, 0, 0, 0, nil)
  206. tfm.exec.displayParticle(3, xC+10, yC+10, 0, 0, 0, 0, nil)
  207. end
  208. --      END
  209. if fire==true then
  210. a=xC
  211. b=yC
  212. local mas={a={0,10,-10,0,10,-10,0}, b={0,10,-10,10,0,0,-10}}
  213. for i = 1, 7 do
  214. fa(a+mas.a[i], b+mas.b[i])
  215. end
  216. end
  217. end
  218. end
  219. for _,abc in pairs (SuperAdmin) do
  220.     if (abc == playerName) then
  221. --SPADMIN CNTRL TELEPORT
  222. if key17==true then
  223. tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
  224. tfm.exec.displayParticle(3, xC-10, yC-5, 0, 0, 0, 0, nil)
  225. tfm.exec.displayParticle(3, xC, yC, 0, 0, 0, 0, nil)
  226. tfm.exec.displayParticle(3, xC+3, yC+2, 0, 0, 0, 0, nil)
  227. tfm.exec.displayParticle(3, xC+6, yC+4, 0, 0, 0, 0, nil)
  228. tfm.exec.displayParticle(3, xC-5, yC+6, 0, 0, 0, 0, nil)
  229. tfm.exec.displayParticle(3, xC-2, yC+8, 0, 0, 0, 0, nil)
  230. tfm.exec.displayParticle(3, xC-10, yC+15, 0, 0, 0, 0, nil)
  231. tfm.exec.displayParticle(3, xC-10, yC+8, 0, 0, 0, 0, nil)
  232. tfm.exec.displayParticle(3, xC+10, yC+10, 0, 0, 0, 0, nil)
  233. end
  234. --END
  235. if fire==true then
  236. a=xC
  237. b=yC
  238. local mas={a={0,10,-10,0,10,-10,0}, b={0,10,-10,10,0,0,-10}}
  239. for i = 1, 7 do
  240. fa(a+mas.a[i], b+mas.b[i])
  241. end
  242. end
  243. end
  244. end
  245. if tear==true then
  246. tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
  247. tfm.exec.displayParticle(3, xC-10, yC-5, 0, 0, 0, 0, nil)
  248. tfm.exec.displayParticle(3, xC, yC, 0, 0, 0, 0, nil)
  249. tfm.exec.displayParticle(3, xC+3, yC+2, 0, 0, 0, 0, nil)
  250. tfm.exec.displayParticle(3, xC+6, yC+4, 0, 0, 0, 0, nil)
  251. tfm.exec.displayParticle(3, xC-5, yC+6, 0, 0, 0, 0, nil)
  252. tfm.exec.displayParticle(3, xC-2, yC+8, 0, 0, 0, 0, nil)
  253. tfm.exec.displayParticle(3, xC-10, yC+15, 0, 0, 0, 0, nil)
  254. tfm.exec.displayParticle(3, xC-10, yC+8, 0, 0, 0, 0, nil)
  255. tfm.exec.displayParticle(3, xC+10, yC+10, 0, 0, 0, 0, nil)
  256. end
  257. if info==true then
  258. xClick=xC
  259. yClick=yC
  260. ui.addTextArea(idd,"<p align='center'><a href='event:mo'><font color='#FFDD00'>X</font><font color='#A4CF9E'>=</font><font color='#2ECF73'>"..xClick.."</font> <font color='#FFDD00'>Y</font><font color='#A4CF9E'>=</font><font color='#2ECF73'>"..yClick.."</font><b></b></a></p>",playerName,xC+10,yC-5,nil,20,nil,0x324650,nil,true)
  261. gord=10
  262. end
  263. end
  264. function eventChatCommand(playerName, message)
  265. local args={}
  266. for _,recv in pairs (admins) do
  267.     if (recv == playerName) then
  268.  
  269.  
  270.                 for argument in message:gmatch("[^#]+") do
  271.                         table.insert(args,argument)
  272.                 end
  273. if message=="fly" then
  274. adminfly[playerName]=true
  275. elseif message=="flyoff" then
  276. adminfly[playerName]=false
  277. end
  278. if args[1]=="chat" and args[2] then
  279. end
  280. if args[1]=="m" and args[2] then
  281. textarea(player,"<font color='#ED67EA'>[~Modération] "..args[2].."</font>")
  282. end
  283. if message=="panel" then
  284. ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
  285. end    
  286. if message=="arg" then
  287. print(arg[#arg])
  288. end
  289. if message=="pass" then
  290. ui.addTextArea(403,"| Пароль: |<p align='center'><a href='event:parol'><b>"..table.concat(pass).."</b></a></p>",playerName,628,363,153,20,nil,0x324650,nil,true)
  291. rouF=oj
  292. end
  293. if message=="banlist" then
  294. print(Banned[#Banned])
  295. end
  296.         end
  297.         end
  298.                 for _,abv in pairs (SuperAdmin) do
  299.              if (abv == playerName) then
  300. if message=="fly" then
  301. adminfly[playerName]=true
  302. elseif message=="flyoff" then
  303. adminfly[playerName]=false
  304. end
  305.         end
  306.         end
  307.         end
  308. function eventTextAreaCallback(id,name,callback)
  309. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  310. if callback == "close" then
  311. ui.removeTextArea(55555,name)
  312. end
  313. if callback == "closeShaman" then
  314. ui.removeTextArea(77777,name)
  315. end
  316. if callback=="closeSmall" then
  317. ui.removeTextArea(44444,name)
  318. end
  319. if callback=="closeBigAll" then
  320. ui.removeTextArea(33333,name)
  321. end
  322. end--КОНЕЦ ШАМАНХАНТ
  323. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  324. if callback=="closeSmall" then
  325. ui.removeTextArea(44444,name)
  326. ui.removeTextArea(44445,name)
  327. ui.removeTextArea(44446,name)
  328. end
  329. end--КОНЕЦ СУРВИВОР
  330. if callback=="mo" then
  331. ui.removeTextArea(idd,name)
  332. end
  333. if callback == "close" then
  334. ui.removeTextArea(77777,name)
  335. end
  336. keyinvoker = name
  337. if callback=="plusik" then
  338. if table.contains(proverenniy, keyinvoker) == false then
  339. ui.addPopup(1,2, "Введите пароль для доступа к функциям администратора",name,300,150,200)
  340. elseif table.contains(proverenniy, keyinvoker) == true then
  341. ui.removeTextArea(401, name)
  342. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  343. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  344. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  345. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  346. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  347. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  348. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  349. end
  350. end
  351. if callback=="sir" then
  352. ui.addPopup(2,2, "  <font color='#A4CF9E'>Введите что Вы хотите дать и кому</font><br>             <font color='#BABD2F'>Доступные команды:</font><br>                   <font color='#2ECF73'>cheese</font> <font color='#BABD2F'>Nick</font><br>                  <font color='#2ECF73'>vampire</font> <font color='#BABD2F'>Nick</font><br>                  <font color='#2ECF73'>shaman</font> <font color='#BABD2F'>Nick</font><br>                   <font color='#2ECF73'>victory</font> <font color='#BABD2F'>Nick</font><br><font size='9'><font color='#CB546B'>*Никнейм обязательно вводить с большой буквы (Пример:cheese Bushmeister)</font></font>",name,300,150,240)
  353. end
  354. if callback=="minus" then
  355. ui.removeTextArea(401, name)
  356. ui.removeTextArea(402, name)
  357. ui.removeTextArea(404, name)
  358. ui.removeTextArea(405, name)
  359. ui.removeTextArea(406, name)
  360. ui.removeTextArea(407, name)
  361. ui.removeTextArea(408, name)
  362. ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  363. --remove
  364. end
  365. if callback=="карта" then
  366. ui.removeTextArea(401, name)
  367. ui.removeTextArea(402, name)
  368. ui.removeTextArea(404, name)
  369. ui.removeTextArea(405, name)
  370. ui.removeTextArea(406, name)
  371. ui.removeTextArea(407, name)
  372. ui.removeTextArea(408, name)
  373. ui.addTextArea(03,"<p align='center'><a href='event:назад'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  374. ui.addTextArea(04,"<p align='center'><a href='event:изменить карту'><b>Изменить карту</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
  375. ui.addTextArea(05,"<p align='center'><a href='event:изменить название'><b>Изменить название</b></a></p>",name,222,36,133,16,nil,0x324650,nil,true)
  376. ui.addTextArea(06,"<p align='center'><a href='event:изменить время'><b>Изменить время</b></a></p>",name,372,36,133,16,nil,0x324650,nil,true)
  377. ui.addTextArea(1706,"<p align='center'><a href='event:рестартмап'><b>Перезагрузить</b></a></p>",name,520,36,133,16,nil,0x324650,nil,true)
  378. end
  379. if callback=="назад" then
  380. ui.removeTextArea(03, name)
  381. ui.removeTextArea(04, name)
  382. ui.removeTextArea(05, name)
  383. ui.removeTextArea(06, name)
  384. ui.removeTextArea(1706, name)
  385. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  386. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  387. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  388. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  389. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  390. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  391. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  392. end
  393. if callback=="изменить карту" then
  394. ui.addPopup(3,2, "<br><p align='center'><b>Введите @номер карты</b></p>",name,300,150,200)
  395. end
  396. if callback=="изменить название" then
  397. ui.addPopup(4,2, "<br><p align='center'><b>Введите название карты</b></p>",name,300,150,200)
  398. end
  399. if callback=="изменить время" then
  400. ui.addPopup(5,2, "<br><p align='center'><b>Введите время раунда в секундах</b></p>",name,300,150,200)
  401. end
  402. if callback=="рестартмап" then
  403. kodrestarta = tfm.get.room.xmlMapInfo.mapCode
  404. tfm.exec.newGame(kodrestarta)
  405. end
  406. if callback=="игрок" then
  407. ui.removeTextArea(401, name)
  408. ui.removeTextArea(402, name)
  409. ui.removeTextArea(404, name)
  410. ui.removeTextArea(405, name)
  411. ui.removeTextArea(406, name)
  412. ui.removeTextArea(407, name)
  413. ui.removeTextArea(408, name)
  414. ui.addTextArea(07,"<p align='center'><a href='event:назадигрок'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  415. ui.addTextArea(08,"<p align='center'><a href='event:цвет'><b>Цвет никнейма</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
  416. ui.addTextArea(09,"<p align='center'><a href='event:убить'><b>Убить</b></a></p>",name,222,36,83,16,nil,0x324650,nil,true)
  417. ui.addTextArea(010,"<p align='center'><a href='event:телепорт'><b>Телепортировать</b></a></p>",name,322,36,133,16,nil,0x324650,nil,true)
  418. end
  419. if callback=="цвет" then
  420. ui.addPopup(6,2, "<br><p align='center'><b>Введите никнейм и код цвета.</b></p><br><font size='9'><font color='#CB546B'>*Код цвета должен быть без # (Пример:Bushmeister FF9500)</font></font>",name,300,150,200)
  421. end
  422. if callback=="убить" then
  423. ui.addPopup(7,2, "<br><p align='center'><b>Введите никнейм игрока которого хотите убить.</b></p>",name,300,150,200)
  424. end
  425. if callback=="телепорт" then
  426. ui.addPopup(8,2, "<br><p align='center'><b>Введите никнейм игрока и x y координаты.</b></p>",name,300,150,200)
  427. end
  428. if callback=="бан" then
  429. ui.addPopup(9,2, "<br><p align='center'><b>Введите никнейм игрока и причину.<br> <font color='#CB546B'>После никнейма обязателен знак</font> <font color='#2ECF73'>#</font><br><font color='#CB546B'>Пример: Bushmeister</font><font color='#2ECF73'>#</font><font color='#CB546B'>Hack!</font></b></p>",name,300,150,200)
  430. end
  431. if callback=="разбан" then
  432. ui.addPopup(10,2, "<br><p align='center'><b>Введите никнейм игрока.</b></p>",name,300,150,200)
  433. end
  434. if callback=="назадигрок" then
  435. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  436. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  437. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  438. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  439. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  440. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  441. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  442. ui.removeTextArea(07, name)
  443. ui.removeTextArea(08, name)
  444. ui.removeTextArea(09, name)
  445. ui.removeTextArea(010, name)
  446. end
  447. if callback=="другое" then
  448. ui.removeTextArea(401, name)
  449. ui.removeTextArea(402, name)
  450. ui.removeTextArea(404, name)
  451. ui.removeTextArea(405, name)
  452. ui.removeTextArea(406, name)
  453. ui.removeTextArea(407, name)
  454. ui.removeTextArea(408, name)
  455. ui.addTextArea(013,"<p align='center'><a href='event:назаддругое'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  456. ui.addTextArea(014,"<p align='center'><a href='event:snow'><b>Снег</b></a></p>",name,92,36,53,16,nil,0x324650,nil,true)
  457. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана: "..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  458. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  459. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  460. ui.addTextArea(018,"<p align='center'><a href='event:добъект'><b>Добавить объект</b></a></p>",name,592,36,143,16,nil,0x324650,nil,true)
  461. ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
  462. end
  463. if callback=="snow" then
  464. ui.addPopup(11,2, "<br><p align='center'><b>Введите <font color='#2ECF73'>время</font> которое будет идти снег<br> (<font color='#2ECF73'>в секундах</font>) и <font color='#2ECF73'>силу</font> снежков(стандартная - 10)</b></p><font color='#CB546B'><font size='9'>Пример: 60 12</font></font>",name,300,150,200)
  465. end
  466. if callback=="скилы" then
  467. if mor=="<font color='#2ECF73'>ON</font>" then
  468. mor="<font color='#CB546B'>OFF</font>"
  469. Log(""..name.." отключил(а) умения шамана")
  470. tfm.exec.disableAllShamanSkills(true)
  471. textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#CB546B'> OFF</font>")
  472. ui.removeTextArea(015, name)
  473. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  474. elseif mor=="<font color='#CB546B'>OFF</font>" then
  475. mor="<font color='#2ECF73'>ON</font>"
  476. Log(""..name.." включил(a) умения шамана")
  477. tfm.exec.disableAllShamanSkills(false)
  478. textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#2ECF73'> ON</font>")
  479. ui.removeTextArea(015, name)
  480. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  481. end
  482. end
  483. if callback=="фли" then
  484. if far==false then
  485. far=true
  486. faro="<font color='#2ECF73'>ON</font>"
  487. Log(""..name.." включил(a) режим Fly")
  488. textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#2ECF73'> ON</font>")
  489. dor();
  490. ui.removeTextArea(016, name)
  491. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  492. elseif far==true then
  493. far=false
  494. Log(""..name.." выключил(a) режим Fly")
  495. faro="<font color='#CB546B'>OFF</font>"
  496. textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#CB546B'> OFF</font>")
  497. dor();
  498. ui.removeTextArea(016, name)
  499. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  500. end
  501. end
  502. if callback=="телепортак" then
  503. if tear==false then
  504. tear=true
  505. textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#2ECF73'> ON</font>")
  506. Log(""..name.." включил(а) режим Teleport")
  507. tea="<font color='#2ECF73'>ON</font>"
  508. ui.removeTextArea(017, name)
  509. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  510. dor();
  511. elseif tear==true then
  512. tear=false
  513. Log(""..name.." выключил(а) режим Teleport")
  514. tea="<font color='#CB546B'>OFF</font>"
  515. textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#CB546B'> OFF</font>")
  516. ui.removeTextArea(017, name)
  517. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  518. dor();
  519. end
  520. end
  521. if callback=="добъект" then
  522. ui.addPopup(12,2, "<br><p align='center'><b>Введите id объекта и X Y координаты.</b></p>",name,300,150,200)
  523. ui.addPopup(00889,0, "<p align='center'><b>Список объектов:</p></b><br><p align='left'>ID   27   оранжевый портал<br>ID   28   шарик<br>ID   32   руна<br>ID   34   снег<br>ID   35   стрелка Валентина<br>ID   39   яблоко<br>ID   40   овчека<br>ID   45   ледяная палка<br>ID   46   шоколадная палка<br>ID   57   облако<br>ID   59   пузырь<br>ID   60   крошечная палка<br>ID   61   компаньон-куб<br>ID   62   стабильная руна</p>",name,510,90,200)
  524. ui.addPopup(00888,0, "<p align='center'><b>Список объектов:</p></b><br><p align='left'>ID   0   стрелка<br>ID   1   маленький ящик<br>ID   2   большой ящик<br>ID   3   маленькая палка<br>ID   4   большая палка<br>ID   6   мячик<br>ID   7   трамплин<br>ID   10   наковальня<br>ID   18   ядро вниз<br>ID   19   ядро вправо<br>ID   20   ядро влево<br>ID   23   бомба<br>ID   24   спирит<br>ID   26   голубой портал</p>",name,90,90,200)
  525. end
  526. if callback=="файер" then
  527. if fire==false then
  528. fire=true
  529. firew="<font color='#2ECF73'>ON</font>"
  530. Log(""..name.." включил(а) фейерверки")
  531. ui.removeTextArea(027, name)
  532. ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
  533. elseif fire==true then
  534. fire=false
  535. Log(""..name.." выключил(а) фейерверки")
  536. firew="<font color='#CB546B'>OFF</font>"
  537. ui.removeTextArea(027, name)
  538. ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
  539. end
  540. end
  541. if callback=="назаддругое" then
  542. alfazet=0
  543. ui.removeTextArea(013, name)
  544. ui.removeTextArea(014, name)
  545. ui.removeTextArea(015, name)
  546. ui.removeTextArea(016, name)
  547. ui.removeTextArea(017, name)
  548. ui.removeTextArea(018, name)
  549. ui.removeTextArea(027, name)
  550. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  551. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  552. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  553. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  554. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  555. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  556. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  557. end
  558. if callback=="админ" then
  559. ui.removeTextArea(401, name)
  560. ui.removeTextArea(402, name)
  561. ui.removeTextArea(404, name)
  562. ui.removeTextArea(405, name)
  563. ui.removeTextArea(406, name)
  564. ui.removeTextArea(407, name)
  565. ui.removeTextArea(408, name)
  566. ui.addTextArea(019,"<p align='center'><a href='event:назададмин'><b>Назад</b></a></p>",name,22,36,53,17,nil,0x324650,nil,true)
  567. ui.addTextArea(020,"<p align='center'><a href='event:папуп'><b>ui.addPopup() "..popuset.."</b></a></p>",name,92,36,133,17,nil,0x324650,nil,true)
  568. ui.addTextArea(021,"<p align='center'><a href='event:месаге'><b>Message</b></a></p>",name,242,36,85,17,nil,0x324650,nil,true)
  569. ui.addTextArea(011,"<p align='center'><a href='event:бан'><b>Забанить</b></a></p>",name,347,36,100,16,nil,0x324650,nil,true)
  570. ui.addTextArea(012,"<p align='center'><a href='event:разбан'><b>Разбанить</b></a></p>",name,469,36,100,16,nil,0x324650,nil,true)
  571. for _,govno in pairs (SuperAdmin) do
  572.     if (govno == name) then
  573.         ui.addTextArea(022,"<p align='center'><a href='event:Добавить админа'><b><font color='#FFDD00'>Добавить админа</font></b></a></p>",name,22,78,133,17,nil,0x324650,nil,true)
  574.         ui.addTextArea(023,"<p align='center'><a href='event:удалить админа'><b><font color='#FFDD00'>Удалить админа</font></b></a></p>",name,173,78,130,17,nil,0x324650,nil,true)
  575.         ui.addTextArea(024,"<p align='center'><a href='event:инфо'><b><font color='#FFDD00'>Info</font></b></a></p>",name,323,78,53,17,nil,0x324650,nil,true)
  576.         ui.addTextArea(025,"<p align='center'><a href='event:попустройки'><b><font color='#FFDD00'>Popup: "..popuset.."</font></b></a></p>",name,397,78,83,17,nil,0x324650,nil,true)
  577.                 ui.addTextArea(026,"<p align='center'><a href='event:рестарт'><b><font color='#FFDD00'>Restart</font></b></a></p>",name,500,78,73,17,nil,0x324650,nil,true)
  578.         end
  579.         end
  580. end
  581. if callback=="папуп" then
  582. if popu==true then
  583. ui.addPopup(13,2, "<p align='center'><b>Введите текст таблички и X Y координаты.<br><font color='#CB546B'>ВНИМАНИЕ!</font><br><font color='#BABD2F'>Обязательно использовать символ</font><font color='#2ECF73'> #</font> <font color='#BABD2F'>для разделения аргументов.</font></p><p align='left'><font color='#CB546B'>Пример:</font><font color='#2ECF73'>Текст </font><font color='#BABD2F'>#</font><font color='#2ECF73'>400</font><font color='#BABD2F'>#</font><font color='#2ECF73'>200</font></b></p>",name,300,150,200)
  584. end
  585. end
  586. if callback=="месаге" then
  587. ui.addPopup(14,2, "<br><p align='center'><b>Введите текст сообщения</b></p>",name,300,150,200)
  588. end
  589. if callback=="Добавить админа" then
  590. ui.addPopup(15,2, "<br><p align='center'><b>Введите никнейм нового админа</p>",name,300,150,200)
  591. end
  592. if callback=="удалить админа" then
  593. ui.addPopup(16,2, "<br><p align='center'><b>Введите никнейм админа и причину</b> <font size='9'>(необязательно)</font></p>",name,300,150,200)
  594. end
  595. if callback=="инфо" then
  596. if info==false then
  597. info=true
  598. textarea(player,"<font color='#ED67EA'>Info:</font><font color='#2ECF73'> ON</font>")
  599. elseif info==true then
  600. info=false
  601. textarea(player,"<font color='#ED67EA'>Info:</font><font color='#CB546B'> OFF</font>")
  602. ui.removeTextArea(idd)
  603. end
  604. end
  605. if callback=="попустройки" then
  606. if popu==true then
  607. popu=false
  608. popuset="<font color='#CB546B'>OFF"
  609. ui.removeTextArea(020, name)
  610. ui.addTextArea(020,"<p align='center'><a href='event:папуп'><b>ui.addPopup() "..popuset.."</b></a></p>",name,92,36,133,17,nil,0x324650,nil,true)
  611. for _,govno in pairs (SuperAdmin) do
  612.     if (govno == name) then
  613.         ui.removeTextArea(025,name)
  614.                 ui.addTextArea(025,"<p align='center'><a href='event:попустройки'><b><font color='#FFDD00'>Popup: "..popuset.."</font></font></b></a></p>",name,397,78,83,17,nil,0x324650,nil,true)
  615.                 end
  616.                 end
  617. elseif
  618. popu==false then
  619. popu=true
  620. popuset="<font color='#2ECF73'>ON"
  621. ui.removeTextArea(020, name)
  622. ui.addTextArea(020,"<p align='center'><a href='event:папуп'><b>ui.addPopup() "..popuset.."</b></a></p>",name,92,36,133,17,nil,0x324650,nil,true)
  623. for _,govno in pairs (SuperAdmin) do
  624.     if (govno == name) then
  625.                 ui.removeTextArea(025,name)
  626.                 ui.addTextArea(025,"<p align='center'><a href='event:попустройки'><b><font color='#FFDD00'>Popup: "..popuset.."</font></b></a></p>",name,397,78,83,17,nil,0x324650,nil,true)
  627. end
  628. end
  629. end
  630. end
  631. if callback=="рестарт" then
  632. ui.addPopup(17,1, "<br><p align='center'><b>Перезапустить скрипт?</p>",name,300,150,200)
  633. ui.addPopup(18,0, "<br><p align='center'><b><font color='#CB546B'>Администраторы: </font><font color='#E88F4F'>"..admn.."</font><font color='#CB546B'><br>SuperAdmin: </font><font color='#E88F4F'>"..sadmn.."</font></p>",name,300,250,200)
  634. end
  635. if callback=="назададмин" then
  636. for _,govno in pairs (SuperAdmin) do
  637.     if (govno == name) then
  638.         ui.removeTextArea(022,name)
  639.         ui.removeTextArea(023,name)
  640.         ui.removeTextArea(024,name)
  641.         ui.removeTextArea(025,name)
  642.         ui.removeTextArea(026,name)
  643.         end
  644.         end
  645.         ui.removeTextArea(011, name)
  646.         ui.removeTextArea(012, name)
  647. ui.removeTextArea(019, name)
  648. ui.removeTextArea(020, name)
  649. ui.removeTextArea(021, name)
  650. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  651. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  652. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  653. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  654. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  655. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  656. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  657. end
  658. if callback=="мини-игры" then
  659. ui.removeTextArea(401, name)
  660. ui.removeTextArea(402, name)
  661. ui.removeTextArea(404, name)
  662. ui.removeTextArea(405, name)
  663. ui.removeTextArea(406, name)
  664. ui.removeTextArea(407, name)
  665. ui.removeTextArea(408, name)
  666. ui.addTextArea(028,"<p align='center'><a href='event:назадигра'><b>Назад</b></a></p>",name,22,36,53,17,nil,0x324650,nil,true)
  667. ui.addTextArea(029,"<p align='center'><a href='event:shamanhunt'><b>Shamanhunt</b></a></p>",name,92,36,113,17,nil,0x324650,nil,true)
  668. ui.addTextArea(030,"<p align='center'><a href='event:stopgame'><font color='#FFDD00'><b>Stop</b></font></a></p>",name,22,73,53,17,nil,0x324650,nil,true)
  669. ui.addTextArea(031,"<p align='center'><a href='event:survivor'><b>Survivor</b></a></p>",name,222,36,90,17,nil,0x324650,nil,true)
  670. ui.addTextArea(032,"<p align='center'><a href='event:bootcamp'><b>Bootcamp</b></a></p>",name,332,36,88,17,nil,0x324650,nil,true)
  671. ui.addTextArea(0033,"<p align='center'><a href='event:racing'><b>Racing</b></a></p>",name,442,36,80,17,nil,0x324650,nil,true)
  672. end
  673. if callback=="shamanhunt" then
  674. if Module_Shamanhunt==false then
  675. Module_Shamanhunt=true
  676. startShamanhunt();
  677. Log(""..name.." включил(а) мини-игру Shamanhunt")
  678. print("<V>Module_Shamanhunt=<BV>true")
  679. elseif Module_Shamanhunt==true then
  680. end
  681. end
  682. if callback=="survivor" then
  683. if Module_Survivor==false then
  684. Module_Survivor=true
  685.  startSurvivor();
  686. print("<V>Module_Survivor=<BV>true")
  687. Log(""..name.." включил(а) режим Survivor")
  688. end
  689. end
  690. if callback=="bootcamp" then
  691. if Module_Bootcamp==false then
  692. Module_Bootcamp=true
  693. print("<V>Module_Bootcamp=<BV>true")
  694. Log(""..name.." включил(а) режим Bootcamp")
  695. startBootcamp();
  696. end
  697. end
  698. if callback=="racing" then
  699. if Module_Racing==false then
  700. Module_Racing=true
  701. print("<V>Module_Racing=<BV>true")
  702. Log(""..name.." включил(а) мини-игру Racing")
  703. start_racing();
  704. end
  705. end
  706. if callback=="stopgame" then
  707. ui.addPopup(18,1, "<br><p align='center'><b>Остановить работу всех игр?</p>",name,300,150,200)
  708. end
  709. if callback=="назадигра" then
  710. ui.removeTextArea(028, name)
  711. ui.removeTextArea(029, name)
  712. ui.removeTextArea(030, name)
  713. ui.removeTextArea(031, name)
  714. ui.removeTextArea(032, name)
  715. ui.removeTextArea(0033, name)
  716. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  717. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  718. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  719. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  720. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  721. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  722. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  723. end
  724. end
  725. gav={"ste"}
  726. function eventPopupAnswer(id,playerName,answer)
  727. local arg={}
  728. local rabbit={}
  729.  
  730.                 for argument in answer:gmatch("[^%s]+") do
  731.                         table.insert(arg,argument)
  732.                 end
  733.                 for argument in answer:gmatch("[^#]+") do
  734.                         table.insert(rabbit,argument)
  735.                 end
  736. if id==1 then
  737. if answer==table.concat(pass) then
  738. table.insert(proverenniy, playerName)
  739. ui.removeTextArea(401, playerName)
  740. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
  741. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",playerName,92,36,83,16,nil,0x324650,nil,true)
  742. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",playerName,192,36,83,16,nil,0x324650,nil,true)
  743. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",playerName,292,36,83,16,nil,0x324650,nil,true)
  744. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",playerName,392,36,83,16,nil,0x324650,nil,true)
  745. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",playerName,492,36,73,16,nil,0x324650,nil,true)
  746. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",playerName,582,36,103,16,nil,0x324650,nil,true)
  747. ui.addTextArea(02,"<p align='center'><a href='event:AGHненужно'><b>Разблокировано!</b></a></p>",playerName,330,206,123,16,nil,0x324650,nil,true)
  748. rempver=5
  749. else
  750. print("<R>Неверный пароль!")
  751. end
  752. end
  753. if id==2 then
  754. if arg[1]=="cheese" and arg[2] then
  755. tfm.exec.giveCheese(arg[2])
  756. end
  757. if arg[1]=="vampire" and arg[2] then
  758. tfm.exec.setVampirePlayer(arg[2])
  759. end
  760. if arg[1]=="shaman" and arg[2] then
  761. tfm.exec.setShaman(arg[2])
  762. end
  763. if arg[1]=="victory" and arg[2] then
  764. tfm.exec.playerVictory(arg[2])
  765. end
  766. end
  767. if id==3 then
  768. if arg[1] then
  769.     if arg[1]~=nil then
  770.     tfm.exec.newGame(arg[1])
  771.         Log(""..playerName.." изменил(а) карту на @"..arg[1].."")
  772.         end
  773. end
  774. end
  775. if id==4 then
  776. if rabbit[1] then
  777.     if rabbit[1]~=nil then
  778.     tfm.exec.setUIMapName(rabbit[1])
  779.         Log(""..playerName.." сменил(а) название карты на "..rabbit[1].."")
  780.         end
  781. end
  782. end
  783. if id==5 then
  784. if arg[1] then
  785.     if arg[1]~=nil then
  786.     tfm.exec.setGameTime(arg[1])
  787.         Log(""..playerName.." установил(а) время раунда "..arg[1].." секунд")
  788.         end
  789. end
  790. end
  791. if id==6 then
  792. if arg[1]~=nil then
  793. tfm.exec.setNameColor(arg[1], "0x"..arg[2])
  794. Log(""..playerName.." изменил(а) цвет никнейма "..arg[1].."")
  795. end
  796. end
  797. if id==7 then
  798. if arg[1] then
  799.     if arg[1]~=nil then
  800.     tfm.exec.killPlayer(arg[1])
  801.         Log(""..playerName.." убил(а) "..arg[1])
  802.         end
  803. end
  804. end
  805. if id==8 then
  806. if arg[1] then
  807.     if arg[1]~=nil then
  808.         tfm.exec.movePlayer(arg[1], arg[2], arg[3])
  809.         Log(""..playerName.." телепортировал(а) "..arg[1])
  810. end
  811. end
  812. end
  813. if id==9 then
  814. if rabbit[1] and rabbit[2] then
  815.     if rabbit[1]~=nil then
  816.         textarea(player,"<font color='#CB546B'>"..rabbit[1].."</font><font color='#BABD2F'> забанен. Причина: </font><font color='#CB546B'>"..rabbit[2].."</font>")
  817.         table.insert(Banned,rabbit[1])
  818.         ui.addPopup(005,0, "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>",rabbit[1],-5000,-900,10200)
  819.     ui.addPopup(006,0, "<br><p align='center'>Вы были забанены<br>Причина: <font color='#CB546B'>"..rabbit[2].."</p></font>",rabbit[1],300,150,200)
  820.                 Log(""..playerName.." забанил(а) "..rabbit[1].." Причина: "..rabbit[2])
  821. end
  822. end
  823. end
  824. if id==10 then
  825. if arg[1] then
  826.     if arg[1]~=nil then
  827.         table.rem(Banned,arg[1])
  828.         ui.addPopup(005,0, "0",arg[1],-5000,-900,10200)
  829.         textarea(player,"<font color='#CB546B'>"..arg[1].."</font><font color='#BABD2F'> разбанен</font>")
  830.         Log(""..playerName.." разбанил(а) "..arg[1])
  831.         end
  832.         end
  833.         end
  834.         if id==11 then
  835. if arg[1] then
  836.     if arg[1]~=nil then
  837.         tfm.exec.snow(arg[1], arg[2])
  838.                 Log(""..playerName.." включил(а) снег на "..arg[1].." секунд")
  839.         end
  840.         end
  841.         end
  842. if id==12 then
  843. ui.addPopup(00888,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
  844. ui.addPopup(00889,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
  845. if arg[1] then
  846.     if arg[1]~=nil then
  847.         tfm.exec.addShamanObject(arg[1], arg[2], arg[3],nil,nil,nil, arg[4])
  848.         end
  849.         end
  850.         end
  851. if id==13 then
  852. if arg[1] then
  853.     if arg[1]~=nil then
  854. for name,player in pairs(tfm.get.room.playerList) do
  855. pabla=ralF[math.random(#ralF)]
  856. ui.addPopup(pabla,0, "<p align='center'><b>"..rabbit[1].."</b></p>",name,rabbit[2],rabbit[3],150)
  857.         end
  858.         end
  859. end
  860. end
  861. if id==14 then
  862. if arg[1] then
  863.     if arg[1]~=nil then
  864.         textarea(player,"<font color='#ED67EA'>[~Modération] "..rabbit[1].."</font>")
  865.         end
  866.         end
  867. end
  868. if id==15 then
  869. if arg[1] then
  870.     if arg[1]~=nil then
  871.         table.insert(admins,arg[1])
  872.                 textarea(player,"<font color='#BABD2F'>Приветствуем нового администратора - </font><font color='#ED67EA'>"..arg[1].."!</font>")
  873.         admn=table.concat(admins,", ")
  874.         end
  875.         end
  876. end
  877. if id==16 then
  878.                         if arg[1] then
  879.                                 if arg[1]~=nil then
  880.                                         table.rem(admins,arg[1])
  881.                                         for i,iddd in ipairs({401,402,403,404,405,406,407,408,028,029,019,020,021,011,012,022,023,024,025,026,020,027,018,017,016,015,014,013,07,08,09,010,03,04,05,06,030,031,032}) do
  882.                      ui.removeTextArea(iddd, arg[1])
  883.                     end
  884.                                         local pr = ""
  885.                                         if arg[2]~=nil then
  886.                                                 pr= " <R>Причина:<J> "
  887.                                                 for j=2, #arg, 1 do
  888.                                                         pr = pr.." "..arg[j]
  889.                                                 end
  890.                                         end
  891.                                         textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font>"..pr)
  892.                                     admn=table.concat(admins,", ")
  893.                                 end
  894.                         end
  895.                 end
  896. if id==17 then
  897. if answer=="yes" then
  898. start();
  899. end
  900. end
  901. if id==18 then
  902. if answer=="yes" then
  903. print("<V>Module_game=<R>false")
  904. Game_off()
  905.                 Log(""..playerName.." выключил(а) все мини-игры")
  906. end
  907. end
  908. end
  909. gord=-1
  910. regros={"<CEP>Bush","<VP>Creator: "}
  911. startsh=0
  912. function eventLoop(a,timeLeft)
  913. dor();
  914.  
  915. if Module_Racing==true then--RACING
  916.         if (tfm.get.room.MouseAlive())==0 then
  917.             new_race()
  918.         end
  919.         if timeLeft<=0 then
  920.             new_race()
  921.         end
  922.     end--RACING END
  923.  
  924. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  925. if startsh==1 then
  926. if timeLeft <= 0 then
  927.                 tfm.exec.newGame(mapss[math.random(#mapss)]);
  928.         end
  929. z=z-1
  930. sec=sec-0.5
  931. if sec==0 then
  932. TextAllBig(player,"Start!")
  933. tfm.exec.newGame(mapss[math.random(#mapss)]);
  934. elseif sec>0 then
  935. TextAllBig(player,"Shamanhunt будет запущен через "..sec.." секунд")
  936. end
  937.  if(shaman~=nil) and not tfm.get.room.playerList[shaman].isDead then
  938.   local shamanx=tfm.get.room.playerList[shaman].x
  939.   local shamany=tfm.get.room.playerList[shaman].y
  940.   for name,player in pairs(tfm.get.room.playerList) do
  941.    if not tfm.get.room.playerList[name].isShaman then
  942.     x=tfm.get.room.playerList[name].x
  943.     y=tfm.get.room.playerList[name].y
  944.     if x>shamanx-30 and x<shamanx+30 and y>shamany-30 and y<shamany+30 and z<=6 then
  945.      tfm.exec.giveCheese(name)
  946.     end
  947.    if tfm.get.room.currentMap=="@4465309" then
  948.    if (x>740 and x<780 and y>70 and y<100) then
  949.    tfm.exec.setVampirePlayer(name)
  950.    end
  951.    end
  952.    end
  953.   end
  954.  end
  955.  if i==1 then
  956.  SmallText(player, "<font color='#98E2EB'>1 Мышь взяла сыр!</font>")
  957. i=i+20
  958. end
  959. if d==5 then
  960.  SmallText(player, "<font color='#98E2EB'>5 Мышам достался сыр!</font>")
  961. d=d+20
  962. end
  963. if k==10 then
  964.  SmallText(player, "<font color='#98E2EB'>10 мышам достался сыр! Шаман нуб и опозорился!</font>")
  965. tfm.exec.newGame(mapss[math.random(#mapss)]);
  966. end
  967. end
  968. end--КОНЕЦ ШАМАНХАНТ
  969. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  970.  getMouseCount();
  971.  if timeLeft<=0 and getMouseCount()>1 then
  972.  SmallText(player,"<font color='#ED67EA'>[~Modération]</font>Время вышло, <font color='#ED67EA'>"..shaman.." </font>нуб и опозорился! ^_^</font>")
  973.   tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  974.  
  975.   elseif timeLeft<=0 and getMouseCount()==1 then
  976.   tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  977.  end
  978.  end--КОНЕЦ СУРВИВОР
  979.  if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
  980.  if timeLeft<=0 then
  981.  tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)])
  982.  end
  983.  end--КНЕЦ БК
  984. gord=gord-1
  985. gafra=gafra-1
  986. if gafra==7 then
  987. ui.addPopup(42,0, "1",nil,-5000,-900,10200)
  988. elseif gafra==4 then
  989. ui.removeTextArea(41)
  990. end
  991. if gord==0 then
  992. ui.removeTextArea(idd)
  993. end
  994.  for player,name in pairs(tfm.get.room.playerList) do
  995.   if table.contains(Banned,player) then
  996.    tfm.exec.killPlayer(player)
  997.   end
  998.  end
  999. for name,player in pairs(tfm.get.room.playerList) do
  1000. x=tfm.get.room.playerList[name].x
  1001. y=tfm.get.room.playerList[name].y
  1002. end
  1003. rempver=rempver-1
  1004. if rempver==0 then
  1005. ui.removeTextArea(02, name)
  1006. end
  1007. rouF=rouF-1
  1008. if rouF==0 then
  1009. ui.removeTextArea(403, name)
  1010. end
  1011. oj=oj-1
  1012. if oj==0 then
  1013. o();
  1014. end
  1015. end
  1016. function o()
  1017. generate(9,9);
  1018. oj=20
  1019. oj=oj*2
  1020. end
  1021. alf={"mei","r"}
  1022. function dor()
  1023. for name,player in pairs(tfm.get.room.playerList) do
  1024. tfm.exec.bindKeyboard(name, 32, true, true)
  1025. tfm.exec.bindKeyboard(name, 80, true, true)
  1026. tfm.exec.bindKeyboard(name, 72, true, true)
  1027. tfm.exec.bindKeyboard(name, 76, true, true)
  1028. tfm.exec.bindKeyboard(name, 17, true, true)
  1029. tfm.exec.bindKeyboard(name, 17, false, true)
  1030. system.bindMouse(name, true)
  1031. end
  1032. end
  1033. for i,command in ipairs({"pass","panel","banlist","chat#","info"}) do
  1034.         system.disableChatCommandDisplay(command)
  1035.         end
  1036. function table.contains(table, element)
  1037.   for _, value in pairs(table) do
  1038.     if value == element then
  1039.       return true
  1040.     end
  1041.   end
  1042.   return false
  1043. end
  1044. function table.notnill (table)
  1045. if next(table) == nil then
  1046.    return false
  1047. else
  1048. return true
  1049. end
  1050. end
  1051. if table.notnill(SuperAdmin)  == true then
  1052. print("<R>SuperAdmin: <ROSE>"..SuperAdmin[1])
  1053. else
  1054. end
  1055. if gord==-1 then
  1056. print(regros[2]..regros[1]..alf[1]..gav[1]..alf[2])
  1057. gord=88888888
  1058. else
  1059. system.exit()
  1060. end
  1061. function table.indexof(t,val)
  1062.     for k,v in ipairs(t) do
  1063.         if v == val then return k end
  1064.     end
  1065. end
  1066. function table.rem(tab,value)
  1067. table.remove(tab,table.indexof(tab,value))
  1068. end
  1069. dor();
  1070. --[[
  1071. for key,value in pairs(args) do
  1072. if key>=2 then
  1073. print(value)
  1074. end
  1075. end]]
  1076. admn=table.concat(admins,", ")
  1077. if table.notnill(SuperAdmin)  == true then
  1078. sadmn=""..SuperAdmin[1]
  1079. table.insert(proverenniy,SuperAdmin[1])
  1080. end
  1081. end
  1082. start();
  1083. function fa(a, b)
  1084. for i=1, 4 do
  1085. if i == 1 then
  1086. id = 13
  1087. masUzor={a={50,0,0,-50,30,-30,-30,30},b={0,50,-50,0,30,-30,30,-30}, va={0.5,0,0,-0.5,0.5,-0.5,-0.5,0.5}, vb={0,0.5,-0.5,0,0.5,-0.5,0.5,-0.5}}
  1088. elseif i == 2 then
  1089. id = 1
  1090. masUzor={a={40,0,0,-40,20,-20,-20,20},b={0,40,-40,0,20,-20,20,-20}, va={0.5,0,0,-0.5,0.5,-0.5,-0.5,0.5}, vb={0,0.5,-0.5,0,0.5,-0.5,0.5,-0.5}}
  1091. elseif i == 3 then
  1092. id = 2
  1093. masUzor={a={30,0,0,-30,10,-10,-10,10},b={0,30,-30,0,10,-10,10,-10}, va={0.5,0,0,-0.5,0.5,-0.5,-0.5,0.5}, vb={0,0.5,-0.5,0,0.5,-0.5,0.5,-0.5}}
  1094. elseif i == 4 then
  1095. id = 9
  1096. masUzor={a={20,0,0,-20,0,-0,-0,0},b={0,20,-20,0,0,-0,0,-0}, va={0.5,0,0,-0.5,0.5,-0.5,-0.5,0.5}, vb={0,0.5,-0.5,0,0.5,-0.5,0.5,-0.5}}
  1097. end
  1098. for i=1, 8 do
  1099. tfm.exec.displayParticle(id, a+masUzor.a[i], b+masUzor.b[i], 0, 0, masUzor.va[i], masUzor.vb[i], nil)
  1100. tfm.exec.displayParticle(id, a+masUzor.a[i], b+masUzor.b[i], 0, 0, masUzor.va[i], masUzor.vb[i], nil)
  1101. end
  1102. end
  1103. end    
  1104. --GAME_OFF
  1105. function Game_off()
  1106. ui.removeTextArea(44444)
  1107. ui.removeTextArea(44445)
  1108. ui.removeTextArea(44446)
  1109. ui.removeTextArea(33333)
  1110. ui.removeTextArea(77777)
  1111. ui.removeTextArea(55555)
  1112. Module_Shamanhunt=false
  1113. tfm.exec.disableAutoNewGame (false)
  1114. mor="<font color='#2ECF73'>ON</font>"
  1115. tfm.exec.disableAllShamanSkills(false)
  1116. startsh=0
  1117. Module_Survivor=false
  1118. tfm.exec.setGameTime (1);
  1119. Module_Bootcamp=false
  1120. tfm.exec.disableAfkDeath(false)
  1121. tfm.exec.disableAutoTimeLeft(false)
  1122. tfm.exec.disableAutoShaman(false)
  1123. Module_Racing=false
  1124. end
  1125. function eventNewGame()
  1126. kodrestarta = tfm.get.room.xmlMapInfo.mapCode
  1127.  
  1128.     if Module_Racing==true then--RACING
  1129.     tfm.exec.setGameTime(60)
  1130.     checkAuthor()
  1131.     end--RACING END
  1132.    
  1133. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  1134. tfm.exec.disableAllShamanSkills(true)
  1135.  tfm.exec.setGameTime (123)
  1136.  for pName,player in pairs(tfm.get.room.playerList) do
  1137.     tfm.exec.bindKeyboard(pName, 37, true, true)
  1138.     tfm.exec.bindKeyboard(pName, 38, true, true)
  1139.     tfm.exec.bindKeyboard(pName, 39, true, true)
  1140.     tfm.exec.bindKeyboard(pName, 40, true, true)
  1141.         tfm.exec.bindKeyboard(pName, 81, true, true)
  1142.         tfm.exec.bindKeyboard(pName, 68, true, true)
  1143.         tfm.exec.bindKeyboard(pName, 83, true, true)
  1144.         tfm.exec.bindKeyboard(pName, 87, true, true)
  1145.     keyCodeULastTime[pName] = os.time()
  1146.     keyCodeUserName[pName] = 20
  1147.         textShaman(name,"Продержитесь 2 минуты и не дайте мышам вас схватить!<br>Все граунды пропускают сквозь себя объекты.<br><font color='#CB546B'>Нажмите чтобы закрыть</font>")
  1148. end
  1149.  z=20
  1150.  d=0
  1151. i=0
  1152. k=0
  1153.  shaman=nil
  1154.  for namep,player in pairs(tfm.get.room.playerList) do
  1155.   if(tfm.get.room.playerList[namep].isShaman) then
  1156.    shaman=namep
  1157.    tfm.exec.giveCheese(shaman)
  1158.   end
  1159.  end
  1160.  if(shaman==nil) then
  1161.   print('No shaman found!')
  1162.   else
  1163.    SmallText(player, "<font color='#A4CF9E'>"..shaman.."</font><font color='#BABD2F'> just stole the cheese! CATCH HER!")
  1164.  end
  1165. end--КОНЕЦ ШАМАНХАНТ
  1166. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  1167. local playersAlive = 0;
  1168.         local winner;
  1169.         for player in pairs(tfm.get.room.playerList) do
  1170.                 if not tfm.get.room.playerList[player].isDead then
  1171.                         playersAlive = playersAlive + 1;
  1172.                                                 end
  1173.                                                 end
  1174. ---Раздел
  1175. shaman=nil
  1176.  for nameppp,player in pairs(tfm.get.room.playerList) do
  1177.   if(tfm.get.room.playerList[nameppp].isShaman) then
  1178.    shaman=nameppp
  1179.    end
  1180.    end
  1181.  tfm.exec.disableAllShamanSkills(true)
  1182.  SmallText2(player,"<font color='#ED67EA'>[~Modération]</font> Спасайтесь от<font color='#ED67EA'> "..shaman.."</font>!")
  1183.  end--КОНЕЦ СУРВИВОР
  1184.   if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
  1185.  tfm.exec.setGameTime(bootcampDuration)
  1186.  end--КОНЕЦ БК
  1187. end
  1188. function eventPlayerWon(playerName)
  1189. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  1190.         i=i+1
  1191. k=k+1
  1192. d=d+1
  1193.                 local playersAlive = 0;
  1194.         local winner;
  1195.         for player in pairs(tfm.get.room.playerList) do
  1196.                 if not tfm.get.room.playerList[player].isDead then
  1197.                         playersAlive = playersAlive + 1;
  1198.                         winner = player;
  1199.                 end
  1200.         end
  1201.         if (playersAlive == 1) then
  1202.                 tfm.exec.setGameTime (10);
  1203.         elseif (playersAlive ==0) then
  1204.                 tfm.exec.newGame(maps[math.random(#maps)]);
  1205.         end
  1206. end--КОНЕЦ ШАМАНХАНТ
  1207. if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
  1208. tfm.exec.respawnPlayer(playerName)
  1209. end--КОНЕЦ БК
  1210. end
  1211. function eventPlayerDied (playerName)
  1212.  
  1213. if Module_Racing==true then--RACING
  1214.         if (tfm.get.room.MouseAlive())==2 then
  1215.             tfm.exec.setGameTime(20)
  1216.         elseif (tfm.get.room.MouseAlive())==0 then
  1217.             new_race()
  1218.         end
  1219.     end--RACING END
  1220.    
  1221. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  1222. local playersAlive = 0;
  1223.         local winner;
  1224.         for player in pairs(tfm.get.room.playerList) do
  1225.                 if not tfm.get.room.playerList[player].isDead then
  1226.                         playersAlive = playersAlive + 1;
  1227.                         winner = player;
  1228.                 end
  1229.         end
  1230.         if (playersAlive == 1) then
  1231.                 tfm.exec.setGameTime (10);
  1232.         elseif (playersAlive ==0) then
  1233.                 tfm.exec.newGame(mapss[math.random(#mapss)]);
  1234.         end
  1235. for name,playera in pairs(tfm.get.room.playerList) do
  1236.         if playera.isShaman then
  1237.         tfm.exec.setGameTime (1);
  1238.  SmallText(player, "<font color='#CB546B'>Shaman has died T_T</font>")
  1239.  end
  1240.   tfm.exec.newGame(mapss[math.random(#mapss)]);
  1241.  end
  1242. end----КОНЕЦ ШАМАНХАНТ
  1243. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  1244. local playersAlive = 0;
  1245.         local winner;
  1246.         for player in pairs(tfm.get.room.playerList) do
  1247.                 if not tfm.get.room.playerList[player].isDead then
  1248.                         playersAlive = playersAlive + 1;
  1249.                         winner = player;
  1250.                 end
  1251.         end
  1252.                         if (playersAlive == 1) then
  1253.                 tfm.exec.setGameTime (20);
  1254.                                 end
  1255. --ещё
  1256.     if tfm.get.room.playerList[playerName].isShaman==true then
  1257.       tfm.exec.setPlayerScore(playerName, 0, false)
  1258.           SmallText(player,"<font color='#CB546B'>"..shaman.."</font><font color='#ED67EA'> погиб T_T</font>")
  1259.       tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  1260.      
  1261.       for p,_ in pairs(tfm.get.room.playerList) do
  1262.         if tfm.get.room.playerList[p].isShaman==false then
  1263.           if tfm.get.room.playerList[p].isDead==false then
  1264.             tfm.exec.setPlayerScore(p, 10, true)
  1265.           end
  1266. end
  1267. end
  1268. end
  1269. end--КОНЕЦ СУРВИВОР
  1270. if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
  1271. tfm.exec.respawnPlayer(playerName)
  1272. end--КОНЕЦ БК
  1273. end
  1274. --МИНИ-ИГРЫ
  1275. mapss = {"4400516", "4402674", "4398700", "4388974", "4427343", "4430443", "4465309"}
  1276. function startShamanhunt()--ШАМАНХАНТ
  1277. startsh=1
  1278. sec=10
  1279. function text(player,msg)
  1280. for name,player in pairs(tfm.get.room.playerList) do
  1281.         if not player.isShaman then
  1282. ui.addTextArea(55555,"<p align='center'><a href='event:close'> <font size='11'>"..msg.."</font></p></a>",name,300,150,200,nil,0x1C3C41,0x1C3C41,0.7,true)
  1283. end
  1284. end
  1285. end
  1286. function TextAllBig(player,msg)
  1287. ui.addTextArea(33333,"<p align='center'><a href='event:closeBigAll'> <font size='11'>"..msg.."</font></p></a>",player,300,150,200,nil,0x000001,0x000001,0.7,true)
  1288. end
  1289. function SmallText(player,msg)
  1290. ui.addTextArea(44444,"<p align='center'><a href='event:closeSmall'> <font size='11'>"..msg.."</font></p></a>",player,6,368,800,30,0x1C3C41,0x1C3C41,0.7,true)
  1291. end
  1292. function textShaman(player,msg)
  1293. for name,player in pairs(tfm.get.room.playerList) do
  1294.         if player.isShaman then
  1295. ui.addTextArea(77777,"<p align='center'><a href='event:closeShaman'> <font size='11'>"..msg.."</font></p></a>",name,300,150,200,nil,0x1C3C41,0x1C3C41,0.7,true)
  1296. end
  1297. end
  1298. end
  1299. ui.addPopup(1, 0, "Добро пожаловать в мини-игру <font color='#BABD2F'>shamanhunt!</font> Главная цель схватить шамана и донести сыр до норы! Но будьте осторожны, шаман будет предпринимать все меры, чтобы вы не cмогли это сделать!                                     <font color='#EB1D51'>Creator:</font><font color='#BABD2F'> Bushmeister</font>                         <font color='#2ECF73'>Helpers:</font> <font color='#A4CF9E'>Timatimaaa Clowfish Issey </font>", playerName, 278, 220, 250)
  1300.  
  1301.         tfm.exec.disableAutoNewGame (true)
  1302.                  z=-1
  1303. keyCodeUserName = {}
  1304. keyCodeULastTime = {}
  1305. end--КОНЕЦ ШАМАНХАНТСТАРТЕР
  1306.  
  1307.  function startSurvivor()--START SURV
  1308. function SmallText(player,msg)
  1309. ui.addTextArea(44444,"<p align='center'><a href='event:closeSmall'> <font size='11'>"..msg.."</font></p></a>",player,6,378,nil,20,0x1C3C41,0x1C3C41,0.8,true)
  1310. end
  1311. function SmallText2(player,msg)
  1312. ui.addTextArea(44445,"<p align='center'><a href='event:closeSmall'> <font size='11'>"..msg.."</font></p></a>",player,530,378,nil,20,0x1C3C41,0x1C3C41,0.8,true)
  1313. end
  1314. survivorMaps = {"@3540608","@492283","@1026249","@1545834","@1659906","@1659906","@3295213","@3699989","@741041","@489470","@395246","@292672","@306106","@3584123","@1522692","@3107377","@2387888","@3685564","@787131","@2408376","@3670885","@3620709","@3584826","@3587860","@3549404","@481676","@3550350","@3480467"}
  1315.  tfm.exec.disableAutoNewGame (true)
  1316.  tfm.exec.disableAutoTimeLeft(true)
  1317.  function getMouseCount()
  1318.   local count = 0
  1319.   for n,p in pairs(tfm.get.room.playerList) do
  1320.   if not tfm.get.room.playerList[n].isDead then
  1321.     count = count + 1
  1322.   end
  1323.   end
  1324.   return count
  1325. end
  1326.  tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  1327. end--END SURV
  1328.  function startBootcamp()--НАЧАЛО BOOTCAMP
  1329. bootcampMaps = {"@172951","@1427980", "@161434", "@216173", "@172621", "@500000", "@3908151", "@512887","@374995", "@306365", "@155606", "@333002", "@172547", "@3734998", "@1737914", "@2989803", "@3136410", "@438449", "@976944", "@1595965", "@1636814", "@2009003", "@3804078", "@3768117", "@3799357", "@3278138", "@3311534", "@3779861", "@3576303", "@3780618", "@2789121", "@2811229", "@3659983", "@3759157", "@597804", "@2998268", "@2132250", "@3745158", "@3338283", "@3062939", "@3137929", "@3560999", "@3182487", "@3725142", "@3012311", "@3493456", "@343456", "@208056", "@881158", "@492399", "@268915", "@505619", "@397469", "@729863", "@184648", "@156720", "@541693"}
  1330. bootcampDuration = 360
  1331. tfm.exec.disableAutoShaman(true)
  1332. tfm.exec.disableAfkDeath(true)
  1333. tfm.exec.disableAutoTimeLeft(true)
  1334. tfm.exec.disableAutoNewGame(true)
  1335. tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)])
  1336. tfm.exec.setGameTime(bootcampDuration)
  1337. end--КОНЕЦ BOOTCAMP
  1338.  
  1339. function start_racing()--Начало мини-игры RACING
  1340. tfm.exec.disableAutoNewGame(true)
  1341. tfm.exec.disableAutoShaman(true)
  1342. racing_maps={3953425,3638794,1856349,164802,160762,158128,145020,122911,180509,165747,163682,165843,216505,211885,209708,545493,512291,2005559,1956002,3696662,2538131,4428798, 693021, 2316566, 1504935, 1595131, 2475527, 416625, 3452208, 511007, 2262297, 250619, 180617, 260478, 308729, 1404417, 3629984, 3077480, 1587883, 2679801, 1957607, 583715, 2141827, 1187548, 2920810, 425229, 2522826, 1607271, 2535752, 2782088, 2527651, 2118873, 326032, 2870581, 1954181, 1629706, 1419902, 1221806, 179541, 252033, 326192, 482951, 592204, 583715, 4212491, 3674997, 2946601, 3931290, 3877599, 4119705, 3026533, 4024450, 1842545, 2007295, 2686505, 2580114, 2988325, 3549627, 4338921, 4059294, 3559116, 211902, 1524883, 2464807, 2463035, 2444219, 162561, 387110, 2501491, 2731707, 1652047, 2222219, 2306838, 233093, 1545000, 2819802, 2432314, 2760668, 2782088, 2852249, 3033972, 3488998,4949321, 4949286, 4949186, 4949173, 4949114, 4949101, 4949075, 4949061, 4948998, 4865457, 4865422, 4840440,3799998, 3789192, 455499, 3766449, 2981609, 3828678, 3250015, 3832217, 3688191, 3272722, 3715958, 3701788, 3695243, 3856794, 3690600, 3820202, 3919116, 3685029, 3687917, 1387078, 2901007, 3561325, 3936449, 1452162, 3952271, 3884802, 3253701, 1307956, 3077480, 3676395, 3673777, 3678477, 3051957, 3679199, 3663008, 3654423, 3556603, 3669198, 3652475, 3660048, 3534755, 3428362, 3651841, 3651961, 3046497, 3495277, 3594130, 3595063, 3644534, 3577823, 2556192, 3644964, 3644907, 1678717, 3523401, 2731707, 3220349, 3648297, 3600181, 3641333, 1478131, 3637777, 3639230, 499821, 3490631, 2205147, 1964800,585601, 3816991, 3786946, 1758903, 3588299, 2852718, 3530855, 3561646, 139360, 2760668}
  1343.    
  1344.     function checkAuthor()
  1345. mapcode=tfm.get.room.xmlMapInfo.mapCode
  1346.     if mapcode==4955881 then
  1347.         tfm.exec.setUIMapName("<J>Felipedtx <BL>- @4119705")
  1348.     elseif mapcode==4949286 then
  1349.         tfm.exec.setUIMapName("<J>Kenjit <BL>- @639649")
  1350.     elseif mapcode==4949321 then
  1351.         tfm.exec.setUIMapName("<J>Kmlcan <BL>- @646968")
  1352.     elseif mapcode==4949075 then
  1353.         tfm.exec.setUIMapName("<J>Hibr <BL>- @221564")
  1354.     elseif mapcode==4865422 then
  1355.         tfm.exec.setUIMapName("<J>Temple <BL>- @314806")
  1356.     elseif mapcode==4840440 then
  1357.         tfm.exec.setUIMapName("<J>Bushmeister <BL>- @3066761")
  1358.     elseif mapcode==4865457 then
  1359.         tfm.exec.setUIMapName("<J>Viprin <BL>- @405795")
  1360.     end
  1361. end
  1362.    
  1363.     function new_race()
  1364.         tfm.exec.newGame(racing_maps[math.random(#racing_maps)])
  1365.     end
  1366.    
  1367. new_race()
  1368. function tfm.get.room.MouseAlive()
  1369.         local countAlive = 0
  1370.             for n,p in pairs(tfm.get.room.playerList) do
  1371.                 if not tfm.get.room.playerList[n].isDead then
  1372.                     countAlive = countAlive + 1
  1373.                 end
  1374.             end
  1375.         return countAlive
  1376.     end
  1377.  
  1378. end--Конец мини-игры RACING
  1379. tfm.exec.newGame()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement