SHOW:
|
|
- or go back to the newest paste.
| 1 | ||
| 2 | fly = false -- false : fly désactivé par défaut, true : fly activé par defaut | |
| 3 | teleport = false -- false : tpclick désactivé par défaut, true : tpclick activé par defaut. | |
| 4 | code = "MotDePasse" -- Mot de passe dès l'entrée d'un joueur | |
| 5 | demandeCode = false -- Demander le code ? true : oui, false : non | |
| 6 | - | version = "v2.2" -- Ne pas toucher |
| 6 | + | |
| 7 | version = "v3.0" -- Ne pas toucher | |
| 8 | ||
| 9 | for name in pairs(tfm.get.room.playerList) do | |
| 10 | system.bindMouse(name, true) | |
| 11 | end | |
| 12 | system.disableChatCommandDisplay("aide")
| |
| 13 | system.disableChatCommandDisplay("vampire")
| |
| 14 | system.disableChatCommandDisplay("chamane")
| |
| 15 | system.disableChatCommandDisplay("respawn")
| |
| 16 | system.disableChatCommandDisplay("mort")
| |
| 17 | system.disableChatCommandDisplay("fromage")
| |
| 18 | system.disableChatCommandDisplay("meep")
| |
| 19 | system.disableChatCommandDisplay("lock")
| |
| 20 | system.disableChatCommandDisplay("unlock")
| |
| 21 | system.disableChatCommandDisplay("unlockP")
| |
| 22 | system.disableChatCommandDisplay("tp")
| |
| 23 | system.disableChatCommandDisplay("all-fly")
| |
| 24 | system.disableChatCommandDisplay("all-fly false")
| |
| 25 | system.disableChatCommandDisplay("tpclick")
| |
| 26 | system.disableChatCommandDisplay("tpclick false")
| |
| 27 | system.disableChatCommandDisplay("aideADM")
| |
| 28 | system.disableChatCommandDisplay("time")
| |
| 29 | system.disableChatCommandDisplay("couleur")
| |
| 30 | system.disableChatCommandDisplay("spawnobject")
| |
| 31 | system.disableChatCommandDisplay("lockP")
| |
| 32 | system.disableChatCommandDisplay("couleurP")
| |
| 33 | ||
| 34 | ||
| 35 | print("<font color='#FFFF00'>TribeOS "..version.." started.</font>")
| |
| 36 | print("")
| |
| 37 | print("<font color='#C2C2DA'><font color='#FFFF00'><b>!aideADM</b></font> : Liste des commandes ADMIN !</font>")
| |
| 38 | print("<font color='#C2C2DA'>Faites l'émote <font color='#FFFF00'><b>dormir</b></font>, fonction cachée :D")
| |
| 39 | print("")
| |
| 40 | ui.addPopup(0, 0, "<p align='center'><font size='15'><b>Bienvenue sur TribeOS "..version.." !</b></font></p><br><font size='12'>Les commandes sont disponibles en tapant !aide.<br><br><b><font size='14' face='Consolas'>TribeOS "..version.." - RUN</b></font><br><b><font size='8' face='Comic Sans MS'>Coded by Nathaan</b></font>", playerName, 200, 100, 400) | |
| 41 | ||
| 42 | ui.addTextArea(0, "<b><font size='14' face='Consolas' color='#000000' >TribeOS "..version.." - RUN</b></font>", all, 0, 20, 800, 20, 0x000000, 0x000000, 0) | |
| 43 | ui.addTextArea(1, "<b><font size='8' face='Comic Sans MS' color='#000000' >Coded by Nathaan</b></font>", all, 0, 38, 800, 20, 0x000000, 0x000000, 0) | |
| 44 | ||
| 45 | function eventNewPlayer(playerName) | |
| 46 | ||
| 47 | for name in pairs(tfm.get.room.playerList) do | |
| 48 | system.bindMouse(name, true) | |
| 49 | end | |
| 50 | tfm.exec.bindKeyboard(playerName,32,true,true) | |
| 51 | if demandeCode then | |
| 52 | ui.addPopup(101, 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><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>", playerName, -1000, -1000, 1000000) | |
| 53 | ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", playerName, 300, 150, 200) | |
| 54 | end | |
| 55 | ui.addTextArea(0, "<b><font size='14' face='Consolas' color='#000000' >TribeOS "..version.." - RUN</b></font>", all, 0, 20, 800, 20, 0x000000, 0x000000, 0) | |
| 56 | ui.addTextArea(1, "<b><font size='8' face='Comic Sans MS' color='#000000' >Coded by Nathaan</b></font>", all, 0, 38, 800, 20, 0x000000, 0x000000, 0) | |
| 57 | ui.addPopup(0, 0, "<p align='center'><font size='15'><b>Bienvenue sur TribeOS "..version.." !</b></font></p><br><font size='12'>Les commandes sont disponibles en tapant !aide.<br><br><b><font size='14' face='Consolas'>TribeOS "..version.." - RUN</b></font><br><b><font size='8' face='Comic Sans MS'>Coded by Nathaan</b></font>", playerName, 200, 100, 400) | |
| 58 | ||
| 59 | end | |
| 60 | ||
| 61 | function eventEmotePlayed(playerName, emote) | |
| 62 | if emote==6 then | |
| 63 | ui.addPopup(111,2,"<p align='center'><font size='30'><b><font face='Time Sans MS'>Special Agents Mices</font></b><br></font><font size='15'>Votre message special",playerName,200,50,400) | |
| 64 | end | |
| 65 | end | |
| 66 | ||
| 67 | function eventPopupAnswer(id, playerName, answer) | |
| 68 | if id == 102 then | |
| 69 | if answer == code then | |
| 70 | ui.addPopup(101, 0, "<font size='15'><b>Le code est correct.</b></font>", playerName, 300, 150, 200) | |
| 71 | else | |
| 72 | ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", playerName, 300, 150, 200) | |
| 73 | end | |
| 74 | end | |
| 75 | ||
| 76 | if id == 111 then | |
| 77 | print("<font color='#009D9D'>["..playerName.."]</font> <font color='#C2C2DA'>"..answer.."</font>")
| |
| 78 | ui.addPopup(112, 0, "<font color='#009D9D' size='15'>["..playerName.."]</font> <font size='15'>"..answer.."</font>", nil, 0, 24, 800) | |
| 79 | end | |
| 80 | end | |
| 81 | ||
| 82 | function eventChatCommand(playerName, message) | |
| 83 | local arg = {}
| |
| 84 | - | tfm.exec.movePlayer (arg[2], arg[3], arg[4]); |
| 84 | + | |
| 85 | table.insert (arg, argument); | |
| 86 | end | |
| 87 | if arg[1] == "tp" then | |
| 88 | tfm.exec.movePlayer(arg[2], arg[3], arg[4]) | |
| 89 | end | |
| 90 | - | ui.addPopup(1, 0, "<p align='center'><font size='16' color='#FF0000'><b>Commandes</b></font></p><br><font size='12' color='#C2C2DA'><font color='#EB1D51'><b>!vampire</b></font> : Se transformer en vampire.<br><font color='#EB1D51'><b>!chamane</b></font> : Devenir un chamane (sans compétences)<br><font color='#EB1D51'><b>!respawn</b></font> : Respawn dans les maps ou des joueurs sont encore présents.<br><font color='#EB1D51'><b>!mort</b></font> : Similaire à la commande /mort.<br><font color='#EB1D51'><b>!fromage</b></font> : Vous donne le fromage.<br><font color='#EB1D51'><b>!meep</b></font> : Vous donne le droit de meep..<br><font color='#EB1D51'><b>!tp [JOUEUR] [X] [Y]</b></font> : Téléporter un joueur aux coordonées demandés.", playerName, 200, 50, 400) |
| 90 | + | |
| 91 | tfm.exec.setGameTime(arg[2]) | |
| 92 | end | |
| 93 | if arg[1] == "spawnobject" then | |
| 94 | tfm.exec.addShamanObject(arg[2],tfm.get.room.playerList[playerName].x,tfm.get.room.playerList[playerName].y) | |
| 95 | end | |
| 96 | if arg[1] == "couleur" then | |
| 97 | tfm.exec.setNameColor(playerName, "0x"..arg[2]) | |
| 98 | end | |
| 99 | if message=="aide" then | |
| 100 | ui.addPopup(1, 0, "<p align='center'><font size='16' color='#FF0000'><b>Commandes</b></font></p><br><font size='12' color='#C2C2DA'><font color='#EB1D51'><b>!vampire</b></font> : Se transformer en vampire.<br><font color='#EB1D51'><b>!chamane</b></font> : Devenir un chamane (sans compétences)<br><font color='#EB1D51'><b>!respawn</b></font> : Respawn dans les maps ou des joueurs sont encore présents.<br><font color='#EB1D51'><b>!mort</b></font> : Similaire à la commande /mort.<br><font color='#EB1D51'><b>!fromage</b></font> : Vous donne le fromage.<br><font color='#EB1D51'><b>!meep</b></font> : Vous donne le droit de meep..<br><font color='#EB1D51'><b>!tp [JOUEUR] [X] [Y]</b></font> : Téléporter un joueur aux coordonées demandés.<br><font color='#EB1D51'><b>!couleur ABCDEF</b></font> : Choisir la couleur de son pseudo, NE PAS METTRE LE # !<br><font color='#EB1D51'><b>!spawnobject</b></font> : Faire apparaître l'objet voulu à coté de soi. Marquez l'ID de l'objet.", playerName, 200, 50, 400) | |
| 101 | end | |
| 102 | if message=="vampire" then | |
| 103 | tfm.exec.setVampirePlayer(playerName) | |
| 104 | end | |
| 105 | if message=="chamane" then | |
| 106 | tfm.exec.setShaman(playerName) | |
| 107 | end | |
| 108 | if message=="respawn" then | |
| 109 | tfm.exec.respawnPlayer(playerName) | |
| 110 | end | |
| 111 | if message=="mort" then | |
| 112 | tfm.exec.killPlayer(playerName) | |
| 113 | end | |
| 114 | if message=="fromage" then | |
| 115 | tfm.exec.giveCheese(playerName) | |
| 116 | end | |
| 117 | if message=="meep" then | |
| 118 | tfm.exec.giveMeep(playerName) | |
| 119 | end | |
| 120 | if playerName == owner then | |
| 121 | if message=="unlock" then | |
| 122 | ui.addPopup(101, 0, "<font size='15'><b>Deverouille par un admin.</b></font>", all, 300, 150, 200) | |
| 123 | - | ui.addPopup(1, 0, "<p align='center'><font size='16' color='#FF0000'><b>Commandes admin</b></font></p><br><font size='12' color='#C2C2DA'><font color='#EB1D51'><b>!unlock</b></font> : Dévérouiller pour tout le monde.<br><font color='#EB1D51'><b>!unlockP [PlayerName]</b></font> : Dévérouiller pour un joueur précis.<br><font color='#EB1D51'><b>!lock</b></font> : Bloquer à tout le monde.<br><font color='#EB1D51'><b>!all-fly (false)</b></font> : Donner l'autorisation à tout le monde de voler (false pour désactiver)<br><font color='#EB1D51'><b>!tpclick (false)</b></font> : Donne l'autorisation à tout le monde de se téléporter en cliquant. (false pour désactiver)", playerName, 200, 50, 400) |
| 123 | + | |
| 124 | end | |
| 125 | if message=="lock" then | |
| 126 | ui.addPopup(101, 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><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>", all, -1000, -1000, 1000000) | |
| 127 | ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", all, 300, 150, 200) | |
| 128 | end | |
| 129 | if message=="all-fly" then | |
| 130 | fly = true | |
| 131 | end | |
| 132 | if message=="aideADM" then | |
| 133 | ui.addPopup(1, 0, "<p align='center'><font size='16' color='#FF0000'><b>Commandes admin</b></font></p><br><font size='12' color='#C2C2DA'><font color='#EB1D51'><b>!unlock</b></font> : Dévérouiller pour tout le monde.<br><font color='#EB1D51'><b>!unlockP [PlayerName]</b></font> : Dévérouiller pour un joueur précis.<br><font color='#EB1D51'><b>!lock</b></font> : Bloquer à tout le monde.<br><font color='#EB1D51'><b>!lockP</b></font> : Bloquer pour un joueur précis.<br><font color='#EB1D51'><b>!all-fly (false)</b></font> : Donner l'autorisation à tout le monde de voler (false pour désactiver)<br><font color='#EB1D51'><b>!tpclick (false)</b></font> : Donne l'autorisation à tout le monde de se téléporter en cliquant. (false pour désactiver)<br><font color='#EB1D51'><b>!couleurP [PSEUDO] [COULEUR SANS LE #]</b></font> : Mettre le pseudo de quelqu'un en couleur.", playerName, 200, 50, 400) | |
| 134 | end | |
| 135 | if message=="all-fly false" then | |
| 136 | fly = false | |
| 137 | end | |
| 138 | local UP = {}
| |
| 139 | for argument in message:gmatch ("[^%s]+") do
| |
| 140 | table.insert (UP, argument); | |
| 141 | end | |
| 142 | ||
| 143 | - | end |
| 143 | + | |
| 144 | ui.addPopup(101, 0, "<font size='15'><b>Deverouille par un admin.</b></font>", UP[2], 300, 150, 200) | |
| 145 | ui.addPopup(102, 0, "<font size='15'><b>Vous devez fermer cette fenêtre..</b></font>", UP[2], 90, 150, 200) | |
| 146 | end | |
| 147 | if UP[1] == "couleurP" then | |
| 148 | tfm.exec.setNameColor(arg[2], "0x"..arg[3]) | |
| 149 | end | |
| 150 | if UP[1] == "lockP" then | |
| 151 | ui.addPopup(101, 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><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>", arg[2], -1000, -1000, 1000000) | |
| 152 | ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", arg[2], 300, 150, 200) | |
| 153 | if message=="tpclick" then | |
| 154 | teleport = true | |
| 155 | end | |
| 156 | if message=="tpclick false" then | |
| 157 | teleport = false | |
| 158 | end | |
| 159 | end | |
| 160 | end | |
| 161 | end | |
| 162 | ||
| 163 | for playerName,player in pairs(tfm.get.room.playerList) do | |
| 164 | eventNewPlayer(playerName) | |
| 165 | end | |
| 166 | ||
| 167 | function eventKeyboard(playerName,key,down,x,y) | |
| 168 | if fly then | |
| 169 | if key==32 then | |
| 170 | tfm.exec.movePlayer(playerName,0,0,true,0,-50,false) | |
| 171 | end | |
| 172 | end | |
| 173 | end | |
| 174 | ||
| 175 | function eventMouse(playerName, x, y) | |
| 176 | if teleport then | |
| 177 | tfm.exec.movePlayer(playerName,x,y) | |
| 178 | end | |
| 179 | end |