Advertisement
Guest User

[LTM] v1.8

a guest
Feb 25th, 2014
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 59.33 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. fire=false
  47. firew="<font color='#CB546B'>OFF</font>"
  48. adminfly={}
  49. log={}
  50.  
  51. popu=true
  52. popuset="<font color='#2ECF73'>ON</font>"
  53.  
  54. pabla=0
  55. gafra=10
  56. 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)
  57. 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)
  58.  
  59. for name in pairs (admins) do
  60.     adminfly[name]=false
  61.         print(adminfly[name])
  62. end
  63. for name in pairs (SuperAdmin) do
  64. adminfly[name]=false
  65.     print(adminfly[name])
  66. end
  67.  
  68. function Log(element)
  69. abr=table.maxn(log)
  70. if abr<=23 then
  71. table.insert(log, element)
  72. elseif abr>=24 then
  73. table.remove(log,1)
  74. table.insert(log,element)
  75. end
  76. end
  77. function textarea(player,msg)
  78. 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)
  79. end
  80. textt="<font color='#CB546B'>Администраторы: </font><font color='#ED67EA'>"..table.concat(admins, ", ").."</font>"
  81. textarea(player,textt)
  82. for name,player in pairs(tfm.get.room.playerList) do
  83. idName[name]=0
  84. end
  85. 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}
  86. function eventNewPlayer(playerName)
  87. for name,player in pairs(tfm.get.room.playerList) do
  88. idName[name]=0
  89. end
  90. system.bindMouse(playerName, true)
  91. tfm.exec.bindKeyboard(playerName, 32, true, true)
  92. tfm.exec.bindKeyboard(playerName, 80, true, true)
  93. tfm.exec.bindKeyboard(playerName, 72, true, true)
  94. tfm.exec.bindKeyboard(playerName, 76, true, true)
  95. tfm.exec.bindKeyboard(playerName, 17, true, true)
  96. tfm.exec.bindKeyboard(playerName, 17, false, true)
  97. end
  98. function eventKeyboard(playerName, keyCode, down, xPosition, yPosition)
  99. if Module_Shamanhunt==true and sec<0 then--НАЧАЛО ШАМАНХАНТ
  100. if tfm.get.room.playerList[playerName].isShaman then
  101.     if keyCode == 81 then
  102.             keyCodeUserName[playerName] = 20
  103.         elseif keyCode == 37 then
  104.         keyCodeUserName[playerName] = 20
  105.     elseif keyCode == 39 then
  106.         keyCodeUserName[playerName] = 19
  107.         elseif keyCode == 68 then
  108.         keyCodeUserName[playerName] = 19
  109.     elseif keyCode == 40 or keyCode == 83 then
  110.         if os.time() - keyCodeULastTime[playerName] >= 1000 then
  111.             tfm.exec.addShamanObject(keyCodeUserName[playerName], xPosition, yPosition + 15, 0, 0, 0, false)
  112.             keyCodeULastTime[playerName] = os.time()
  113.         end
  114.     end
  115. end
  116. end--КОНЕЦ ШАМАНХАНТ
  117. if adminfly[playerName]==true then
  118. if keyCode==32 then
  119. tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  120. tfm.exec.displayParticle(26, xPosition-15, yPosition-35, 0, 0, 0, 0, nil)
  121. end
  122. end
  123. if far==true then
  124. if keyCode==32 then
  125. tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  126. tfm.exec.displayParticle(26, xPosition-15, yPosition-35, 0, 0, 0, 0, nil)
  127. end
  128. end
  129. for _,recv in pairs (admins) do
  130.     if (recv == playerName) then
  131. -----------------------------------LOG
  132. if keyCode == 76 and down == true then
  133. 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)
  134. tfm.exec.bindKeyboard(playerName, 76, false, true)
  135. elseif keyCode == 76 and down == false then
  136. ui.removeTextArea(08502, playerName)
  137. tfm.exec.bindKeyboard(playerName, 76, true, true)
  138. end
  139. --
  140. if keyCode == 17 and down == true then
  141. key17=true
  142. else
  143. key17=false
  144. end
  145. -----------------------------------LOG END
  146.         if keyCode==80 then
  147.         ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",recv,22,36,53,16,nil,0x324650,nil,true)
  148.         end
  149.         end
  150.         end
  151.         for _,govno in pairs (SuperAdmin) do
  152.     if (govno == playerName) then
  153. ------------------------------LOG SPADMIN
  154. if keyCode == 76 and down == true then
  155. 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)
  156. tfm.exec.bindKeyboard(playerName, 76, false, true)
  157. elseif keyCode == 76 and down == false then
  158. ui.removeTextArea(08502, playerName)
  159. tfm.exec.bindKeyboard(playerName, 76, true, true)
  160. end
  161. --
  162. if keyCode == 17 and down == true then
  163. key17=true
  164. else
  165. key17=false
  166. end
  167. ------------------------------LOGEND SPADMIN
  168.         if keyCode==80 then
  169.         ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",govno,22,36,53,16,nil,0x324650,nil,true)
  170.         end
  171.         end
  172.         end
  173.         for _,recv in pairs (admins) do
  174.     if (recv == playerName) then
  175.         if keyCode==72 then
  176.         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)
  177. rouF=oj
  178. end
  179. end
  180. end
  181. for _,govno in pairs (SuperAdmin) do
  182.     if (govno == playerName) then
  183.         if keyCode==72 then
  184.         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)
  185. rouF=oj
  186. end
  187. end
  188. end
  189. end
  190. idd=ralF[math.random(#ralF)]
  191. function eventMouse(playerName, xC, yC)
  192. for _,recv in pairs (admins) do
  193.     if (recv == playerName) then
  194. --ADMIN CNTRL TELEPORT
  195. if key17==true then
  196. tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
  197. tfm.exec.displayParticle(3, xC-10, yC-5, 0, 0, 0, 0, nil)
  198. tfm.exec.displayParticle(3, xC, yC, 0, 0, 0, 0, nil)
  199. tfm.exec.displayParticle(3, xC+3, yC+2, 0, 0, 0, 0, nil)
  200. tfm.exec.displayParticle(3, xC+6, yC+4, 0, 0, 0, 0, nil)
  201. tfm.exec.displayParticle(3, xC-5, yC+6, 0, 0, 0, 0, nil)
  202. tfm.exec.displayParticle(3, xC-2, yC+8, 0, 0, 0, 0, nil)
  203. tfm.exec.displayParticle(3, xC-10, yC+15, 0, 0, 0, 0, nil)
  204. tfm.exec.displayParticle(3, xC-10, yC+8, 0, 0, 0, 0, nil)
  205. tfm.exec.displayParticle(3, xC+10, yC+10, 0, 0, 0, 0, nil)
  206. end
  207. --  END
  208. if fire==true then
  209. a=xC
  210. b=yC
  211. local mas={a={0,10,-10,0,10,-10,0}, b={0,10,-10,10,0,0,-10}}
  212. for i = 1, 7 do
  213. fa(a+mas.a[i], b+mas.b[i])
  214. end
  215. end
  216. end
  217. end
  218. for _,abc in pairs (SuperAdmin) do
  219.     if (abc == playerName) then
  220. --SPADMIN CNTRL TELEPORT
  221. if key17==true then
  222. tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
  223. tfm.exec.displayParticle(3, xC-10, yC-5, 0, 0, 0, 0, nil)
  224. tfm.exec.displayParticle(3, xC, yC, 0, 0, 0, 0, nil)
  225. tfm.exec.displayParticle(3, xC+3, yC+2, 0, 0, 0, 0, nil)
  226. tfm.exec.displayParticle(3, xC+6, yC+4, 0, 0, 0, 0, nil)
  227. tfm.exec.displayParticle(3, xC-5, yC+6, 0, 0, 0, 0, nil)
  228. tfm.exec.displayParticle(3, xC-2, yC+8, 0, 0, 0, 0, nil)
  229. tfm.exec.displayParticle(3, xC-10, yC+15, 0, 0, 0, 0, nil)
  230. tfm.exec.displayParticle(3, xC-10, yC+8, 0, 0, 0, 0, nil)
  231. tfm.exec.displayParticle(3, xC+10, yC+10, 0, 0, 0, 0, nil)
  232. end
  233. --END
  234. if fire==true then
  235. a=xC
  236. b=yC
  237. local mas={a={0,10,-10,0,10,-10,0}, b={0,10,-10,10,0,0,-10}}
  238. for i = 1, 7 do
  239. fa(a+mas.a[i], b+mas.b[i])
  240. end
  241. end
  242. end
  243. end
  244. if tear==true then
  245. tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
  246. tfm.exec.displayParticle(3, xC-10, yC-5, 0, 0, 0, 0, nil)
  247. tfm.exec.displayParticle(3, xC, yC, 0, 0, 0, 0, nil)
  248. tfm.exec.displayParticle(3, xC+3, yC+2, 0, 0, 0, 0, nil)
  249. tfm.exec.displayParticle(3, xC+6, yC+4, 0, 0, 0, 0, nil)
  250. tfm.exec.displayParticle(3, xC-5, yC+6, 0, 0, 0, 0, nil)
  251. tfm.exec.displayParticle(3, xC-2, yC+8, 0, 0, 0, 0, nil)
  252. tfm.exec.displayParticle(3, xC-10, yC+15, 0, 0, 0, 0, nil)
  253. tfm.exec.displayParticle(3, xC-10, yC+8, 0, 0, 0, 0, nil)
  254. tfm.exec.displayParticle(3, xC+10, yC+10, 0, 0, 0, 0, nil)
  255. end
  256. if info==true then
  257. xClick=xC
  258. yClick=yC
  259. 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)
  260. gord=10
  261. end
  262. end
  263. function eventChatCommand(playerName, message)
  264. local args={}
  265. for _,recv in pairs (admins) do
  266.     if (recv == playerName) then
  267.  
  268.  
  269.                 for argument in message:gmatch("[^#]+") do
  270.                         table.insert(args,argument)
  271.                 end
  272. if message=="fly" then
  273. adminfly[playerName]=true
  274. elseif message=="flyoff" then
  275. adminfly[playerName]=false
  276. end
  277. if args[1]=="chat" and args[2] then
  278. end
  279. if args[1]=="m" and args[2] then
  280. textarea(player,"<font color='#ED67EA'>[~Modération] "..args[2].."</font>")
  281. end
  282. if message=="panel" then
  283. ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
  284. end    
  285. if message=="arg" then
  286. print(arg[#arg])
  287. end
  288. if message=="pass" then
  289. 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)
  290. rouF=oj
  291. end
  292. if message=="banlist" then
  293. print(Banned[#Banned])
  294. end
  295.         end
  296.         end
  297.         for _,abv in pairs (SuperAdmin) do
  298.              if (abv == playerName) then
  299. if message=="fly" then
  300. adminfly[playerName]=true
  301. elseif message=="flyoff" then
  302. adminfly[playerName]=false
  303. end
  304.     end
  305.     end
  306.         end
  307. function eventTextAreaCallback(id,name,callback)
  308. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  309. if callback == "close" then
  310. ui.removeTextArea(55555,name)
  311. end
  312. if callback == "closeShaman" then
  313. ui.removeTextArea(77777,name)
  314. end
  315. if callback=="closeSmall" then
  316. ui.removeTextArea(44444,name)
  317. end
  318. if callback=="closeBigAll" then
  319. ui.removeTextArea(33333,name)
  320. end
  321. end--КОНЕЦ ШАМАНХАНТ
  322. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  323. if callback=="closeSmall" then
  324. ui.removeTextArea(44444,name)
  325. ui.removeTextArea(44445,name)
  326. ui.removeTextArea(44446,name)
  327. end
  328. end--КОНЕЦ СУРВИВОР
  329. if callback=="mo" then
  330. ui.removeTextArea(idd,name)
  331. end
  332. if callback == "close" then
  333. ui.removeTextArea(77777,name)
  334. end
  335. keyinvoker = name
  336. if callback=="plusik" then
  337. if table.contains(proverenniy, keyinvoker) == false then
  338. ui.addPopup(1,2, "Введите пароль для доступа к функциям администратора",name,300,150,200)
  339. elseif table.contains(proverenniy, keyinvoker) == true then
  340. ui.removeTextArea(401, name)
  341. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  342. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  343. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  344. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  345. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  346. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  347. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  348. end
  349. end
  350. if callback=="sir" then
  351. 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)
  352. end
  353. if callback=="minus" then
  354. ui.removeTextArea(401, name)
  355. ui.removeTextArea(402, name)
  356. ui.removeTextArea(404, name)
  357. ui.removeTextArea(405, name)
  358. ui.removeTextArea(406, name)
  359. ui.removeTextArea(407, name)
  360. ui.removeTextArea(408, name)
  361. ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  362. --remove
  363. end
  364. if callback=="карта" then
  365. ui.removeTextArea(401, name)
  366. ui.removeTextArea(402, name)
  367. ui.removeTextArea(404, name)
  368. ui.removeTextArea(405, name)
  369. ui.removeTextArea(406, name)
  370. ui.removeTextArea(407, name)
  371. ui.removeTextArea(408, name)
  372. ui.addTextArea(03,"<p align='center'><a href='event:назад'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  373. ui.addTextArea(04,"<p align='center'><a href='event:изменить карту'><b>Изменить карту</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
  374. ui.addTextArea(05,"<p align='center'><a href='event:изменить название'><b>Изменить название</b></a></p>",name,222,36,133,16,nil,0x324650,nil,true)
  375. ui.addTextArea(06,"<p align='center'><a href='event:изменить время'><b>Изменить время</b></a></p>",name,372,36,133,16,nil,0x324650,nil,true)
  376. ui.addTextArea(1706,"<p align='center'><a href='event:рестартмап'><b>Перезагрузить</b></a></p>",name,520,36,133,16,nil,0x324650,nil,true)
  377. end
  378. if callback=="назад" then
  379. ui.removeTextArea(03, name)
  380. ui.removeTextArea(04, name)
  381. ui.removeTextArea(05, name)
  382. ui.removeTextArea(06, name)
  383. ui.removeTextArea(1706, name)
  384. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  385. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  386. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  387. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  388. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  389. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  390. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  391. end
  392. if callback=="изменить карту" then
  393. ui.addPopup(3,2, "<br><p align='center'><b>Введите @номер карты</b></p>",name,300,150,200)
  394. end
  395. if callback=="изменить название" then
  396. ui.addPopup(4,2, "<br><p align='center'><b>Введите название карты</b></p>",name,300,150,200)
  397. end
  398. if callback=="изменить время" then
  399. ui.addPopup(5,2, "<br><p align='center'><b>Введите время раунда в секундах</b></p>",name,300,150,200)
  400. end
  401. if callback=="рестартмап" then
  402. kodrestarta = tfm.get.room.xmlMapInfo.mapCode
  403. tfm.exec.newGame(kodrestarta)
  404. end
  405. if callback=="игрок" then
  406. ui.removeTextArea(401, name)
  407. ui.removeTextArea(402, name)
  408. ui.removeTextArea(404, name)
  409. ui.removeTextArea(405, name)
  410. ui.removeTextArea(406, name)
  411. ui.removeTextArea(407, name)
  412. ui.removeTextArea(408, name)
  413. ui.addTextArea(07,"<p align='center'><a href='event:назадигрок'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  414. ui.addTextArea(08,"<p align='center'><a href='event:цвет'><b>Цвет никнейма</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
  415. ui.addTextArea(09,"<p align='center'><a href='event:убить'><b>Убить</b></a></p>",name,222,36,83,16,nil,0x324650,nil,true)
  416. ui.addTextArea(010,"<p align='center'><a href='event:телепорт'><b>Телепортировать</b></a></p>",name,322,36,133,16,nil,0x324650,nil,true)
  417. end
  418. if callback=="цвет" then
  419. 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)
  420. end
  421. if callback=="убить" then
  422. ui.addPopup(7,2, "<br><p align='center'><b>Введите никнейм игрока которого хотите убить.</b></p>",name,300,150,200)
  423. end
  424. if callback=="телепорт" then
  425. ui.addPopup(8,2, "<br><p align='center'><b>Введите никнейм игрока и x y координаты.</b></p>",name,300,150,200)
  426. end
  427. if callback=="бан" then
  428. 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)
  429. end
  430. if callback=="разбан" then
  431. ui.addPopup(10,2, "<br><p align='center'><b>Введите никнейм игрока.</b></p>",name,300,150,200)
  432. end
  433. if callback=="назадигрок" then
  434. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  435. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  436. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  437. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  438. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  439. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  440. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  441. ui.removeTextArea(07, name)
  442. ui.removeTextArea(08, name)
  443. ui.removeTextArea(09, name)
  444. ui.removeTextArea(010, name)
  445. end
  446. if callback=="другое" then
  447. ui.removeTextArea(401, name)
  448. ui.removeTextArea(402, name)
  449. ui.removeTextArea(404, name)
  450. ui.removeTextArea(405, name)
  451. ui.removeTextArea(406, name)
  452. ui.removeTextArea(407, name)
  453. ui.removeTextArea(408, name)
  454. ui.addTextArea(013,"<p align='center'><a href='event:назаддругое'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  455. ui.addTextArea(014,"<p align='center'><a href='event:snow'><b>Снег</b></a></p>",name,92,36,53,16,nil,0x324650,nil,true)
  456. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана: "..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  457. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  458. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  459. ui.addTextArea(018,"<p align='center'><a href='event:добъект'><b>Добавить объект</b></a></p>",name,592,36,143,16,nil,0x324650,nil,true)
  460. ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
  461. end
  462. if callback=="snow" then
  463. 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)
  464. end
  465. if callback=="скилы" then
  466. if mor=="<font color='#2ECF73'>ON</font>" then
  467. mor="<font color='#CB546B'>OFF</font>"
  468. Log(""..name.." отключил(а) умения шамана")
  469. tfm.exec.disableAllShamanSkills(true)
  470. textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#CB546B'> OFF</font>")
  471. ui.removeTextArea(015, name)
  472. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  473. elseif mor=="<font color='#CB546B'>OFF</font>" then
  474. mor="<font color='#2ECF73'>ON</font>"
  475. Log(""..name.." включил(a) умения шамана")
  476. tfm.exec.disableAllShamanSkills(false)
  477. textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#2ECF73'> ON</font>")
  478. ui.removeTextArea(015, name)
  479. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  480. end
  481. end
  482. if callback=="фли" then
  483. if far==false then
  484. far=true
  485. faro="<font color='#2ECF73'>ON</font>"
  486. Log(""..name.." включил(a) режим Fly")
  487. textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#2ECF73'> ON</font>")
  488. dor();
  489. ui.removeTextArea(016, name)
  490. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  491. elseif far==true then
  492. far=false
  493. Log(""..name.." выключил(a) режим Fly")
  494. faro="<font color='#CB546B'>OFF</font>"
  495. textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#CB546B'> OFF</font>")
  496. dor();
  497. ui.removeTextArea(016, name)
  498. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  499. end
  500. end
  501. if callback=="телепортак" then
  502. if tear==false then
  503. tear=true
  504. textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#2ECF73'> ON</font>")
  505. Log(""..name.." включил(а) режим Teleport")
  506. tea="<font color='#2ECF73'>ON</font>"
  507. ui.removeTextArea(017, name)
  508. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  509. dor();
  510. elseif tear==true then
  511. tear=false
  512. Log(""..name.." выключил(а) режим Teleport")
  513. tea="<font color='#CB546B'>OFF</font>"
  514. textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#CB546B'> OFF</font>")
  515. ui.removeTextArea(017, name)
  516. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  517. dor();
  518. end
  519. end
  520. if callback=="добъект" then
  521. ui.addPopup(12,2, "<br><p align='center'><b>Введите id объекта и X Y координаты.</b></p>",name,300,150,200)
  522. 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)
  523. 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)
  524. end
  525. if callback=="файер" then
  526. if fire==false then
  527. fire=true
  528. firew="<font color='#2ECF73'>ON</font>"
  529. Log(""..name.." включил(а) фейерверки")
  530. ui.removeTextArea(027, name)
  531. ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
  532. elseif fire==true then
  533. fire=false
  534. Log(""..name.." выключил(а) фейерверки")
  535. firew="<font color='#CB546B'>OFF</font>"
  536. ui.removeTextArea(027, name)
  537. ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
  538. end
  539. end
  540. if callback=="назаддругое" then
  541. alfazet=0
  542. ui.removeTextArea(013, name)
  543. ui.removeTextArea(014, name)
  544. ui.removeTextArea(015, name)
  545. ui.removeTextArea(016, name)
  546. ui.removeTextArea(017, name)
  547. ui.removeTextArea(018, name)
  548. ui.removeTextArea(027, name)
  549. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  550. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  551. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  552. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  553. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  554. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  555. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  556. end
  557. if callback=="админ" then
  558. ui.removeTextArea(401, name)
  559. ui.removeTextArea(402, name)
  560. ui.removeTextArea(404, name)
  561. ui.removeTextArea(405, name)
  562. ui.removeTextArea(406, name)
  563. ui.removeTextArea(407, name)
  564. ui.removeTextArea(408, name)
  565. ui.addTextArea(019,"<p align='center'><a href='event:назададмин'><b>Назад</b></a></p>",name,22,36,53,17,nil,0x324650,nil,true)
  566. 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)
  567. ui.addTextArea(021,"<p align='center'><a href='event:месаге'><b>Message</b></a></p>",name,242,36,85,17,nil,0x324650,nil,true)
  568. ui.addTextArea(011,"<p align='center'><a href='event:бан'><b>Забанить</b></a></p>",name,347,36,100,16,nil,0x324650,nil,true)
  569. ui.addTextArea(012,"<p align='center'><a href='event:разбан'><b>Разбанить</b></a></p>",name,469,36,100,16,nil,0x324650,nil,true)
  570. for _,govno in pairs (SuperAdmin) do
  571.     if (govno == name) then
  572.         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)
  573.         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)
  574.         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)
  575.         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)
  576.                 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)
  577.         end
  578.         end
  579. end
  580. if callback=="папуп" then
  581. if popu==true then
  582. 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)
  583. end
  584. end
  585. if callback=="месаге" then
  586. ui.addPopup(14,2, "<br><p align='center'><b>Введите текст сообщения</b></p>",name,300,150,200)
  587. end
  588. if callback=="Добавить админа" then
  589. ui.addPopup(15,2, "<br><p align='center'><b>Введите никнейм нового админа</p>",name,300,150,200)
  590. end
  591. if callback=="удалить админа" then
  592. ui.addPopup(16,2, "<br><p align='center'><b>Введите никнейм админа и причину</b> <font size='9'>(необязательно)</font></p>",name,300,150,200)
  593. end
  594. if callback=="инфо" then
  595. if info==false then
  596. info=true
  597. textarea(player,"<font color='#ED67EA'>Info:</font><font color='#2ECF73'> ON</font>")
  598. elseif info==true then
  599. info=false
  600. textarea(player,"<font color='#ED67EA'>Info:</font><font color='#CB546B'> OFF</font>")
  601. ui.removeTextArea(idd)
  602. end
  603. end
  604. if callback=="попустройки" then
  605. if popu==true then
  606. popu=false
  607. popuset="<font color='#CB546B'>OFF"
  608. ui.removeTextArea(020, name)
  609. 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)
  610. for _,govno in pairs (SuperAdmin) do
  611.     if (govno == name) then
  612.         ui.removeTextArea(025,name)
  613.                 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)
  614.                 end
  615.                 end
  616. elseif
  617. popu==false then
  618. popu=true
  619. popuset="<font color='#2ECF73'>ON"
  620. ui.removeTextArea(020, name)
  621. 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)
  622. for _,govno in pairs (SuperAdmin) do
  623.     if (govno == name) then
  624.                 ui.removeTextArea(025,name)
  625.                 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)
  626. end
  627. end
  628. end
  629. end
  630. if callback=="рестарт" then
  631. ui.addPopup(17,1, "<br><p align='center'><b>Перезапустить скрипт?</p>",name,300,150,200)
  632. 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)
  633. end
  634. if callback=="назададмин" then
  635. for _,govno in pairs (SuperAdmin) do
  636.     if (govno == name) then
  637.         ui.removeTextArea(022,name)
  638.         ui.removeTextArea(023,name)
  639.         ui.removeTextArea(024,name)
  640.         ui.removeTextArea(025,name)
  641.         ui.removeTextArea(026,name)
  642.         end
  643.         end
  644.         ui.removeTextArea(011, name)
  645.         ui.removeTextArea(012, name)
  646. ui.removeTextArea(019, name)
  647. ui.removeTextArea(020, name)
  648. ui.removeTextArea(021, name)
  649. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  650. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  651. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  652. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  653. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  654. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  655. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  656. end
  657. if callback=="мини-игры" then
  658. ui.removeTextArea(401, name)
  659. ui.removeTextArea(402, name)
  660. ui.removeTextArea(404, name)
  661. ui.removeTextArea(405, name)
  662. ui.removeTextArea(406, name)
  663. ui.removeTextArea(407, name)
  664. ui.removeTextArea(408, name)
  665. ui.addTextArea(028,"<p align='center'><a href='event:назадигра'><b>Назад</b></a></p>",name,22,36,53,17,nil,0x324650,nil,true)
  666. ui.addTextArea(029,"<p align='center'><a href='event:shamanhunt'><b>Shamanhunt</b></a></p>",name,92,36,113,17,nil,0x324650,nil,true)
  667. 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)
  668. ui.addTextArea(031,"<p align='center'><a href='event:survivor'><b>Survivor</b></a></p>",name,222,36,90,17,nil,0x324650,nil,true)
  669. ui.addTextArea(032,"<p align='center'><a href='event:bootcamp'><b>Bootcamp</b></a></p>",name,332,36,88,17,nil,0x324650,nil,true)
  670. end
  671. if callback=="shamanhunt" then
  672. if Module_Shamanhunt==false then
  673. Module_Shamanhunt=true
  674. startShamanhunt();
  675. Log(""..name.." включил(а) мини-игру Shamanhunt")
  676. print("<V>Module_Shamanhunt=<BV>true")
  677. elseif Module_Shamanhunt==true then
  678. end
  679. end
  680. if callback=="survivor" then
  681. if Module_Survivor==false then
  682. Module_Survivor=true
  683.  startSurvivor();
  684. print("<V>Module_Survivor=<BV>true")
  685. Log(""..name.." включил(а) режим Survivor")
  686. end
  687. end
  688. if callback=="bootcamp" then
  689. if Module_Bootcamp==false then
  690. Module_Bootcamp=true
  691. print("<V>Module_Bootcamp=<BV>true")
  692. Log(""..name.." включил(а) режим Bootcamp")
  693. startBootcamp();
  694. end
  695. end
  696. if callback=="stopgame" then
  697. ui.addPopup(18,1, "<br><p align='center'><b>Остановить работу всех игр?</p>",name,300,150,200)
  698. end
  699. if callback=="назадигра" then
  700. ui.removeTextArea(028, name)
  701. ui.removeTextArea(029, name)
  702. ui.removeTextArea(030, name)
  703. ui.removeTextArea(031, name)
  704. ui.removeTextArea(032, name)
  705. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  706. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  707. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  708. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  709. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  710. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  711. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
  712. end
  713. end
  714. gav={"ste"}
  715. function eventPopupAnswer(id,playerName,answer)
  716. local arg={}
  717. local rabbit={}
  718.  
  719.                 for argument in answer:gmatch("[^%s]+") do
  720.                         table.insert(arg,argument)
  721.                 end
  722.                 for argument in answer:gmatch("[^#]+") do
  723.                         table.insert(rabbit,argument)
  724.                 end
  725. if id==1 then
  726. if answer==table.concat(pass) then
  727. table.insert(proverenniy, playerName)
  728. ui.removeTextArea(401, playerName)
  729. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
  730. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",playerName,92,36,83,16,nil,0x324650,nil,true)
  731. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",playerName,192,36,83,16,nil,0x324650,nil,true)
  732. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",playerName,292,36,83,16,nil,0x324650,nil,true)
  733. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",playerName,392,36,83,16,nil,0x324650,nil,true)
  734. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",playerName,492,36,73,16,nil,0x324650,nil,true)
  735. ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",playerName,582,36,103,16,nil,0x324650,nil,true)
  736. ui.addTextArea(02,"<p align='center'><a href='event:AGHненужно'><b>Разблокировано!</b></a></p>",playerName,330,206,123,16,nil,0x324650,nil,true)
  737. rempver=5
  738. else
  739. print("<R>Неверный пароль!")
  740. end
  741. end
  742. if id==2 then
  743. if arg[1]=="cheese" and arg[2] then
  744. tfm.exec.giveCheese(arg[2])
  745. end
  746. if arg[1]=="vampire" and arg[2] then
  747. tfm.exec.setVampirePlayer(arg[2])
  748. end
  749. if arg[1]=="shaman" and arg[2] then
  750. tfm.exec.setShaman(arg[2])
  751. end
  752. if arg[1]=="victory" and arg[2] then
  753. tfm.exec.playerVictory(arg[2])
  754. end
  755. end
  756. if id==3 then
  757. if arg[1] then
  758.     if arg[1]~=nil then
  759.     tfm.exec.newGame(arg[1])
  760.         Log(""..playerName.." изменил(а) карту на @"..arg[1].."")
  761.         end
  762. end
  763. end
  764. if id==4 then
  765. if rabbit[1] then
  766.     if rabbit[1]~=nil then
  767.     tfm.exec.setUIMapName(rabbit[1])
  768.         Log(""..playerName.." сменил(а) название карты на "..rabbit[1].."")
  769.         end
  770. end
  771. end
  772. if id==5 then
  773. if arg[1] then
  774.     if arg[1]~=nil then
  775.     tfm.exec.setGameTime(arg[1])
  776.         Log(""..playerName.." установил(а) время раунда "..arg[1].." секунд")
  777.         end
  778. end
  779. end
  780. if id==6 then
  781. if arg[1]~=nil then
  782. tfm.exec.setNameColor(arg[1], "0x"..arg[2])
  783. Log(""..playerName.." изменил(а) цвет никнейма "..arg[1].."")
  784. end
  785. end
  786. if id==7 then
  787. if arg[1] then
  788.     if arg[1]~=nil then
  789.     tfm.exec.killPlayer(arg[1])
  790.         Log(""..playerName.." убил(а) "..arg[1])
  791.         end
  792. end
  793. end
  794. if id==8 then
  795. if arg[1] then
  796.     if arg[1]~=nil then
  797.         tfm.exec.movePlayer(arg[1], arg[2], arg[3])
  798.         Log(""..playerName.." телепортировал(а) "..arg[1])
  799. end
  800. end
  801. end
  802. if id==9 then
  803. if rabbit[1] and rabbit[2] then
  804.     if rabbit[1]~=nil then
  805.         textarea(player,"<font color='#CB546B'>"..rabbit[1].."</font><font color='#BABD2F'> забанен. Причина: </font><font color='#CB546B'>"..rabbit[2].."</font>")
  806.         table.insert(Banned,rabbit[1])
  807.         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)
  808.     ui.addPopup(006,0, "<br><p align='center'>Вы были забанены<br>Причина: <font color='#CB546B'>"..rabbit[2].."</p></font>",rabbit[1],300,150,200)
  809.                 Log(""..playerName.." забанил(а) "..rabbit[1].." Причина: "..rabbit[2])
  810. end
  811. end
  812. end
  813. if id==10 then
  814. if arg[1] then
  815.     if arg[1]~=nil then
  816.         table.rem(Banned,arg[1])
  817.         ui.addPopup(005,0, "0",arg[1],-5000,-900,10200)
  818.         textarea(player,"<font color='#CB546B'>"..arg[1].."</font><font color='#BABD2F'> разбанен</font>")
  819.         Log(""..playerName.." разбанил(а) "..arg[1])
  820.         end
  821.         end
  822.         end
  823.         if id==11 then
  824. if arg[1] then
  825.     if arg[1]~=nil then
  826.         tfm.exec.snow(arg[1], arg[2])
  827.                 Log(""..playerName.." включил(а) снег на "..arg[1].." секунд")
  828.         end
  829.         end
  830.         end
  831. if id==12 then
  832. ui.addPopup(00888,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
  833. ui.addPopup(00889,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
  834. if arg[1] then
  835.     if arg[1]~=nil then
  836.         tfm.exec.addShamanObject(arg[1], arg[2], arg[3],nil,nil,nil, arg[4])
  837.         end
  838.         end
  839.         end
  840. if id==13 then
  841. if arg[1] then
  842.     if arg[1]~=nil then
  843. for name,player in pairs(tfm.get.room.playerList) do
  844. pabla=ralF[math.random(#ralF)]
  845. ui.addPopup(pabla,0, "<p align='center'><b>"..rabbit[1].."</b></p>",name,rabbit[2],rabbit[3],150)
  846.         end
  847.         end
  848. end
  849. end
  850. if id==14 then
  851. if arg[1] then
  852.     if arg[1]~=nil then
  853.         textarea(player,"<font color='#ED67EA'>[~Modération] "..rabbit[1].."</font>")
  854.         end
  855.         end
  856. end
  857. if id==15 then
  858. if arg[1] then
  859.     if arg[1]~=nil then
  860.         table.insert(admins,arg[1])
  861.                 textarea(player,"<font color='#BABD2F'>Приветствуем нового администратора - </font><font color='#ED67EA'>"..arg[1].."!</font>")
  862.         admn=table.concat(admins,", ")
  863.         end
  864.         end
  865. end
  866. if id==16 then
  867.                         if arg[1] then
  868.                                 if arg[1]~=nil then
  869.                                         table.rem(admins,arg[1])
  870.                                         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
  871.                      ui.removeTextArea(iddd, arg[1])
  872.                     end
  873.                                         local pr = ""
  874.                                         if arg[2]~=nil then
  875.                                                 pr= " <R>Причина:<J> "
  876.                                                 for j=2, #arg, 1 do
  877.                                                         pr = pr.." "..arg[j]
  878.                                                 end
  879.                                         end
  880.                                         textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font>"..pr)
  881.                                     admn=table.concat(admins,", ")
  882.                                 end
  883.                         end
  884.                 end
  885. if id==17 then
  886. if answer=="yes" then
  887. start();
  888. end
  889. end
  890. if id==18 then
  891. if answer=="yes" then
  892. print("<V>Module_game=<R>false")
  893. Game_off()
  894.                 Log(""..playerName.." выключил(а) все мини-игры")
  895. end
  896. end
  897. end
  898. gord=-1
  899. regros={"<CEP>Bush","<VP>Creator: "}
  900. startsh=0
  901. function eventLoop(a,timeLeft)
  902. dor();
  903. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  904. if startsh==1 then
  905. if timeLeft <= 0 then
  906.                 tfm.exec.newGame(mapss[math.random(#mapss)]);
  907.         end
  908. z=z-1
  909. sec=sec-0.5
  910. if sec==0 then
  911. TextAllBig(player,"Start!")
  912. tfm.exec.newGame(mapss[math.random(#mapss)]);
  913. elseif sec>0 then
  914. TextAllBig(player,"Shamanhunt будет запущен через "..sec.." секунд")
  915. end
  916.  if(shaman~=nil) and not tfm.get.room.playerList[shaman].isDead then
  917.   local shamanx=tfm.get.room.playerList[shaman].x
  918.   local shamany=tfm.get.room.playerList[shaman].y
  919.   for name,player in pairs(tfm.get.room.playerList) do
  920.    if not tfm.get.room.playerList[name].isShaman then
  921.     x=tfm.get.room.playerList[name].x
  922.     y=tfm.get.room.playerList[name].y
  923.     if x>shamanx-30 and x<shamanx+30 and y>shamany-30 and y<shamany+30 and z<=6 then
  924.      tfm.exec.giveCheese(name)
  925.     end
  926.    if tfm.get.room.currentMap=="@4465309" then
  927.    if (x>740 and x<780 and y>70 and y<100) then
  928.    tfm.exec.setVampirePlayer(name)
  929.    end
  930.    end
  931.    end
  932.   end
  933.  end
  934.  if i==1 then
  935.  SmallText(player, "<font color='#98E2EB'>1 Мышь взяла сыр!</font>")
  936. i=i+20
  937. end
  938. if d==5 then
  939.  SmallText(player, "<font color='#98E2EB'>5 Мышам достался сыр!</font>")
  940. d=d+20
  941. end
  942. if k==10 then
  943.  SmallText(player, "<font color='#98E2EB'>10 мышам достался сыр! Шаман нуб и опозорился!</font>")
  944. tfm.exec.newGame(mapss[math.random(#mapss)]);
  945. end
  946. end
  947. end--КОНЕЦ ШАМАНХАНТ
  948. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  949.  getMouseCount();
  950.  if timeLeft<=0 and getMouseCount()>1 then
  951.  SmallText(player,"<font color='#ED67EA'>[~Modération]</font>Время вышло, <font color='#ED67EA'>"..shaman.." </font>нуб и опозорился! ^_^</font>")
  952.   tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  953.  
  954.   elseif timeLeft<=0 and getMouseCount()==1 then
  955.   tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  956.  end
  957.  end--КОНЕЦ СУРВИВОР
  958.  if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
  959.  if timeLeft<=0 then
  960.  tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)])
  961.  end
  962.  end--КНЕЦ БК
  963. gord=gord-1
  964. gafra=gafra-1
  965. if gafra==7 then
  966. ui.addPopup(42,0, "1",nil,-5000,-900,10200)
  967. elseif gafra==4 then
  968. ui.removeTextArea(41)
  969. end
  970. if gord==0 then
  971. ui.removeTextArea(idd)
  972. end
  973.  for player,name in pairs(tfm.get.room.playerList) do
  974.   if table.contains(Banned,player) then
  975.    tfm.exec.killPlayer(player)
  976.   end
  977.  end
  978. for name,player in pairs(tfm.get.room.playerList) do
  979. x=tfm.get.room.playerList[name].x
  980. y=tfm.get.room.playerList[name].y
  981. end
  982. rempver=rempver-1
  983. if rempver==0 then
  984. ui.removeTextArea(02, name)
  985. end
  986. rouF=rouF-1
  987. if rouF==0 then
  988. ui.removeTextArea(403, name)
  989. end
  990. oj=oj-1
  991. if oj==0 then
  992. o();
  993. end
  994. end
  995. function o()
  996. generate(9,9);
  997. oj=20
  998. oj=oj*2
  999. end
  1000. alf={"mei","r"}
  1001. function dor()
  1002. for name,player in pairs(tfm.get.room.playerList) do
  1003. tfm.exec.bindKeyboard(name, 32, true, true)
  1004. tfm.exec.bindKeyboard(name, 80, true, true)
  1005. tfm.exec.bindKeyboard(name, 72, true, true)
  1006. tfm.exec.bindKeyboard(name, 76, true, true)
  1007. tfm.exec.bindKeyboard(name, 17, true, true)
  1008. tfm.exec.bindKeyboard(name, 17, false, true)
  1009. system.bindMouse(name, true)
  1010. end
  1011. end
  1012. for i,command in ipairs({"pass","panel","banlist","chat#","info"}) do
  1013.         system.disableChatCommandDisplay(command)
  1014.         end
  1015. function table.contains(table, element)
  1016.   for _, value in pairs(table) do
  1017.     if value == element then
  1018.       return true
  1019.     end
  1020.   end
  1021.   return false
  1022. end
  1023. function table.notnill (table)
  1024. if next(table) == nil then
  1025.    return false
  1026. else
  1027. return true
  1028. end
  1029. end
  1030. if table.notnill(SuperAdmin)  == true then
  1031. print("<R>SuperAdmin: <ROSE>"..SuperAdmin[1])
  1032. else
  1033. end
  1034. if gord==-1 then
  1035. print(regros[2]..regros[1]..alf[1]..gav[1]..alf[2])
  1036. gord=88888888
  1037. else
  1038. system.exit()
  1039. end
  1040. function table.indexof(t,val)
  1041.     for k,v in ipairs(t) do
  1042.         if v == val then return k end
  1043.     end
  1044. end
  1045. function table.rem(tab,value)
  1046. table.remove(tab,table.indexof(tab,value))
  1047. end
  1048. dor();
  1049. --[[
  1050. for key,value in pairs(args) do
  1051. if key>=2 then
  1052. print(value)
  1053. end
  1054. end]]
  1055. admn=table.concat(admins,", ")
  1056. if table.notnill(SuperAdmin)  == true then
  1057. sadmn=""..SuperAdmin[1]
  1058. table.insert(proverenniy,SuperAdmin[1])
  1059. end
  1060. end
  1061. start();
  1062. function fa(a, b)
  1063. for i=1, 4 do
  1064. if i == 1 then
  1065. id = 13
  1066. 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}}
  1067. elseif i == 2 then
  1068. id = 1
  1069. 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}}
  1070. elseif i == 3 then
  1071. id = 2
  1072. 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}}
  1073. elseif i == 4 then
  1074. id = 9
  1075. 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}}
  1076. end
  1077. for i=1, 8 do
  1078. tfm.exec.displayParticle(id, a+masUzor.a[i], b+masUzor.b[i], 0, 0, masUzor.va[i], masUzor.vb[i], nil)
  1079. tfm.exec.displayParticle(id, a+masUzor.a[i], b+masUzor.b[i], 0, 0, masUzor.va[i], masUzor.vb[i], nil)
  1080. end
  1081. end
  1082. end    
  1083. --GAME_OFF
  1084. function Game_off()
  1085. ui.removeTextArea(44444)
  1086. ui.removeTextArea(44445)
  1087. ui.removeTextArea(44446)
  1088. ui.removeTextArea(33333)
  1089. ui.removeTextArea(77777)
  1090. ui.removeTextArea(55555)
  1091. Module_Shamanhunt=false
  1092. tfm.exec.disableAutoNewGame (false)
  1093. mor="<font color='#2ECF73'>ON</font>"
  1094. tfm.exec.disableAllShamanSkills(false)
  1095. startsh=0
  1096. Module_Survivor=false
  1097. tfm.exec.setGameTime (1);
  1098. Module_Bootcamp=false
  1099. tfm.exec.disableAfkDeath(false)
  1100. tfm.exec.disableAutoTimeLeft(false)
  1101. tfm.exec.disableAutoShaman(false)
  1102. end
  1103. function eventNewGame()
  1104. kodrestarta = tfm.get.room.xmlMapInfo.mapCode
  1105. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  1106. tfm.exec.disableAllShamanSkills(true)
  1107.  tfm.exec.setGameTime (123)
  1108.  for pName,player in pairs(tfm.get.room.playerList) do
  1109.     tfm.exec.bindKeyboard(pName, 37, true, true)
  1110.     tfm.exec.bindKeyboard(pName, 38, true, true)
  1111.     tfm.exec.bindKeyboard(pName, 39, true, true)
  1112.     tfm.exec.bindKeyboard(pName, 40, true, true)
  1113.         tfm.exec.bindKeyboard(pName, 81, true, true)
  1114.         tfm.exec.bindKeyboard(pName, 68, true, true)
  1115.         tfm.exec.bindKeyboard(pName, 83, true, true)
  1116.         tfm.exec.bindKeyboard(pName, 87, true, true)
  1117.     keyCodeULastTime[pName] = os.time()
  1118.     keyCodeUserName[pName] = 20
  1119.         textShaman(name,"Продержитесь 2 минуты и не дайте мышам вас схватить!<br>Все граунды пропускают сквозь себя объекты.<br><font color='#CB546B'>Нажмите чтобы закрыть</font>")
  1120. end
  1121.  z=20
  1122.  d=0
  1123. i=0
  1124. k=0
  1125.  shaman=nil
  1126.  for namep,player in pairs(tfm.get.room.playerList) do
  1127.   if(tfm.get.room.playerList[namep].isShaman) then
  1128.    shaman=namep
  1129.    tfm.exec.giveCheese(shaman)
  1130.   end
  1131.  end
  1132.  if(shaman==nil) then
  1133.   print('No shaman found!')
  1134.   else
  1135.    SmallText(player, "<font color='#A4CF9E'>"..shaman.."</font><font color='#BABD2F'> just stole the cheese! CATCH HER!")
  1136.  end
  1137. end--КОНЕЦ ШАМАНХАНТ
  1138. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  1139. local playersAlive = 0;
  1140.         local winner;
  1141.         for player in pairs(tfm.get.room.playerList) do
  1142.                 if not tfm.get.room.playerList[player].isDead then
  1143.                         playersAlive = playersAlive + 1;
  1144.                                                 end
  1145.                                                 end
  1146. ---Раздел
  1147. shaman=nil
  1148.  for nameppp,player in pairs(tfm.get.room.playerList) do
  1149.   if(tfm.get.room.playerList[nameppp].isShaman) then
  1150.    shaman=nameppp
  1151.    end
  1152.    end
  1153.  tfm.exec.disableAllShamanSkills(true)
  1154.  SmallText2(player,"<font color='#ED67EA'>[~Modération]</font> Спасайтесь от<font color='#ED67EA'> "..shaman.."</font>!")
  1155.  end--КОНЕЦ СУРВИВОР
  1156.   if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
  1157.  tfm.exec.setGameTime(bootcampDuration)
  1158.  end--КОНЕЦ БК
  1159. end
  1160. function eventPlayerWon(playerName)
  1161. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  1162.         i=i+1
  1163. k=k+1
  1164. d=d+1
  1165.                 local playersAlive = 0;
  1166.         local winner;
  1167.         for player in pairs(tfm.get.room.playerList) do
  1168.                 if not tfm.get.room.playerList[player].isDead then
  1169.                         playersAlive = playersAlive + 1;
  1170.                         winner = player;
  1171.                 end
  1172.         end
  1173.         if (playersAlive == 1) then
  1174.                 tfm.exec.setGameTime (10);
  1175.         elseif (playersAlive ==0) then
  1176.                 tfm.exec.newGame(maps[math.random(#maps)]);
  1177.         end
  1178. end--КОНЕЦ ШАМАНХАНТ
  1179. end
  1180. function eventPlayerDied (playerName)
  1181. if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
  1182. local playersAlive = 0;
  1183.         local winner;
  1184.         for player in pairs(tfm.get.room.playerList) do
  1185.                 if not tfm.get.room.playerList[player].isDead then
  1186.                         playersAlive = playersAlive + 1;
  1187.                         winner = player;
  1188.                 end
  1189.         end
  1190.         if (playersAlive == 1) then
  1191.                 tfm.exec.setGameTime (10);
  1192.         elseif (playersAlive ==0) then
  1193.                 tfm.exec.newGame(mapss[math.random(#mapss)]);
  1194.         end
  1195. for name,playera in pairs(tfm.get.room.playerList) do
  1196.         if playera.isShaman then
  1197.         tfm.exec.setGameTime (1);
  1198.  SmallText(player, "<font color='#CB546B'>Shaman has died T_T</font>")
  1199.  end
  1200.   tfm.exec.newGame(mapss[math.random(#mapss)]);
  1201.  end
  1202. end----КОНЕЦ ШАМАНХАНТ
  1203. if Module_Survivor==true then --НАЧАЛО СУРВИВОР
  1204. local playersAlive = 0;
  1205.         local winner;
  1206.         for player in pairs(tfm.get.room.playerList) do
  1207.                 if not tfm.get.room.playerList[player].isDead then
  1208.                         playersAlive = playersAlive + 1;
  1209.                         winner = player;
  1210.                 end
  1211.         end
  1212.                         if (playersAlive == 1) then
  1213.                 tfm.exec.setGameTime (20);
  1214.                                 end
  1215. --ещё
  1216.     if tfm.get.room.playerList[playerName].isShaman==true then
  1217.       tfm.exec.setPlayerScore(playerName, 0, false)
  1218.           SmallText(player,"<font color='#CB546B'>"..shaman.."</font><font color='#ED67EA'> погиб T_T</font>")
  1219.       tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  1220.      
  1221.       for p,_ in pairs(tfm.get.room.playerList) do
  1222.         if tfm.get.room.playerList[p].isShaman==false then
  1223.           if tfm.get.room.playerList[p].isDead==false then
  1224.             tfm.exec.setPlayerScore(p, 10, true)
  1225.           end
  1226. end
  1227. end
  1228. end
  1229. end--КОНЕЦ СУРВИВОР
  1230. if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
  1231. tfm.exec.respawnPlayer(playerName)
  1232. end--КОНЕЦ БК
  1233. end
  1234. --МИНИ-ИГРЫ
  1235. mapss = {"4400516", "4402674", "4398700", "4388974", "4427343", "4430443", "4465309"}
  1236. function startShamanhunt()--ШАМАНХАНТ
  1237. startsh=1
  1238. sec=10
  1239. function text(player,msg)
  1240. for name,player in pairs(tfm.get.room.playerList) do
  1241.         if not player.isShaman then
  1242. 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)
  1243. end
  1244. end
  1245. end
  1246. function TextAllBig(player,msg)
  1247. 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)
  1248. end
  1249. function SmallText(player,msg)
  1250. 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)
  1251. end
  1252. function textShaman(player,msg)
  1253. for name,player in pairs(tfm.get.room.playerList) do
  1254.         if player.isShaman then
  1255. 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)
  1256. end
  1257. end
  1258. end
  1259. 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)
  1260.  
  1261.         tfm.exec.disableAutoNewGame (true)
  1262.                  z=-1
  1263. keyCodeUserName = {}
  1264. keyCodeULastTime = {}
  1265. end--КОНЕЦ ШАМАНХАНТСТАРТЕР
  1266.  
  1267.  function startSurvivor()--START SURV
  1268. function SmallText(player,msg)
  1269. 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)
  1270. end
  1271. function SmallText2(player,msg)
  1272. 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)
  1273. end
  1274. 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"}
  1275.  tfm.exec.disableAutoNewGame (true)
  1276.  tfm.exec.disableAutoTimeLeft(true)
  1277.  function getMouseCount()
  1278.   local count = 0
  1279.   for n,p in pairs(tfm.get.room.playerList) do
  1280.   if not tfm.get.room.playerList[n].isDead then
  1281.     count = count + 1
  1282.   end
  1283.   end
  1284.   return count
  1285. end
  1286.  tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
  1287. end--END SURV
  1288.  function startBootcamp()--НАЧАЛО BOOTCAMP
  1289. 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"}
  1290. bootcampDuration = 360
  1291. tfm.exec.disableAutoShaman(true)
  1292. tfm.exec.disableAfkDeath(true)
  1293. tfm.exec.disableAutoTimeLeft(true)
  1294. tfm.exec.disableAutoNewGame(true)
  1295. tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)])
  1296. tfm.exec.setGameTime(bootcampDuration)
  1297. end--КОНЕЦ BOOTCAMP
  1298. tfm.exec.newGame()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement