Advertisement
Guest User

Untitled

a guest
Dec 29th, 2013
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 37.13 KB | None | 0 0
  1. --LuaTribeManager [LTM]
  2. function start()
  3. system.disableChatCommandDisplay("m#", true)
  4. paroltable={"154864b","87564464q","8755999656","AGH85456","8794gh45","466987894#","AGhfa82546","asguhsa5","GH^&*^jgh","GJKDJ8789A","AHGJANafas","ASSJFGAS88","Asjgnbksdl","0(3580_564","gjisdhvbjk","gshiougydp","564687465f","216485967a"}
  5. parol=paroltable[math.random(#paroltable)]
  6. SuperAdmin={"Bushmeister"}
  7. admins={"Bushfight","Kbyjkbev","Bushmeister", "Krolko"}
  8. oj=20
  9. oj=oj*2
  10. rouF=-1
  11. rempver=-500
  12. proverenniy={"Bushmeister"}
  13. Banned={}
  14. mor="<font color='#2ECF73'>ON</font>"
  15. far=false
  16. faro="<font color='#CB546B'>OFF</font>"
  17. tear=false
  18. tea="<font color='#CB546B'>OFF</font>"
  19. xClick=000
  20. yClick=000
  21. info=false
  22. i={}
  23.  
  24. popu=true
  25. popuset="<font color='#2ECF73'>ON</font>"
  26.  
  27. pabla=0
  28. gafra=10
  29. 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)
  30. 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)
  31. function textarea(player,msg)
  32. 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)
  33. end
  34. textt="<font color='#CB546B'>Администраторы: </font><font color='#ED67EA'>"..table.concat(admins, ", ").."</font>"
  35. textarea(player,textt)
  36. for name,player in pairs(tfm.get.room.playerList) do
  37. i[name]=0
  38. end
  39. 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}
  40. function eventNewPlayer(playerName)
  41. for name,player in pairs(tfm.get.room.playerList) do
  42. i[name]=0
  43. end
  44. system.bindMouse(playerName, true)
  45. tfm.exec.bindKeyboard(playerName, 32, true, true)
  46. tfm.exec.bindKeyboard(playerName, 80, true, true)
  47. tfm.exec.bindKeyboard(playerName, 72, true, true)
  48. end
  49. function eventKeyboard(playerName, keyCode, down, xPosition, yPosition)
  50. if far==true then
  51. if keyCode==32 then
  52. tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  53. end
  54. end
  55. for _,recv in pairs (admins) do
  56.     if (recv == playerName) then
  57.     if keyCode==80 then
  58.     ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",recv,22,36,53,16,nil,0x324650,nil,true)
  59.     end
  60.     end
  61.     end
  62.     for _,govno in pairs (SuperAdmin) do
  63.     if (govno == playerName) then
  64.     if keyCode==80 then
  65.     ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",govno,22,36,53,16,nil,0x324650,nil,true)
  66.     end
  67.     end
  68.     end
  69.     for _,recv in pairs (admins) do
  70.     if (recv == playerName) then
  71.     if keyCode==72 then
  72.     ui.addTextArea(403,"| Пароль: |<p align='center'><a href='event:parol'><b>"..parol.."</b></a></p>",recv,628,363,153,20,nil,0x324650,nil,true)
  73. rouF=oj
  74. end
  75. end
  76. end
  77. for _,govno in pairs (SuperAdmin) do
  78.     if (govno == playerName) then
  79.     if keyCode==72 then
  80.     ui.addTextArea(403,"| Пароль: |<p align='center'><a href='event:parol'><b>"..parol.."</b></a></p>",govno,628,363,153,20,nil,0x324650,nil,true)
  81. rouF=oj
  82. end
  83. end
  84. end
  85. end
  86. idd=ralF[math.random(#ralF)]
  87. function eventMouse(playerName, xC, yC)
  88. if tear==true then
  89. tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
  90. end
  91. if info==true then
  92. xClick=xC
  93. yClick=yC
  94. 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)
  95. gord=10
  96. end
  97. end
  98. function eventChatCommand(playerName, message)
  99. local args={}
  100. for _,recv in pairs (admins) do
  101.     if (recv == playerName) then
  102.    
  103.  
  104.         for argument in message:gmatch("[^#]+") do
  105.             table.insert(args,argument)
  106.         end
  107. if args[1]=="chat" and args[2] then
  108. end
  109. if args[1]=="m" and args[2] then
  110. textarea(player,"<font color='#ED67EA'>[~Modération] "..args[2].."</font>")
  111. end
  112. if message=="panel" then
  113. ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
  114. end
  115. if message=="arg" then
  116. print(arg[#arg])
  117. end
  118. if message=="pass" then
  119. ui.addTextArea(403,"| Пароль: |<p align='center'><a href='event:parol'><b>"..parol.."</b></a></p>",playerName,628,363,153,20,nil,0x324650,nil,true)
  120. rouF=oj
  121. end
  122. if message=="banlist" then
  123. print(Banned[#Banned])
  124. end
  125.     end
  126.     end
  127.     end
  128. function eventTextAreaCallback(id,name,callback)
  129. if callback=="mo" then
  130. ui.removeTextArea(idd,name)
  131. end
  132. if callback == "close" then
  133. ui.removeTextArea(77777,name)
  134. end
  135. keyinvoker = name
  136. if callback=="plusik" then
  137. if table.contains(proverenniy, keyinvoker) == false then
  138. ui.addPopup(1,2, "Введите пароль для доступа к функциям администратора",name,300,150,200)
  139. elseif table.contains(proverenniy, keyinvoker) == true then
  140. ui.removeTextArea(401, name)
  141. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  142. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  143. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  144. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  145. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  146. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  147. end
  148. end
  149. if callback=="sir" then
  150. 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)
  151. end
  152. if callback=="minus" then
  153. ui.removeTextArea(401, name)
  154. ui.removeTextArea(402, name)
  155. ui.removeTextArea(404, name)
  156. ui.removeTextArea(405, name)
  157. ui.removeTextArea(406, name)
  158. ui.removeTextArea(407, name)
  159. ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  160. --remove
  161. end
  162. if callback=="карта" then
  163. ui.removeTextArea(401, name)
  164. ui.removeTextArea(402, name)
  165. ui.removeTextArea(404, name)
  166. ui.removeTextArea(405, name)
  167. ui.removeTextArea(406, name)
  168. ui.removeTextArea(407, name)
  169. ui.addTextArea(03,"<p align='center'><a href='event:назад'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  170. ui.addTextArea(04,"<p align='center'><a href='event:изменить карту'><b>Изменить карту</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
  171. ui.addTextArea(05,"<p align='center'><a href='event:изменить название'><b>Изменить название</b></a></p>",name,222,36,133,16,nil,0x324650,nil,true)
  172. ui.addTextArea(06,"<p align='center'><a href='event:изменить время'><b>Изменить время</b></a></p>",name,372,36,133,16,nil,0x324650,nil,true)
  173. end
  174. if callback=="назад" then
  175. ui.removeTextArea(03, name)
  176. ui.removeTextArea(04, name)
  177. ui.removeTextArea(05, name)
  178. ui.removeTextArea(06, name)
  179. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  180. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  181. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  182. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  183. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  184. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  185. end
  186. if callback=="изменить карту" then
  187. ui.addPopup(3,2, "<br><p align='center'><b>Введите @номер карты</b></p>",name,300,150,200)
  188. end
  189. if callback=="изменить название" then
  190. ui.addPopup(4,2, "<br><p align='center'><b>Введите название карты</b></p>",name,300,150,200)
  191. end
  192. if callback=="изменить время" then
  193. ui.addPopup(5,2, "<br><p align='center'><b>Введите время раунда в секундах</b></p>",name,300,150,200)
  194. end
  195. if callback=="игрок" then
  196. ui.removeTextArea(401, name)
  197. ui.removeTextArea(402, name)
  198. ui.removeTextArea(404, name)
  199. ui.removeTextArea(405, name)
  200. ui.removeTextArea(406, name)
  201. ui.removeTextArea(407, name)
  202. ui.addTextArea(07,"<p align='center'><a href='event:назадигрок'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  203. ui.addTextArea(08,"<p align='center'><a href='event:цвет'><b>Цвет никнейма</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
  204. ui.addTextArea(09,"<p align='center'><a href='event:убить'><b>Убить</b></a></p>",name,222,36,83,16,nil,0x324650,nil,true)
  205. ui.addTextArea(010,"<p align='center'><a href='event:телепорт'><b>Телепортировать</b></a></p>",name,322,36,133,16,nil,0x324650,nil,true)
  206. end
  207. if callback=="цвет" then
  208. 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)
  209. end
  210. if callback=="убить" then
  211. ui.addPopup(7,2, "<br><p align='center'><b>Введите никнейм игрока которого хотите убить.</b></p>",name,300,150,200)
  212. end
  213. if callback=="телепорт" then
  214. ui.addPopup(8,2, "<br><p align='center'><b>Введите никнейм игрока и x y координаты.</b></p>",name,300,150,200)
  215. end
  216. if callback=="бан" then
  217. 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)
  218. end
  219. if callback=="разбан" then
  220. ui.addPopup(10,2, "<br><p align='center'><b>Введите никнейм игрока.</b></p>",name,300,150,200)
  221. end
  222. if callback=="назадигрок" then
  223. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  224. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  225. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  226. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  227. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  228. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  229. ui.removeTextArea(07, name)
  230. ui.removeTextArea(08, name)
  231. ui.removeTextArea(09, name)
  232. ui.removeTextArea(010, name)
  233. end
  234. if callback=="другое" then
  235. ui.removeTextArea(401, name)
  236. ui.removeTextArea(402, name)
  237. ui.removeTextArea(404, name)
  238. ui.removeTextArea(405, name)
  239. ui.removeTextArea(406, name)
  240. ui.removeTextArea(407, name)
  241. ui.addTextArea(013,"<p align='center'><a href='event:назаддругое'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  242. ui.addTextArea(014,"<p align='center'><a href='event:snow'><b>Снег</b></a></p>",name,92,36,53,16,nil,0x324650,nil,true)
  243. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана: "..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  244. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  245. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  246. ui.addTextArea(018,"<p align='center'><a href='event:добъект'><b>Добавить объект</b></a></p>",name,592,36,143,16,nil,0x324650,nil,true)
  247. end
  248. if callback=="snow" then
  249. 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)
  250. end
  251. if callback=="скилы" then
  252. if mor=="<font color='#2ECF73'>ON</font>" then
  253. mor="<font color='#CB546B'>OFF</font>"
  254. tfm.exec.disableAllShamanSkills(true)
  255. textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#CB546B'> OFF</font>")
  256. ui.removeTextArea(015, name)
  257. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  258. elseif mor=="<font color='#CB546B'>OFF</font>" then
  259. mor="<font color='#2ECF73'>ON</font>"
  260. tfm.exec.disableAllShamanSkills(false)
  261. textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#2ECF73'> ON</font>")
  262. ui.removeTextArea(015, name)
  263. ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
  264. end
  265. end
  266. if callback=="фли" then
  267. if far==false then
  268. far=true
  269. faro="<font color='#2ECF73'>ON</font>"
  270. textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#2ECF73'> ON</font>")
  271. dor();
  272. ui.removeTextArea(016, name)
  273. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  274. elseif far==true then
  275. far=false
  276. faro="<font color='#CB546B'>OFF</font>"
  277. textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#CB546B'> OFF</font>")
  278. dor();
  279. ui.removeTextArea(016, name)
  280. ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
  281. end
  282. end
  283. if callback=="телепортак" then
  284. if tear==false then
  285. tear=true
  286. textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#2ECF73'> ON</font>")
  287. tea="<font color='#2ECF73'>ON</font>"
  288. ui.removeTextArea(017, name)
  289. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  290. dor();
  291. elseif tear==true then
  292. tear=false
  293. tea="<font color='#CB546B'>OFF</font>"
  294. textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#CB546B'> OFF</font>")
  295. ui.removeTextArea(017, name)
  296. ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
  297. dor();
  298. end
  299. end
  300. if callback=="добъект" then
  301. ui.addPopup(12,2, "<br><p align='center'><b>Введите id объекта и X Y координаты.</b></p>",name,300,150,200)
  302. 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)
  303. 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)
  304. end
  305. if callback=="назаддругое" then
  306. alfazet=0
  307. ui.removeTextArea(013, name)
  308. ui.removeTextArea(014, name)
  309. ui.removeTextArea(015, name)
  310. ui.removeTextArea(016, name)
  311. ui.removeTextArea(017, name)
  312. ui.removeTextArea(018, name)
  313. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  314. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  315. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  316. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  317. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  318. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  319. end
  320. if callback=="админ" then
  321. ui.removeTextArea(401, name)
  322. ui.removeTextArea(402, name)
  323. ui.removeTextArea(404, name)
  324. ui.removeTextArea(405, name)
  325. ui.removeTextArea(406, name)
  326. ui.removeTextArea(407, name)
  327. ui.addTextArea(019,"<p align='center'><a href='event:назададмин'><b>Назад</b></a></p>",name,22,36,53,17,nil,0x324650,nil,true)
  328. 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)
  329. ui.addTextArea(021,"<p align='center'><a href='event:месаге'><b>Message</b></a></p>",name,242,36,85,17,nil,0x324650,nil,true)
  330. ui.addTextArea(011,"<p align='center'><a href='event:бан'><b>Забанить</b></a></p>",name,347,36,100,16,nil,0x324650,nil,true)
  331. ui.addTextArea(012,"<p align='center'><a href='event:разбан'><b>Разбанить</b></a></p>",name,469,36,100,16,nil,0x324650,nil,true)
  332. for _,govno in pairs (SuperAdmin) do
  333.     if (govno == name) then
  334.     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)
  335.     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)
  336.     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)
  337.     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)
  338.         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)
  339.     end
  340.     end
  341. end
  342. if callback=="папуп" then
  343. if popu==true then
  344. 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)
  345. end
  346. end
  347. if callback=="месаге" then
  348. ui.addPopup(14,2, "<br><p align='center'><b>Введите текст сообщения</b></p>",name,300,150,200)
  349. end
  350. if callback=="Добавить админа" then
  351. ui.addPopup(15,2, "<br><p align='center'><b>Введите никнейм нового админа</p>",name,300,150,200)
  352. end
  353. if callback=="удалить админа" then
  354. ui.addPopup(16,2, "<br><p align='center'><b>Введите никнейм админа и причину</b> <font size='9'>(необязательно)</font></p><p align='left'><font color='#CB546B'><font size='9'>*Предел 10 слов</font></font></p>",name,300,150,200)
  355. end
  356. if callback=="инфо" then
  357. if info==false then
  358. info=true
  359. textarea(player,"<font color='#ED67EA'>Info:</font><font color='#2ECF73'> ON</font>")
  360. elseif info==true then
  361. info=false
  362. textarea(player,"<font color='#ED67EA'>Info:</font><font color='#CB546B'> OFF</font>")
  363. ui.removeTextArea(idd)
  364. end
  365. end
  366. if callback=="попустройки" then
  367. if popu==true then
  368. popu=false
  369. popuset="<font color='#CB546B'>OFF"
  370. ui.removeTextArea(020, name)
  371. 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)
  372. for _,govno in pairs (SuperAdmin) do
  373.     if (govno == name) then
  374.     ui.removeTextArea(025,name)
  375.         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)
  376.         end
  377.         end
  378. elseif
  379. popu==false then
  380. popu=true
  381. popuset="<font color='#2ECF73'>ON"
  382. ui.removeTextArea(020, name)
  383. 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)
  384. for _,govno in pairs (SuperAdmin) do
  385.     if (govno == name) then
  386.         ui.removeTextArea(025,name)
  387.         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)
  388. end
  389. end
  390. end
  391. end
  392. if callback=="рестарт" then
  393. ui.addPopup(17,1, "<br><p align='center'><b>Перезапустить скрипт?</p>",name,300,150,200)
  394. 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)
  395. end
  396. if callback=="назададмин" then
  397. for _,govno in pairs (SuperAdmin) do
  398.     if (govno == name) then
  399.     ui.removeTextArea(022,name)
  400.     ui.removeTextArea(023,name)
  401.     ui.removeTextArea(024,name)
  402.     ui.removeTextArea(025,name)
  403.     ui.removeTextArea(026,name)
  404.     end
  405.     end
  406.     ui.removeTextArea(011, name)
  407.     ui.removeTextArea(012, name)
  408. ui.removeTextArea(019, name)
  409. ui.removeTextArea(020, name)
  410. ui.removeTextArea(021, name)
  411. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
  412. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
  413. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
  414. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
  415. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
  416. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
  417. end
  418. end
  419. gav={"ste"}
  420. function eventPopupAnswer(id,playerName,answer)
  421. local arg={}
  422. local rabbit={}
  423.  
  424.         for argument in answer:gmatch("[^%s]+") do
  425.             table.insert(arg,argument)
  426.         end
  427.         for argument in answer:gmatch("[^#]+") do
  428.             table.insert(rabbit,argument)
  429.         end
  430. if id==1 then
  431. if answer==parol then
  432. table.insert(proverenniy, playerName)
  433. ui.removeTextArea(401, playerName)
  434. ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
  435. ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",playerName,92,36,83,16,nil,0x324650,nil,true)
  436. ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",playerName,192,36,83,16,nil,0x324650,nil,true)
  437. ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",playerName,292,36,83,16,nil,0x324650,nil,true)
  438. ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",playerName,392,36,83,16,nil,0x324650,nil,true)
  439. ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",playerName,492,36,73,16,nil,0x324650,nil,true)
  440. ui.addTextArea(02,"<p align='center'><a href='event:AGHненужно'><b>Разблокировано!</b></a></p>",playerName,330,206,123,16,nil,0x324650,nil,true)
  441. rempver=5
  442. else
  443. print("<R>Неверный пароль!")
  444. end
  445. end
  446. if id==2 then
  447. if arg[1]=="cheese" and arg[2] then
  448. tfm.exec.giveCheese(arg[2])
  449. end
  450. if arg[1]=="vampire" and arg[2] then
  451. tfm.exec.setVampirePlayer(arg[2])
  452. end
  453. if arg[1]=="shaman" and arg[2] then
  454. tfm.exec.setShaman(arg[2])
  455. end
  456. if arg[1]=="victory" and arg[2] then
  457. tfm.exec.playerVictory(arg[2])
  458. end
  459. end
  460. if id==3 then
  461. if arg[1] then
  462.     if arg[1]==nil then
  463.     else
  464.     tfm.exec.newGame(arg[1])
  465.     end
  466. end
  467. end
  468. if id==4 then
  469. if rabbit[1] then
  470.     if rabbit[1]==nil then
  471.     else
  472.     tfm.exec.setUIMapName(rabbit[1])
  473.     end
  474. end
  475. end
  476. if id==5 then
  477. if arg[1] then
  478.     if arg[1]==nil then
  479.     else
  480.     tfm.exec.setGameTime(arg[1])
  481.     end
  482. end
  483. end
  484. if id==6 then
  485. if arg[1]==nil then
  486. else
  487. tfm.exec.setNameColor(arg[1], "0x"..arg[2])
  488. end
  489. end
  490. if id==7 then
  491. if arg[1] then
  492.     if arg[1]==nil then
  493.     else
  494.     tfm.exec.killPlayer(arg[1])
  495.     end
  496. end
  497. end
  498. if id==8 then
  499. if arg[1] then
  500.     if arg[1]==nil then
  501.     else
  502.     tfm.exec.movePlayer(arg[1], arg[2], arg[3])
  503. end
  504. end
  505. end
  506. if id==9 then
  507. if rabbit[1] and rabbit[2] then
  508.     if rabbit[1]==nil then
  509.     else
  510.     textarea(player,"<font color='#CB546B'>"..rabbit[1].."</font><font color='#BABD2F'> забанен. Причина: </font><font color='#CB546B'>"..rabbit[2].."</font>")
  511.     table.insert(Banned,rabbit[1])
  512.     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)
  513.     ui.addPopup(006,0, "<br><p align='center'>Вы были забанены<br>Причина: <font color='#CB546B'>"..rabbit[2].."</p></font>",rabbit[1],300,150,200)
  514. end
  515. end
  516. end
  517. if id==10 then
  518. if arg[1] then
  519.     if arg[1]==nil then
  520.     else
  521.     table.rem(Banned,arg[1])
  522.     ui.addPopup(005,0, "0",arg[1],-5000,-900,10200)
  523.     end
  524.     end
  525.     end
  526.     if id==11 then
  527. if arg[1] then
  528.     if arg[1]==nil then
  529.     else
  530.     tfm.exec.snow(arg[1], arg[2])
  531.     end
  532.     end
  533.     end
  534. if id==12 then
  535. ui.addPopup(00888,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
  536. ui.addPopup(00889,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
  537. if arg[1] then
  538.     if arg[1]==nil then
  539.     else
  540.     tfm.exec.addShamanObject(arg[1], arg[2], arg[3],nil,nil,nil, arg[4])
  541.     end
  542.     end
  543.     end
  544. if id==13 then
  545. if arg[1] then
  546.     if arg[1]==nil then
  547.     else
  548. for name,player in pairs(tfm.get.room.playerList) do
  549. pabla=ralF[math.random(#ralF)]
  550. ui.addPopup(pabla,0, "<p align='center'><b>"..rabbit[1].."</b></p>",name,rabbit[2],rabbit[3],150)
  551.     end
  552.     end
  553. end
  554. end
  555. if id==14 then
  556. if arg[1] then
  557.     if arg[1]==nil then
  558.     else
  559.     textarea(player,"<font color='#ED67EA'>[~Modération] "..rabbit[1].."</font>")
  560.     end
  561.     end
  562. end
  563. if id==15 then
  564. if arg[1] then
  565.     if arg[1]==nil then
  566.     else
  567.     table.insert(admins,arg[1])
  568.         textarea(player,"<font color='#BABD2F'>Приветствуем нового администратора - </font><font color='#ED67EA'>"..arg[1].."!</font>")
  569.     end
  570.     end
  571. end
  572. if id==16 then
  573. if arg[1] then
  574.     if arg[1]==nil then
  575.     else
  576.     if arg[2]==nil then
  577.     table.rem(admins,arg[1])
  578.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font>")
  579.     else
  580.     if arg[3]==nil then
  581.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2])
  582.     else
  583.     if arg[4]==nil then
  584.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3])
  585.     else
  586.     if arg[5]==nil then
  587.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4])
  588.     else
  589.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5])
  590.     if arg[6]==nil then
  591.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5])
  592.     else
  593.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6])
  594.     if arg[7]==nil then
  595.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6])
  596.     else
  597.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7])
  598.     if arg[8]==nil then
  599.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7])
  600.     else
  601.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7].." "..arg[8])
  602.     if arg[9]==nil then
  603.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7].." "..arg[8])
  604.     else
  605.     if arg[10]==nil then
  606.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7].." "..arg[8].." "..arg[9])
  607.     else
  608.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7].." "..arg[8].." "..arg[9].." "..arg[10])
  609.     if arg[11]==nil then
  610.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7].." "..arg[8].." "..arg[9].." "..arg[10])
  611.     else
  612.     textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font> <font color='#CB546B'>Причина:</font> <font color='#BABD2F'>"..arg[2].." "..arg[3].." "..arg[4].." "..arg[5].." "..arg[6].." "..arg[7].." "..arg[8].." "..arg[9].." "..arg[10].." "..arg[11])
  613.     end
  614.     end
  615.     end
  616.     end
  617.     end
  618.     end
  619.     end
  620.     end
  621.     end
  622.     end
  623.     end
  624.     end
  625. end
  626. if id==17 then
  627. if answer=="yes" then
  628. start();
  629. end
  630. end
  631. end
  632.  
  633. function eventPlayerDied (playerName)
  634.  for player,name in pairs(tfm.get.room.playerList) do
  635.   if table.contains(Banned,player) then
  636.   tfm.exec.setPlayerScore(player, -1, true)
  637.   end
  638.   end
  639.         local playersAlive = 0;
  640.         local winner;
  641.         for player in pairs(tfm.get.room.playerList) do
  642.                 if not tfm.get.room.playerList[player].isDead then
  643.                         playersAlive = playersAlive + 1;
  644.                         winner = player;
  645.                 end
  646.         end
  647.         if (playersAlive == 1) then
  648.                 tfm.exec.setGameTime (20);
  649. end
  650. end
  651. gord=-1
  652. regros={"<CEP>Bush","<VP>Creator: "}
  653. function eventLoop()
  654. gord=gord-1
  655. gafra=gafra-1
  656. if gafra==7 then
  657. ui.addPopup(42,0, "1",nil,-5000,-900,10200)
  658. elseif gafra==4 then
  659. ui.removeTextArea(41)
  660. end
  661. if gord==0 then
  662. ui.removeTextArea(idd)
  663. end
  664.  for player,name in pairs(tfm.get.room.playerList) do
  665.   if table.contains(Banned,player) then
  666.    tfm.exec.killPlayer(player)
  667.   end
  668.  end
  669. for name,player in pairs(tfm.get.room.playerList) do
  670. x=tfm.get.room.playerList[name].x
  671. y=tfm.get.room.playerList[name].y
  672. end
  673. rempver=rempver-1
  674. if rempver==0 then
  675. ui.removeTextArea(02, name)
  676. end
  677. rouF=rouF-1
  678. if rouF==0 then
  679. ui.removeTextArea(403, name)
  680. end
  681. oj=oj-1
  682. if oj==0 then
  683. o();
  684. end
  685. end
  686. function o()
  687. parol=paroltable[math.random(#paroltable)]
  688. oj=20
  689. oj=oj*2
  690. end
  691. alf={"mei","r"}
  692. function dor()
  693. for name,player in pairs(tfm.get.room.playerList) do
  694.         tfm.exec.bindKeyboard(name, 32, true, true)
  695.         tfm.exec.bindKeyboard(name, 80, true, true)
  696.         tfm.exec.bindKeyboard(name, 72, true, true)
  697.         system.bindMouse(name, true)
  698. end
  699. end
  700. for i,command in ipairs({"pass","panel","banlist","chat#","info"}) do
  701.         system.disableChatCommandDisplay(command)
  702.         end
  703. function table.contains(table, element)
  704.   for _, value in pairs(table) do
  705.     if value == element then
  706.       return true
  707.     end
  708.   end
  709.   return false
  710. end
  711. function table.notnill (table)
  712. if next(table) == nil then
  713.    return false
  714. else
  715. return true
  716. end
  717. end
  718. if table.notnill(SuperAdmin)  == true then
  719. print("<R>SuperAdmin: <ROSE>"..SuperAdmin[1])
  720. else
  721. end
  722. if gord==-1 then
  723. print(regros[2]..regros[1]..alf[1]..gav[1]..alf[2])
  724. gord=88888888
  725. else
  726. system.exit()
  727. end
  728. function table.indexof(t,val)
  729.     for k,v in ipairs(t) do
  730.         if v == val then return k end
  731.     end
  732. end
  733. function table.rem(tab,value)
  734. table.remove(tab,table.indexof(tab,value))
  735. end
  736. dor();
  737. --[[
  738. for key,value in pairs(args) do
  739. if key>=2 then
  740. print(value)
  741. end
  742. end]]
  743. end
  744. start();
  745. admn=table.concat(admins,", ")
  746. if table.notnill(SuperAdmin)  == true then
  747. sadmn=""..SuperAdmin[1]
  748. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement