Advertisement
Guest User

[LTM] v2.0 Ban update

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