Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --LuaTribeManager [LTM]
- SuperAdmin={"Conplai"}
- admins={"Wyerk","Nickname"}
- function start()
- 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"}
- math.randomseed(os.time())
- pass = {}
- function generate(s, l)
- pass = {}
- size = math.random(s,l)
- for z = 1,size do
- case = math.random(1)
- a = math.random(1,#char)
- if case == 1 then
- x=string.upper(char[a])
- elseif case == 2 then
- x=string.lower(char[a])
- end
- table.insert(pass, x)
- end
- return(table.concat(pass))
- end
- system.disableChatCommandDisplay("m#", true)
- generate(9,9);
- oj=20
- oj=oj*2
- rouF=-1
- rempver=-500
- proverenniy={}
- Banned={}
- mor="<font color='#2ECF73'>ON</font>"
- far=false
- faro="<font color='#CB546B'>OFF</font>"
- tear=false
- tea="<font color='#CB546B'>OFF</font>"
- xClick=000
- yClick=000
- info=false
- idName={}
- Module_Shamanhunt=false
- Module_Survivor=false
- Module_Bootcamp=false
- fire=false
- firew="<font color='#CB546B'>OFF</font>"
- log={}
- popu=true
- popuset="<font color='#2ECF73'>ON</font>"
- pabla=0
- gafra=10
- 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)
- 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)
- function Log(element)
- abr=table.maxn(log)
- if abr<=23 then
- table.insert(log, element)
- elseif abr>=24 then
- table.remove(log,1)
- table.insert(log,element)
- end
- end
- function textarea(player,msg)
- 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)
- end
- textt="<font color='#CB546B'>Администраторы: </font><font color='#ED67EA'>"..table.concat(admins, ", ").."</font>"
- textarea(player,textt)
- for name,player in pairs(tfm.get.room.playerList) do
- idName[name]=0
- end
- 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}
- function eventNewPlayer(playerName)
- for name,player in pairs(tfm.get.room.playerList) do
- idName[name]=0
- end
- system.bindMouse(playerName, true)
- tfm.exec.bindKeyboard(playerName, 32, true, true)
- tfm.exec.bindKeyboard(playerName, 80, true, true)
- tfm.exec.bindKeyboard(playerName, 72, true, true)
- tfm.exec.bindKeyboard(playerName, 76, true, true)
- end
- function eventKeyboard(playerName, keyCode, down, xPosition, yPosition)
- if Module_Shamanhunt==true and sec<0 then--НАЧАЛО ШАМАНХАНТ
- if tfm.get.room.playerList[playerName].isShaman then
- if keyCode == 81 then
- keyCodeUserName[playerName] = 20
- elseif keyCode == 37 then
- keyCodeUserName[playerName] = 20
- elseif keyCode == 39 then
- keyCodeUserName[playerName] = 19
- elseif keyCode == 68 then
- keyCodeUserName[playerName] = 19
- elseif keyCode == 40 or keyCode == 83 then
- if os.time() - keyCodeULastTime[playerName] >= 1000 then
- tfm.exec.addShamanObject(keyCodeUserName[playerName], xPosition, yPosition + 15, 0, 0, 0, false)
- keyCodeULastTime[playerName] = os.time()
- end
- end
- end
- end--КОНЕЦ ШАМАНХАНТ
- if far==true then
- if keyCode==32 then
- tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
- tfm.exec.displayParticle(26, xPosition-15, yPosition-35, 0, 0, 0, 0, nil)
- end
- end
- for _,recv in pairs (admins) do
- if (recv == playerName) then
- -----------------------------------LOG
- if keyCode == 76 and down == true then
- ui.addTextArea(08502, "<p align='center'><font color='#2ECF73'>----ADMIN LOG----</p><br><p align='left'>"..table.concat(log,"<br>").."</p></font>", playerName, 200, 40, 400, 340, 0x1C3C41, 0x1C3C41, 0.6)
- tfm.exec.bindKeyboard(playerName, 76, false, true)
- elseif keyCode == 76 and down == false then
- ui.removeTextArea(08502, playerName)
- tfm.exec.bindKeyboard(playerName, 76, true, true)
- end
- -----------------------------------LOG END
- if keyCode==80 then
- ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",recv,22,36,53,16,nil,0x324650,nil,true)
- end
- end
- end
- for _,govno in pairs (SuperAdmin) do
- if (govno == playerName) then
- ------------------------------LOG SPADMIN
- if keyCode == 76 and down == true then
- ui.addTextArea(08502, "<p align='center'><font color='#2ECF73'>----ADMIN LOG----</p><br><p align='left'>"..table.concat(log,"<br>").."</p></font>", playerName, 200, 40, 400, 340, 0x1C3C41, 0x1C3C41, 0.6)
- tfm.exec.bindKeyboard(playerName, 76, false, true)
- elseif keyCode == 76 and down == false then
- ui.removeTextArea(08502, playerName)
- tfm.exec.bindKeyboard(playerName, 76, true, true)
- end
- ------------------------------LOGEND SPADMIN
- if keyCode==80 then
- ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",govno,22,36,53,16,nil,0x324650,nil,true)
- end
- end
- end
- for _,recv in pairs (admins) do
- if (recv == playerName) then
- if keyCode==72 then
- 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)
- rouF=oj
- end
- end
- end
- for _,govno in pairs (SuperAdmin) do
- if (govno == playerName) then
- if keyCode==72 then
- 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)
- rouF=oj
- end
- end
- end
- end
- idd=ralF[math.random(#ralF)]
- function eventMouse(playerName, xC, yC)
- for _,recv in pairs (admins) do
- if (recv == playerName) then
- if fire==true then
- a=xC
- b=yC
- local mas={a={0,10,-10,0,10,-10,0}, b={0,10,-10,10,0,0,-10}}
- for i = 1, 7 do
- fa(a+mas.a[i], b+mas.b[i])
- end
- end
- end
- end
- for _,abc in pairs (SuperAdmin) do
- if (abc == playerName) then
- if fire==true then
- a=xC
- b=yC
- local mas={a={0,10,-10,0,10,-10,0}, b={0,10,-10,10,0,0,-10}}
- for i = 1, 7 do
- fa(a+mas.a[i], b+mas.b[i])
- end
- end
- end
- end
- if tear==true then
- tfm.exec.movePlayer(playerName, xC, yC, false, 0, 0, false)
- tfm.exec.displayParticle(3, xC-10, yC-5, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC, yC, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC+3, yC+2, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC+6, yC+4, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC-5, yC+6, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC-2, yC+8, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC-10, yC+15, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC-10, yC+8, 0, 0, 0, 0, nil)
- tfm.exec.displayParticle(3, xC+10, yC+10, 0, 0, 0, 0, nil)
- end
- if info==true then
- xClick=xC
- yClick=yC
- 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)
- gord=10
- end
- end
- function eventChatCommand(playerName, message)
- local args={}
- for _,recv in pairs (admins) do
- if (recv == playerName) then
- for argument in message:gmatch("[^#]+") do
- table.insert(args,argument)
- end
- if args[1]=="chat" and args[2] then
- end
- if args[1]=="m" and args[2] then
- textarea(player,"<font color='#ED67EA'>[~Modération] "..args[2].."</font>")
- end
- if message=="panel" then
- ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
- end
- if message=="arg" then
- print(arg[#arg])
- end
- if message=="pass" then
- 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)
- rouF=oj
- end
- if message=="banlist" then
- print(Banned[#Banned])
- end
- end
- end
- end
- function eventTextAreaCallback(id,name,callback)
- if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
- if callback == "close" then
- ui.removeTextArea(55555,name)
- end
- if callback == "closeShaman" then
- ui.removeTextArea(77777,name)
- end
- if callback=="closeSmall" then
- ui.removeTextArea(44444,name)
- end
- if callback=="closeBigAll" then
- ui.removeTextArea(33333,name)
- end
- end--КОНЕЦ ШАМАНХАНТ
- if Module_Survivor==true then --НАЧАЛО СУРВИВОР
- if callback=="closeSmall" then
- ui.removeTextArea(44444,name)
- ui.removeTextArea(44445,name)
- ui.removeTextArea(44446,name)
- end
- end--КОНЕЦ СУРВИВОР
- if callback=="mo" then
- ui.removeTextArea(idd,name)
- end
- if callback == "close" then
- ui.removeTextArea(77777,name)
- end
- keyinvoker = name
- if callback=="plusik" then
- if table.contains(proverenniy, keyinvoker) == false then
- ui.addPopup(1,2, "Введите пароль для доступа к функциям администратора",name,300,150,200)
- elseif table.contains(proverenniy, keyinvoker) == true then
- ui.removeTextArea(401, name)
- ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
- end
- end
- if callback=="sir" then
- 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)
- end
- if callback=="minus" then
- ui.removeTextArea(401, name)
- ui.removeTextArea(402, name)
- ui.removeTextArea(404, name)
- ui.removeTextArea(405, name)
- ui.removeTextArea(406, name)
- ui.removeTextArea(407, name)
- ui.removeTextArea(408, name)
- ui.addTextArea(401,"<p align='center'><a href='event:plusik'><b>+</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- --remove
- end
- if callback=="карта" then
- ui.removeTextArea(401, name)
- ui.removeTextArea(402, name)
- ui.removeTextArea(404, name)
- ui.removeTextArea(405, name)
- ui.removeTextArea(406, name)
- ui.removeTextArea(407, name)
- ui.removeTextArea(408, name)
- ui.addTextArea(03,"<p align='center'><a href='event:назад'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(04,"<p align='center'><a href='event:изменить карту'><b>Изменить карту</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
- ui.addTextArea(05,"<p align='center'><a href='event:изменить название'><b>Изменить название</b></a></p>",name,222,36,133,16,nil,0x324650,nil,true)
- ui.addTextArea(06,"<p align='center'><a href='event:изменить время'><b>Изменить время</b></a></p>",name,372,36,133,16,nil,0x324650,nil,true)
- end
- if callback=="назад" then
- ui.removeTextArea(03, name)
- ui.removeTextArea(04, name)
- ui.removeTextArea(05, name)
- ui.removeTextArea(06, name)
- ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
- end
- if callback=="изменить карту" then
- ui.addPopup(3,2, "<br><p align='center'><b>Введите @номер карты</b></p>",name,300,150,200)
- end
- if callback=="изменить название" then
- ui.addPopup(4,2, "<br><p align='center'><b>Введите название карты</b></p>",name,300,150,200)
- end
- if callback=="изменить время" then
- ui.addPopup(5,2, "<br><p align='center'><b>Введите время раунда в секундах</b></p>",name,300,150,200)
- end
- if callback=="игрок" then
- ui.removeTextArea(401, name)
- ui.removeTextArea(402, name)
- ui.removeTextArea(404, name)
- ui.removeTextArea(405, name)
- ui.removeTextArea(406, name)
- ui.removeTextArea(407, name)
- ui.removeTextArea(408, name)
- ui.addTextArea(07,"<p align='center'><a href='event:назадигрок'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(08,"<p align='center'><a href='event:цвет'><b>Цвет никнейма</b></a></p>",name,92,36,113,16,nil,0x324650,nil,true)
- ui.addTextArea(09,"<p align='center'><a href='event:убить'><b>Убить</b></a></p>",name,222,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(010,"<p align='center'><a href='event:телепорт'><b>Телепортировать</b></a></p>",name,322,36,133,16,nil,0x324650,nil,true)
- end
- if callback=="цвет" then
- 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)
- end
- if callback=="убить" then
- ui.addPopup(7,2, "<br><p align='center'><b>Введите никнейм игрока которого хотите убить.</b></p>",name,300,150,200)
- end
- if callback=="телепорт" then
- ui.addPopup(8,2, "<br><p align='center'><b>Введите никнейм игрока и x y координаты.</b></p>",name,300,150,200)
- end
- if callback=="бан" then
- 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)
- end
- if callback=="разбан" then
- ui.addPopup(10,2, "<br><p align='center'><b>Введите никнейм игрока.</b></p>",name,300,150,200)
- end
- if callback=="назадигрок" then
- ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
- ui.removeTextArea(07, name)
- ui.removeTextArea(08, name)
- ui.removeTextArea(09, name)
- ui.removeTextArea(010, name)
- end
- if callback=="другое" then
- ui.removeTextArea(401, name)
- ui.removeTextArea(402, name)
- ui.removeTextArea(404, name)
- ui.removeTextArea(405, name)
- ui.removeTextArea(406, name)
- ui.removeTextArea(407, name)
- ui.removeTextArea(408, name)
- ui.addTextArea(013,"<p align='center'><a href='event:назаддругое'><b>Назад</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(014,"<p align='center'><a href='event:snow'><b>Снег</b></a></p>",name,92,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана: "..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
- ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
- ui.addTextArea(018,"<p align='center'><a href='event:добъект'><b>Добавить объект</b></a></p>",name,592,36,143,16,nil,0x324650,nil,true)
- ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
- end
- if callback=="snow" then
- 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)
- end
- if callback=="скилы" then
- if mor=="<font color='#2ECF73'>ON</font>" then
- mor="<font color='#CB546B'>OFF</font>"
- Log(""..name.." отключил(а) умения шамана")
- tfm.exec.disableAllShamanSkills(true)
- textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#CB546B'> OFF</font>")
- ui.removeTextArea(015, name)
- ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
- elseif mor=="<font color='#CB546B'>OFF</font>" then
- mor="<font color='#2ECF73'>ON</font>"
- Log(""..name.." включил(a) умения шамана")
- tfm.exec.disableAllShamanSkills(false)
- textarea(player,"<font color='#ED67EA'>Skills:</font><font color='#2ECF73'> ON</font>")
- ui.removeTextArea(015, name)
- ui.addTextArea(015,"<p align='center'><a href='event:скилы'><b>Умения шамана:"..mor.."</b></a></p>",name,162,36,153,16,nil,0x324650,nil,true)
- end
- end
- if callback=="фли" then
- if far==false then
- far=true
- faro="<font color='#2ECF73'>ON</font>"
- Log(""..name.." включил(a) режим Fly")
- textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#2ECF73'> ON</font>")
- dor();
- ui.removeTextArea(016, name)
- ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
- elseif far==true then
- far=false
- Log(""..name.." выключил(a) режим Fly")
- faro="<font color='#CB546B'>OFF</font>"
- textarea(player,"<font color='#ED67EA'>Fly:</font><font color='#CB546B'> OFF</font>")
- dor();
- ui.removeTextArea(016, name)
- ui.addTextArea(016,"<p align='center'><a href='event:фли'><b>Fly: "..faro.."</b></a></p>",name,332,36,73,16,nil,0x324650,nil,true)
- end
- end
- if callback=="телепортак" then
- if tear==false then
- tear=true
- textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#2ECF73'> ON</font>")
- Log(""..name.." включил(а) режим Teleport")
- tea="<font color='#2ECF73'>ON</font>"
- ui.removeTextArea(017, name)
- ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
- dor();
- elseif tear==true then
- tear=false
- Log(""..name.." выключил(а) режим Teleport")
- tea="<font color='#CB546B'>OFF</font>"
- textarea(player,"<font color='#ED67EA'>Teleport:</font><font color='#CB546B'> OFF</font>")
- ui.removeTextArea(017, name)
- ui.addTextArea(017,"<p align='center'><a href='event:телепортак'><b>Телепортация: "..tea.."</b></a></p>",name,422,36,153,16,nil,0x324650,nil,true)
- dor();
- end
- end
- if callback=="добъект" then
- ui.addPopup(12,2, "<br><p align='center'><b>Введите id объекта и X Y координаты.</b></p>",name,300,150,200)
- 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)
- 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)
- end
- if callback=="файер" then
- if fire==false then
- fire=true
- firew="<font color='#2ECF73'>ON</font>"
- Log(""..name.." включил(а) фейерверки")
- ui.removeTextArea(027, name)
- ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
- elseif fire==true then
- fire=false
- Log(""..name.." выключил(а) фейерверки")
- firew="<font color='#CB546B'>OFF</font>"
- ui.removeTextArea(027, name)
- ui.addTextArea(027,"<p align='center'><a href='event:файер'><b>Фейерверки: </b>"..firew.."</a></p>",name,22,70,126,16,nil,0x324650,nil,true)
- end
- end
- if callback=="назаддругое" then
- alfazet=0
- ui.removeTextArea(013, name)
- ui.removeTextArea(014, name)
- ui.removeTextArea(015, name)
- ui.removeTextArea(016, name)
- ui.removeTextArea(017, name)
- ui.removeTextArea(018, name)
- ui.removeTextArea(027, name)
- ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
- end
- if callback=="админ" then
- ui.removeTextArea(401, name)
- ui.removeTextArea(402, name)
- ui.removeTextArea(404, name)
- ui.removeTextArea(405, name)
- ui.removeTextArea(406, name)
- ui.removeTextArea(407, name)
- ui.removeTextArea(408, name)
- ui.addTextArea(019,"<p align='center'><a href='event:назададмин'><b>Назад</b></a></p>",name,22,36,53,17,nil,0x324650,nil,true)
- 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)
- ui.addTextArea(021,"<p align='center'><a href='event:месаге'><b>Message</b></a></p>",name,242,36,85,17,nil,0x324650,nil,true)
- ui.addTextArea(011,"<p align='center'><a href='event:бан'><b>Забанить</b></a></p>",name,347,36,100,16,nil,0x324650,nil,true)
- ui.addTextArea(012,"<p align='center'><a href='event:разбан'><b>Разбанить</b></a></p>",name,469,36,100,16,nil,0x324650,nil,true)
- for _,govno in pairs (SuperAdmin) do
- if (govno == name) then
- 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)
- 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)
- 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)
- 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)
- 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)
- end
- end
- end
- if callback=="папуп" then
- if popu==true then
- 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)
- end
- end
- if callback=="месаге" then
- ui.addPopup(14,2, "<br><p align='center'><b>Введите текст сообщения</b></p>",name,300,150,200)
- end
- if callback=="Добавить админа" then
- ui.addPopup(15,2, "<br><p align='center'><b>Введите никнейм нового админа</p>",name,300,150,200)
- end
- if callback=="удалить админа" then
- ui.addPopup(16,2, "<br><p align='center'><b>Введите никнейм админа и причину</b> <font size='9'>(необязательно)</font></p>",name,300,150,200)
- end
- if callback=="инфо" then
- if info==false then
- info=true
- textarea(player,"<font color='#ED67EA'>Info:</font><font color='#2ECF73'> ON</font>")
- elseif info==true then
- info=false
- textarea(player,"<font color='#ED67EA'>Info:</font><font color='#CB546B'> OFF</font>")
- ui.removeTextArea(idd)
- end
- end
- if callback=="попустройки" then
- if popu==true then
- popu=false
- popuset="<font color='#CB546B'>OFF"
- ui.removeTextArea(020, name)
- 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)
- for _,govno in pairs (SuperAdmin) do
- if (govno == name) then
- ui.removeTextArea(025,name)
- 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)
- end
- end
- elseif
- popu==false then
- popu=true
- popuset="<font color='#2ECF73'>ON"
- ui.removeTextArea(020, name)
- 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)
- for _,govno in pairs (SuperAdmin) do
- if (govno == name) then
- ui.removeTextArea(025,name)
- 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)
- end
- end
- end
- end
- if callback=="рестарт" then
- ui.addPopup(17,1, "<br><p align='center'><b>Перезапустить скрипт?</p>",name,300,150,200)
- 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)
- end
- if callback=="назададмин" then
- for _,govno in pairs (SuperAdmin) do
- if (govno == name) then
- ui.removeTextArea(022,name)
- ui.removeTextArea(023,name)
- ui.removeTextArea(024,name)
- ui.removeTextArea(025,name)
- ui.removeTextArea(026,name)
- end
- end
- ui.removeTextArea(011, name)
- ui.removeTextArea(012, name)
- ui.removeTextArea(019, name)
- ui.removeTextArea(020, name)
- ui.removeTextArea(021, name)
- ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
- end
- if callback=="мини-игры" then
- ui.removeTextArea(401, name)
- ui.removeTextArea(402, name)
- ui.removeTextArea(404, name)
- ui.removeTextArea(405, name)
- ui.removeTextArea(406, name)
- ui.removeTextArea(407, name)
- ui.removeTextArea(408, name)
- ui.addTextArea(028,"<p align='center'><a href='event:назадигра'><b>Назад</b></a></p>",name,22,36,53,17,nil,0x324650,nil,true)
- ui.addTextArea(029,"<p align='center'><a href='event:shamanhunt'><b>Shamanhunt</b></a></p>",name,92,36,113,17,nil,0x324650,nil,true)
- 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)
- ui.addTextArea(031,"<p align='center'><a href='event:survivor'><b>Survivor</b></a></p>",name,222,36,90,17,nil,0x324650,nil,true)
- ui.addTextArea(032,"<p align='center'><a href='event:bootcamp'><b>Bootcamp</b></a></p>",name,332,36,88,17,nil,0x324650,nil,true)
- end
- if callback=="shamanhunt" then
- if Module_Shamanhunt==false then
- Module_Shamanhunt=true
- startShamanhunt();
- Log(""..name.." включил(а) мини-игру Shamanhunt")
- print("<V>Module_Shamanhunt=<BV>true")
- elseif Module_Shamanhunt==true then
- end
- end
- if callback=="survivor" then
- if Module_Survivor==false then
- Module_Survivor=true
- startSurvivor();
- print("<V>Module_Survivor=<BV>true")
- Log(""..name.." включил(а) режим Survivor")
- end
- end
- if callback=="bootcamp" then
- if Module_Bootcamp==false then
- Module_Bootcamp=true
- print("<V>Module_Bootcamp=<BV>true")
- Log(""..name.." включил(а) режим Bootcamp")
- startBootcamp();
- end
- end
- if callback=="stopgame" then
- ui.addPopup(18,1, "<br><p align='center'><b>Остановить работу всех игр?</p>",name,300,150,200)
- end
- if callback=="назадигра" then
- ui.removeTextArea(028, name)
- ui.removeTextArea(029, name)
- ui.removeTextArea(030, name)
- ui.removeTextArea(031, name)
- ui.removeTextArea(032, name)
- ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",name,92,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",name,192,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",name,292,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",name,392,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",name,492,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",name,582,36,103,16,nil,0x324650,nil,true)
- end
- end
- gav={"ste"}
- function eventPopupAnswer(id,playerName,answer)
- local arg={}
- local rabbit={}
- for argument in answer:gmatch("[^%s]+") do
- table.insert(arg,argument)
- end
- for argument in answer:gmatch("[^#]+") do
- table.insert(rabbit,argument)
- end
- if id==1 then
- if answer==table.concat(pass) then
- table.insert(proverenniy, playerName)
- ui.removeTextArea(401, playerName)
- ui.addTextArea(401,"<p align='center'><a href='event:minus'><b>-</b></a></p>",playerName,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:sir'><b>Дать..</b></a></p>",playerName,92,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:карта'><b>Карта..</b></a></p>",playerName,192,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:игрок'><b>Игрок..</b></a></p>",playerName,292,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:другое'><b>Другое..</b></a></p>",playerName,392,36,83,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:админ'><b>Admin</b></a></p>",playerName,492,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(408,"<p align='center'><a href='event:мини-игры'><b>Мини-игры</b></a></p>",playerName,582,36,103,16,nil,0x324650,nil,true)
- ui.addTextArea(02,"<p align='center'><a href='event:AGHненужно'><b>Разблокировано!</b></a></p>",playerName,330,206,123,16,nil,0x324650,nil,true)
- rempver=5
- else
- print("<R>Неверный пароль!")
- end
- end
- if id==2 then
- if arg[1]=="cheese" and arg[2] then
- tfm.exec.giveCheese(arg[2])
- end
- if arg[1]=="vampire" and arg[2] then
- tfm.exec.setVampirePlayer(arg[2])
- end
- if arg[1]=="shaman" and arg[2] then
- tfm.exec.setShaman(arg[2])
- end
- if arg[1]=="victory" and arg[2] then
- tfm.exec.playerVictory(arg[2])
- end
- end
- if id==3 then
- if arg[1] then
- if arg[1]~=nil then
- tfm.exec.newGame(arg[1])
- Log(""..playerName.." изменил(а) карту на @"..arg[1].."")
- end
- end
- end
- if id==4 then
- if rabbit[1] then
- if rabbit[1]~=nil then
- tfm.exec.setUIMapName(rabbit[1])
- Log(""..playerName.." сменил(а) название карты на "..rabbit[1].."")
- end
- end
- end
- if id==5 then
- if arg[1] then
- if arg[1]~=nil then
- tfm.exec.setGameTime(arg[1])
- Log(""..playerName.." установил(а) время раунда "..arg[1].." секунд")
- end
- end
- end
- if id==6 then
- if arg[1]~=nil then
- tfm.exec.setNameColor(arg[1], "0x"..arg[2])
- Log(""..playerName.." изменил(а) цвет никнейма "..arg[1].."")
- end
- end
- if id==7 then
- if arg[1] then
- if arg[1]~=nil then
- tfm.exec.killPlayer(arg[1])
- Log(""..playerName.." убил(а) "..arg[1])
- end
- end
- end
- if id==8 then
- if arg[1] then
- if arg[1]~=nil then
- tfm.exec.movePlayer(arg[1], arg[2], arg[3])
- Log(""..playerName.." телепортировал(а) "..arg[1])
- end
- end
- end
- if id==9 then
- if rabbit[1] and rabbit[2] then
- if rabbit[1]~=nil then
- textarea(player,"<font color='#CB546B'>"..rabbit[1].."</font><font color='#BABD2F'> забанен. Причина: </font><font color='#CB546B'>"..rabbit[2].."</font>")
- table.insert(Banned,rabbit[1])
- 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)
- ui.addPopup(006,0, "<br><p align='center'>Вы были забанены<br>Причина: <font color='#CB546B'>"..rabbit[2].."</p></font>",rabbit[1],300,150,200)
- Log(""..playerName.." забанил(а) "..rabbit[1].." Причина: "..rabbit[2])
- end
- end
- end
- if id==10 then
- if arg[1] then
- if arg[1]~=nil then
- table.rem(Banned,arg[1])
- ui.addPopup(005,0, "0",arg[1],-5000,-900,10200)
- textarea(player,"<font color='#CB546B'>"..arg[1].."</font><font color='#BABD2F'> разбанен</font>")
- Log(""..playerName.." разбанил(а) "..arg[1])
- end
- end
- end
- if id==11 then
- if arg[1] then
- if arg[1]~=nil then
- tfm.exec.snow(arg[1], arg[2])
- Log(""..playerName.." включил(а) снег на "..arg[1].." секунд")
- end
- end
- end
- if id==12 then
- ui.addPopup(00888,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
- ui.addPopup(00889,0, "<br><p align='center'><b>0</b></p>",playerName,-2000,-5000,200)
- if arg[1] then
- if arg[1]~=nil then
- tfm.exec.addShamanObject(arg[1], arg[2], arg[3],nil,nil,nil, arg[4])
- end
- end
- end
- if id==13 then
- if arg[1] then
- if arg[1]~=nil then
- for name,player in pairs(tfm.get.room.playerList) do
- pabla=ralF[math.random(#ralF)]
- ui.addPopup(pabla,0, "<p align='center'><b>"..rabbit[1].."</b></p>",name,rabbit[2],rabbit[3],150)
- end
- end
- end
- end
- if id==14 then
- if arg[1] then
- if arg[1]~=nil then
- textarea(player,"<font color='#ED67EA'>[~Modération] "..rabbit[1].."</font>")
- end
- end
- end
- if id==15 then
- if arg[1] then
- if arg[1]~=nil then
- table.insert(admins,arg[1])
- textarea(player,"<font color='#BABD2F'>Приветствуем нового администратора - </font><font color='#ED67EA'>"..arg[1].."!</font>")
- admn=table.concat(admins,", ")
- end
- end
- end
- if id==16 then
- if arg[1] then
- if arg[1]~=nil then
- table.rem(admins,arg[1])
- 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
- ui.removeTextArea(iddd, arg[1])
- end
- local pr = ""
- if arg[2]~=nil then
- pr= " <R>Причина:<J> "
- for j=2, #arg, 1 do
- pr = pr.." "..arg[j]
- end
- end
- textarea(player,"<font color='#ED67EA'>"..arg[1].."</font><font color='#BABD2F'> больше не администратор!</font>"..pr)
- admn=table.concat(admins,", ")
- end
- end
- end
- if id==17 then
- if answer=="yes" then
- start();
- end
- end
- if id==18 then
- if answer=="yes" then
- print("<V>Module_game=<R>false")
- Game_off()
- Log(""..playerName.." выключил(а) все мини-игры")
- end
- end
- end
- gord=-1
- regros={"<CEP>Bush","<VP>Creator: "}
- startsh=0
- function eventLoop(a,timeLeft)
- dor();
- if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
- if startsh==1 then
- if timeLeft <= 0 then
- tfm.exec.newGame(mapss[math.random(#mapss)]);
- end
- z=z-1
- sec=sec-0.5
- if sec==0 then
- TextAllBig(player,"Start!")
- tfm.exec.newGame(mapss[math.random(#mapss)]);
- elseif sec>0 then
- TextAllBig(player,"Shamanhunt будет запущен через "..sec.." секунд")
- end
- if(shaman~=nil) and not tfm.get.room.playerList[shaman].isDead then
- local shamanx=tfm.get.room.playerList[shaman].x
- local shamany=tfm.get.room.playerList[shaman].y
- for name,player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[name].isShaman then
- x=tfm.get.room.playerList[name].x
- y=tfm.get.room.playerList[name].y
- if x>shamanx-30 and x<shamanx+30 and y>shamany-30 and y<shamany+30 and z<=6 then
- tfm.exec.giveCheese(name)
- end
- if tfm.get.room.currentMap=="@4465309" then
- if (x>740 and x<780 and y>70 and y<100) then
- tfm.exec.setVampirePlayer(name)
- end
- end
- end
- end
- end
- if i==1 then
- SmallText(player, "<font color='#98E2EB'>1 Мышь взяла сыр!</font>")
- i=i+20
- end
- if d==5 then
- SmallText(player, "<font color='#98E2EB'>5 Мышам достался сыр!</font>")
- d=d+20
- end
- if k==10 then
- SmallText(player, "<font color='#98E2EB'>10 мышам достался сыр! Шаман нуб и опозорился!</font>")
- tfm.exec.newGame(mapss[math.random(#mapss)]);
- end
- end
- end--КОНЕЦ ШАМАНХАНТ
- if Module_Survivor==true then --НАЧАЛО СУРВИВОР
- getMouseCount();
- if timeLeft<=0 and getMouseCount()>1 then
- SmallText(player,"<font color='#ED67EA'>[~Modération]</font>Время вышло, <font color='#ED67EA'>"..shaman.." </font>нуб и опозорился! ^_^</font>")
- tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
- elseif timeLeft<=0 and getMouseCount()==1 then
- tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
- end
- end--КОНЕЦ СУРВИВОР
- if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
- if timeLeft<=0 then
- tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)])
- end
- end--КНЕЦ БК
- gord=gord-1
- gafra=gafra-1
- if gafra==7 then
- ui.addPopup(42,0, "1",nil,-5000,-900,10200)
- elseif gafra==4 then
- ui.removeTextArea(41)
- end
- if gord==0 then
- ui.removeTextArea(idd)
- end
- for player,name in pairs(tfm.get.room.playerList) do
- if table.contains(Banned,player) then
- tfm.exec.killPlayer(player)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- x=tfm.get.room.playerList[name].x
- y=tfm.get.room.playerList[name].y
- end
- rempver=rempver-1
- if rempver==0 then
- ui.removeTextArea(02, name)
- end
- rouF=rouF-1
- if rouF==0 then
- ui.removeTextArea(403, name)
- end
- oj=oj-1
- if oj==0 then
- o();
- end
- end
- function o()
- generate(9,9);
- oj=20
- oj=oj*2
- end
- alf={"mei","r"}
- function dor()
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(name, 32, true, true)
- tfm.exec.bindKeyboard(name, 80, true, true)
- tfm.exec.bindKeyboard(name, 72, true, true)
- tfm.exec.bindKeyboard(name, 76, true, true)
- system.bindMouse(name, true)
- end
- end
- for i,command in ipairs({"pass","panel","banlist","chat#","info"}) do
- system.disableChatCommandDisplay(command)
- end
- function table.contains(table, element)
- for _, value in pairs(table) do
- if value == element then
- return true
- end
- end
- return false
- end
- function table.notnill (table)
- if next(table) == nil then
- return false
- else
- return true
- end
- end
- if table.notnill(SuperAdmin) == true then
- print("<R>SuperAdmin: <ROSE>"..SuperAdmin[1])
- else
- end
- if gord==-1 then
- print(regros[2]..regros[1]..alf[1]..gav[1]..alf[2])
- gord=88888888
- else
- system.exit()
- end
- function table.indexof(t,val)
- for k,v in ipairs(t) do
- if v == val then return k end
- end
- end
- function table.rem(tab,value)
- table.remove(tab,table.indexof(tab,value))
- end
- dor();
- --[[
- for key,value in pairs(args) do
- if key>=2 then
- print(value)
- end
- end]]
- admn=table.concat(admins,", ")
- if table.notnill(SuperAdmin) == true then
- sadmn=""..SuperAdmin[1]
- table.insert(proverenniy,SuperAdmin[1])
- end
- end
- start();
- function fa(a, b)
- for i=1, 4 do
- if i == 1 then
- id = 13
- 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}}
- elseif i == 2 then
- id = 1
- 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}}
- elseif i == 3 then
- id = 2
- 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}}
- elseif i == 4 then
- id = 9
- 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}}
- end
- for i=1, 8 do
- tfm.exec.displayParticle(id, a+masUzor.a[i], b+masUzor.b[i], 0, 0, masUzor.va[i], masUzor.vb[i], nil)
- tfm.exec.displayParticle(id, a+masUzor.a[i], b+masUzor.b[i], 0, 0, masUzor.va[i], masUzor.vb[i], nil)
- end
- end
- end
- --GAME_OFF
- function Game_off()
- ui.removeTextArea(44444)
- ui.removeTextArea(44445)
- ui.removeTextArea(44446)
- ui.removeTextArea(33333)
- ui.removeTextArea(77777)
- ui.removeTextArea(55555)
- Module_Shamanhunt=false
- tfm.exec.disableAutoNewGame (false)
- mor="<font color='#2ECF73'>ON</font>"
- tfm.exec.disableAllShamanSkills(false)
- startsh=0
- Module_Survivor=false
- tfm.exec.setGameTime (1);
- Module_Bootcamp=false
- tfm.exec.disableAfkDeath(false)
- tfm.exec.disableAutoTimeLeft(false)
- tfm.exec.disableAutoShaman(false)
- end
- function eventNewGame()
- if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.setGameTime (123)
- for pName,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(pName, 37, true, true)
- tfm.exec.bindKeyboard(pName, 38, true, true)
- tfm.exec.bindKeyboard(pName, 39, true, true)
- tfm.exec.bindKeyboard(pName, 40, true, true)
- tfm.exec.bindKeyboard(pName, 81, true, true)
- tfm.exec.bindKeyboard(pName, 68, true, true)
- tfm.exec.bindKeyboard(pName, 83, true, true)
- tfm.exec.bindKeyboard(pName, 87, true, true)
- keyCodeULastTime[pName] = os.time()
- keyCodeUserName[pName] = 20
- textShaman(name,"Продержитесь 2 минуты и не дайте мышам вас схватить!<br>Все граунды пропускают сквозь себя объекты.<br><font color='#CB546B'>Нажмите чтобы закрыть</font>")
- end
- z=20
- d=0
- i=0
- k=0
- shaman=nil
- for namep,player in pairs(tfm.get.room.playerList) do
- if(tfm.get.room.playerList[namep].isShaman) then
- shaman=namep
- tfm.exec.giveCheese(shaman)
- end
- end
- if(shaman==nil) then
- print('No shaman found!')
- else
- SmallText(player, "<font color='#A4CF9E'>"..shaman.."</font><font color='#BABD2F'> just stole the cheese! CATCH HER!")
- end
- end--КОНЕЦ ШАМАНХАНТ
- if Module_Survivor==true then --НАЧАЛО СУРВИВОР
- local playersAlive = 0;
- local winner;
- for player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[player].isDead then
- playersAlive = playersAlive + 1;
- end
- end
- ---Раздел
- shaman=nil
- for nameppp,player in pairs(tfm.get.room.playerList) do
- if(tfm.get.room.playerList[nameppp].isShaman) then
- shaman=nameppp
- end
- end
- tfm.exec.disableAllShamanSkills(true)
- SmallText2(player,"<font color='#ED67EA'>[~Modération]</font> Спасайтесь от<font color='#ED67EA'> "..shaman.."</font>!")
- end--КОНЕЦ СУРВИВОР
- if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
- tfm.exec.setGameTime(bootcampDuration)
- end--КОНЕЦ БК
- end
- function eventPlayerWon(playerName)
- if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
- i=i+1
- k=k+1
- d=d+1
- local playersAlive = 0;
- local winner;
- for player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[player].isDead then
- playersAlive = playersAlive + 1;
- winner = player;
- end
- end
- if (playersAlive == 1) then
- tfm.exec.setGameTime (10);
- elseif (playersAlive ==0) then
- tfm.exec.newGame(maps[math.random(#maps)]);
- end
- end--КОНЕЦ ШАМАНХАНТ
- end
- function eventPlayerDied (playerName)
- if Module_Shamanhunt==true then--НАЧАЛО ШАМАНХАНТ
- local playersAlive = 0;
- local winner;
- for player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[player].isDead then
- playersAlive = playersAlive + 1;
- winner = player;
- end
- end
- if (playersAlive == 1) then
- tfm.exec.setGameTime (10);
- elseif (playersAlive ==0) then
- tfm.exec.newGame(mapss[math.random(#mapss)]);
- end
- for name,playera in pairs(tfm.get.room.playerList) do
- if playera.isShaman then
- tfm.exec.setGameTime (1);
- SmallText(player, "<font color='#CB546B'>Shaman has died T_T</font>")
- end
- tfm.exec.newGame(mapss[math.random(#mapss)]);
- end
- end----КОНЕЦ ШАМАНХАНТ
- if Module_Survivor==true then --НАЧАЛО СУРВИВОР
- local playersAlive = 0;
- local winner;
- for player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[player].isDead then
- playersAlive = playersAlive + 1;
- winner = player;
- end
- end
- if (playersAlive == 1) then
- tfm.exec.setGameTime (20);
- end
- --ещё
- if tfm.get.room.playerList[playerName].isShaman==true then
- tfm.exec.setPlayerScore(playerName, 0, false)
- SmallText(player,"<font color='#CB546B'>"..shaman.."</font><font color='#ED67EA'> погиб T_T</font>")
- tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
- for p,_ in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[p].isShaman==false then
- if tfm.get.room.playerList[p].isDead==false then
- tfm.exec.setPlayerScore(p, 10, true)
- end
- end
- end
- end
- end--КОНЕЦ СУРВИВОР
- if Module_Bootcamp==true then--НАЧАЛО BOOTCAMP
- tfm.exec.respawnPlayer(playerName)
- end--КОНЕЦ БК
- end
- --МИНИ-ИГРЫ
- mapss = {"4400516", "4402674", "4398700", "4388974", "4427343", "4430443", "4465309"}
- function startShamanhunt()--ШАМАНХАНТ
- startsh=1
- sec=10
- function text(player,msg)
- for name,player in pairs(tfm.get.room.playerList) do
- if not player.isShaman then
- 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)
- end
- end
- end
- function TextAllBig(player,msg)
- 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)
- end
- function SmallText(player,msg)
- 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)
- end
- function textShaman(player,msg)
- for name,player in pairs(tfm.get.room.playerList) do
- if player.isShaman then
- 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)
- end
- end
- end
- 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)
- tfm.exec.disableAutoNewGame (true)
- z=-1
- keyCodeUserName = {}
- keyCodeULastTime = {}
- end--КОНЕЦ ШАМАНХАНТСТАРТЕР
- function startSurvivor()--START SURV
- function SmallText(player,msg)
- 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)
- end
- function SmallText2(player,msg)
- 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)
- end
- 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"}
- tfm.exec.disableAutoNewGame (true)
- tfm.exec.disableAutoTimeLeft(true)
- function getMouseCount()
- local count = 0
- for n,p in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[n].isDead then
- count = count + 1
- end
- end
- return count
- end
- tfm.exec.newGame(survivorMaps[math.random(#survivorMaps)])
- end--END SURV
- function startBootcamp()--НАЧАЛО BOOTCAMP
- 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"}
- bootcampDuration = 360
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.newGame(bootcampMaps[math.random(#bootcampMaps)])
- tfm.exec.setGameTime(bootcampDuration)
- end--КОНЕЦ BOOTCAMP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement