quests.lua

main 1629 lines · 66.1 KB Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1local DRAGON_ID = 5791
2local DRAGON_POS_1 = Position(3958, 1357, 8)
3local DRAGON_POS_2 = Position(3968, 1347, 8)
4local SCAN_AREA_X = {x=3955, y=1344, z=8}
5local SCAN_AREA_Y = {x=3971, y=1361, z=8}
6
7local DG_TUMBA_ID = 0
8local COUNT_BASIN = 0
9local BASIN_01 = Position(4076, 1333, 8)
10local BASIN_02 = Position(4078, 1333, 8)
11local BASIN_03 = Position(4080, 1333, 8)
12local BASIN_04 = Position(4082, 1333, 8)
13local CATACLYSM_01 = Position(3359, 1172, 10)
14local CATACLYSM_02 = Position(3359, 1171, 10)
15local CATACLYSM_03 = Position(3359, 1170, 10)
16local CATACLYSM_04 = Position(3359, 1169, 10)
17local CATACLYSM_05 = Position(3359, 1168, 10)
18local TILE_TELEPORT = {
19 [10391] = {POS1 = {4076, 1354, 8}, POS2 = {4076, 1355, 8}};
20 [10392] = {POS1 = {4078, 1354, 8}, POS2 = {4078, 1355, 8}};
21 [10393] = {POS1 = {4080, 1354, 8}, POS2 = {4080, 1355, 8}};
22 [10394] = {POS1 = {4082, 1354, 8}, POS2 = {4082, 1355, 8}};
23 [10395] = {POS1 = {4084, 1354, 8}, POS2 = {4084, 1355, 8}};
24}
25local function SuperNinhoQuest(cid, step)
26 local creature = Player(cid)
27 if creature then
28 local SummPos = creature:getSummons()
29 local CHAT_TALK = {
30
31
32
33 [04] = {TALK = 'Sou o Ross.', SUM = 02, TIMER = 3000},
34 [05] = {TALK = 'Villauba.', SUM = 03, TIMER = 3000},
35 [06] = {TALK = 'Grr.', SUM = 01, TIMER = 3000},
36
37
38
39 [10] = {TALK = 'Vai ser moleza.', SUM = 02, TIMER = 3000},
40 [11] = {TALK = 'Fiquem sempre juntos e vamos ficar bem.', SUM = 02, TIMER = 4000},
41 [12] = {TALK = 'Entendido?', SUM = 02, TIMER = 3000},
42 [13] = {TALK = 'Vamos botar pra quebrar!', SUM = 01, TIMER = 3000},
43 [14] = {TALK = '', SUM = nil, TIMER = 0001},
44
45
46 [16] = {TALK = 'Muito bem, galera. Escuta.', SUM = 01, TIMER = 4000},
47 [17] = {TALK = 'Temos um parasita a solta aqui.', SUM = 01, TIMER = 4000},
48 [18] = {TALK = 'Precisamos ter bastante cuidado.', SUM = 01, TIMER = 4000},
49
50
51 [21] = {TALK = '', SUM = nil, TIMER = 0002},
52 }
53 if CHAT_TALK[step].SUM == nil then
54 if CHAT_TALK[step].TIMER == 01 then
55 Game.createMonster('Blood Beast', {x=3531, y=1777, z=09})
56 Game.createMonster('Blood Beast', {x=3526, y=1776, z=09})
57 Game.createMonster('Blood Beast', {x=3527, y=1784, z=09})
58 Game.createMonster('Blood Beast', {x=3527, y=1789, z=09})
59 Game.createMonster('Blood Beast', {x=3522, y=1788, z=09})
60 Game.createMonster('Blood Beast', {x=3516, y=1789, z=09})
61 Game.createMonster('Blood Beast', {x=3514, y=1786, z=09})
62 Game.createMonster('Blood Beast', {x=3511, y=1778, z=09})
63 Game.createMonster('Blood Beast', {x=3508, y=1780, z=09})
64 Game.createMonster('Blood Beast', {x=3521, y=1768, z=09})
65 Game.createMonster('Blood Beast', {x=3517, y=1767, z=09})
66 Game.createMonster('Blood Beast', {x=3501, y=1767, z=09})
67 Game.createMonster('Blood Beast', {x=3524, y=1763, z=09})
68 Game.createMonster('Blood Beast', {x=3508, y=1762, z=09})
69 Game.createMonster('Blood Beast', {x=3504, y=1764, z=09})
70 Game.createMonster('Blood Beast', {x=3524, y=1758, z=09})
71 Game.createMonster('Blood Beast', {x=3512, y=1760, z=09})
72 Game.createMonster('Blood Beast', {x=3508, y=1757, z=09}) --18
73
74 creature:teleportTo({x=3542, y=1764, z=09})
75 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
76
77 addEvent(function()
78
79 end, 3000)
80 return true
81 elseif CHAT_TALK[step].TIMER == 02 then
82 creature:teleportTo({x=3269, y=1962, z=14})
83 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
84 addEvent(function()
85 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Seu Quest Log foi atualizado.")
86 end, 3000)
87 return true
88 end
89 else
90 if #creature:getSummons() > 0 then
91 local timerDelay = CHAT_TALK[step].TIMER
92 SummPos[CHAT_TALK[step].SUM]:say(CHAT_TALK[step].TALK, TALKTYPE_SAY)
93 step = step + 01
94
95 addEvent(function() SuperNinhoQuest(creature.uid, step) end, timerDelay)
96 end
97 end
98 end
99end
100local function checkBoss(centerPosition, rangeX, rangeY, bossName)
101 local spectators, spec = Game.getSpectators(centerPosition, false, false, rangeX, rangeX, rangeY, rangeY)
102 for i = 1, #spectators do
103 spec = spectators[i]
104 if spec:isMonster() then
105 if spec:getName() == bossName then
106 return true
107 end
108 end
109 end
110 return false
111end
112function onStepIn(creature, item, position, fromPosition)
113 if item.uid == 10370 then
114 if creature:isMonster() then
115 local tile = Tile(3849, 974, 8)
116 local creature = tile:getTopCreature()
117 if creature and creature:isPlayer() then
118 creature:teleportTo({x=3834, y=959, z=08})
119 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
120 end
121 end
122
123 item:transform(item.itemid - 1)
124 elseif item.uid == 10371 then
125 if creature:isPlayer() then
126 if creature:getStorageValue(_QUESTLOG[15].UID_01) < 100 then
127 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) < 01 then
128 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 01)
129 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 02 then
130 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 03)
131 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 04 then
132 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 05)
133 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 06 then
134 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 07)
135 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 08 then
136 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
137 creature:teleportTo({x=3906, y=972, z=08})
138 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
139 else
140 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
141 end
142 end
143 end
144 elseif item.uid == 10372 then
145 if creature:isPlayer() then
146 if creature:getStorageValue(_QUESTLOG[15].UID_01) < 100 then
147 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 01 then
148 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
149 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 07 then
150 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 08)
151 else
152 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
153 end
154 end
155 end
156 elseif item.uid == 10373 then
157 if creature:isPlayer() then
158 if creature:getStorageValue(_QUESTLOG[15].UID_01) < 100 then
159 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 03 then
160 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 04)
161 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 05 then
162 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 06)
163 else
164 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
165 end
166 end
167 end
168 elseif item.uid == 10374 then
169 if creature:isPlayer() then
170 if creature:getStorageValue(_SYSTEM.ESPECIALISTA[02]) < 06 then
171 if creature:getStorageValue(_SYSTEM.ESPECIALISTA[03]) == 03 then
172
173 creature:setStorageValue(_SYSTEM.ESPECIALISTA[02], (creature:getStorageValue(_SYSTEM.ESPECIALISTA[02]) + 1))
174 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
175 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
176 creature:sendCancelMessage("@NoTeleport 00")
177
178 if creature:getStorageValue(_QUESTLOG[160].UID_01) == 02 then
179 addEvent(function()
180 creature:setStorageValue(_QUESTLOG[160].UID_01, 100)
181 creature:setStorageValue(_QUESTLOG[161].UID_01, 01)
182 creature:getPosition():sendMagicEffect(14)
183 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Seu Quest Log foi atualizado.")
184
185 creature:addExperience(250000, true, true)
186 doBackpack(creature, 12)
187 end, 3000)
188 end
189 end
190 end
191 end
192 elseif item.uid == 10375 then
193 if creature:isPlayer() then
194 if creature:getStorageValue(_SYSTEM.ESPECIALISTA[02]) < 06 then
195 if creature:getStorageValue(_SYSTEM.ESPECIALISTA[03]) == 05 then
196 local ITEM_01 = 3224 local ITEM_02 = 3225 local ITEM_03 = 3229
197
198 doBackpack(creature, 03, 03, 00, 01, ITEM_01)
199 local QNT_BAG_01 = doBackpack(creature, 04)
200 local POS_BAG_01 = doBackpack(creature, 05)
201 local EXT_BAG_01 = doBackpack(creature, 06)
202
203 doBackpack(creature, 03, 03, 00, 01, ITEM_02)
204 local QNT_BAG_02 = doBackpack(creature, 04)
205 local POS_BAG_02 = doBackpack(creature, 05)
206 local EXT_BAG_02 = doBackpack(creature, 06)
207
208 doBackpack(creature, 03, 03, 00, 01, ITEM_03)
209 local QNT_BAG_03 = doBackpack(creature, 04)
210 local POS_BAG_03 = doBackpack(creature, 05)
211 local EXT_BAG_03 = doBackpack(creature, 06)
212
213 if QNT_BAG_01 >= 01 and QNT_BAG_02 >= 01 and QNT_BAG_03 >= 01 then
214 if QNT_BAG_01 > 01 then
215 creature:setStorageValue(_BACKPACK[03][EXT_BAG_01][POS_BAG_01].UID_04, (QNT_BAG_01 - 01))
216 else
217 doBackpack(creature, 02, 03, EXT_BAG_01, POS_BAG_01)
218 end
219 if QNT_BAG_02 > 01 then
220 creature:setStorageValue(_BACKPACK[03][EXT_BAG_02][POS_BAG_02].UID_04, (QNT_BAG_02 - 01))
221 else
222 doBackpack(creature, 02, 03, EXT_BAG_02, POS_BAG_02)
223 end
224 if QNT_BAG_03 > 01 then
225 creature:setStorageValue(_BACKPACK[03][EXT_BAG_03][POS_BAG_03].UID_04, (QNT_BAG_03 - 01))
226 else
227 doBackpack(creature, 02, 03, EXT_BAG_03, POS_BAG_03)
228 end
229
230
231 creature:setStorageValue(_SYSTEM.ESPECIALISTA[02], (creature:getStorageValue(_SYSTEM.ESPECIALISTA[02]) + 1))
232 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
233 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
234
235 doBackpack(creature, 00, 03, 00, 01)
236 creature:teleportTo({x=3281, y=1632, z=7})
237 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
238 creature:sendCancelMessage("@NoTeleport 00")
239
240 if creature:getStorageValue(_QUESTLOG[162].UID_01) == 02 then
241 addEvent(function()
242 creature:setStorageValue(_QUESTLOG[162].UID_01, 100)
243 creature:getPosition():sendMagicEffect(14)
244 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Seu Quest Log foi atualizado.")
245
246 creature:addExperience(350000, true, true)
247 doBackpack(creature, 12)
248 end, 3000)
249 end
250 else
251 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Obtenha dos monstros:\n\n[ 1x Dangerous Proto Matter ]\n[ 1x Instable Proto Matter ]\n[ 1x Volatile Proto Matter ]")
252 creature:teleportTo(fromPosition)
253 creature:getPosition():sendMagicEffect(03)
254 end
255 else
256 creature:teleportTo(fromPosition)
257 creature:getPosition():sendMagicEffect(03)
258 end
259 else
260 creature:teleportTo({x=3281, y=1632, z=7})
261 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
262 creature:sendCancelMessage("@NoTeleport 00")
263 end
264 end
265 elseif item.uid == 10376 then
266 if creature:isPlayer() then
267 if creature:getStorageValue(_SYSTEM.ESPECIALISTA[02]) < 06 then
268 if creature:getStorageValue(_SYSTEM.ESPECIALISTA[03]) == 05 then
269 local BossPosition = Position(3355, 1029, 05)
270 if checkBoss(BossPosition, 10, 10, "Zulazza The Corruptor") then
271 return true
272 end
273 Game.createMonster("Zulazza The Corruptor", {x=3355, y=1029, z=5})
274 end
275 end
276 end
277 elseif item.uid == 10377 then
278 if creature:isPlayer() then
279 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
280 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
281 creature:sendCancelMessage("@NoTeleport 00")
282 end
283 elseif item.uid == 10378 then
284 if creature:isPlayer() then
285 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
286 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
287 creature:sendCancelMessage("@NoTeleport 00")
288 end
289 elseif item.uid == 10379 then
290 if creature:isPlayer() then
291 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
292 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
293 creature:sendCancelMessage("@NoTeleport 00")
294 end
295 elseif item.uid == 10380 then
296 if creature:isPlayer() then
297 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
298 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
299 creature:sendCancelMessage("@NoTeleport 00")
300 end
301 elseif item.uid == 10381 then
302 if creature:isPlayer() then
303 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
304 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
305 creature:sendCancelMessage("@NoTeleport 00")
306 end
307 elseif item.uid == 10382 then
308 if creature:isPlayer() then
309 creature:setStorageValue(_SYSTEM.ESPECIALISTA[03], nil)
310 creature:setStorageValue(_SYSTEM.ESPECIALISTA[04], nil)
311 creature:sendCancelMessage("@NoTeleport 00")
312 end
313 elseif item.uid == 10383 then
314 if creature:isPlayer() then
315 if creature:getStorageValue(_SYSTEM.DANGEROUS[05][02].STORAGE) == 02 then
316 local from = SCAN_AREA_X
317 local to = SCAN_AREA_Y
318 local countPlayer = 00
319 for A = from.x, to.x do
320 for B = from.y, to.y do
321 for C = from.z, to.z do
322 local tile = Tile(A, B, C)
323 if tile ~= nil then
324 local creature = tile:getTopCreature()
325 local DragonThing = tile:getItemById(DRAGON_ID)
326 if DragonThing then
327 DragonThing:remove()
328 end
329 if creature and creature:isPlayer() then
330 countPlayer = 01
331 end
332 end
333 end
334 end
335 end
336
337 if countPlayer == 00 then
338 DRAGON_POS_1 = Position(3958, 1357, 8)
339 DRAGON_POS_2 = Position(3968, 1347, 8)
340
341 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
342 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
343 end
344 end
345
346 creature:sendCancelMessage("@@TutorShow 31")
347 creature:teleportTo({x=3959, y=1352, z=8})
348 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
349 end
350 elseif item.uid == 10384 then
351 if creature:isPlayer() then
352 local party = creature:getParty()
353 local DragonThing = Tile(DRAGON_POS_1):getItemById(DRAGON_ID)
354 if DragonThing then
355 creature:getPosition():sendMagicEffect(13)
356 if creature:getDirection() == 00 then
357 DragonThing:remove()
358 DRAGON_POS_1:sendMagicEffect(CONST_ME_POFF)
359 DRAGON_POS_1 = Position(DRAGON_POS_1.x, DRAGON_POS_1.y - 1, DRAGON_POS_1.z)
360 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
361 elseif creature:getDirection() == 01 then
362 DragonThing:remove()
363 DRAGON_POS_1:sendMagicEffect(CONST_ME_POFF)
364 DRAGON_POS_1 = Position(DRAGON_POS_1.x + 1, DRAGON_POS_1.y, DRAGON_POS_1.z)
365 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
366 elseif creature:getDirection() == 02 then
367 DragonThing:remove()
368 DRAGON_POS_1:sendMagicEffect(CONST_ME_POFF)
369 DRAGON_POS_1 = Position(DRAGON_POS_1.x, DRAGON_POS_1.y + 1, DRAGON_POS_1.z)
370 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
371 elseif creature:getDirection() == 03 then
372 DragonThing:remove()
373 DRAGON_POS_1:sendMagicEffect(CONST_ME_POFF)
374 DRAGON_POS_1 = Position(DRAGON_POS_1.x - 1, DRAGON_POS_1.y, DRAGON_POS_1.z)
375 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
376 end
377 end
378
379 local FloorThing = Tile(DRAGON_POS_1):getItemById(18008)
380 if not FloorThing then
381 onResetDragons(01)
382 DRAGON_POS_1 = Position(3958, 1357, 8)
383 DRAGON_POS_2 = Position(3968, 1347, 8)
384
385 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
386 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
387 end
388 if DRAGON_POS_1.x == 3968 and DRAGON_POS_1.y == 1356 and DRAGON_POS_1.z == 8 then
389 local DragonThing = Tile(DRAGON_POS_1):getItemById(DRAGON_ID)
390 if DragonThing then
391 DragonThing:remove()
392 DRAGON_POS_1:sendMagicEffect(29)
393
394 if onResetDragons(03) == false then
395 if not party then
396 creature:setStorageValue(_SYSTEM.DANGEROUS[05][02].STORAGE, 03)
397 creature:setStorageValue(_SYSTEM.DANGEROUS[05][02].RECOMPENSA[01], _SYSTEM.DANGEROUS[05][02].RECOMPENSA[02])
398 creature:teleportTo({x=3943, y=1340, z=8})
399 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
400 else
401 local members = party:getMembers()
402 members[#members + 1] = party:getLeader()
403 for _, member in ipairs(members) do
404 member:setStorageValue(_SYSTEM.DANGEROUS[05][02].STORAGE, 03)
405 member:setStorageValue(_SYSTEM.DANGEROUS[05][02].RECOMPENSA[01], _SYSTEM.DANGEROUS[05][02].RECOMPENSA[02])
406 member:teleportTo({x=3943, y=1340, z=8})
407 member:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
408 end
409 end
410 return true
411 else
412 if DRAGON_POS_2.x == 3958 and DRAGON_POS_2.y == 1348 and DRAGON_POS_2.z == 8 then
413 return true
414 else
415 onResetDragons(01)
416 DRAGON_POS_1 = Position(3958, 1357, 8)
417 DRAGON_POS_2 = Position(3968, 1347, 8)
418
419 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
420 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
421 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Os dois Dragons precisam encontrar a chama ao mesmo tempo.")
422 end
423 end
424 end
425 end
426 end
427 elseif item.uid == 10385 then
428 if creature:isPlayer() then
429 local party = creature:getParty()
430 local DragonThing = Tile(DRAGON_POS_2):getItemById(DRAGON_ID)
431 if DragonThing then
432 creature:getPosition():sendMagicEffect(13)
433 if creature:getDirection() == 00 then
434 DragonThing:remove()
435 DRAGON_POS_2:sendMagicEffect(CONST_ME_POFF)
436 DRAGON_POS_2 = Position(DRAGON_POS_2.x, DRAGON_POS_2.y - 1, DRAGON_POS_2.z)
437 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
438 elseif creature:getDirection() == 01 then
439 DragonThing:remove()
440 DRAGON_POS_2:sendMagicEffect(CONST_ME_POFF)
441 DRAGON_POS_2 = Position(DRAGON_POS_2.x + 1, DRAGON_POS_2.y, DRAGON_POS_2.z)
442 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
443 elseif creature:getDirection() == 02 then
444 DragonThing:remove()
445 DRAGON_POS_2:sendMagicEffect(CONST_ME_POFF)
446 DRAGON_POS_2 = Position(DRAGON_POS_2.x, DRAGON_POS_2.y + 1, DRAGON_POS_2.z)
447 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
448 elseif creature:getDirection() == 03 then
449 DragonThing:remove()
450 DRAGON_POS_2:sendMagicEffect(CONST_ME_POFF)
451 DRAGON_POS_2 = Position(DRAGON_POS_2.x - 1, DRAGON_POS_2.y, DRAGON_POS_2.z)
452 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
453 end
454 end
455
456 local FloorThing = Tile(DRAGON_POS_2):getItemById(18008)
457 if not FloorThing then
458 onResetDragons(01)
459 DRAGON_POS_1 = Position(3958, 1357, 8)
460 DRAGON_POS_2 = Position(3968, 1347, 8)
461
462 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
463 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
464 end
465 if onResetDragons(02) then
466 if DRAGON_POS_2.x == 3958 and DRAGON_POS_2.y == 1347 and DRAGON_POS_2.z == 8 then
467 local DragonThing = Tile(DRAGON_POS_2):getItemById(DRAGON_ID)
468 if DragonThing then
469 DragonThing:remove()
470 DRAGON_POS_2:sendMagicEffect(29)
471
472 if onResetDragons(02) == false then
473 if not party then
474 creature:setStorageValue(_SYSTEM.DANGEROUS[05][02].STORAGE, 03)
475 creature:setStorageValue(_SYSTEM.DANGEROUS[05][02].RECOMPENSA[01], _SYSTEM.DANGEROUS[05][02].RECOMPENSA[02])
476 creature:teleportTo({x=3943, y=1340, z=8})
477 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
478 else
479 local members = party:getMembers()
480 members[#members + 1] = party:getLeader()
481 for _, member in ipairs(members) do
482 member:setStorageValue(_SYSTEM.DANGEROUS[05][02].STORAGE, 03)
483 member:setStorageValue(_SYSTEM.DANGEROUS[05][02].RECOMPENSA[01], _SYSTEM.DANGEROUS[05][02].RECOMPENSA[02])
484 member:teleportTo({x=3943, y=1340, z=8})
485 member:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
486 end
487 end
488 return true
489 else
490 if DRAGON_POS_1.x == 3968 and DRAGON_POS_1.y == 1357 and DRAGON_POS_1.z == 8 then
491 return true
492 else
493 onResetDragons(01)
494 DRAGON_POS_1 = Position(3958, 1357, 8)
495 DRAGON_POS_2 = Position(3968, 1347, 8)
496
497 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
498 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
499 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Os dois Dragons precisam encontrar a chama ao mesmo tempo.")
500 end
501 end
502 end
503 end
504 else
505 if DRAGON_POS_2.x == 3958 and DRAGON_POS_2.y == 1347 and DRAGON_POS_2.z == 8 then
506 local DragonThing = Tile(DRAGON_POS_2):getItemById(DRAGON_ID)
507 if DragonThing then
508 DragonThing:remove()
509 DRAGON_POS_2:sendMagicEffect(29)
510
511 if not party then
512 creature:setStorageValue(_SYSTEM.DANGEROUS[05][02].STORAGE, 03)
513 creature:setStorageValue(_SYSTEM.DANGEROUS[05][02].RECOMPENSA[01], _SYSTEM.DANGEROUS[05][02].RECOMPENSA[02])
514 creature:teleportTo({x=3943, y=1340, z=8})
515 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
516 else
517 local members = party:getMembers()
518 members[#members + 1] = party:getLeader()
519 for _, member in ipairs(members) do
520 member:setStorageValue(_SYSTEM.DANGEROUS[05][02].STORAGE, 03)
521 member:setStorageValue(_SYSTEM.DANGEROUS[05][02].RECOMPENSA[01], _SYSTEM.DANGEROUS[05][02].RECOMPENSA[02])
522 member:teleportTo({x=3943, y=1340, z=8})
523 member:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
524 end
525 end
526 end
527 return true
528 else
529 onResetDragons(01)
530 DRAGON_POS_1 = Position(3958, 1357, 8)
531 DRAGON_POS_2 = Position(3968, 1347, 8)
532
533 Game.createItem(DRAGON_ID, 1, DRAGON_POS_1)
534 Game.createItem(DRAGON_ID, 1, DRAGON_POS_2)
535 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Os dois Dragons precisam encontrar a chama ao mesmo tempo.")
536 end
537 end
538 end
539 elseif item.uid == 10386 then
540 if creature:isPlayer() then
541 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 01 then
542 COUNT_BASIN = 00
543 local Tile_1 = Tile(BASIN_01):getItemById(2604)
544 local Tile_2 = Tile(BASIN_02):getItemById(2604)
545 local Tile_3 = Tile(BASIN_03):getItemById(2604)
546 local Tile_4 = Tile(BASIN_04):getItemById(2604)
547 if Tile_1 then COUNT_BASIN = COUNT_BASIN + 01 end
548 if Tile_2 then COUNT_BASIN = COUNT_BASIN + 01 end
549 if Tile_3 then COUNT_BASIN = COUNT_BASIN + 01 end
550 if Tile_4 then COUNT_BASIN = COUNT_BASIN + 01 end
551
552 if COUNT_BASIN == 01 then
553 local party = creature:getParty()
554 if not party then
555 if creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
556 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
557 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
558 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
559 else
560 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
561 end
562
563 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
564 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
565 creature:getPosition():sendMagicEffect(13)
566 else
567 local members = party:getMembers()
568 members[#members + 1] = party:getLeader()
569 for _, member in ipairs(members) do
570 if member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
571 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
572 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
573 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
574 else
575 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
576 end
577
578 member:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
579 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
580 member:getPosition():sendMagicEffect(13)
581 end
582 end
583 creature:teleportTo({x=4098, y=1359, z=8})
584 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
585 else
586 creature:teleportTo({x=4079, y=1342, z=8})
587 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
588 end
589 else
590 creature:teleportTo({x=4098, y=1359, z=8})
591 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
592 end
593 end
594 elseif item.uid == 10387 then
595 if creature:isPlayer() then
596 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 01 then
597 COUNT_BASIN = 00
598 local Tile_1 = Tile(BASIN_01):getItemById(2604)
599 local Tile_2 = Tile(BASIN_02):getItemById(2604)
600 local Tile_3 = Tile(BASIN_03):getItemById(2604)
601 local Tile_4 = Tile(BASIN_04):getItemById(2604)
602 if Tile_1 then COUNT_BASIN = COUNT_BASIN + 01 end
603 if Tile_2 then COUNT_BASIN = COUNT_BASIN + 01 end
604 if Tile_3 then COUNT_BASIN = COUNT_BASIN + 01 end
605 if Tile_4 then COUNT_BASIN = COUNT_BASIN + 01 end
606 if COUNT_BASIN == 02 then
607 local party = creature:getParty()
608 if not party then
609 if creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
610 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
611 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
612 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
613 else
614 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
615 end
616
617 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
618 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
619 creature:getPosition():sendMagicEffect(13)
620 else
621 local members = party:getMembers()
622 members[#members + 1] = party:getLeader()
623 for _, member in ipairs(members) do
624 if member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
625 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
626 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
627 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
628 else
629 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
630 end
631
632 member:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
633 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
634 member:getPosition():sendMagicEffect(13)
635 end
636 end
637 creature:teleportTo({x=4098, y=1359, z=8})
638 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
639 else
640 creature:teleportTo({x=4079, y=1342, z=8})
641 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
642 end
643 else
644 creature:teleportTo({x=4098, y=1359, z=8})
645 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
646 end
647 end
648 elseif item.uid == 10388 then
649 if creature:isPlayer() then
650 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 01 then
651 COUNT_BASIN = 00
652 local Tile_1 = Tile(BASIN_01):getItemById(2604)
653 local Tile_2 = Tile(BASIN_02):getItemById(2604)
654 local Tile_3 = Tile(BASIN_03):getItemById(2604)
655 local Tile_4 = Tile(BASIN_04):getItemById(2604)
656 if Tile_1 then COUNT_BASIN = COUNT_BASIN + 01 end
657 if Tile_2 then COUNT_BASIN = COUNT_BASIN + 01 end
658 if Tile_3 then COUNT_BASIN = COUNT_BASIN + 01 end
659 if Tile_4 then COUNT_BASIN = COUNT_BASIN + 01 end
660 if COUNT_BASIN == 03 then
661 local party = creature:getParty()
662 if not party then
663 if creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
664 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
665 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
666 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
667 else
668 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
669 end
670
671 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
672 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
673 creature:getPosition():sendMagicEffect(13)
674 else
675 local members = party:getMembers()
676 members[#members + 1] = party:getLeader()
677 for _, member in ipairs(members) do
678 if member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
679 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
680 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
681 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
682 else
683 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
684 end
685
686 member:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
687 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
688 member:getPosition():sendMagicEffect(13)
689 end
690 end
691 creature:teleportTo({x=4098, y=1359, z=8})
692 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
693 else
694 creature:teleportTo({x=4079, y=1342, z=8})
695 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
696 end
697 else
698 creature:teleportTo({x=4098, y=1359, z=8})
699 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
700 end
701 end
702 elseif item.uid == 10389 then
703 if creature:isPlayer() then
704 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 01 then
705 COUNT_BASIN = 00
706 local Tile_1 = Tile(BASIN_01):getItemById(2604)
707 local Tile_2 = Tile(BASIN_02):getItemById(2604)
708 local Tile_3 = Tile(BASIN_03):getItemById(2604)
709 local Tile_4 = Tile(BASIN_04):getItemById(2604)
710 if Tile_1 then COUNT_BASIN = COUNT_BASIN + 01 end
711 if Tile_2 then COUNT_BASIN = COUNT_BASIN + 01 end
712 if Tile_3 then COUNT_BASIN = COUNT_BASIN + 01 end
713 if Tile_4 then COUNT_BASIN = COUNT_BASIN + 01 end
714 if COUNT_BASIN == 03 then
715 local party = creature:getParty()
716 if not party then
717 if creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
718 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
719 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
720 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
721 else
722 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
723 end
724
725 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
726 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
727 creature:getPosition():sendMagicEffect(13)
728 else
729 local members = party:getMembers()
730 members[#members + 1] = party:getLeader()
731 for _, member in ipairs(members) do
732 if member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
733 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Encontre a sala de recompensas.")
734 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, 05)
735 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[06][01].RECOMPENSA[02])
736 else
737 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
738 end
739
740 member:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
741 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
742 member:getPosition():sendMagicEffect(13)
743 end
744 end
745 creature:teleportTo({x=4098, y=1359, z=8})
746 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
747 end
748 else
749 creature:teleportTo({x=4098, y=1359, z=8})
750 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
751 end
752 end
753 elseif item.uid == 10390 then
754 if creature:isPlayer() then
755 if creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) < 07 then
756 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) < 01 then
757 local party = creature:getParty()
758 if not party then
759 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 01)
760 else
761 local members = party:getMembers()
762 members[#members + 1] = party:getLeader()
763 for _, member in ipairs(members) do
764 member:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 01)
765 end
766 end
767
768 onRandomBasin()
769 end
770 end
771 end
772 elseif item.uid == 10396 then
773 if creature:isPlayer() then
774 if creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) >= 06 then
775 creature:teleportTo({x=4122, y=1348, z=8})
776 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
777 else
778 creature:teleportTo({x=4098, y=1359, z=8})
779 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
780 end
781 end
782 elseif item.uid == 10397 then
783 if creature:isPlayer() then
784 if creature:getStorageValue(_SYSTEM.DANGEROUS[05][01].STORAGE) < 02 then
785 creature:sendCancelMessage("@@TutorShow 27")
786 end
787 end
788 elseif item.uid == 10398 then
789 if creature:isPlayer() then
790 local from = {x=3379, y=1178, z=10}
791 local to = {x=3384, y=1183, z=10}
792 local checkPerson = 00
793 for A = from.x, to.x do
794 for B = from.y, to.y do
795 for C = from.z, to.z do
796 local tile = Tile(A, B, C)
797 if tile ~= nil then
798 local creature = tile:getTopCreature()
799 if creature and creature:isPlayer() then
800 checkPerson = 01
801 break
802 end
803 end
804 end
805 end
806 end
807
808 if checkPerson == 01 then
809 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Sala ocupada por outra pessoa.")
810 else
811 creature:teleportTo({x=3381, y=1180, z=10})
812 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
813 end
814 end
815 elseif item.uid == 10399 then
816 if creature:isPlayer() then
817 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 05 then
818 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 06)
819 creature:teleportTo({x=3381, y=1180, z=10})
820 creature:getPosition():sendMagicEffect(14)
821 else
822 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
823 creature:teleportTo({x=3377, y=1168, z=10})
824 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
825 end
826 end
827 elseif item.uid == 11001 then
828 if creature:isPlayer() then
829 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 02 then
830 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 03)
831 creature:teleportTo({x=3381, y=1180, z=10})
832 creature:getPosition():sendMagicEffect(14)
833 else
834 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
835 creature:teleportTo({x=3377, y=1168, z=10})
836 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
837 end
838 end
839 elseif item.uid == 11002 then
840 if creature:isPlayer() then
841 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
842 creature:teleportTo({x=3377, y=1168, z=10})
843 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
844 end
845 elseif item.uid == 11003 then
846 if creature:isPlayer() then
847 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 04 then
848 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 05)
849 creature:teleportTo({x=3381, y=1180, z=10})
850 creature:getPosition():sendMagicEffect(14)
851 else
852 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
853 creature:teleportTo({x=3377, y=1168, z=10})
854 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
855 end
856 end
857 elseif item.uid == 11004 then
858 if creature:isPlayer() then
859 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
860 creature:teleportTo({x=3377, y=1168, z=10})
861 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
862 end
863 elseif item.uid == 11005 then
864 if creature:isPlayer() then
865 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 06 then
866 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
867 creature:teleportTo({x=3369, y=1180, z=11})
868 creature:getPosition():sendMagicEffect(14)
869
870 local Choose = 2605
871 local Tile_1 = Tile(CATACLYSM_01):getItemById(2605)
872 Choose = math.random(2604, 2605)
873 if Tile_1 then
874 Tile_1:transform(Choose)
875 else
876 Tile_1 = Tile(CATACLYSM_01):getItemById(2604)
877 Tile_1:transform(Choose)
878 end
879 CATACLYSM_01:sendMagicEffect(13)
880
881 local Tile_2 = Tile(CATACLYSM_02):getItemById(2605)
882 Choose = math.random(2604, 2605)
883 if Tile_2 then
884 Tile_2:transform(Choose)
885 else
886 Tile_2 = Tile(CATACLYSM_02):getItemById(2604)
887 Tile_2:transform(Choose)
888 end
889 CATACLYSM_02:sendMagicEffect(13)
890
891 local Tile_3 = Tile(CATACLYSM_03):getItemById(2605)
892 Choose = math.random(2604, 2605)
893 if Tile_3 then
894 Tile_3:transform(Choose)
895 else
896 Tile_3 = Tile(CATACLYSM_03):getItemById(2604)
897 Tile_3:transform(Choose)
898 end
899 CATACLYSM_03:sendMagicEffect(13)
900
901 local Tile_4 = Tile(CATACLYSM_04):getItemById(2605)
902 Choose = math.random(2604, 2605)
903 if Tile_4 then
904 Tile_4:transform(Choose)
905 else
906 Tile_4 = Tile(CATACLYSM_04):getItemById(2604)
907 Tile_4:transform(Choose)
908 end
909 CATACLYSM_04:sendMagicEffect(13)
910
911 local Tile_5 = Tile(CATACLYSM_05):getItemById(2605)
912 Choose = math.random(2604, 2605)
913 if Tile_5 then
914 Tile_5:transform(Choose)
915 else
916 Tile_5 = Tile(CATACLYSM_05):getItemById(2604)
917 Tile_5:transform(Choose)
918 end
919 CATACLYSM_05:sendMagicEffect(13)
920 else
921 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
922 creature:teleportTo({x=3377, y=1168, z=10})
923 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
924 end
925 end
926 elseif item.uid == 11006 then
927 if creature:isPlayer() then
928 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 03 then
929 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 04)
930 creature:teleportTo({x=3381, y=1180, z=10})
931 creature:getPosition():sendMagicEffect(14)
932 else
933 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
934 creature:teleportTo({x=3377, y=1168, z=10})
935 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
936 end
937 end
938 elseif item.uid == 11007 then
939 if creature:isPlayer() then
940 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) < 01 then
941 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
942 creature:teleportTo({x=3381, y=1180, z=10})
943 creature:getPosition():sendMagicEffect(14)
944 else
945 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
946 creature:teleportTo({x=3377, y=1168, z=10})
947 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
948 end
949 end
950 elseif item.uid == 11008 then
951 if creature:isPlayer() then
952 local CoalBasin = Tile(CATACLYSM_01):getItemById(2604)
953 if CoalBasin then
954 creature:teleportTo({x=3381, y=1207, z=09})
955 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
956 end
957 end
958 elseif item.uid == 11009 then
959 if creature:isPlayer() then
960 local CoalBasin = Tile(CATACLYSM_02):getItemById(2604)
961 if CoalBasin then
962 creature:teleportTo({x=3381, y=1207, z=09})
963 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
964 end
965 end
966 elseif item.uid == 11010 then
967 if creature:isPlayer() then
968 local CoalBasin = Tile(CATACLYSM_03):getItemById(2604)
969 if CoalBasin then
970 creature:teleportTo({x=3381, y=1207, z=09})
971 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
972 end
973 end
974 elseif item.uid == 11011 then
975 if creature:isPlayer() then
976 local CoalBasin = Tile(CATACLYSM_04):getItemById(2604)
977 if CoalBasin then
978 creature:teleportTo({x=3381, y=1207, z=09})
979 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
980 end
981 end
982 elseif item.uid == 11012 then
983 if creature:isPlayer() then
984 local CoalBasin = Tile(CATACLYSM_05):getItemById(2604)
985 if CoalBasin then
986 creature:teleportTo({x=3381, y=1207, z=09})
987 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
988 end
989 end
990 elseif item.uid == 11013 then
991 if creature:isPlayer() then
992 if creature:getStorageValue(_QUESTLOG[42].Value[01]) == 06 or creature:getStorageValue(_QUESTLOG[42].UID_01) == 100 then
993 creature:teleportTo({x=3263, y=1094, z=10})
994 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
995 else
996 creature:teleportTo(fromPosition)
997 creature:getPosition():sendMagicEffect(03)
998 end
999 end
1000 elseif item.uid == 11014 then
1001 if creature:isPlayer() then
1002 if creature:getDirection() == 00 then
1003 if creature:getStorageValue(_QUESTLOG[03].UID_01) == 02 then
1004 creature:sendCancelMessage("@TutorShow 07")
1005 end
1006 end
1007 end
1008 elseif item.uid == 11015 then
1009 if creature:isPlayer() then
1010 creature:setStorageValue(_SYSTEM.GLOBAL_INDEX[01], nil)
1011 creature:teleportTo({x=3688, y=1036, z=04})
1012 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1013 end
1014 elseif item.uid == 11016 then
1015 if creature:isPlayer() then
1016 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_01, nil)
1017 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_02, nil)
1018 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_03, nil)
1019 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_04, nil)
1020 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_05, nil)
1021 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_06, nil)
1022 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_07, nil)
1023 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_08, nil)
1024 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_09, nil)
1025 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_10, nil)
1026 creature:setTown(Town(15))
1027
1028 doInventario(creature, 00, 04, 00)
1029 creature:sendCancelMessage("@StarCliente")
1030 end
1031 elseif item.uid == 11017 then
1032 if creature:isPlayer() then
1033 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1034 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 01 then
1035 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02)
1036 else
1037 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1038 creature:getPosition():sendMagicEffect(14)
1039 end
1040 end
1041 end
1042 elseif item.uid == 11018 then
1043 if creature:isPlayer() then
1044 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1045 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 02 then
1046 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 03)
1047 else
1048 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1049 creature:getPosition():sendMagicEffect(14)
1050 end
1051 end
1052 end
1053 elseif item.uid == 11019 then
1054 if creature:isPlayer() then
1055 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1056 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 03 then
1057 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 04)
1058 else
1059 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1060 creature:getPosition():sendMagicEffect(14)
1061 end
1062 end
1063 end
1064 elseif item.uid == 11020 then
1065 if creature:isPlayer() then
1066 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1067 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 04 then
1068 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 05)
1069 else
1070 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1071 creature:getPosition():sendMagicEffect(14)
1072 end
1073 end
1074 end
1075 elseif item.uid == 11021 then
1076 if creature:isPlayer() then
1077 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1078 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 05 then
1079 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 06)
1080 else
1081 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1082 creature:getPosition():sendMagicEffect(14)
1083 end
1084 end
1085 end
1086 elseif item.uid == 11022 then
1087 if creature:isPlayer() then
1088 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1089 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 06 then
1090 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 07)
1091 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 10 then
1092 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 11)
1093 creature:getPosition():sendMagicEffect(13)
1094 else
1095 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1096 creature:getPosition():sendMagicEffect(14)
1097 end
1098 end
1099 end
1100 elseif item.uid == 11023 then
1101 if creature:isPlayer() then
1102 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1103 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 07 then
1104 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 08)
1105 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 09 then
1106 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 10)
1107 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 11 then
1108 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 12)
1109 else
1110 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1111 creature:getPosition():sendMagicEffect(14)
1112 end
1113 end
1114 end
1115 elseif item.uid == 11024 then
1116 if creature:isPlayer() then
1117 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1118 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 08 then
1119 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 09)
1120 elseif creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 12 then
1121 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 13)
1122 else
1123 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1124 creature:getPosition():sendMagicEffect(14)
1125 end
1126 end
1127 end
1128 elseif item.uid == 11025 then
1129 if creature:isPlayer() then
1130 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1131 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 13 then
1132 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 14)
1133 else
1134 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1135 creature:getPosition():sendMagicEffect(14)
1136 end
1137 end
1138 end
1139 elseif item.uid == 11026 then
1140 if creature:isPlayer() then
1141 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1142 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 14 then
1143 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 15)
1144 else
1145 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1146 creature:getPosition():sendMagicEffect(14)
1147 end
1148 end
1149 end
1150 elseif item.uid == 11027 then
1151 if creature:isPlayer() then
1152 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1153 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 15 then
1154 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 16)
1155 else
1156 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1157 creature:getPosition():sendMagicEffect(14)
1158 end
1159 end
1160 end
1161 elseif item.uid == 11028 then
1162 if creature:isPlayer() then
1163 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) > 00 then
1164 if creature:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 16 then
1165 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1166 creature:getPosition():sendMagicEffect(14)
1167
1168 creature:setStorageValue(_QUESTLOG[121].UID_01, 04)
1169 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Seu Quest Log foi atualizado.")
1170 creature:teleportTo({x=3567, y=1678, z=10})
1171 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1172 else
1173 creature:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
1174 creature:getPosition():sendMagicEffect(14)
1175 end
1176 end
1177 end
1178 elseif item.uid == 11029 then
1179 if creature:isPlayer() then
1180 if creature:getStorageValue(10957) >= 04 then
1181 creature:teleportTo({x=3516, y=1920, z=12})
1182 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1183 else
1184 creature:teleportTo({x=3519, y=1919, z=11})
1185 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1186 end
1187 end
1188 elseif item.uid == 11030 then
1189 if creature:isPlayer() then
1190 if creature:getStorageValue(_QUESTLOG[26].UID_01) == 01 then
1191 if creature:getDirection() == 00 then
1192 local SINCRO = Position(3848, 1010, 3)
1193 SINCRO:sendMagicEffect(CONST_ME_TUTORIALARROW)
1194 addEvent(function() SINCRO:sendMagicEffect(CONST_ME_TUTORIALARROW) end, 1000)
1195 addEvent(function() SINCRO:sendMagicEffect(CONST_ME_TUTORIALARROW) end, 2000)
1196
1197
1198 end
1199 end
1200 end
1201 elseif item.uid == 11031 then
1202 if creature:isPlayer() then
1203 local WAR_PLAYER = Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_COUNT_PLAYER) or 0
1204 local BLUE_PARTY = Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_BLUE_PLAYER) or 0
1205
1206 if Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_START_WARZONE) == 01 then
1207 Game.setStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_BLUE_PLAYER, (BLUE_PARTY - 01))
1208 Game.setStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_COUNT_PLAYER, (WAR_PLAYER - 01))
1209 end
1210 creature:setStorageValue(_SYSTEM.WARZONE, nil)
1211 creature:sendCancelMessage("@ShowPlacar 02")
1212 creature:setTown(Town(01))
1213 creature:removeCondition(CONDITION_OUTFIT)
1214 creature:setMaxHealth((creature:getLevel() * 10) + 140)
1215 creature:addHealth(creature:getMaxHealth())
1216 creature:sendCancelMessage("@NoTeleport 00")
1217
1218 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_01, nil)
1219 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_02, nil)
1220 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_03, nil)
1221 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_04, nil)
1222 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_05, nil)
1223 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_06, nil)
1224 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_07, nil)
1225 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_08, nil)
1226 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_09, nil)
1227 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_10, nil)
1228
1229 doInventario(creature, 00, 04, 00)
1230 creature:sendCancelMessage("@StarCliente")
1231 local players = Game.getPlayers()
1232 for _, targetPlayer in ipairs(players) do
1233 if targetPlayer:getLevel() >= _GLOBAL_RANDOM.WARZONE.LEVEL then
1234 if targetPlayer:getStorageValue(_SYSTEM.WARZONE) < 01 then
1235 if Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_START_WARZONE) == 01 then
1236 if _GLOBAL_RANDOM.WARZONE.LEFT_TIMER[01] >= 10 then
1237 targetPlayer:sendCancelMessage("@WarzoneStart " ..Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_COUNT_PLAYER))
1238 end
1239 end
1240 end
1241 end
1242 end
1243 end
1244 elseif item.uid == 11032 then
1245 if creature:isPlayer() then
1246 local WAR_PLAYER = Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_COUNT_PLAYER)
1247 local RED_PARTY = Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_RED_PLAYER)
1248
1249 if Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_START_WARZONE) == 01 then
1250 Game.setStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_RED_PLAYER, (RED_PARTY - 01))
1251 Game.setStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_COUNT_PLAYER, (WAR_PLAYER - 01))
1252 end
1253 creature:setStorageValue(_SYSTEM.WARZONE, nil)
1254 creature:sendCancelMessage("@ShowPlacar 02")
1255 creature:setTown(Town(01))
1256 creature:removeCondition(CONDITION_OUTFIT)
1257 creature:setMaxHealth((creature:getLevel() * 10) + 140)
1258 creature:addHealth(creature:getMaxHealth())
1259 creature:sendCancelMessage("@NoTeleport 00")
1260
1261 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_01, nil)
1262 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_02, nil)
1263 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_03, nil)
1264 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_04, nil)
1265 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_05, nil)
1266 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_06, nil)
1267 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_07, nil)
1268 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_08, nil)
1269 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_09, nil)
1270 creature:setStorageValue(_SYSTEM.INVENTARIO[04].UID_10, nil)
1271
1272 doInventario(creature, 00, 04, 00)
1273 creature:sendCancelMessage("@StarCliente")
1274 local players = Game.getPlayers()
1275 for _, targetPlayer in ipairs(players) do
1276 if targetPlayer:getLevel() >= _GLOBAL_RANDOM.WARZONE.LEVEL then
1277 if targetPlayer:getStorageValue(_SYSTEM.WARZONE) < 01 then
1278 if Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_START_WARZONE) == 01 then
1279 if _GLOBAL_RANDOM.WARZONE.LEFT_TIMER[01] >= 10 then
1280 targetPlayer:sendCancelMessage("@WarzoneStart " ..Game.getStorageValue(_GLOBAL_RANDOM.WARZONE.STORAGE_COUNT_PLAYER))
1281 end
1282 end
1283 end
1284 end
1285 end
1286 end
1287 elseif item.uid == 11033 then
1288 if creature:isPlayer() then
1289 if creature:getStorageValue(_SYSTEM.WARZONE) == 01 then
1290 creature:teleportTo(_GLOBAL_RANDOM.WARZONE.POS_BLUE_TIME)
1291 creature:getPosition():sendMagicEffect(11)
1292 elseif creature:getStorageValue(_SYSTEM.WARZONE) == 02 then
1293 creature:teleportTo(_GLOBAL_RANDOM.WARZONE.POS_RED_TIME)
1294 creature:getPosition():sendMagicEffect(11)
1295 else
1296 creature:setStorageValue(_SYSTEM.WARZONE, nil)
1297 creature:teleportTo({x=3999, y=991, z=7})
1298 creature:getPosition():sendMagicEffect(11)
1299 end
1300
1301 return true
1302 end
1303 elseif item.uid == 11034 then
1304 if creature:isPlayer() then
1305 local X = creature:getStorageValue(_SYSTEM.FENDAS_DIMENSIONAL[01])
1306 creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
1307 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1308 creature:setStorageValue(_SYSTEM.FENDAS_DIMENSIONAL[01], nil)
1309 creature:sendCancelMessage("@DGTime 0 0 0")
1310
1311 if creature:getStorageValue(_QUESTLOG[167].UID_01) == 03 or creature:getStorageValue(_QUESTLOG[167].UID_01) == 02 then
1312 creature:setStorageValue(_QUESTLOG[167].UID_01, 02)
1313
1314 else
1315
1316 creature:getStorageValue(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].DELAY[01], _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].DELAY[02])
1317 end
1318 return true
1319 end
1320 elseif item.uid == 11035 then
1321 if creature:isPlayer() then
1322 local EQUIPE_1 = Game.createMonster('Kanigher', {x=3537, y=1754, z=09})
1323 local EQUIPE_2 = Game.createMonster('Ross', {x=3540, y=1754, z=09})
1324 local EQUIPE_3 = Game.createMonster('Villauba', {x=3543, y=1753, z=09})
1325
1326 EQUIPE_1:setMaster(creature)
1327 EQUIPE_2:setMaster(creature)
1328 EQUIPE_3:setMaster(creature)
1329
1330 addEvent(function()
1331 SuperNinhoQuest(creature.uid, 01)
1332 end, 3000)
1333 end
1334 elseif item.uid == 11036 then
1335 if creature:isPlayer() then
1336 creature:setStorageValue(10993, nil)
1337 creature:setStorageValue(_QUESTLOG[166].UID_01, 01)
1338
1339 return true
1340 end
1341 elseif item.uid == 11037 then
1342 if creature:isPlayer() then
1343 local EQUIPE_1 = Game.createMonster('Ross', {x=3272, y=1954, z=14})
1344 local EQUIPE_2 = Game.createMonster('Villauba', {x=3275, y=1956, z=14})
1345 local EQUIPE_3 = Game.createMonster('Kanigher', {x=3277, y=1955, z=14})
1346
1347 EQUIPE_1:setMaster(creature)
1348 EQUIPE_2:setMaster(creature)
1349 EQUIPE_3:setMaster(creature)
1350
1351 addEvent(function()
1352 SuperNinhoQuest(creature.uid, 15)
1353 end, 3000)
1354 end
1355 elseif item.uid == 11038 then
1356 if creature:isPlayer() then
1357 creature:setStorageValue(_QUESTLOG[169].UID_01, 01)
1358
1359
1360 doBackpack(creature, 12)
1361 creature:sendCancelMessage("@LoadQuestWindows")
1362 return true
1363 end
1364 elseif item.uid == 11039 then
1365 if creature:isPlayer() then
1366 if creature:getStorageValue(_QUESTLOG[169].UID_01) == 02 then
1367 addEvent(function()
1368 local SummPos = creature:getSummons()
1369 addEvent(function() if #SummPos > 02 then SummPos[03]:say('Ross...', TALKTYPE_SAY) end end, 3000)
1370
1371 addEvent(function() if #SummPos > 02 then SummPos[01]:say('Kanigher!', TALKTYPE_SAY) end end, 9000)
1372 addEvent(function() if #SummPos > 02 then SummPos[03]:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
1373 doRemoveCreature(SummPos[03]:getId()) end end, 12000)
1374 addEvent(function() if #SummPos > 01 then SummPos[02]:say('Droga!', TALKTYPE_SAY) end end, 15000)
1375 addEvent(function() if #SummPos > 01 then SummPos[02]:say('Precisamos sair daqui!', TALKTYPE_SAY) end end, 18000)
1376 addEvent(function() if #SummPos > 01 then SummPos[01]:say('Vamos.', TALKTYPE_SAY) end end, 21000)
1377 end, 5000)
1378
1379 creature:setStorageValue(_QUESTLOG[169].UID_01, 03)
1380 end
1381 end
1382 elseif item.uid == 11040 then
1383 if creature:isPlayer() then
1384 if creature:getStorageValue(_QUESTLOG[169].UID_01) == 03 then
1385 addEvent(function()
1386 local SummPos = creature:getSummons()
1387 addEvent(function() if #SummPos > 01 then SummPos[02]:say('<Cof, cof>', TALKTYPE_MONSTER_SAY) end end, 3000)
1388 addEvent(function() if #SummPos > 01 then SummPos[01]:say('Villauba.', TALKTYPE_SAY) end end, 6000)
1389
1390
1391 addEvent(function() if #SummPos > 01 then SummPos[02]:say('Foi uma honra, soldado.', TALKTYPE_SAY) end end, 17000)
1392 addEvent(function() if #SummPos > 01 then SummPos[02]:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
1393 doRemoveCreature(SummPos[02]:getId()) end end, 20000)
1394 addEvent(function() if #SummPos > 00 then creature:say('Ross.', TALKTYPE_SAY) end end, 23000)
1395
1396
1397 addEvent(function() if #SummPos > 00 then SummPos[01]:say('Vamos.', TALKTYPE_SAY) end end, 31000)
1398
1399 addEvent(function()
1400 creature:setStorageValue(_QUESTLOG[169].UID_01, 04)
1401 end, 32000)
1402 end, 5000)
1403 end
1404 end
1405 elseif item.uid == 11041 then
1406 if creature:isPlayer() then
1407 if creature:getStorageValue(_QUESTLOG[169].UID_01) == 04 then
1408 addEvent(function()
1409 local SummPos = creature:getSummons()
1410 addEvent(function() if #SummPos > 00 then SummPos[01]:say('A fonte...', TALKTYPE_SAY) end end, 3000)
1411 addEvent(function() if #SummPos > 00 then SummPos[01]:say('Ela... deve ser...', TALKTYPE_SAY) end end, 6000)
1412 addEvent(function() if #SummPos > 00 then creature:say('Ross.', TALKTYPE_SAY) end end, 9000)
1413 addEvent(function() if #SummPos > 00 then SummPos[01]:say('Acho que chegou minha vez...', TALKTYPE_SAY) end end, 12000)
1414 addEvent(function() if #SummPos > 00 then SummPos[01]:say('Destrua a fonte para acabar com o parasita.', TALKTYPE_SAY) end end, 16000)
1415
1416
1417
1418 addEvent(function() if #SummPos > 00 then SummPos[01]:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS)
1419 doRemoveCreature(SummPos[01]:getId()) end end, 25000)
1420 addEvent(function()
1421 creature:setStorageValue(_QUESTLOG[169].UID_01, 05)
1422
1423 end, 28000)
1424 end, 1000)
1425 else
1426 creature:teleportTo(fromPosition)
1427 end
1428 end
1429 elseif item.uid == 11042 then
1430 if creature:isPlayer() then
1431 if creature:getStorageValue(_QUESTLOG[172].UID_01) == 02 then
1432 creature:setStorageValue(_QUESTLOG[172].UID_01, 03)
1433 return true
1434 end
1435 end
1436 elseif item.uid == 11043 then
1437 if creature:isPlayer() then
1438 if creature:getStorageValue(_QUESTLOG[172].UID_01) == 03 then
1439 creature:setStorageValue(_QUESTLOG[172].UID_01, 02)
1440 return true
1441 end
1442 end
1443 elseif item.uid == 11044 then
1444 if creature:isPlayer() then
1445 if creature:getStorageValue(_QUESTLOG[122].UID_01) == 01 then
1446 creature:setStorageValue(_QUESTLOG[122].UID_01, 02)
1447
1448 doBackpack(creature, 12)
1449 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Seu Quest Log foi atualizado.")
1450 creature:sendCancelMessage("@RemoveMarkMap")
1451 creature:sendCancelMessage("@LoadQuestMap")
1452 creature:sendCancelMessage("@LoadQuestWindows")
1453 return true
1454 end
1455 end
1456 elseif item.uid == 11045 then
1457 if creature:isPlayer() then
1458 if creature:getStorageValue(_QUESTLOG[197].UID_01) == 03 then
1459 creature:teleportTo(fromPosition)
1460 end
1461 end
1462 elseif item.uid == 11046 then
1463 if creature:isPlayer() then
1464 local from = {x=3876, y=1529, z=04}
1465 local to = {x=3882, y=1531, z=04}
1466 for A = from.x, to.x do
1467 for B = from.y, to.y do
1468 for C = from.z, to.z do
1469 local tile = Tile(A, B, C)
1470 local others = tile:getTopCreature()
1471 if tile then
1472 if others and others:isPlayer() and others:getStorageValue(_QUESTLOG[197].UID_01) == 03 then
1473 creature:teleportTo({x=3890, y=1533, z=05})
1474 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1475 return false
1476 end
1477 end
1478 end
1479 end
1480 end
1481 end
1482 elseif item.uid == 11047 then
1483 if creature:isPlayer() then
1484 creature:setStorageValue(_QUESTLOG[198].UID_01, 01)
1485 creature:setStorageValue(_SYSTEM.DANGEROUS[01][01].STORAGE, nil)
1486
1487
1488 creature:sendCancelMessage("@RemoveMarkMap")
1489 creature:sendCancelMessage("@LoadQuestMap")
1490 creature:sendCancelMessage("@LoadQuestWindows")
1491 end
1492 end
1493
1494 if TILE_TELEPORT[item.uid] then
1495 if creature:isPlayer() then
1496 if creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA) < 01 then
1497 local tile_1 = Tile(TILE_TELEPORT[item.uid].POS1[01], TILE_TELEPORT[item.uid].POS1[02], 8)
1498 local tile_2 = Tile(TILE_TELEPORT[item.uid].POS2[01], TILE_TELEPORT[item.uid].POS2[02], 8)
1499 local creature_1 = tile_1:getTopCreature()
1500 local creature_2 = tile_2:getTopCreature()
1501 if creature_1 and creature_1:isMonster() or creature_2 and creature_2:isMonster() then
1502 local party = creature:getParty()
1503 if not party then
1504 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
1505 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA, 01)
1506 creature:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (creature:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
1507 creature:getPosition():sendMagicEffect(13)
1508 else
1509 local members = party:getMembers()
1510 members[#members + 1] = party:getLeader()
1511 for _, member in ipairs(members) do
1512 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Selo Ancestral Obtido:\n[ 0" ..member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE).. "/06 ]")
1513 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE, (member:getStorageValue(_SYSTEM.DANGEROUS[06][01].STORAGE) + 01))
1514 member:setStorageValue(_SYSTEM.DANGEROUS[06][01].RECOMPENSA, 01)
1515 member:getPosition():sendMagicEffect(13)
1516 end
1517 end
1518 creature:teleportTo({x=4098, y=1359, z=8})
1519 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1520 else
1521 creature:teleportTo({x=4087, y=1360, z=8})
1522 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1523 end
1524 else
1525 creature:teleportTo({x=4098, y=1359, z=8})
1526 creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
1527 end
1528 end
1529 end
1530 return true
1531end
1532function onRandomBasin()
1533 local Choose = 2605
1534 local Tile_1 = Tile(BASIN_01):getItemById(2605)
1535 Choose = math.random(2604, 2605)
1536 if Tile_1 then
1537 Tile_1:transform(Choose)
1538 else
1539 Tile_1 = Tile(BASIN_01):getItemById(2604)
1540 Tile_1:transform(Choose)
1541 end
1542 BASIN_01:sendMagicEffect(13)
1543
1544 local Tile_2 = Tile(BASIN_02):getItemById(2605)
1545 Choose = math.random(2604, 2605)
1546 if Tile_2 then
1547 Tile_2:transform(Choose)
1548 else
1549 Tile_2 = Tile(BASIN_02):getItemById(2604)
1550 Tile_2:transform(Choose)
1551 end
1552 BASIN_02:sendMagicEffect(13)
1553
1554 local Tile_3 = Tile(BASIN_03):getItemById(2605)
1555 Choose = math.random(2604, 2605)
1556 if Tile_3 then
1557 Tile_3:transform(Choose)
1558 else
1559 Tile_3 = Tile(BASIN_03):getItemById(2604)
1560 Tile_3:transform(Choose)
1561 end
1562 BASIN_03:sendMagicEffect(13)
1563
1564 local Tile_4 = Tile(BASIN_04):getItemById(2605)
1565 Choose = math.random(2604, 2605)
1566 if Tile_4 then
1567 Tile_4:transform(Choose)
1568 else
1569 Tile_4 = Tile(BASIN_04):getItemById(2604)
1570 Tile_4:transform(Choose)
1571 end
1572 BASIN_04:sendMagicEffect(13)
1573
1574 addEvent(onRandomBasin, 2000)
1575end
1576function onResetDragons(type)
1577 if type == 01 then
1578 local from = SCAN_AREA_X
1579 local to = SCAN_AREA_Y
1580 for A = from.x, to.x do
1581 for B = from.y, to.y do
1582 for C = from.z, to.z do
1583 local tile = Tile(A, B, C)
1584 if tile ~= nil then
1585 local creature = tile:getTopCreature()
1586 local DragonThing = tile:getItemById(DRAGON_ID)
1587 if DragonThing then
1588 DragonThing:remove()
1589 end
1590 end
1591 end
1592 end
1593 end
1594 else
1595 local POS_PUZZLE = {
1596 [02] = {POS1 = {x=3957, y=1356, z=8}, POS2 = {x=3969, y=1359, z=8}};
1597 [03] = {POS1 = {x=3956, y=1345, z=8}, POS2 = {x=3969, y=1350, z=8}};
1598 }
1599 local DragonSearch = false
1600 local from = POS_PUZZLE[type].POS1
1601 local to = POS_PUZZLE[type].POS2
1602 for A = from.x, to.x do
1603 for B = from.y, to.y do
1604 for C = from.z, to.z do
1605 local tile = Tile(A, B, C)
1606 if tile ~= nil then
1607 local DragonThing = tile:getItemById(DRAGON_ID)
1608 if DragonThing then
1609 DragonSearch = true
1610 break
1611 end
1612 end
1613 end
1614 end
1615 end
1616
1617 return DragonSearch
1618 end
1619end
1620function onStepOut(creature, item, position, fromPosition)
1621 if item.uid == 10370 then
1622 item:transform(item.itemid + 1)
1623 end
1624 return true
1625end
1626
1627
1628
1629
Top