View difference between Paste ID: 12beY03Q and AsTmDzKV
SHOW: | | - or go back to the newest paste.
1
system.disableChatCommandDisplay("m", true)
2
system.disableChatCommandDisplay("clear", true)
3
tfm.exec.disableAutoNewGame(true)
4
tfm.exec.disableAutoShaman(true)
5
tfm.exec.newGame("@4459589")
6
version = "3.0"
7
tfm.exec.setUIMapName("<VP>eshOS "..version.." por Eshkation, Bugs/Feedback é aceito! <p")
8
-- Tables para o EventLoop
9
n = 0
10
hora = false
11
atualizar = false
12
efeitos = false
13
tempo = os.date("Hoje é %A, de %B")
14
messeger = {""}
15
msn = false
16
17
--
18
ui.addTextArea(700, "<B><R><a href='event:on'><font size='9'>O</a></B>", nil, 400, 293, 14, 14, 0, 0, 1.1);
19
--
20
21
COLOR = "<VP>"
22
bordColor = 0x2ECF73
23
24
function guiColor()
25
if COLOR == "<VI>" then
26
bordColor = 0xC53DFF
27
end
28
if COLOR == "<VP>" then
29
bordColor = 0x2ECF73
30
end
31
if COLOR == "<N>" then
32
bordColor = 0xC2C2DA
33
end
34
if COLOR == "<CH>" then
35
bordColor = 0x98E2EB
36
end
37
if COLOR == "<ROSE>" then
38
bordColor = 0xED67EA
39
end
40
if COLOR == "<J>" then 
41
bordColor = 0xFFFF00
42
end
43
if COLOR == "<R>" then 
44
bordColor = 0xCB546B
45
end
46
if COLOR == "<V>" then 
47
bordColor = 0x009D9D
48
end
49
end
50
51
52
function areaTrabalho()
53
ui.addTextArea(1, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>O que deseja fazer?</font>", nil, 179, 75, 455, 208, 1, 1, 0.3);
54
ui.addTextArea(2, "<a href='event:tfm'>TFM</a>", nil, 190, 150, 28, 20, 1, bordColor, 1.1);
55
ui.addTextArea(3, "<a href='event:atualizar'>ATU</a>", nil, 240, 150, 28, 20, 1, bordColor, 1.1);
56
ui.addTextArea(4, "<a href='event:hora'>DAT</a>", nil, 290, 150, 28, 20, 1, bordColor, 1.1);
57
ui.addTextArea(5, "<a href='event:cor'>COR</a>", nil, 340, 150, 30, 20, 1, bordColor, 1.1);
58
ui.addTextArea(6, "<a href='event:status'>STS</a>", nil, 390, 150, 30, 20, 1, bordColor, 1.1);
59
ui.addTextArea(7, "<a href='event:mp3'>MP3</a>", nil, 440, 150, 30, 20, 1, bordColor, 1.1);
60
ui.addTextArea(8, "<a href='event:efeitodetela'>TEL</a>", nil, 490, 150, 30, 20, 1, bordColor, 1.1);
61
ui.addTextArea(9, "<a href='event:msn'>MSN</a>", nil, 540, 150, 30, 20, 1, bordColor, 1.1);
62
ui.addTextArea(10, "<a href='event:help'>HLP</a>", nil, 590, 150, 30, 20, 1, bordColor, 1.1);
63
end
64
65
function removeText()
66
for i = 60, 1, -1 do
67
ui.removeTextArea(i)
68
end
69
end
70
71
function eventTextAreaCallback(textAreaId, playerName, callback)
72
if (callback=="on") then
73
ui.addTextArea(1, "<P align='center'>"..COLOR.."<b><font size='20'>eshOS</P></b><BR><font size='14'>O eshOS foi iniciado com sucesso!<BR>Atenção, tudo que for feito no computador será mostrado a todos os jogadores, caso queira jogar sozinho esvazie o seu cafofo.<BR><BR><a href='event:iniciar'>Iniciar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
74
ui.addTextArea(700, "<B><VP><a href='event:off'><font size='9'>O</a></B>", nil, 400, 293, 14, 14, 0, 0, 1.1);
75
end
76
77
if(callback=="off") then
78
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Deseja realmente sair?</font><BR><BR><BR><BR><font size='17'><a href='event:sim'>SIM</a>      <a href='event:iniciar'>NÃO</a>", nil, 179, 75, 455, 208, 1, 1, 1.1);
79
end
80
if(callback=="sim") then
81
for i = 600, 1, -1 do
82
ui.removeTextArea(i)
83
end
84
end
85
86
if (callback=="help") then
87
removeText()
88
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Entenda as siglas!</font><BR><BR><font size='10'><B>TFM</B> - Transformice<BR><B>ATU</B> - Cheque se há alguma nova atualização <BR><B>DAT</B> - Data e hora!<BR><B>COR</B> - Mude a cor da fonte/borda do eshOS!<BR><B>STS</B> - Veja seus status!<BR><B>MP3</B> - Sistema de pesquisa de musicas(alguns standalones não funcionam)<BR><B>TEL</B> - Modo de Descanço de tela!<BR><B>MSN</B> - Envie mensagens! use !m [texto] para enviar uma mensagem, e use o scroll do mouse para descer as mensagens.<BR><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
89
end
90
91
if (callback=="iniciar") then
92
areaTrabalho()
93
ui.removeTextArea(101)
94
ui.removeTextArea(102)
95
ui.removeTextArea(103)
96
efeitos = false
97
hora = false
98
msn = false
99
end
100
101
if (callback=="tfm") then
102
ui.addTextArea(101, "<P align='center'><font size='20'><b>eshOS - Fatal Error</B></P><font size='13'>Um erro foi encontrado enquanto tentava executar a operação TFM_ESHOS.EXE<BR>Caso o erro continue siga as intruções abaixo:<BR>1. Desinstale os ultimos programas que você instalou <BR>2. Cheque se seu computador têm memoria suficiente para executar a operação<BR>3. Reinicie seu computador<BR>Error 1: Out of memory.</font>", nil, 179, 75, 455, 208, 130, 130, 1);
103
removeText()
104
end
105
106
if (callback=="msn") then
107
removeText()
108
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Messeger!</font><BR><BR><p aling='left'><font size='10'>"..messeger[1].."<BR><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
109
110
msn = true
111
end
112
113
if (callback=="atualizar") then
114
atualizar = true
115
removeText()
116
end
117
118
if(callback=="hora")then
119
hora = true
120
removeText()
121
end
122
123
if(callback=="cor")then
124
removeText()
125
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>mude a cor do eshOS!</font><BR><BR><font size='10'><BR><VP><a href='event:corverde'>VERDE</a><BR><VI><a href='event:corRoxo'>ROXO</a><BR><N><a href='event:corbranca'>BRANCO</a><BR><CH><a href='event:corazul'>AZUL</a><BR><ROSE><a href='event:corrosa'>ROSA</a><BR><J><a href='event:coramarelo'>AMARELO</a><BR><R><a href='event:corvermelho'>VERMELHO</a><BR><V><a href='event:corazul2'>VERDE PISCINA</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
126
guiColor()
127
end
128
if(callback=="corverde")then
129
COLOR = "<VP>"
130
guiColor()
131
areaTrabalho()
132
ui.removeTextArea(101)
133
ui.removeTextArea(102)
134
end
135
if(callback=="corRoxo")then
136
COLOR = "<VI>"
137
guiColor()
138
areaTrabalho()
139
ui.removeTextArea(101)
140
ui.removeTextArea(102)
141
end
142
if(callback=="corbranca")then
143
COLOR = "<N>"
144
guiColor()
145
areaTrabalho()
146
ui.removeTextArea(101)
147
ui.removeTextArea(102)
148
end
149
if(callback=="corazul")then
150
COLOR = "<CH>"
151
guiColor()
152
areaTrabalho()
153
ui.removeTextArea(101)
154
ui.removeTextArea(102)
155
end
156
if(callback=="corrosa")then
157
COLOR = "<ROSE>"
158
guiColor()
159
areaTrabalho()
160
ui.removeTextArea(101)
161
ui.removeTextArea(102)
162
end
163
if(callback=="coramarelo")then
164
COLOR = "<J>"
165
guiColor()
166
areaTrabalho()
167
ui.removeTextArea(101)
168
ui.removeTextArea(102)
169
end
170
if(callback=="corvermelho")then
171
COLOR = "<R>"
172
guiColor()
173
areaTrabalho()
174
ui.removeTextArea(101)
175
ui.removeTextArea(102)
176
end
177
if(callback=="corazul2")then
178
COLOR = "<V>"
179
guiColor()
180
areaTrabalho()
181
ui.removeTextArea(101)
182
ui.removeTextArea(102)
183
end
184
185
if(callback=="status")then
186
removeText()
187
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Status do jogador</font><BR><BR><font size='10'><B>Nome:</B> "..playerName.."<BR><B>Tribo atual:</B> "..tfm.get.room.playerList[playerName].tribeName.."<BR><B>Link do perfil</B> : <A href='br.cheese.formice.com/mouse/"..playerName.."'>AQUI</a><BR><BR><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
188
end
189
if(callback=="mp3")then
190
removeText()
191
ui.addPopup(0, 2, "Digite o nome da musica aqui !", playerName, 303, 156, 200,20)
192
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Pesquise musica!</font> <BR><BR><BR><BR><BR><BR><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
193
end
194
if(callback=="efeitodetela")then
195
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Tela em Descanço!</font> <BR><BR><BR><BR><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
196
efeitos = true
197
removeText()
198
end
199
end
200
201
function eventPopupAnswer(popupId, playerName, answer)
202
if popupId == 0 then
203
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='15'>Pesquise musica!</font> <BR><BR><a href='beemp3s.org/index.php?q="..answer.."'>Inicie a pesquisa</a><BR><BR><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
204
end
205
end
206
207
function eventLoop()
208
209
if atualizar == true then
210
n = n+1
211
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Checando aualizações..</font><BR><BR><font size='17'>"..n.."%", nil, 179, 75, 455, 208, 1, 1, 0.3);
212
end
213
214
if n == 100 then
215
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>ATUALIZADO!</font><BR><BR><font size='15'><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
216
atualizar = false
217
n = 0
218
end
219
220
if hora == true then
221
tempo = os.date("Hoje é %A, de %B")
222
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Hora atual(Horario de Portugal)</font><BR><BR><font size='17'>"..tempo.."<BR><BR><font size='15'><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
223
end
224
225
if efeitos == true then
226
for i=20,1,-1 do
227
tfm.exec.displayParticle(math.random(0, 30), math.random(200,600), math.random(100,290),0,0,0,0,nil)
228
end
229
end
230
end
231
232
233
function eventChatCommand(playerName, message)
234
   if (message:sub(0,1) == [[m]]) then
235
      table.insert(messeger,1,messeger[1].."<b>["..playerName.."]</b> "..message:sub(3).."<BR>")
236
end
237
if msn == true then
238
ui.addTextArea(102, "<P align='center'>"..COLOR.."<font size='20'><b>eshOS</B></P><font size='13'>Messeger!</font><BR><BR><p aling='left'><font size='10'>"..messeger[1].."<BR><a href='event:iniciar'>Voltar</a>", nil, 179, 75, 455, 208, 1, 1, 0.3);
239
end
240
   if (message=="clear") then
241
   for i = 5000,1,-1 do
242
      table.remove(messeger,1)
243
	  table.insert(messeger,1,"")
244
end
245
end
246
end
247
248
guiColor()