SHOW:
|
|
- or go back to the newest paste.
1 | -- Events Mice Coded by Izzeberg -- | |
2 | ||
3 | - | version = "1.0" |
3 | + | version = "1.1" |
4 | event = "Rien" | |
5 | modo = "Izzeberg" | |
6 | Et = "0" | |
7 | s = 0 | |
8 | C = 0 | |
9 | P = 0 | |
10 | H = 0 | |
11 | N = 0 | |
12 | Pa = 0 | |
13 | v = 200 | |
14 | ||
15 | - | ui.addTextArea(1, "<a href='event:help'><P align='center'>?</a>", nil, 760, 24, 31, 15, 0x000001, 0x000001, 0.75, true) |
15 | + | |
16 | ||
17 | ui.addTextArea(1, "<a href='event:help'><P align='center'>?</a>", nil, 760, 24, 30, 15, 0x000001, 0x000001, 0.75, true) | |
18 | ui.addTextArea(5, "<a href='event:NewE'><P align='center'>•</a>", nil, 720, 24, 30, 15, 0x000001, 0x000001, 0.75, true) | |
19 | function eventNewPlayer (name) | |
20 | ui.addTextArea(1, "<a href='event:help'><P align='center'>?</a>", nil, 760, 24, 30, 15, 0x000001, 0x000001, 0.75, true) | |
21 | ui.addTextArea(5, "<a href='event:NewE'><P align='center'>•</a>", nil, 720, 24, 30, 15, 0x000001, 0x000001, 0.75, true) | |
22 | - | ui.addTextArea(2, "<font size='30'><P align='center'><u>L'event :</u><br><br><a href='event:St-Valentin'>Saint-Valentin</a><br><a href='event:Carnaval'>Carnaval</a><br><a href='event:Poisson'>Poisson d'avril</a><br><a href='event:Halloween'>Halloween</a><br><a href='event:Noël'>Noël</a>", modo, 39, 54, 326, 277, 0x000001, 0x000001, 0.75, true) |
22 | + | |
23 | ||
24 | -- Interface de l'event -- | |
25 | ||
26 | function eventTextAreaCallback (id, name, c) | |
27 | if c == "NewE" then | |
28 | if name == ""..modo.."" then | |
29 | ui.addTextArea(2, "<font size='20'><P align='center'><u>L'event :</u><br><br><a href='event:St-Valentin'>Saint-Valentin</a><br><a href='event:Carnaval'>Carnaval</a><br><a href='event:Pâques'>Pâques</a><br><a href='event:Poisson'>Poisson d'avril</a><br><a href='event:Halloween'>Halloween</a><br><a href='event:Noël'>Noël</a>", modo, 39, 54, 326, 277, 0x000001, 0x000001, 0.75, true) | |
30 | end | |
31 | end | |
32 | if c == "help" then | |
33 | ui.addTextArea(2, "<font size='20'><P align='center'><u>L'event :</u><br><br><a href='event:St-Valentin'>Saint-Valentin</a><br><a href='event:Carnaval'>Carnaval</a><br><a href='event:Pâques'>Pâques</a><br><a href='event:Poisson'>Poisson d'avril</a><br><a href='event:Halloween'>Halloween</a><br><a href='event:Noël'>Noël</a>", modo, 39, 54, 326, 277, 0x000001, 0x000001, 0.75, true) | |
34 | end | |
35 | if c == "St-Valentin" then | |
36 | Et = "10" | |
37 | event = "Saint-Valentin" | |
38 | RandA() | |
39 | elseif c == "Carnaval" then | |
40 | - | tfm.exec.setVampirePlayer (name) |
40 | + | |
41 | event = "Carnaval" | |
42 | RandA() | |
43 | elseif c == "Pâques" then | |
44 | Et = "10" | |
45 | event = "Pâques" | |
46 | RandA() | |
47 | elseif c == "Poisson" then | |
48 | Et = "10" | |
49 | event = "Poisson d'avril" | |
50 | RandA() | |
51 | elseif c == "Halloween" then | |
52 | Et = "10" | |
53 | event = "Halloween" | |
54 | RandA() | |
55 | v = 0 | |
56 | elseif c == "Noël" then | |
57 | Et = "10" | |
58 | event = "Noël" | |
59 | RandA() | |
60 | - | P = P + 0.5 |
60 | + | |
61 | - | H = H + 0.5 |
61 | + | |
62 | - | N = N + 0.5 |
62 | + | |
63 | ui.removeTextArea(0, nil) | |
64 | ui.addTextArea(0, "<font size='20'><P align='center'>Event : "..event.."</P></font>", nil, 4, 370, 243, 40, 0x000001, 0x000001, 0.75, true) | |
65 | if Et == "10" then | |
66 | for name,player in pairs(tfm.get.room.playerList) do | |
67 | tfm.exec.killPlayer (name) | |
68 | tfm.exec.respawnPlayer (name) | |
69 | end | |
70 | ui.removeTextArea(2, nil) | |
71 | ET = 0 | |
72 | end | |
73 | end | |
74 | RandA() | |
75 | ||
76 | function eventLoop() | |
77 | s = s + 0.1 | |
78 | C = C + 0.1 | |
79 | P = P + 0.1 | |
80 | H = H + 0.1 | |
81 | N = N + 0.1 | |
82 | v = v + 1.0 | |
83 | Pa = Pa + 0.1 | |
84 | ||
85 | --if s == 0.1 then | |
86 | if event == "Saint-Valentin" then | |
87 | tfm.exec.displayParticle (30, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
88 | tfm.exec.displayParticle (31, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
89 | tfm.exec.displayParticle (5 , math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
90 | s = 0 | |
91 | end | |
92 | --end | |
93 | --if Pa == 0.1 then | |
94 | if event == "Pâques" then | |
95 | tfm.exec.displayParticle (34, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
96 | tfm.exec.displayParticle (33, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
97 | tfm.exec.displayParticle (32 , math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
98 | Pa = 0 | |
99 | end | |
100 | --end | |
101 | --if C == 0.1 then | |
102 | if event == "Carnaval" then | |
103 | tfm.exec.displayParticle (21, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
104 | tfm.exec.displayParticle (22, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
105 | tfm.exec.displayParticle (23, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
106 | tfm.exec.displayParticle (24, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
107 | C = 0 | |
108 | end | |
109 | --end | |
110 | --if P == 0.1 then | |
111 | if event == "Poisson d'avril" then | |
112 | tfm.exec.displayParticle (28, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
113 | tfm.exec.displayParticle (14, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
114 | tfm.exec.displayParticle (23, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
115 | tfm.exec.displayParticle (24, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
116 | P = 0 | |
117 | end | |
118 | --end | |
119 | --if H == 0.1 then | |
120 | if event == "Halloween" then | |
121 | tfm.exec.displayParticle (2, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
122 | H = 0 | |
123 | end | |
124 | --end | |
125 | --if N == 0.1 then | |
126 | if event == "Noël" then | |
127 | tfm.exec.snow(1, 10) | |
128 | tfm.exec.displayParticle (0, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
129 | tfm.exec.displayParticle (13, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
130 | tfm.exec.displayParticle (4, math.random(0,800),math.random(0,400), 1.0, 1.0, 1.0, 1.0, nil) | |
131 | N = 0 | |
132 | end | |
133 | --end | |
134 | if v == 2 then | |
135 | if event == "Halloween" then | |
136 | for name,player in pairs(tfm.get.room.playerList) do | |
137 | tfm.exec.setVampirePlayer (name) | |
138 | end | |
139 | end | |
140 | end | |
141 | end |