Advertisement
Guest User

v1.5 Minigames

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