Advertisement
NathNath

TribeOS - v3.3 - Recommanded build #1

Oct 5th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- TribeOS v3.3
  2. -- Coded by Nathaan. Please, do not edit without autorisation.
  3.  
  4. fly = false -- false : fly désactivé par défaut, true : fly activé par defaut
  5. teleport = false -- false : tpclick désactivé par défaut, true : tpclick activé par defaut.
  6. code = "MotDePasse" -- Mot de passe dès l'entrée d'un joueur
  7. demandeCode = false -- Demander le code ? true : oui, false : non
  8. owner = {"PseudoAdmin1"}, {"PseudoAdmin2"} -- Pseudo des admins.
  9. version = "v3.3" -- Ne pas toucher
  10.  
  11. for name in pairs(tfm.get.room.playerList) do
  12.         system.bindMouse(name, true)
  13. end
  14. system.disableChatCommandDisplay("aide")
  15. system.disableChatCommandDisplay("vampire")
  16. system.disableChatCommandDisplay("chamane")
  17. system.disableChatCommandDisplay("respawn")
  18. system.disableChatCommandDisplay("mort")
  19. system.disableChatCommandDisplay("fromage")
  20. system.disableChatCommandDisplay("meep")
  21. system.disableChatCommandDisplay("lock")
  22. system.disableChatCommandDisplay("unlock")
  23. system.disableChatCommandDisplay("unlockP")
  24. system.disableChatCommandDisplay("tp")
  25. system.disableChatCommandDisplay("all-fly")
  26. system.disableChatCommandDisplay("all-fly false")
  27. system.disableChatCommandDisplay("tpclick")
  28. system.disableChatCommandDisplay("tpclick false")
  29. system.disableChatCommandDisplay("aideADM")
  30. system.disableChatCommandDisplay("time")
  31. system.disableChatCommandDisplay("couleur")
  32. system.disableChatCommandDisplay("spawnobject")
  33. system.disableChatCommandDisplay("spawnobjectP")
  34. system.disableChatCommandDisplay("lockP")
  35. system.disableChatCommandDisplay("couleurP")
  36.  
  37.  
  38. print("<font color='#FFFF00'>TribeOS "..version.." started.</font>")
  39. print("")
  40. print("<font color='#C2C2DA'><font color='#FFFF00'><b>!aideADM</b></font> : Liste des commandes ADMIN !</font>")
  41. print("<font color='#C2C2DA'>Faites l'émote <font color='#FFFF00'><b>dormir</b></font>, fonction cachée :D")
  42. print("")
  43. 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)
  44.  
  45. ui.addTextArea(0, "<b><font size='14' face='Consolas' color='#000000' >TribeOS "..version.." - RUN</b></font>", all, 0, 20, 800, 20, 0x000000, 0x000000, 0)
  46. 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)
  47.  
  48.  
  49. function eventNewPlayer(playerName)
  50.  
  51.         for i,playerName in ipairs(owner) do
  52.                 tfm.exec.setNameColor(playerName, 0x0FFFFF)
  53.         end
  54.         for name in pairs(tfm.get.room.playerList) do
  55.                 system.bindMouse(name, true)
  56.         end
  57.         tfm.exec.bindKeyboard(playerName,32,true,true)
  58.         if demandeCode then
  59.                 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)
  60.                 ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", playerName, 300, 150, 200)
  61.         end
  62.         ui.addTextArea(0, "<b><font size='14' face='Consolas' color='#000000' >TribeOS "..version.." - RUN</b></font>", all, 0, 20, 800, 20, 0x000000, 0x000000, 0)
  63.         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)
  64.         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)
  65.  
  66. end
  67.  
  68. function eventEmotePlayed(playerName, emote)
  69.         if emote==6 then
  70.                 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)
  71.         end
  72. end
  73.  
  74. function eventPopupAnswer(id, playerName, answer)
  75.         if id == 102 then
  76.                 if answer == code then
  77.                         ui.addPopup(101, 0, "<font size='15'><b>Le code est correct.</b></font>", playerName, 300, 150, 200)
  78.                 else
  79.                         ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", playerName, 300, 150, 200)
  80.                 end
  81.         end
  82.  
  83.         if id == 111 then
  84.                 print("<font color='#009D9D'>["..playerName.."]</font> <font color='#C2C2DA'>"..answer.."</font>")
  85.                 ui.addPopup(112, 0, "<font color='#009D9D' size='15'>["..playerName.."]</font> <font size='15'>"..answer.."</font>", nil, 0, 24, 800)
  86.         end
  87. end
  88.  
  89. function eventChatCommand(playerName, message)
  90.         local arg = {}
  91.         for argument in message:gmatch ("[^%s]+") do
  92.                 table.insert (arg, argument);
  93.         end
  94.         if arg[1] == "tp" then
  95.                 tfm.exec.movePlayer(arg[2], arg[3], arg[4])
  96.         end
  97.         if arg[1] == "time" then
  98.                 tfm.exec.setGameTime(arg[2])
  99.         end
  100.         if arg[1] == "spawnobject" then
  101.                 tfm.exec.addShamanObject(arg[2],tfm.get.room.playerList[playerName].x,tfm.get.room.playerList[playerName].y)
  102.         end
  103.         if arg[1] == "spawnobjectP" then
  104.                 tfm.exec.addShamanObject(arg[2],arg[3],arg[4])
  105.         end
  106.         if arg[1] == "couleur" then
  107.                tfm.exec.setNameColor(playerName, "0x"..arg[2])
  108.         end
  109.         if message=="aide" then
  110.                 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 [ID]</b></font> : Faire apparaître l'objet voulu à coté de soi.<br><font color='#EB1D51'><b>!spawnobjectP [ID] [X] [Y]</b></font> : Faire apparaître l'objet voulu au coordonées X et Y.", playerName, 200, 50, 400)
  111.         end
  112.         if message=="vampire" then
  113.                 tfm.exec.setVampirePlayer(playerName)
  114.         end
  115.         if message=="chamane" then
  116.                 tfm.exec.setShaman(playerName)
  117.         end
  118.         if message=="respawn" then
  119.                 tfm.exec.respawnPlayer(playerName)
  120.         end
  121.         if message=="mort" then
  122.                 tfm.exec.killPlayer(playerName)
  123.         end
  124.         if message=="fromage" then
  125.                 tfm.exec.giveCheese(playerName)
  126.         end
  127.         if message=="meep" then
  128.                 tfm.exec.giveMeep(playerName)
  129.         end
  130.         for i,playerName in ipairs(owner) do
  131.                 if message=="unlock" then
  132.                         ui.addPopup(101, 0, "<font size='15'><b>Deverouille par un admin.</b></font>", all, 300, 150, 200)
  133.                         ui.addPopup(102, 0, "<font size='15'><b>Vous devez fermer cette fenêtre..</b></font>", all, 90, 150, 200)
  134.                 end
  135.                 if message=="lock" then
  136.                         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)
  137.                         ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", all, 300, 150, 200)
  138.                 end
  139.                 if message=="all-fly" then
  140.                         fly = true
  141.                 end
  142.                 if message=="aideADM" then
  143.                         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)
  144.                 end
  145.                 if message=="all-fly false" then
  146.                         fly = false
  147.                 end
  148.                 local UP = {}
  149.                 for argument in message:gmatch ("[^%s]+") do
  150.                         table.insert (UP, argument);
  151.                 end
  152.        
  153.                 if UP[1] == "unlockP" then
  154.                         ui.addPopup(101, 0, "<font size='15'><b>Deverouille par un admin.</b></font>", UP[2], 300, 150, 200)
  155.                         ui.addPopup(102, 0, "<font size='15'><b>Vous devez fermer cette fenêtre..</b></font>", UP[2], 90, 150, 200)
  156.                 end
  157.                 if UP[1] == "couleurP" then
  158.                         tfm.exec.setNameColor(arg[2], "0x"..arg[3])
  159.                 end
  160.                 if UP[1] == "lockP" then
  161.                         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)
  162.                         ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", arg[2], 300, 150, 200)
  163.                 end
  164.                 if message=="tpclick" then
  165.                         teleport = true
  166.                 end
  167.                 if message=="tpclick false" then
  168.                         teleport = false
  169.                 end          
  170.         end
  171. end
  172.  
  173. for playerName,player in pairs(tfm.get.room.playerList) do
  174.         eventNewPlayer(playerName)
  175. end
  176.  
  177. function eventKeyboard(playerName,key,down,x,y)
  178.         if fly then
  179.                 if key==32 then
  180.                         tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
  181.                 end
  182.         end
  183. end
  184.  
  185. function eventMouse(playerName, x, y)
  186.          if teleport then
  187.                   tfm.exec.movePlayer(playerName,x,y)
  188.          end
  189. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement