View difference between Paste ID: eFX0GXMy and LpXqxB8W
SHOW: | | - or go back to the newest paste.
1
code = "Mot de passe d'accées."
2
owner = "Pseudo de celui qui load le lua"
3
version = "v1.3"
4
5
system.disableChatCommandDisplay("aide")
6
system.disableChatCommandDisplay("vampire")
7
system.disableChatCommandDisplay("chamane")
8
system.disableChatCommandDisplay("respawn")
9
system.disableChatCommandDisplay("mort")
10
system.disableChatCommandDisplay("fromage")
11-
code = "Set your code here !"
11+
12-
version = "v1.2"
12+
13
system.disableChatCommandDisplay("unlock")
14
15
print("<font color='#FFFF00'>TribeOS "..version.." started.</font>")
16
print("Commande cachée : !unlock qui permet de fermer la demande de code à tout le monde !")
17
print("Faites l'émote dormir, fonction cachée.")
18
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)
19
20
ui.addTextArea(0, "<b><font size='14' face='Consolas' color='#000000' >TribeOS "..version.." - RUN</b></font>", all, 0, 20, 800, 20, 0x000000, 0x000000, 0)
21
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)
22
23
function eventNewPlayer(playerName)
24
 
25
        tfm.exec.bindKeyboard(playerName,32,true,true)
26
        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)
27
        ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", playerName, 300, 150, 200)
28
        ui.addTextArea(0, "<b><font size='14' face='Consolas' color='#000000' >TribeOS "..version.." - RUN</b></font>", all, 0, 20, 800, 20, 0x000000, 0x000000, 0)
29
        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)
30
        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)
31
32
end
33
34
function eventEmotePlayed(playerName, emote)
35
        if emote==6 then
36
                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)
37
        end
38
end
39
 
40
function eventPopupAnswer(id, playerName, answer)
41
        if id == 102 then
42
                if answer == code then
43
                        ui.addPopup(101, 0, "<font size='15'><b>Le code est correct.</b></font>", playerName, 300, 150, 200)
44
                else
45
                        ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", playerName, 300, 150, 200)
46
                end
47
        end
48
49
        if id == 111 then
50
                print("<font color='#009D9D'>["..playerName.."]</font> <font color='#C2C2DA'>"..answer.."</font>")
51
                ui.addPopup(112, 0, "<font color='#009D9D' size='15'>["..playerName.."]</font> <font size='15'>"..answer.."</font>", nil, 0, 24, 800)
52
        end
53
end
54
55
function eventChatCommand(playerName, message)
56
        if message=="aide" then
57
                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>", playerName, 200, 50, 400)
58
        end
59
        if message=="vampire" then
60
                tfm.exec.setVampirePlayer(playerName)
61
        end
62
        if message=="chamane" then
63
                tfm.exec.setShaman(playerName)
64
        end
65
        if message=="respawn" then
66
                tfm.exec.respawnPlayer(playerName)
67
        end
68
        if message=="mort" then
69
                tfm.exec.killPlayer(playerName)
70
        end
71
        if message=="fromage" then
72
                tfm.exec.giveCheese(playerName)
73-
        if message=="lock" then
73+
74-
                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)
74+
75-
                ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", all, 300, 150, 200)
75+
76
        end
77-
        if message=="unlock" then
77+
        if playerName == owner then
78-
                ui.addPopup(101, 0, "<font size='15'><b>Deverouille par un admin.</b></font>", all, 300, 150, 200)
78+
                if message=="unlock" then
79-
                ui.addPopup(102, 0, "<font size='15'><b>Vous devez fermer cette fenêtre..</b></font>", all, 90, 150, 200)
79+
                        ui.addPopup(101, 0, "<font size='15'><b>Deverouille par un admin.</b></font>", all, 300, 150, 200)
80
                        ui.addPopup(102, 0, "<font size='15'><b>Vous devez fermer cette fenêtre..</b></font>", all, 90, 150, 200)
81
                end
82
                if message=="lock" then
83
                        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)
84
                        ui.addPopup(102, 2, "<font size='15'><b>Insérez le code d'accées.</b></font>", all, 300, 150, 200)
85
                end
86
        end
87
                 
88
end
89
90
for playerName,player in pairs(tfm.get.room.playerList) do
91
        eventNewPlayer(playerName)
92
end
93
 
94
function eventKeyboard(playerName,key,down,x,y)
95
        if key==32 then
96
                tfm.exec.movePlayer(playerName,0,0,true,0,-50,false)
97
        end
98
end