fly = false -- false : fly désactivé par défaut, true : fly activé par defaut
teleport = false -- false : tpclick désactivé par défaut, true : tpclick activé par defaut.
code = "MotDePasse" -- Mot de passe dès l'entrée d'un joueur
demandeCode = false -- Demander le code ? true : oui, false : non
owner = "PseudoAdmin" -- Pseudo de l'administrateur.
owner2 = "PseudoAdmin2" -- Pseudo du deuxième administrateur
owner3 = "PseudoAdmin3" -- Pseudo du troisième administrateur.
version = "v3.1" -- Ne pas toucher
for name in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end
system.disableChatCommandDisplay("aide")
system.disableChatCommandDisplay("vampire")
system.disableChatCommandDisplay("chamane")
system.disableChatCommandDisplay("respawn")
system.disableChatCommandDisplay("mort")
system.disableChatCommandDisplay("fromage")
system.disableChatCommandDisplay("meep")
system.disableChatCommandDisplay("lock")
system.disableChatCommandDisplay("unlock")
system.disableChatCommandDisplay("unlockP")
system.disableChatCommandDisplay("tp")
system.disableChatCommandDisplay("all-fly")
system.disableChatCommandDisplay("all-fly false")
system.disableChatCommandDisplay("tpclick")
system.disableChatCommandDisplay("tpclick false")
system.disableChatCommandDisplay("aideADM")
system.disableChatCommandDisplay("time")
system.disableChatCommandDisplay("couleur")
system.disableChatCommandDisplay("spawnobject")
system.disableChatCommandDisplay("lockP")
system.disableChatCommandDisplay("couleurP")
print("TribeOS "..version.." started.")
print("")
print("!aideADM : Liste des commandes ADMIN !")
print("Faites l'émote dormir, fonction cachée :D")
print("")
ui.addPopup(0, 0, " Bienvenue sur TribeOS "..version.." !
Les commandes sont disponibles en tapant !aide.
TribeOS "..version.." - RUN
Coded by Nathaan", playerName, 200, 100, 400)
ui.addTextArea(0, "TribeOS "..version.." - RUN", all, 0, 20, 800, 20, 0x000000, 0x000000, 0)
ui.addTextArea(1, "Coded by Nathaan", all, 0, 38, 800, 20, 0x000000, 0x000000, 0)
function eventNewPlayer(playerName)
for name in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end
tfm.exec.bindKeyboard(playerName,32,true,true)
if demandeCode then
ui.addPopup(101, 0, "
", playerName, -1000, -1000, 1000000)
ui.addPopup(102, 2, "Insérez le code d'accées.", playerName, 300, 150, 200)
end
ui.addTextArea(0, "TribeOS "..version.." - RUN", all, 0, 20, 800, 20, 0x000000, 0x000000, 0)
ui.addTextArea(1, "Coded by Nathaan", all, 0, 38, 800, 20, 0x000000, 0x000000, 0)
ui.addPopup(0, 0, "
Bienvenue sur TribeOS "..version.." !
Special Agents Mices Commandes Commandes admin Commandes admin Commandes admin
Votre message special",playerName,200,50,400)
end
end
function eventPopupAnswer(id, playerName, answer)
if id == 102 then
if answer == code then
ui.addPopup(101, 0, "Le code est correct.", playerName, 300, 150, 200)
else
ui.addPopup(102, 2, "Insérez le code d'accées.", playerName, 300, 150, 200)
end
end
if id == 111 then
print("["..playerName.."] "..answer.."")
ui.addPopup(112, 0, "["..playerName.."] "..answer.."", nil, 0, 24, 800)
end
end
function eventChatCommand(playerName, message)
local arg = {}
for argument in message:gmatch ("[^%s]+") do
table.insert (arg, argument);
end
if arg[1] == "tp" then
tfm.exec.movePlayer(arg[2], arg[3], arg[4])
end
if arg[1] == "time" then
tfm.exec.setGameTime(arg[2])
end
if arg[1] == "spawnobject" then
tfm.exec.addShamanObject(arg[2],tfm.get.room.playerList[playerName].x,tfm.get.room.playerList[playerName].y)
end
if arg[1] == "couleur" then
tfm.exec.setNameColor(playerName, "0x"..arg[2])
end
if message=="aide" then
ui.addPopup(1, 0, "
!vampire : Se transformer en vampire.
!chamane : Devenir un chamane (sans compétences)
!respawn : Respawn dans les maps ou des joueurs sont encore présents.
!mort : Similaire à la commande /mort.
!fromage : Vous donne le fromage.
!meep : Vous donne le droit de meep..
!tp [JOUEUR] [X] [Y] : Téléporter un joueur aux coordonées demandés.
!couleur ABCDEF : Choisir la couleur de son pseudo, NE PAS METTRE LE # !
!spawnobject : Faire apparaître l'objet voulu à coté de soi. Marquez l'ID de l'objet.", playerName, 200, 50, 400)
end
if message=="vampire" then
tfm.exec.setVampirePlayer(playerName)
end
if message=="chamane" then
tfm.exec.setShaman(playerName)
end
if message=="respawn" then
tfm.exec.respawnPlayer(playerName)
end
if message=="mort" then
tfm.exec.killPlayer(playerName)
end
if message=="fromage" then
tfm.exec.giveCheese(playerName)
end
if message=="meep" then
tfm.exec.giveMeep(playerName)
end
if playerName == owner then
if message=="unlock" then
ui.addPopup(101, 0, "Deverouille par un admin.", all, 300, 150, 200)
ui.addPopup(102, 0, "Vous devez fermer cette fenêtre..", all, 90, 150, 200)
end
if message=="lock" then
ui.addPopup(101, 0, "
", all, -1000, -1000, 1000000)
ui.addPopup(102, 2, "Insérez le code d'accées.", all, 300, 150, 200)
end
if message=="all-fly" then
fly = true
end
if message=="aideADM" then
ui.addPopup(1, 0, "
!unlock : Dévérouiller pour tout le monde.
!unlockP [PlayerName] : Dévérouiller pour un joueur précis.
!lock : Bloquer à tout le monde.
!lockP : Bloquer pour un joueur précis.
!all-fly (false) : Donner l'autorisation à tout le monde de voler (false pour désactiver)
!tpclick (false) : Donne l'autorisation à tout le monde de se téléporter en cliquant. (false pour désactiver)
!couleurP [PSEUDO] [COULEUR SANS LE #] : Mettre le pseudo de quelqu'un en couleur.", playerName, 200, 50, 400)
end
if message=="all-fly false" then
fly = false
end
local UP = {}
for argument in message:gmatch ("[^%s]+") do
table.insert (UP, argument);
end
if UP[1] == "unlockP" then
ui.addPopup(101, 0, "Deverouille par un admin.", UP[2], 300, 150, 200)
ui.addPopup(102, 0, "Vous devez fermer cette fenêtre..", UP[2], 90, 150, 200)
end
if UP[1] == "couleurP" then
tfm.exec.setNameColor(arg[2], "0x"..arg[3])
end
if UP[1] == "lockP" then
ui.addPopup(101, 0, "
", arg[2], -1000, -1000, 1000000)
ui.addPopup(102, 2, "Insérez le code d'accées.", arg[2], 300, 150, 200)
if message=="tpclick" then
teleport = true
end
if message=="tpclick false" then
teleport = false
end
end
end
if playerName == owner2 then
if message=="unlock" then
ui.addPopup(101, 0, "Deverouille par un admin.", all, 300, 150, 200)
ui.addPopup(102, 0, "Vous devez fermer cette fenêtre..", all, 90, 150, 200)
end
if message=="lock" then
ui.addPopup(101, 0, "
", all, -1000, -1000, 1000000)
ui.addPopup(102, 2, "Insérez le code d'accées.", all, 300, 150, 200)
end
if message=="all-fly" then
fly = true
end
if message=="aideADM" then
ui.addPopup(1, 0, "
!unlock : Dévérouiller pour tout le monde.
!unlockP [PlayerName] : Dévérouiller pour un joueur précis.
!lock : Bloquer à tout le monde.
!lockP : Bloquer pour un joueur précis.
!all-fly (false) : Donner l'autorisation à tout le monde de voler (false pour désactiver)
!tpclick (false) : Donne l'autorisation à tout le monde de se téléporter en cliquant. (false pour désactiver)
!couleurP [PSEUDO] [COULEUR SANS LE #] : Mettre le pseudo de quelqu'un en couleur.", playerName, 200, 50, 400)
end
if message=="all-fly false" then
fly = false
end
local UP = {}
for argument in message:gmatch ("[^%s]+") do
table.insert (UP, argument);
end
if UP[1] == "unlockP" then
ui.addPopup(101, 0, "Deverouille par un admin.", UP[2], 300, 150, 200)
ui.addPopup(102, 0, "Vous devez fermer cette fenêtre..", UP[2], 90, 150, 200)
end
if UP[1] == "couleurP" then
tfm.exec.setNameColor(arg[2], "0x"..arg[3])
end
if UP[1] == "lockP" then
ui.addPopup(101, 0, "
", arg[2], -1000, -1000, 1000000)
ui.addPopup(102, 2, "Insérez le code d'accées.", arg[2], 300, 150, 200)
if message=="tpclick" then
teleport = true
end
if message=="tpclick false" then
teleport = false
end
end
if playerName == owner3 then
if message=="unlock" then
ui.addPopup(101, 0, "Deverouille par un admin.", all, 300, 150, 200)
ui.addPopup(102, 0, "Vous devez fermer cette fenêtre..", all, 90, 150, 200)
end
if message=="lock" then
ui.addPopup(101, 0, "
", all, -1000, -1000, 1000000)
ui.addPopup(102, 2, "Insérez le code d'accées.", all, 300, 150, 200)
end
if message=="all-fly" then
fly = true
end
if message=="aideADM" then
ui.addPopup(1, 0, "
!unlock : Dévérouiller pour tout le monde.
!unlockP [PlayerName] : Dévérouiller pour un joueur précis.
!lock : Bloquer à tout le monde.
!lockP : Bloquer pour un joueur précis.
!all-fly (false) : Donner l'autorisation à tout le monde de voler (false pour désactiver)
!tpclick (false) : Donne l'autorisation à tout le monde de se téléporter en cliquant. (false pour désactiver)
!couleurP [PSEUDO] [COULEUR SANS LE #] : Mettre le pseudo de quelqu'un en couleur.", playerName, 200, 50, 400)
end
if message=="all-fly false" then
fly = false
end
local UP = {}
for argument in message:gmatch ("[^%s]+") do
table.insert (UP, argument);
end
if UP[1] == "unlockP" then
ui.addPopup(101, 0, "Deverouille par un admin.", UP[2], 300, 150, 200)
ui.addPopup(102, 0, "Vous devez fermer cette fenêtre..", UP[2], 90, 150, 200)
end
if UP[1] == "couleurP" then
tfm.exec.setNameColor(arg[2], "0x"..arg[3])
end
if UP[1] == "lockP" then
ui.addPopup(101, 0, "
", arg[2], -1000, -1000, 1000000)
ui.addPopup(102, 2, "Insérez le code d'accées.", arg[2], 300, 150, 200)
if message=="tpclick" then
teleport = true
end
if message=="tpclick false" then
teleport = false
end
end
end
end
end
for playerName,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(playerName)
end
function eventKeyboard(playerName,key,down,x,y)
if fly then
if key==32 then
tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
end
end
end
function eventMouse(playerName, x, y)
if teleport then
tfm.exec.movePlayer(playerName,x,y)
end
end