events.lua

main 147 lines · 4.9 KB Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1local JOKER_EVENT = {
2 [01] = { -- DRAGONS [BONEBROOK]
3 [00] = {
4 POS_X = {x=3499, y=1100, z=7},
5 POS_Y = {x=3583, y=1162, z=7},
6 TITLE = "Solo Negro de Bonebrook",
7 },
8 [01] = {POS = {x=3518, y=1126, z=7}},
9 [02] = {POS = {x=3522, y=1138, z=7}},
10 [03] = {POS = {x=3516, y=1147, z=7}},
11 [04] = {POS = {x=3528, y=1120, z=7}},
12 [05] = {POS = {x=3527, y=1126, z=7}},
13 [06] = {POS = {x=3529, y=1133, z=7}},
14 [07] = {POS = {x=3530, y=1139, z=7}},
15 [08] = {POS = {x=3528, y=1146, z=7}},
16 [09] = {POS = {x=3533, y=1125, z=7}},
17 [10] = {POS = {x=3536, y=1131, z=7}},
18 [11] = {POS = {x=3537, y=1142, z=7}},
19 [12] = {POS = {x=3541, y=1118, z=7}},
20 [13] = {POS = {x=3543, y=1127, z=7}},
21 [14] = {POS = {x=3544, y=1134, z=7}},
22 [15] = {POS = {x=3544, y=1146, z=7}},
23 [16] = {POS = {x=3546, y=1143, z=7}},
24 [17] = {POS = {x=3552, y=1138, z=7}},
25 [18] = {POS = {x=3550, y=1132, z=7}},
26 [19] = {POS = {x=3549, y=1125, z=7}},
27 [20] = {POS = {x=3550, y=1119, z=7}},
28 [21] = {POS = {x=3555, y=1129, z=7}},
29 [22] = {POS = {x=3561, y=1121, z=7}},
30 [23] = {POS = {x=3560, y=1125, z=7}},
31 [24] = {POS = {x=3559, y=1133, z=7}},
32 [25] = {POS = {x=3565, y=1134, z=7}},
33 },
34 [02] = { -- DESERTO [RIVERMINE]
35 [00] = {
36 POS_X = {x=3691, y=1183, z=7},
37 POS_Y = {x=3790, y=1253, z=7},
38 TITLE = "Deserto Escaldante de Rivermine",
39 },
40 [01] = {POS = {x=3706, y=1208, z=7}},
41 [02] = {POS = {x=3707, y=1222, z=7}},
42 [03] = {POS = {x=3718, y=1202, z=7}},
43 [04] = {POS = {x=3717, y=1208, z=7}},
44 [05] = {POS = {x=3714, y=1215, z=7}},
45 [06] = {POS = {x=3718, y=1226, z=7}},
46 [07] = {POS = {x=3718, y=1231, z=7}},
47 [08] = {POS = {x=3724, y=1196, z=7}},
48 [09] = {POS = {x=3723, y=1216, z=7}},
49 [10] = {POS = {x=3727, y=1230, z=7}},
50 [11] = {POS = {x=3730, y=1223, z=7}},
51 [12] = {POS = {x=3729, y=1206, z=7}},
52 [13] = {POS = {x=3729, y=1195, z=7}},
53 [14] = {POS = {x=3734, y=1200, z=7}},
54 [15] = {POS = {x=3737, y=1193, z=7}},
55 [16] = {POS = {x=3738, y=1204, z=7}},
56 [17] = {POS = {x=3739, y=1212, z=7}},
57 [18] = {POS = {x=3738, y=1225, z=7}},
58 [19] = {POS = {x=3738, y=1232, z=7}},
59 [20] = {POS = {x=3744, y=1205, z=7}},
60 [21] = {POS = {x=3746, y=1219, z=7}},
61 [22] = {POS = {x=3749, y=1200, z=7}},
62 [23] = {POS = {x=3749, y=1211, z=7}},
63 [24] = {POS = {x=3751, y=1230, z=7}},
64 [25] = {POS = {x=3753, y=1221, z=7}},
65 },
66 [03] = { -- CAMPOS VERDES [BASE PREMIUM]
67 [00] = {
68 POS_X = {x=3682, y=1572, z=7},
69 POS_Y = {x=3762, y=1630, z=7},
70 TITLE = "Campos Verdejantes da Base Premium",
71 },
72 [01] = {POS = {x=3697, y=1595, z=7}},
73 [02] = {POS = {x=3699, y=1601, z=7}},
74 [03] = {POS = {x=3700, y=1613, z=7}},
75 [04] = {POS = {x=3703, y=1588, z=7}},
76 [05] = {POS = {x=3704, y=1609, z=7}},
77 [06] = {POS = {x=3705, y=1582, z=7}},
78 [07] = {POS = {x=3707, y=1599, z=7}},
79 [08] = {POS = {x=3709, y=1591, z=7}},
80 [09] = {POS = {x=3709, y=1615, z=7}},
81 [10] = {POS = {x=3713, y=1584, z=7}},
82 [11] = {POS = {x=3714, y=1592, z=7}},
83 [12] = {POS = {x=3714, y=1606, z=7}},
84 [13] = {POS = {x=3717, y=1583, z=7}},
85 [14] = {POS = {x=3717, y=1596, z=7}},
86 [15] = {POS = {x=3720, y=1587, z=7}},
87 [16] = {POS = {x=3720, y=1610, z=7}},
88 [17] = {POS = {x=3721, y=1605, z=7}},
89 [18] = {POS = {x=3724, y=1592, z=7}},
90 [19] = {POS = {x=3727, y=1586, z=7}},
91 [20] = {POS = {x=3727, y=1606, z=7}},
92 [21] = {POS = {x=3729, y=1613, z=7}},
93 [22] = {POS = {x=3731, y=1596, z=7}},
94 [23] = {POS = {x=3732, y=1591, z=7}},
95 [24] = {POS = {x=3734, y=1601, z=7}},
96 [25] = {POS = {x=3734, y=1609, z=7}},
97 },
98}
99
100local function onRemoveMonsterEvent()
101 for X = 01, #JOKER_EVENT do
102 local from = JOKER_EVENT[X][00].POS_X
103 local to = JOKER_EVENT[X][00].POS_Y
104 for A = from.x, to.x do
105 for B = from.y, to.y do
106 for C = from.z, to.z do
107 local tile = Tile(A, B, C)
108 local creature = tile:getTopCreature()
109 if creature and creature:isMonster() and creature:getName() == "Joker" then
110 doRemoveCreature(creature:getId())
111 end
112 end
113 end
114 end
115 end
116end
117function onThink(interval)
118 if Game.getStorageValue(_GLOBAL_RANDOM.DAILY_EVENTS.STORAGE) == 01 then -- JOKER
119 local onPlaceRaids = math.random(01, #JOKER_EVENT)
120 onRemoveMonsterEvent()
121
122 for X = 01, #JOKER_EVENT[onPlaceRaids] do
123 Game.createMonster("Joker", JOKER_EVENT[onPlaceRaids][X].POS)
124 end
125
126 end
127 if Game.getStorageValue(_GLOBAL_RANDOM.DAILY_EVENTS.STORAGE) == 03 then -- BUFFS DE DEVOVORGA
128 local from = {x=3545, y=1530, z=7}
129 local to = {x=3627, y=1601, z=7}
130 for A = from.x, to.x do
131 for B = from.y, to.y do
132 for C = from.z, to.z do
133 local tile = Tile(A, B, C)
134 local creature = tile:getTopCreature()
135 if creature and creature:isMonster() and creature:getName() == "Devovorga" then
136 doRemoveCreature(creature:getId())
137 break
138 end
139 end
140 end
141 end
142
143 Game.createMonster("Devovorga", {x=3585, y=1572, z=7})
144 Game.broadcastMessage("Devovorga surgiu no mapa.")
145 end
146 return true
147end
Top