Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --tfm.exec.newGame() -- Permet de lancer le script (relancer la map)
- version = 0.6
- ui.addTextArea(0, "<font size='12' face='Levenim MT' color='#EA75BB' > <b>Tribeclick</b> </font><b><font size='12' face='Levenim MT' color='#75EA8C' >"..version.."</font><font size='12' face='Levenim MT' color='#FEFEFE' ></b> By <b><font size='12' face='Levenim MT' color='#E7EA75' >Manacer</b><font size='12' face='Levenim MT' color='#FEFEFE' > et </font><b><font size='12' face='Levenim MT' color='#E7EA75' >Nicolasledu</b></font>", all, 0, 380, 800, 20, 0)
- tfm.exec.setUIMapName("<J><b><i>Tribeclick</b></i>") -- Nom du script (map)
- admin = { "Manacer", "PSEUDO2", "PSEUDO3" }
- ban = {}
- ui.addTextArea(401,"<p align='center'><a href='event:affichage'><b>Plus</b></a></p>",nil,22,36,53,16,nil,0x324650,nil,true)
- staff1fonction="FONCTION" -- A modifier par votre fonction dans la tribu
- staff1joueur="PSEUDO"
- canFly = false -- Ne pas modifier (Pour le fly)
- canTeleport = false --Ne pas modifier (Pour le tp)
- function eventNewGame()
- for index,player in pairs(ban) do
- tfm.exec.killPlayer(player);
- tfm.exec.setPlayerScore(player, 0, false);
- end
- end
- function Admin(name) -- Détection si le joueur est admin
- for i,admin in ipairs(admin) do
- if name==admin then
- return true
- end
- end
- return false
- end
- function Ban(name) -- Détection si le joueur est ban
- for i,ban in ipairs(ban) do
- if name==ban then
- return true
- end
- end
- return false
- end
- function eventMouse(name, x, y) -- Teleport
- if canTeleport then
- tfm.exec.movePlayer(name, x, y)
- end
- end
- function eventPlayerRespawn(name)
- for index,player in pairs(ban) do
- tfm.exec.killPlayer(player);
- tfm.exec.setPlayerScore(player, 0, false);
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(name, 32, true, true) -- Active la touche Espace.
- system.bindMouse(name, true) -- Active les clics de souris.
- end
- function eventKeyboard(name,key,down,x,y) -- Pour le fly ,
- if key == 32 then
- if canFly then
- tfm.exec.movePlayer(name,0,0,true,0,-50,false)
- end
- end
- end
- function eventNewPlayer(playerName)
- ui.addTextArea(100,"<p align='center'><font color='#BABD2F' size='17'><b>Tribeclick v"..version.." !</b></font></p><br><p align='justify'><font size='12'>Bienvenue dans l'utilitaire de tribu Tribeclick, ce module de tribu permet des fonctions comme gagner, roomsay, ban, etc. bref, amusez bien en utilisant Tribeclick !<br><br>Découvrez prochainement les prochaines nouveautés : </font><a href='event:soon'><font color='#5FC86D' size='12'><b><u>Clique ici</u></b></font></a><font color='#BABD2F' size='15'></a><br><br></b></font><font size='10' face='Levenim MT' color='#EA75BB' > <b>Tribeclick</b> </font><b><font size='10' face='Levenim MT' color='#75EA8C' >"..version.."</font><font size='10' face='Levenim MT' color='#FEFEFE' ></b> By <b><font size='10' face='Levenim MT' color='#E7EA75' >Manacer</b><font size='10' face='Levenim MT' color='#FEFEFE' > et </font><b><font size='10' face='Levenim MT' color='#E7EA75' >Nicolasledu</b></font></p>",name,150,75,500,200,nil,0x324650,nil,true)
- ui.addTextArea(101,"<p align='center'><a href='event:closeinfo'>Fermer cette fenêtre</a></p>",name,300,235,200,21,nil,0x3C5064,nil,true)
- ui.addTextArea(401,"<p align='center'><a href='event:affichage'><b>Plus</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- tfm.exec.bindKeyboard(playerName, 32, true, true) -- Active la touche Espace.
- system.bindMouse(playerName, true) -- Active les clics de souris
- end
- function eventTextAreaCallback(id,name,callback)
- if callback=="affichage" then
- ui.addTextArea(401,"<p align='center'><a href='event:affichagemoins'><b>Moins</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.addTextArea(402,"<p align='center'><a href='event:fly'><b>Fly : <font color='#F96868'>OFF</font></b></a></p>",name,102,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(403,"<p align='center'><a href='event:tp'><b>Tp : <font color='#F96868'>OFF</font></b></a></p>",name,202,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(404,"<p align='center'><a href='event:staff'><b>Staff</b></a></p>",name,302,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(405,"<p align='center'><a href='event:couleur'><b>Couleur</b></a></p>",name,402,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(406,"<p align='center'><a href='event:menujoueur'><b>Joueur</b></a></p>",name,502,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(407,"<p align='center'><a href='event:menuadmin'><b>Admin</b></a></p>",name,602,36,73,16,nil,0x324650,nil,true)
- elseif callback=="affichagemoins" then
- ui.addTextArea(401,"<p align='center'><a href='event:affichage'><b>Plus</b></a></p>",name,22,36,53,16,nil,0x324650,nil,true)
- ui.removeTextArea(402,name)
- ui.removeTextArea(403,name)
- ui.removeTextArea(404,name)
- ui.removeTextArea(405,name)
- ui.removeTextArea(406,name)
- ui.removeTextArea(407,name)
- ui.removeTextArea(501,name)
- ui.removeTextArea(5011,name)
- ui.removeTextArea(502,name)
- ui.removeTextArea(503,name)
- ui.removeTextArea(504,name)
- ui.removeTextArea(505,name)
- ui.removeTextArea(506,name)
- ui.removeTextArea(507,name)
- ui.removeTextArea(508,name)
- ui.removeTextArea(509,name)
- ui.removeTextArea(510,name)
- ui.removeTextArea(511,name)
- ui.removeTextArea(4051,name)
- ui.removeTextArea(4052,name)
- ui.removeTextArea(4053,name)
- ui.removeTextArea(4054,name)
- ui.removeTextArea(4055,name)
- elseif callback=="menujoueur" then
- ui.addTextArea(501,"<p align='center'><a href='event:menujoueurclose'><b><font color='#F96868'>Fermer</font></b></a></p>",name,502,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(502,"<p align='center'><a href='event:respawn'><b><font color='#86ED89'>Revivre</font></b></a></p>",name,22,96,58,16,nil,0x324650,nil,true)
- ui.addTextArea(503,"<p align='center'><a href='event:fromage'><b><font color='#86ED89'>Fromage</font></b></a></p>",name,102,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(504,"<p align='center'><a href='event:win'><b><font color='#86ED89'>Gagner</font></b></a></p>",name,202,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(505,"<p align='center'><a href='event:vampire'><b><font color='#86ED89'>Vampire</font></b></a></p>",name,302,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(506,"<p align='center'><a href='event:chamane'><b><font color='#86ED89'>Chamane</font></b></a></p>",name,402,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(507,"<p align='center'><a href='event:meep'><b><font color='#86ED89'>Meep</font></b></a></p>",name,602,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(508,"<p align='center'><a href='event:mort'><b><font color='#86ED89'>Mourir</font></b></a></p>",name,702,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(509,"<p align='center'><a href='event:objet'><b><font color='#86ED89'>Objet</font></b></a></p>",name,22,126,58,16,nil,0x324650,nil,true)
- ui.addTextArea(510,"<p align='center'><a href='event:Admlist'><b><font color='#86ED89'>Admlist</font></b></a></p>",name,102,126,73,16,nil,0x324650,nil,true)
- -- Remove couleur
- ui.removeTextArea(4051,name)
- ui.removeTextArea(511,name)
- ui.removeTextArea(4052,name)
- ui.removeTextArea(4053,name)
- ui.removeTextArea(4054,name)
- ui.removeTextArea(4055,name)
- elseif callback=="menujoueurclose" then
- ui.removeTextArea(501,name)
- ui.removeTextArea(5011,name)
- ui.removeTextArea(502,name)
- ui.removeTextArea(503,name)
- ui.removeTextArea(504,name)
- ui.removeTextArea(505,name)
- ui.removeTextArea(506,name)
- ui.removeTextArea(507,name)
- ui.removeTextArea(508,name)
- ui.removeTextArea(509,name)
- ui.removeTextArea(510,name)
- ui.removeTextArea(511,name)
- elseif callback=="menuadmin" then
- ui.removeTextArea(5011,name)
- ui.addTextArea(501,"<p align='center'><a href='event:menuadminclose'><b><font color='#F96868'>Fermer</font></b></a></p>",name,602,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(502,"<p align='center'><a href='event:roomsay'><b><font color='#86ED89'>RoomSay</font></b></a></p>",name,102,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(503,"<p align='center'><a href='event:stop'><b><font color='#F96868'>STOP</font></b></a></p>",name,202,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(504,"<p align='center'><a href='event:map'><b><font color='#86ED89'>Map</font></b></a></p>",name,302,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(505,"<p align='center'><a href='event:tuer'><b><font color='#86ED89'>Tuer</font></b></a></p>",name,402,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(506,"<p align='center'><a href='event:temps'><b><font color='#86ED89'>Temps</font></b></a></p>",name,502,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(507,"<p align='center'><a href='event:chamall'><b><font color='#86ED89'>Chamall</font></b></a></p>",name,702,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(508,"<p align='center'><a href='event:ban'><b><font color='#86ED89'>Ban</font></b></a></p>",name,22,126,58,16,nil,0x324650,nil,true)
- ui.addTextArea(509,"<p align='center'><a href='event:grade'><b><font color='#86ED89'>Grade</font></b></a></p>",name,22,96,58,16,nil,0x324650,nil,true)
- ui.addTextArea(510,"<p align='center'><a href='event:banlist'><b><font color='#86ED89'>Banlist</font></b></a></p>",name,102,126,73,16,nil,0x324650,nil,true)
- ui.addTextArea(511,"<p align='center'><a href='event:unbanall'><b><font color='#86ED89'>Unbanall</font></b></a></p>",name,202,126,73,16,nil,0x324650,nil,true)
- --Remove couleur
- ui.removeTextArea(4051,name)
- ui.removeTextArea(4052,name)
- ui.removeTextArea(4053,name)
- ui.removeTextArea(4054,name)
- ui.removeTextArea(4055,name)
- elseif callback=="menuadminclose" then
- ui.removeTextArea(501,name)
- ui.removeTextArea(502,name)
- ui.removeTextArea(503,name)
- ui.removeTextArea(504,name)
- ui.removeTextArea(505,name)
- ui.removeTextArea(506,name)
- ui.removeTextArea(507,name)
- ui.removeTextArea(508,name)
- ui.removeTextArea(509,name)
- ui.removeTextArea(510,name)
- ui.removeTextArea(511,name)
- elseif callback=="fly" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addTextArea(402,"<p align='center'><a href='event:flyoff'><b>Fly : <font color='#86ED89'>ON</font></b></a></p>",nil,102,36,73,16,nil,0x324650,nil,true)
- canFly = true
- end
- elseif callback=="flyoff" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addTextArea(402,"<p align='center'><a href='event:fly'><b>Fly : <font color='#F96868'>OFF</font></b></a></p>",nil,102,36,73,16,nil,0x324650,nil,true)
- canFly = false
- end
- elseif callback=="tp" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addTextArea(403,"<p align='center'><a href='event:tpoff'><b>Tp : <font color='#86ED89'>ON</font></b></a></p>",nil,202,36,73,16,nil,0x324650,nil,true)
- canTeleport = true
- ui.addPopup(6,0,"<p align='center'><font color='#8DC7F3' size='15'>Marquer</font><font color='#F3E58D' size='15'> !tp</font><font color='#8DC7F3' size='15'> pour désactiver la téléportation ( Vous pouvez aussi cliquer sur tp mais sa va vous tp à l'endroit )</p></font>",name,400,200,200)
- end
- elseif callback=="tpoff" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addTextArea(403,"<p align='center'><a href='event:tp'><b>Tp : <font color='#F96868'>OFF</font></b></a></p>",nil,202,36,73,16,nil,0x324650,nil,true)
- canTeleport = false
- end
- elseif callback=="staff" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addPopup(3,3,"<p align='center'><b><font size='30' face='Time Sans MS'>Staff de ta tribu !</font></b></p><br><b><font color='#F30069' size='14'>- ["..staff1joueur.."]</font></b><font color='#FEFEFE' size='14'> : ["..staff1fonction.."]</font>",name,168,110,480)
- end
- elseif callback=="couleur" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addTextArea(405,"<p align='center'><a href='event:couleuroff'><b>Couleur</b></a></p>",name,402,36,73,16,nil,0x324650,nil,true)
- ui.addTextArea(4051,"<p align='center'><a href='event:couleurbleu'><b><font color='#0000FF'>Bleu</font></b></a></p>",name,402,66,73,16,nil,0x324650,nil,true)
- ui.addTextArea(4052,"<p align='center'><a href='event:couleurrouge'><b><font color='#EB1D51'>Rouge</font></b></a></p>",name,402,96,73,16,nil,0x324650,nil,true)
- ui.addTextArea(4053,"<p align='center'><a href='event:couleurvert'><b><font color='#30BA76'>Vert</font></b></a></p>",name,402,126,73,16,nil,0x324650,nil,true)
- ui.addTextArea(4054,"<p align='center'><a href='event:couleurrose'><b><font color='#ED67EA'>Rose</font></b></a></p>",name,402,156,73,16,nil,0x324650,nil,true)
- ui.addTextArea(4055,"<p align='center'><a href='event:couleurjaune'><b><font color='#BABD2F'>Jaune</font></b></a></p>",name,402,186,73,16,nil,0x324650,nil,true)
- ui.removeTextArea(501,name)
- ui.removeTextArea(502,name)
- ui.removeTextArea(503,name)
- ui.removeTextArea(504,name)
- ui.removeTextArea(505,name)
- ui.removeTextArea(506,name)
- ui.removeTextArea(507,name)
- ui.removeTextArea(508,name)
- ui.removeTextArea(509,name)
- ui.removeTextArea(510,name)
- ui.removeTextArea(511,name)
- end
- elseif callback=="couleuroff" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addTextArea(405,"<p align='center'><a href='event:couleur'><b>Couleur</b></a></p>",name,402,36,73,16,nil,0x324650,nil,true)
- ui.removeTextArea(4051,name)
- ui.removeTextArea(4052,name)
- ui.removeTextArea(4053,name)
- ui.removeTextArea(4054,name)
- ui.removeTextArea(4055,name)
- end
- elseif callback=="couleurbleu" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.setNameColor(name, 0x0000FF)
- end
- elseif callback=="couleurrouge" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.setNameColor(name, 0xEB1D51)
- end
- elseif callback=="couleurvert" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.setNameColor(name, 0x30BA76)
- end
- elseif callback=="couleurrose" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.setNameColor(name, 0xED67EA)
- end
- elseif callback=="couleurjaune" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.setNameColor(name, 0xBABD2F)
- end
- elseif callback=="fromage" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.giveCheese(name)
- end
- elseif callback=="win" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.giveCheese(name)
- tfm.exec.playerVictory(name)
- end
- elseif callback=="vampire" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.setVampirePlayer(name)
- end
- elseif callback=="chamane" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.setShaman(name)
- end
- elseif callback=="meep" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.giveMeep(name)
- end
- elseif callback=="mort" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- tfm.exec.killPlayer(name)
- end
- elseif callback=="soon" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.removeTextArea(100,name)
- ui.removeTextArea(101,name)
- ui.addPopup(1,0,"<p align='center'><font color='#BABD2F' size='15'><b>Cooming soon !</b></font></p><br><p align='justify'><font color='#FEFEFE' size='12'> Les joueurs bannis n'auront plus accès à aucune commande (FAIT 7/10/2013).<br> La catégorie minijeux.<br> Pouvoir débannir un joueur.<br> D'autre couleurs.<br> Enlever un admin.<br> Peux être : Un canal admin via popup ( Que pour les admins ).</font></p>",name,150,75,500);
- end
- elseif callback=="closeinfo" then
- ui.removeTextArea(100,name)
- ui.removeTextArea(101,name)
- elseif callback=="objet" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.addPopup(12,2,"Rentrez l'ID de l'objet.<br>",name,320,227,163,103)
- ui.addTextArea(5081,"<p align='center'><b>Liste 1 :</b></p>Flèche : 0 <br>Petite caisse : 1 <br>Grosse caisse : 2 <br>Petite planche : 3 <br>Grande planche : 4 <br>Balle : 6 <br>Trampoline : 7 <br>Enclume : 10 <br>Boulet haut : 17 <br>Boulet bas : 18 <br>Boulet droite : 19 <br>Boulet gauche : 20 <br>Bombe : 23 <br>Esprit : 24 <br>Rune Orange : 62 ",name,55,146,246,215,nil,0x324650,nil,true)
- ui.addTextArea(5082,"<p align='center'><b>Liste 2 :</b></p>Portail bleu : 26 <br>Portail orange : 27 <br>Ballon : 28 <br>Rune : 32 <br>Neige : 34 <br>Flèche : 35 <br>Pomme : 39 <br>Mouton : 40 <br>Planche de glace : 45 <br>Planche de chocolat : 46 <br>Glaçon : 54 <br>Nuage : 57 <br>Bulle : 59 <br>Petite planche : 60 <br>Caisse Compagnon : 61 ",name,505,146,246,215,nil,0x324650,nil,true)
- ui.addTextArea(5083,"<p align='center'><b><a href='event:closeobjet'> <br>FERMER<br> <br> </a></b></p>",name,320,146,163,56,nil,0x324650,nil,true)
- end
- elseif callback=="closeobjet" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous êtes banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- ui.removeTextArea(5081,name)
- ui.removeTextArea(5082,name)
- ui.removeTextArea(5083,name)
- end
- elseif callback=="banlist" then
- if Admin(name) then
- local str = "<p align='center'><font color='#F49A9A' size='14'><b>Liste des bannis :</b></font></p>"
- str = str .. "<br><font color='#F4F19A' size='11'><b>" .. table.concat(ban,'\n') .. "</b></font>"
- ui.addPopup(1004,0, str, name,200,100,400)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé à utiliser cette fonction !</font></p>",name,159,129,510);
- end
- elseif callback=="map" then
- if Admin(name) then
- ui.addPopup(7,2,"Rentrez le code de la map à jouer.",name,400,200,200)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé à utiliser cette fonction !</font></p>",name,159,129,510);
- end
- --------------------------------------------
- elseif callback=="stop" then
- if Admin(name) then
- ui.addPopup(6,1,"<p align='center'><font color='#FD6A6A' size='15'>CONFIRMATION :<br><br>Êtes-vous sur d'éteindre <b>tribeclick</b> ?</font></p>",name,400,200)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé a utiliser cette fonction !</font></p>",name,159,129,510);
- ------------------------------
- end
- elseif callback=="roomsay" then
- if Admin(name) then
- ui.addPopup(5,2,"<p align='center'></b></font><font size='15'>Votre message :",name,200,50,400)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé a utiliser cette fonction !</font></p>",name,159,129,510);
- end
- ------------------------
- elseif callback=="tuer" then
- if Admin(name) then
- ui.addPopup(8,2,"Marquer le pseudo de la personne à tuer. ( Nous lui dirons rien )",name,400,200,200)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé a utiliser cette fonction !</font></p>",name,159,129,510);
- end
- -----------------------
- elseif callback=="temps" then
- if Admin(name) then
- ui.addPopup(9,2,"Modifier le temps.",name,400,200,200)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé a utiliser cette fonction !</font></p>",name,159,129,510);
- end
- -----------------------
- elseif callback=="respawn" then
- tfm.exec.respawnPlayer(name)
- for index,name in pairs(ban) do
- tfm.exec.killPlayer(name);
- tfm.exec.setPlayerScore(name, 0, false);
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Tu es banni ! </font></p>",name,159,129,510);
- end
- -----------------------
- elseif callback=="chamall" then
- if Admin(name) then
- tfm.exec.setUIShamanName("Tout le monde")
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..name.."</b>] a mis tout le monde chamane !", nil, 300, 140, 325)
- for name in pairs(tfm.get.room.playerList) do tfm.exec.setShaman(name) end
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé à utiliser cette fonction !</font></p>",name,159,129,510);
- end
- elseif callback=="ban" then
- if Admin(name) then
- ui.addPopup(10,2,"<p align='center'><b>Entrer le pseudo de la personne que vous voulez bannir temporairement.</p></b>",name,300,200,200)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé à utiliser cette fonction !</font></p>",name,159,129,510);
- end
- elseif callback=="unbanall" then
- if Admin(name) then
- ban = {}
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..name.."</b>] a vidé toute la banlist. ", nil, 300, 140, 325)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé à utiliser cette fonction !</font></p>",name,159,129,510);
- end
- elseif callback=="grade" then
- if Admin(name) then
- ui.addPopup(11,2,"<p align='center'><b>Entrer le pseudo de la personne que vous voulez mettre admin temporairement.</p></b>",name,300,200,200)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé à utiliser cette fonction !</font></p>",name,159,129,510);
- end
- elseif callback=="roomsay" then
- if Admin(name) then
- ui.addPopup(5,2,"<p align='center'></b></font><font size='15'>Votre message :",name,200,50,400)
- elseif name~="admin" then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous n'êtes pas autorisé a utiliser cette fonction !</font></p>",name,159,129,510);
- end
- elseif callback=="Admlist" then
- if Ban(name) then
- ui.addPopup(100,0,"<p align='center'><font color='#FD6A6A' size='15'>Vous ête banni !</font></p>",name,159,129,510);
- elseif name~="ban" then
- local str = "<p align='center'><font color='#F4C79A' size='14'><b>Liste des admins :</b></font></p>"
- str = str .. "<br><font color='#F49AE5' size='11'><b>" .. table.concat(admin,'\n') .. "</b></font>"
- ui.addPopup(1005,0, str, name,200,100,400)
- end
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventPopupAnswer(idpopup, playerName, answer)
- if idpopup==5 then
- ui.addPopup(0, 0, "<font color='#ED67EA' size='15'>• [Admin <b>"..playerName.."</b>]</font> <font color='#ED67EA' size='15'>"..answer.."</font>", nil, 220, 240, 400)
- end
- if idpopup==7 then
- tfm.exec.newGame(""..answer.."")
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..playerName.."</b>] a chargé la map "..answer.."", nil, 300, 140, 325)
- end
- if idpopup==8 then
- tfm.exec.killPlayer(""..answer.."")
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..playerName.."</b>] a tué "..answer.."", nil, 300, 140, 325)
- end
- if idpopup==9 then
- tfm.exec.setGameTime(""..answer.."")
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..playerName.."</b>] a modifié le temps de la map ("..answer.." secondes)", nil, 300, 140, 325)
- end
- if idpopup==10 then
- table.insert(ban, answer)
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..playerName.."</b>] a banni temporairement</font><font color='#F3F38D' size='15'> "..answer.."</font>", nil, 300, 140, 325)
- tfm.exec.killPlayer(""..answer.."")
- end
- if idpopup==14 then
- table.insert(ban, answer)
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..playerName.."</b>] a débanni temporairement</font><font color='#F3F38D' size='15'> "..answer.."</font>", nil, 300, 140, 325)
- tfm.exec.killPlayer(""..answer.."")
- end
- if idpopup==11 then
- table.insert(admin, answer)
- ui.addPopup(4, 0, "<font color='#5BD1C5' size='15'>• [Admin <b>"..playerName.."</b>] a mis admin temporairement</font><font color='#F3F38D' size='15'> "..answer.."</font>", nil, 300, 140, 325)
- end
- if idpopup==12 then
- tfm.exec.addShamanObject(answer,tfm.get.room.playerList[playerName].x,tfm.get.room.playerList[playerName].y)
- ui.removeTextArea(5081,playerName)
- ui.removeTextArea(5082,playerName)
- ui.removeTextArea(5083,playerName)
- end
- if idpopup==13 then
- tfm.exec.newGame(answer)
- end
- if idpopup== 6 then
- if answer=="yes" then
- system.exit()
- end
- if answer=="no" then
- print("STOP ANNULE")
- end
- end
- end
- function eventChatCommand(playerName,command) -- A partir de la il y'a les commandes
- local arg = {}
- for argument in command:gmatch ("[^%s]+") do
- table.insert (arg, argument);
- end
- if arg[1] == "move" then
- tfm.exec.movePlayer(arg[2], arg[3], arg[4])
- end
- if command:sub(0,8) == "tp" then
- if canTeleport == true then
- canTeleport = false
- ui.addTextArea(403,"<p align='center'><a href='event:tp'><b>Tp : <font color='#F96868'>OFF</font></b></a></p>",name,202,36,73,16,nil,0x324650,nil,true)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement