Advertisement
Guest User

Untitled

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