Advertisement
Guest User

2.3 info

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