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