Server upload

RD Core / Commit #2

Commit Server upload

Alex Alex committed 18/10/2026 23:38 main Patch
1,106 files +223,404 -0
A data/movements/scripts/custom/arena.lua +21-0 View file
@@ -0,0 +1,21 @@
1+local Dmg, Cura = -500, 1000
2+local function onContinuouDmg(cid, pos)
3+ local player = Player(cid)
4+ if player then
5+ if player:getPosition() == pos then
6+ doTargetCombat(0, player, COMBAT_PHYSICALDAMAGE, -Dmg, -Dmg, CONST_ME_NONE)
7+ addEvent(onContinuouDmg, 1000, player.uid, pos)
8+ end
9+ end
10+end
11+function onStepIn(creature, item, position, fromPosition)
12+ if creature:isPlayer() then
13+ doTargetCombat(0, creature, COMBAT_PHYSICALDAMAGE, -Dmg, -Dmg, CONST_ME_NONE)
14+ addEvent(onContinuouDmg, 1000, creature.uid, item:getPosition())
15+ else
16+ doTargetCombat(0, creature, COMBAT_HEALING, Cura, Cura)
17+ end
18+ return true
19+end
20+
21+
A data/movements/scripts/custom/bonebrook_dg_1.lua +141-0 View file
@@ -0,0 +1,141 @@
1+function onStepIn(creature, item, position, fromPosition)
2+ local STORAGE_BONEBROOK = _SYSTEM.DANGEROUS[03][01].STORAGE
3+ local party = creature:getParty()
4+ local _DG_BONEBROOK_TUTOR = {
5+ [10321] = {"Limpe toda a �rea para poder clicar na est�tua", nil}; -- Zona 01 [Eliminar Monstros da Sala]
6+ [10357] = {"Limpe toda a �rea para poder clicar na est�tua", nil}; -- Zona 01 [Eliminar Monstros da Sala]
7+ [10358] = {"Limpe toda a �rea para poder clicar na est�tua", nil}; -- Zona 01 [Eliminar Monstros da Sala]
8+ [10322] = {"@TutorShow 21", 02}; -- Zona 02 [Sala dos Portais]
9+ [10361] = {"@TutorShow 21", 02}; -- Zona 02 [Sala dos Portais]
10+ [10362] = {"@TutorShow 21", 02}; -- Zona 02 [Sala dos Portais]
11+ [10323] = {"Limpe toda a �rea para poder clicar na est�tua", 09}; -- Zona 03 [Eliminar Monstros da Sala]
12+ [10377] = {"Limpe toda a �rea para poder clicar na est�tua", 09}; -- Zona 03 [Eliminar Monstros da Sala]
13+ [10378] = {"Limpe toda a �rea para poder clicar na est�tua", 09}; -- Zona 03 [Eliminar Monstros da Sala]
14+ [10324] = {"@TutorShow 22", 10}; -- Zona 02 [Sala das Estatuas]
15+ [10381] = {"@TutorShow 22", 10}; -- Zona 02 [Sala das Estatuas]
16+ [10382] = {"@TutorShow 22", 10}; -- Zona 02 [Sala das Estatuas]
17+ [10325] = {"Limpe toda a �rea para poder clicar na est�tua", 11}; -- Zona 04-A0 [Eliminar Monstros da Sala]
18+ [10379] = {"Limpe toda a �rea para poder clicar na est�tua", 11}; -- Zona 04-A0 [Eliminar Monstros da Sala]
19+ [10380] = {"Limpe toda a �rea para poder clicar na est�tua", 11}; -- Zona 04-A0 [Eliminar Monstros da Sala]
20+ [10326] = {"@TutorShow 23", 12}; -- Zona 04-A1 [Sala do Dragon Lord]
21+ [10383] = {"@TutorShow 23", 12}; -- Zona 04-A1 [Sala do Dragon Lord]
22+ [10384] = {"@TutorShow 23", 12}; -- Zona 04-A1 [Sala do Dragon Lord]
23+ }
24+ local _DG_PORTAIS = {
25+ [10336] = 02;
26+ [10337] = 03;
27+ [10338] = 04;
28+ [10339] = 05;
29+ [10340] = 06;
30+ [10341] = 07;
31+ [10342] = 08;
32+
33+ [10363] = 02;
34+ [10364] = 03;
35+ [10365] = 04;
36+ [10366] = 05;
37+ [10367] = 06;
38+ [10368] = 07;
39+ [10369] = 08;
40+
41+ [10500] = 02;
42+ [10501] = 03;
43+ [10502] = 04;
44+ [10503] = 05;
45+ [10504] = 06;
46+ [10505] = 07;
47+ [10506] = 08;
48+ }
49+ if _DG_BONEBROOK_TUTOR[item.actionid] then
50+ if creature:getStorageValue(STORAGE_BONEBROOK) == _DG_BONEBROOK_TUTOR[item.actionid][02] then
51+ if item.actionid == 10321 then
52+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, _DG_BONEBROOK_TUTOR[item.actionid][01])
53+ return true
54+ else
55+ creature:sendCancelMessage(_DG_BONEBROOK_TUTOR[item.actionid][01])
56+ return true
57+ end
58+ end
59+ end
60+ if _DG_PORTAIS[item.uid] then
61+ if creature:getStorageValue(STORAGE_BONEBROOK) > 01 then
62+ if creature:getStorageValue(STORAGE_BONEBROOK) < 09 then
63+ if creature:getStorageValue(STORAGE_BONEBROOK) == _DG_PORTAIS[item.uid] then
64+ if not party then
65+ creature:say("Portal [ 0" .. (_DG_PORTAIS[item.uid] - 1) .. "/07 ].", TALKTYPE_MONSTER_SAY)
66+ creature:setStorageValue(STORAGE_BONEBROOK, (_DG_PORTAIS[item.uid] + 1))
67+ creature:getPosition():sendMagicEffect(13)
68+ else
69+ local members = party:getMembers()
70+ members[#members + 1] = party:getLeader()
71+ for _, member in ipairs(members) do
72+ member:say("Portal [ 0" .. (_DG_PORTAIS[item.uid] - 1) .. "/07 ].", TALKTYPE_MONSTER_SAY)
73+ member:setStorageValue(STORAGE_BONEBROOK, (_DG_PORTAIS[item.uid] + 1))
74+ member:getPosition():sendMagicEffect(13)
75+ end
76+ end
77+
78+ if creature:getStorageValue(STORAGE_BONEBROOK) == 09 then
79+ if not party then
80+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Monstros da Zona 03 liberados.")
81+ else
82+ local members = party:getMembers()
83+ members[#members + 1] = party:getLeader()
84+ for _, member in ipairs(members) do
85+ member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Monstros da Zona 03 liberados.")
86+ end
87+ end
88+
89+ if item.uid == 10342 then
90+ Game.createMonster("Shaburak Demon", {x=3991, y=1198, z=14});
91+ Game.createMonster("Shaburak Demon", {x=3996, y=1199, z=14});
92+ Game.createMonster("Shaburak Demon", {x=4001, y=1198, z=14});
93+ Game.createMonster("Shaburak Demon", {x=4005, y=1199, z=14});
94+ Game.createMonster("Shaburak Demon", {x=4010, y=1097, z=14});
95+ Game.createMonster("Shaburak Demon", {x=4012, y=1203, z=14});
96+ Game.createMonster("Shaburak Demon", {x=4014, y=1198, z=14});
97+ Game.createMonster("Shaburak Demon", {x=4015, y=1194, z=14});
98+ Game.createMonster("Shaburak Demon", {x=4018, y=1201, z=14});
99+ elseif item.uid == 10369 then
100+ Game.createMonster("Shaburak Demon", {x=4099, y=1198, z=14});
101+ Game.createMonster("Shaburak Demon", {x=4104, y=1199, z=14});
102+ Game.createMonster("Shaburak Demon", {x=4109, y=1198, z=14});
103+ Game.createMonster("Shaburak Demon", {x=4113, y=1199, z=14});
104+ Game.createMonster("Shaburak Demon", {x=4118, y=1097, z=14});
105+ Game.createMonster("Shaburak Demon", {x=4120, y=1203, z=14});
106+ Game.createMonster("Shaburak Demon", {x=4122, y=1198, z=14});
107+ Game.createMonster("Shaburak Demon", {x=4123, y=1194, z=14});
108+ Game.createMonster("Shaburak Demon", {x=4126, y=1201, z=14});
109+ elseif item.uid == 10506 then
110+ Game.createMonster("Shaburak Demon", {x=4207, y=1198, z=14});
111+ Game.createMonster("Shaburak Demon", {x=4212, y=1199, z=14});
112+ Game.createMonster("Shaburak Demon", {x=4217, y=1198, z=14});
113+ Game.createMonster("Shaburak Demon", {x=4221, y=1199, z=14});
114+ Game.createMonster("Shaburak Demon", {x=4226, y=1097, z=14});
115+ Game.createMonster("Shaburak Demon", {x=4228, y=1203, z=14});
116+ Game.createMonster("Shaburak Demon", {x=4230, y=1198, z=14});
117+ Game.createMonster("Shaburak Demon", {x=4231, y=1194, z=14});
118+ Game.createMonster("Shaburak Demon", {x=4234, y=1201, z=14});
119+ end
120+ end
121+ else
122+ if not party then
123+ creature:say("ErroR - Portais Resetados.", TALKTYPE_MONSTER_SAY)
124+ creature:setStorageValue(STORAGE_BONEBROOK, 02)
125+ creature:getPosition():sendMagicEffect(03)
126+ else
127+ local members = party:getMembers()
128+ members[#members + 1] = party:getLeader()
129+ for _, member in ipairs(members) do
130+ member:say("ErroR - Portais Resetados.", TALKTYPE_MONSTER_SAY)
131+ member:setStorageValue(STORAGE_BONEBROOK, 02)
132+ end
133+ end
134+ end
135+ else
136+ creature:say("Todos os portais foram selados.", TALKTYPE_MONSTER_SAY)
137+ end
138+ end
139+ end
140+ return true
141+end
A data/movements/scripts/custom/exit_pvp.lua +37-0 View file
@@ -0,0 +1,37 @@
1+local function onLoadPVPRoom(cid)
2+ local player = Player(cid)
3+ if player then
4+ local A = Game.getStorageValue(_PVP_ROOM[01].CONTAGEM_PLAYER) or 0
5+ local B = Game.getStorageValue(_PVP_ROOM[02].CONTAGEM_PLAYER) or 0
6+ local C = Game.getStorageValue(_PVP_ROOM[03].CONTAGEM_PLAYER) or 0
7+ local D = Game.getStorageValue(_PVP_ROOM[04].CONTAGEM_PLAYER) or 0
8+ local E = Game.getStorageValue(_PVP_ROOM[05].CONTAGEM_PLAYER) or 0
9+ local F = Game.getStorageValue(_PVP_ROOM[06].CONTAGEM_PLAYER) or 0
10+
11+ local players = Game.getPlayers()
12+ for _, targetPlayer in ipairs(players) do
13+ targetPlayer:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F)
14+ end
15+ end
16+ return false
17+end
18+function onStepIn(creature, item, position, fromPosition)
19+ if creature:isPlayer() then
20+ local PVP_ROOM = creature:getStorageValue(_PVP_ROOM[00].PVP_SALA_ID)
21+ local COUNT_PLAYER = Game.getStorageValue(_PVP_ROOM[PVP_ROOM].CONTAGEM_PLAYER) or 00
22+ if COUNT_PLAYER < 00 then
23+ COUNT_PLAYER = 00
24+ end
25+
26+ creature:setTown(Town(01))
27+ creature:sendCancelMessage("@NoTeleport 00")
28+ creature:sendCancelMessage("@CronOff")
29+ Game.setStorageValue(_PVP_ROOM[PVP_ROOM].CONTAGEM_PLAYER, (COUNT_PLAYER - 01))
30+ creature:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, nil)
31+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, nil)
32+ creature:teleportTo({x=3999, y=991, z=7})
33+ creature:getPosition():sendMagicEffect(11)
34+ onLoadPVPRoom(creature)
35+ end
36+ return true
37+end
A data/movements/scripts/custom/fendas.lua +260-0 View file
@@ -0,0 +1,260 @@
1+local _FENDA_UID = {
2+ [11100] = 01;
3+ [11101] = 02;
4+ [11102] = 03;
5+ [11103] = 04;
6+ [11104] = 05;
7+ [11105] = 06;
8+ [11106] = 07;
9+ [11107] = 08;
10+ [11108] = 09;
11+ [11109] = 10;
12+ [11110] = 11;
13+ [11111] = 12;
14+ [11112] = 13;
15+ [11113] = 14;
16+ [11114] = 15;
17+ [11115] = 16;
18+ [11116] = 17;
19+ [11117] = 18;
20+ [11118] = 19;
21+ [11119] = 20;
22+ [11120] = 21;
23+ [11121] = 22;
24+ [11122] = 23;
25+ [11123] = 24;
26+ [11124] = 25;
27+ [11125] = 26;
28+ [11126] = 27;
29+ [11127] = 28;
30+ [11128] = 29;
31+ [11129] = 30;
32+ [11130] = 31;
33+ [11131] = 32;
34+ [11132] = 33;
35+ [11133] = 34;
36+ [11134] = 35;
37+ [11135] = 36;
38+ [11136] = 37;
39+ [11137] = 38;
40+ [11138] = 39;
41+ [11139] = 40;
42+ [11140] = 41;
43+ [11141] = 42;
44+ [11142] = 43;
45+ [11143] = 44;
46+ [11144] = 45;
47+ [11145] = 46;
48+ [11146] = 47;
49+ [11147] = 48;
50+ [11148] = 49;
51+ [11149] = 50;
52+}
53+local FENDA_M, FENDA_S = 0, 0
54+
55+local function EsquadraoDimensionalQuest(cid, step)
56+ local creature = Player(cid)
57+ if creature then
58+ local SummPos = creature:getSummons()
59+ local CHAT_TALK = {
60+ [01] = {TALK = 'Outra vez atrasado?', SUM = 03, TIMER = 3000},
61+ [02] = {TALK = 'Villauba...', SUM = 02, TIMER = 4000},
62+ [03] = {TALK = 'Vamos encontrar o Nucleo Dimensional', SUM = 02, TIMER = 4000},
63+ [04] = {TALK = 'Esse nucleo muda sempre que entramos, ent�o � dif�cil deduzir onde ele possa estar.', SUM = 02, TIMER = 6000},
64+ [05] = {TALK = 'Ainda assim, n�o vamos nos separar.', SUM = 02, TIMER = 4000},
65+ [06] = {TALK = 'Somos mais fortes juntos, ent�o vamos ficar juntos.', SUM = 02, TIMER = 5000},
66+ [07] = {TALK = 'Entendido?', SUM = 02, TIMER = 3000},
67+ [08] = {TALK = 'Vamos logo!', SUM = 01, TIMER = 3000},
68+ [09] = {TALK = 'Certo. Vamos acabar com isso.', SUM = 02, TIMER = 3000},
69+ [10] = {TALK = '', SUM = nil, TIMER = 0001},
70+ }
71+
72+ if CHAT_TALK[step].SUM == nil then
73+ addEvent(function()
74+ creature:setStorageValue(_QUESTLOG[167].UID_01, 03)
75+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� tem 30 minutos para encontrar e destrua o Nucleo Dimensional.\nN�o deixe seus companheiros morrer.")
76+ end, 3000)
77+ return true
78+ else
79+ if #creature:getSummons() > 0 then
80+ local timerDelay = CHAT_TALK[step].TIMER
81+ SummPos[CHAT_TALK[step].SUM]:say(CHAT_TALK[step].TALK, TALKTYPE_SAY)
82+ step = step + 01
83+
84+ addEvent(function() EsquadraoDimensionalQuest(creature.uid, step) end, timerDelay)
85+ end
86+ end
87+ end
88+end
89+function onStepIn(creature, item, position, fromPosition)
90+ if _FENDA_UID[item.uid] then
91+ local X = _FENDA_UID[item.uid]
92+ if creature:isPlayer() then
93+ local party = creature:getParty()
94+ if creature:getLevel() >= _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].LEVEL then
95+ if party then
96+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
97+ creature:getPosition():sendMagicEffect(03)
98+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� precisa sair de sua Party para poder entrar.")
99+ return false
100+ end
101+ if creature:getStorageValue(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].DELAY[01]) > 00 then
102+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
103+ creature:getPosition():sendMagicEffect(03)
104+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Aguarde " ..creature:getStorageValue(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].DELAY[01]).. " segundos para poder tentar novamente.")
105+ return false
106+ end
107+ if PlayerFendasDimensionais(creature, 1000, 02, X) then
108+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
109+ creature:getPosition():sendMagicEffect(03)
110+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� j� selou essa Fenda Dimensional.")
111+ return true
112+ end
113+ if creature:getStorageValue(_QUESTLOG[167].UID_01) == 01 and item.uid == 11119 then
114+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
115+ creature:getPosition():sendMagicEffect(03)
116+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Fale com Victor, na Base Premium para iniciar essa miss�o.")
117+ return false
118+ end
119+
120+ local checkArea = 0
121+ local from = _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].POS_INN_X
122+ local to = _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].POS_INN_Y
123+ for A = from.x, to.x do
124+ for B = from.y, to.y do
125+ for C = from.z, to.z do
126+ local tile = Tile(A, B, C)
127+ if tile then
128+ local creature = tile:getTopCreature()
129+ if creature and creature:isPlayer() then
130+ checkArea = 1
131+ break
132+ end
133+ end
134+ end
135+ end
136+ end
137+ if checkArea == 01 then
138+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
139+ creature:getPosition():sendMagicEffect(03)
140+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Algu�m est� tentando selar essa fenda.\nImposs�vel entrar no momento.")
141+ return true
142+ end
143+ for A = from.x, to.x do
144+ for B = from.y, to.y do
145+ for C = from.z, to.z do
146+ local tile = Tile(A, B, C)
147+ if tile then
148+ local creature = tile:getTopCreature()
149+ if creature and creature:isMonster() then
150+ doRemoveCreature(creature:getId())
151+ end
152+ end
153+ end
154+ end
155+ end
156+ if party then
157+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
158+ creature:getPosition():sendMagicEffect(03)
159+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� precisa sair de sua Party para poder entrar.")
160+ return false
161+ end
162+
163+ for M = 01, #_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].MON_POS do
164+ local MR = math.random(01, #_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].MONSTER)
165+ Game.createMonster(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].MONSTER[MR], _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].MON_POS[M])
166+ end
167+
168+ local NDR = math.random(01, #_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].NUCLEO_POS)
169+ Game.createMonster("Nucleo Dimensional", _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].NUCLEO_POS[NDR])
170+
171+ creature:setStorageValue(_SYSTEM.FENDAS_DIMENSIONAL[01], X)
172+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].INN)
173+ creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
174+ FENDA_M = _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].TIMER
175+ FENDA_S = 00
176+ creature:sendCancelMessage("@CountTempo 3 0 0 0 0 0")
177+ creature:sendCancelMessage("@DGTime 01 00 00 01")
178+ addEvent(onFendaTime, 1000, creature.uid)
179+
180+ if item.uid == 11108 then
181+ local EQUIPE_1 = Game.createMonster('Kanigher', {x=3737, y=1411, z=08})
182+ local EQUIPE_2 = Game.createMonster('Ross', {x=3736, y=1411, z=08})
183+ local EQUIPE_3 = Game.createMonster('Villauba', {x=3735, y=1411, z=08})
184+
185+ EQUIPE_1:setMaster(creature)
186+ EQUIPE_2:setMaster(creature)
187+ EQUIPE_3:setMaster(creature)
188+
189+ addEvent(function()
190+ EsquadraoDimensionalQuest(creature.uid, 01)
191+ end, 3000)
192+ else
193+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� tem 30 minutos para encontrar e destrua o Nucleo Dimensional.")
194+ end
195+ else
196+ creature:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
197+ creature:getPosition():sendMagicEffect(03)
198+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Essa Fenda Dimensional requer level " .._GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].LEVEL.. " ou superior.")
199+ return true
200+ end
201+ end
202+ end
203+
204+ return true
205+end
206+function onFendaTime(cid)
207+ local player = Player(cid)
208+ if player then
209+ if player:getStorageValue(_SYSTEM.FENDAS_DIMENSIONAL[01]) > 00 then
210+ if FENDA_M == 0 and FENDA_S == 0 then
211+ player:teleportTo({x=3999, y=991, z=7})
212+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
213+ _GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[00].INN_FENDA_TIMER = nil
214+ local X = player:getStorageValue(_SYSTEM.FENDAS_DIMENSIONAL[01]) or 0
215+ player:teleportTo(_GLOBAL_RANDOM.FENDAS_DIMENSIONAIS[X].OUT)
216+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
217+ player:sendTextMessage(MESSAGE_STATUS_WARNING, "Voc� falhou em selar essa Fenda Dimensional.")
218+ player:setStorageValue(_SYSTEM.FENDAS_DIMENSIONAL[01], nil)
219+ player:sendCancelMessage("@DGTime 0 0 0")
220+ player:setTown(Town(01))
221+ else
222+ local M1 = 0 local S1 = 0
223+ local M2 = 0 local S2 = 0
224+
225+ if FENDA_M > 0 and FENDA_S > 0 then
226+ FENDA_S = FENDA_S - 1
227+ elseif FENDA_M > 0 and FENDA_S == 0 then
228+ FENDA_S = 59
229+ FENDA_M = FENDA_M - 1
230+ elseif FENDA_M == 0 and FENDA_S > 0 then
231+ FENDA_S = FENDA_S - 1
232+ end
233+
234+ if string.len(FENDA_M) == 2 then
235+ M1 = string.sub(FENDA_M, 1, 1)
236+ M2 = string.sub(FENDA_M, 2, 2)
237+ else
238+ M1 = 0
239+ M2 = string.sub(FENDA_M, 1, 1)
240+ end
241+ if string.len(FENDA_S) == 2 then
242+ S1 = string.sub(FENDA_S, 1, 1)
243+ S2 = string.sub(FENDA_S, 2, 2)
244+ else
245+ S1 = 0
246+ S2 = string.sub(FENDA_S, 1, 1)
247+ end
248+
249+ local party = player:getParty()
250+ player:sendCancelMessage("@CountTempo " ..M1.. " " ..M2.." " ..S1.. " " ..S2.." 00 00")
251+ addEvent(onFendaTime, 1000, player.uid)
252+ end
253+ end
254+ end
255+end
256+
257+
258+
259+
260+
A data/movements/scripts/custom/furia_sorte.lua +78-0 View file
@@ -0,0 +1,78 @@
1+local StonePos_1 = Position(3470, 969, 11)
2+local StonePos_2 = Position(3463, 952, 11)
3+local StonePos_3 = Position(3469, 958, 11)
4+
5+function onStepIn(creature, item, position, fromPosition)
6+ local StoneID_1 = Tile(StonePos_1):getItemById(1304)
7+ local StoneID_2 = Tile(StonePos_2):getItemById(1304)
8+ local StoneID_3 = Tile(StonePos_3):getItemById(1304)
9+
10+ if item.uid == 10437 then
11+ if creature:isPlayer() then
12+ item:transform(425)
13+ if StoneID_1 then
14+ StoneID_1:remove()
15+ StonePos_1:sendMagicEffect(CONST_ME_POFF)
16+ return true
17+ end
18+ end
19+ end
20+ if item.uid == 10438 then
21+ if creature:isPlayer() then
22+ item:transform(425)
23+ if StoneID_2 then
24+ StoneID_2:remove()
25+ StonePos_2:sendMagicEffect(CONST_ME_POFF)
26+ return true
27+ end
28+ end
29+ end
30+ if item.uid == 10439 then
31+ if creature:isPlayer() then
32+ item:transform(425)
33+ if StoneID_3 then
34+ StoneID_3:remove()
35+ StonePos_3:sendMagicEffect(CONST_ME_POFF)
36+ return true
37+ end
38+ end
39+ end
40+ return true
41+end
42+function onStepOut(creature, item, position, fromPosition)
43+ local StoneID_1 = Tile(StonePos_1):getItemById(1304)
44+ local StoneID_2 = Tile(StonePos_2):getItemById(1304)
45+ local StoneID_3 = Tile(StonePos_3):getItemById(1304)
46+
47+ if item.uid == 10437 then
48+ item:transform(426)
49+ if creature:isPlayer() then
50+ if not StoneID_1 then
51+ Game.createItem(1304, 1, StonePos_1)
52+ StonePos_1:sendMagicEffect(CONST_ME_POFF)
53+ return true
54+ end
55+ end
56+ end
57+ if item.uid == 10438 then
58+ item:transform(426)
59+ if creature:isPlayer() then
60+ if not StoneID_2 then
61+ Game.createItem(1304, 1, StonePos_2)
62+ StonePos_2:sendMagicEffect(CONST_ME_POFF)
63+ return true
64+ end
65+ end
66+ end
67+ if item.uid == 10439 then
68+ item:transform(426)
69+ if creature:isPlayer() then
70+ if not StoneID_3 then
71+ Game.createItem(1304, 1, StonePos_3)
72+ StonePos_3:sendMagicEffect(CONST_ME_POFF)
73+ return true
74+ end
75+ end
76+ end
77+ return true
78+end
A data/movements/scripts/custom/ninho.lua +12-0 View file
@@ -0,0 +1,12 @@
1+function onStepIn(creature, item, position, fromPosition)
2+ if creature:isPlayer() then
3+ creature:setStorageValue(_SYSTEM.GLOBAL_INDEX[01], nil)
4+ creature:setStorageValue(_SYSTEM.GLOBAL_INDEX[02], nil)
5+ creature:setStorageValue(_SYSTEM.GLOBAL_INDEX[03], nil)
6+ creature:setStorageValue(_SYSTEM.GLOBAL_INDEX[04], nil)
7+ creature:sendCancelMessage("@NoTeleport 00")
8+
9+ creature:sendTextMessage(MESSAGE_STATUS_WARNING, "[ NINHO ]\nVoc� desistiu do Ninho.")
10+ end
11+ return true
12+end
A data/movements/scripts/custom/portalDimensional.lua +23-0 View file
@@ -0,0 +1,23 @@
1+function onStepIn(creature, item, position, fromPosition)
2+ if creature:isPlayer() then
3+ if item.actionid == 13052 then
4+ if #creature:getSummons() > 0 then
5+ local SummPos = creature:getSummons()
6+ for X = 01, #creature:getSummons() do
7+ if SummPos[X]:teleportTo({x=3737, y=1410, z=8}) then
8+ SummPos[X]:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
9+ end
10+ end
11+ end
12+
13+ creature:teleportTo({x=3737, y=1409, z=8})
14+ creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
15+ return true
16+ end
17+ if item.actionid == 13053 then
18+ if creature:getStorageValue(_QUESTLOG[167].UID_01) == 02 then
19+ creature:teleportTo(fromPosition)
20+ end
21+ end
22+ end
23+end
A data/movements/scripts/custom/pvp.lua +89-0 View file
@@ -0,0 +1,89 @@
1+local function onLoadPVPRoom(cid, step)
2+ local player = Player(cid)
3+ if player then
4+ local A = Game.getStorageValue(_PVP_ROOM[01].CONTAGEM_PLAYER) or 0
5+ local B = Game.getStorageValue(_PVP_ROOM[02].CONTAGEM_PLAYER) or 0
6+ local C = Game.getStorageValue(_PVP_ROOM[03].CONTAGEM_PLAYER) or 0
7+ local D = Game.getStorageValue(_PVP_ROOM[04].CONTAGEM_PLAYER) or 0
8+ local E = Game.getStorageValue(_PVP_ROOM[05].CONTAGEM_PLAYER) or 0
9+ local F = Game.getStorageValue(_PVP_ROOM[06].CONTAGEM_PLAYER) or 0
10+
11+ if step == 00 then
12+ player:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F)
13+ return false
14+ end
15+ if step == 01 then
16+ if EnableLoad then
17+ local players = Game.getPlayers()
18+ for _, targetPlayer in ipairs(players) do
19+ targetPlayer:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F)
20+ end
21+ else
22+ onLoadPVPRoom(player, 00)
23+ end
24+ return false
25+ end
26+ end
27+ return false
28+end
29+function onStepIn(creature, item, position, fromPosition)
30+ if creature:isPlayer() then
31+ local PVP_ROOM = creature:getStorageValue(_PVP_ROOM[00].PVP_SALA_ID)
32+ if PVP_ROOM > 00 then
33+ if PVP_ROOM == 02 then
34+ if creature:getStorageValue(_PVP_ROOM[00].TIME_ID) == 01 then
35+ creature:teleportTo(_PVP_ROOM[PVP_ROOM].ARENA_POS[05])
36+ else
37+ creature:teleportTo(_PVP_ROOM[PVP_ROOM].ARENA_POS[06])
38+ end
39+ elseif PVP_ROOM == 03 then
40+ if creature:getStorageValue(_PVP_ROOM[00].TIME_ID) == 01 then
41+ creature:teleportTo(_PVP_ROOM[PVP_ROOM].ARENA_POS[01])
42+ else
43+ creature:teleportTo(_PVP_ROOM[PVP_ROOM].ARENA_POS[02])
44+ end
45+ elseif PVP_ROOM == 04 then
46+ if Game.getStorageValue(_PVP_ROOM[00].BATTLE_PLAYER) ~= nil then
47+ Game.setStorageValue(_PVP_ROOM[00].BATTLE_PLAYER, (Game.getStorageValue(_PVP_ROOM[00].BATTLE_PLAYER) - 01))
48+ end
49+ creature:setTown(Town(01))
50+ creature:sendCancelMessage("@NoTeleport 00")
51+ creature:sendCancelMessage("@CronOff")
52+ creature:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, nil)
53+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, nil)
54+ creature:teleportTo({x=3999, y=991, z=7})
55+ creature:getPosition():sendMagicEffect(11)
56+ onLoadPVPRoom(creature, 00)
57+ return true
58+ else
59+ creature:teleportTo(_PVP_ROOM[PVP_ROOM].ARENA_POS[math.random(01, #_PVP_ROOM[PVP_ROOM].ARENA_POS)])
60+ end
61+ creature:getPosition():sendMagicEffect(11)
62+
63+ if PVP_ROOM == 03 or PVP_ROOM == 06 then
64+ return true
65+ end
66+ if creature:getStorageValue(_PVP_ROOM[00].TIME_ID) == 01 then
67+ _PVP_ROOM[PVP_ROOM].PLACAR[01] = _PVP_ROOM[PVP_ROOM].PLACAR[01] + 01
68+ else
69+ _PVP_ROOM[PVP_ROOM].PLACAR[02] = _PVP_ROOM[PVP_ROOM].PLACAR[02] + 01
70+ end
71+ local from = _PVP_ROOM[PVP_ROOM].ARENA_POS[00].POS_X
72+ local to = _PVP_ROOM[PVP_ROOM].ARENA_POS[00].POS_Y
73+ for A = from.x, to.x do
74+ for B = from.y, to.y do
75+ for C = from.z, to.z do
76+ local tile = Tile(A, B, C)
77+ if tile then
78+ local creature = tile:getTopCreature()
79+ if creature and creature:isPlayer() then
80+ creature:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "[PLACAR] RED (" .._PVP_ROOM[PVP_ROOM].PLACAR[01].. ") | (" .._PVP_ROOM[PVP_ROOM].PLACAR[02].. ") BLUE")
81+ end
82+ end
83+ end
84+ end
85+ end
86+ end
87+ end
88+ return true
89+end
A data/movements/scripts/custom/pvp_castle.lua +75-0 View file
@@ -0,0 +1,75 @@
1+local function onLoadPVPRoom(cid, step)
2+ local player = Player(cid)
3+ if player then
4+ local A = Game.getStorageValue(_PVP_ROOM[01].CONTAGEM_PLAYER) or 0
5+ local B = Game.getStorageValue(_PVP_ROOM[02].CONTAGEM_PLAYER) or 0
6+ local C = Game.getStorageValue(_PVP_ROOM[03].CONTAGEM_PLAYER) or 0
7+ local D = Game.getStorageValue(_PVP_ROOM[04].CONTAGEM_PLAYER) or 0
8+ local E = Game.getStorageValue(_PVP_ROOM[05].CONTAGEM_PLAYER) or 0
9+ local F = Game.getStorageValue(_PVP_ROOM[06].CONTAGEM_PLAYER) or 0
10+
11+ if step == 00 then
12+ player:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F)
13+ return false
14+ end
15+ if step == 01 then
16+ if EnableLoad then
17+ local players = Game.getPlayers()
18+ for _, targetPlayer in ipairs(players) do
19+ targetPlayer:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F)
20+ end
21+ else
22+ onLoadPVPRoom(player, 00)
23+ end
24+ return false
25+ end
26+ end
27+ return false
28+end
29+function onStepIn(creature, item, position, fromPosition)
30+ if creature:isPlayer() then
31+ local id = 03
32+ if creature:getStorageValue(_PVP_ROOM[00].TIME_ID) == 01 then
33+ creature:teleportTo({x=4093, y=1167, z=04})
34+ creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
35+ return true
36+ end
37+
38+ Game.setStorageValue(_PVP_ROOM[id].CONTAGEM_PLAYER, nil)
39+ local players = Game.getPlayers()
40+ for _, cid in ipairs(players) do
41+ if cid:getStorageValue(_PVP_ROOM[00].PVP_SALA_ID) == id then
42+ cid:setTown(Town(01))
43+ cid:removeCondition(CONDITION_OUTFIT)
44+ cid:sendCancelMessage("@NoTeleport 00")
45+ cid:sendCancelMessage("@CronOff")
46+ cid:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, nil)
47+ cid:teleportTo({x=3999, y=991, z=7})
48+ cid:getPosition():sendMagicEffect(11)
49+ onLoadPVPRoom(cid, 00)
50+
51+ if cid:getStorageValue(_PVP_ROOM[00].TIME_ID) == 02 then
52+ print("[" ..cid:getName().. "] Venceu.")
53+ local reward = _PVP_ROOM[id].CRONOMETRO
54+ reward = reward * 02
55+ if Game.getStorageValue(_GLOBAL_RANDOM.DAILY_EVENTS.STORAGE) == 05 then
56+ reward = reward + reward
57+ end
58+ if cid:getStorageValue(_SYSTEM.PVP_POINTS) < 00 then
59+ cid:setStorageValue(_SYSTEM.PVP_POINTS, reward)
60+ else
61+ cid:setStorageValue(_SYSTEM.PVP_POINTS, (cid:getStorageValue(_SYSTEM.PVP_POINTS) + reward))
62+ end
63+
64+ cid:sendCancelMessage("@LootMSG 3219 05 00 " ..reward)
65+ doBackpack(cid, 11)
66+ end
67+ cid:setStorageValue(_PVP_ROOM[00].TIME_ID, nil)
68+ end
69+ end
70+
71+ stopEvent(_PVP_ROOM[id].ADDEVENT_TIMER)
72+ _PVP_ROOM[id].ADDEVENT_TIMER = nil
73+ end
74+ return true
75+end
Top