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/talkactions/scripts/custom/change_name.lua +88-0 View file
@@ -0,0 +1,88 @@
1+--Player rename by Mock the bear (MTB)
2+function sugested() --GName generator
3+ local cons = {'b','c','d','f','g','h','i','j','k','l','m','n',' p','q','r','s','t','v','x','y','z'}
4+ local vog = {"a",'e','i','o','u'}
5+ local sibalas = {}
6+ for i=1,#cons do
7+ for e=1,#vog do
8+ table.insert(sibalas,1,cons[i]..vog[e])
9+ end
10+ end
11+ local total = ""
12+ for i=1,math.random(1,2) do
13+ local nam = ""
14+ for i=1,math.random(2,4) do
15+ nam = nam..sibalas[math.random(1,#sibalas)]
16+ end
17+ if math.random(1,2) == 1 then
18+ nam = nam..vog[math.random(1,#vog)]
19+ elseif math.random(1,2) == 2 then
20+ nam = nam..cons[math.random(1,#vog)]
21+ end
22+ total = total..(i == 2 and ' ' or '')..nam:sub(1,1):upper()..nam:sub(2,-1)
23+ end
24+ return total
25+end
26+function onSay(player, words, param)
27+ local split = param:splitTrimmed(" ")
28+ if param == 'gen' then
29+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sugest�o de nome: " ..sugested())
30+ return false
31+ end
32+ local param1, param2 = param:match('(.-)[;:,.]%s*(.+)')
33+ param = param1 or param
34+ param2 = param2 or sugested()
35+ if not param then
36+ player:popupFYI("Nenhum nome foi digitado.")
37+ return false
38+ end
39+ if param2:len() <= 2 or param2:len() > 20 then
40+ player:popupFYI("S�o necess�rios de 3 a 20 caracteres.")
41+ return false
42+ end
43+ if param2:match('[%a%d%s%u%l]+') ~= param2 then
44+ player:popupFYI("Somente letras de A-Z ou Numeros de 0-9.")
45+ return false
46+ end
47+
48+ param2 = param2:sub(1,1):upper()..param2:sub(2,-1)
49+ local p2 = Creature(param)
50+ if p2 and p2:isPlayer() and param1 == player:getName() then
51+ if param2 ~= player:getName() then
52+ local newname = param2:gsub(" ", "")
53+ local Test = db.storeQuery("SELECT name FROM players WHERE name = '" ..newname.. "';")
54+ if Test then
55+ player:popupFYI("J� existe um jogador com este nome.")
56+ return false
57+ end
58+ if Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then
59+ local SALDO_VIP = PlayerVipCoins(player, 00)
60+ if SALDO_VIP >= 250 then
61+ local id = p2:getGuid()
62+ PlayerVipCoins(player, 01, 250)
63+ doPlayerSendTextMessage(p2, MESSAGE_INFO_DESCR, "Nome alterado com sucesso!\nVoc� ser� deslogado em instantes.")
64+ p2:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
65+ addEvent(doRemoveCreature, 3000, p2.uid)
66+ addEvent(function(id, newname)
67+ db.query("UPDATE `players` SET `name` = '"..newname.."' WHERE `id` = "..id)
68+ end, 3100, id, newname)
69+ return false
70+ else
71+ player:popupFYI("Voc� n�o possui VIP Coins suficientes.")
72+ return false
73+ end
74+ else
75+ player:popupFYI("Somente em Protection Zone (PZ).")
76+ return false
77+ end
78+ else
79+ player:popupFYI("Voc� precisa digitar um nome diferente\ndo nome seu personagem atual.")
80+ return false
81+ end
82+ else
83+ player:popupFYI("Voc� digitou seu nome errado.")
84+ return false
85+ end
86+
87+ return false
88+end
A data/talkactions/scripts/custom/coliseu.lua +257-0 View file
@@ -0,0 +1,257 @@
1+local WaveTimer = 00
2+local Wave = 01
3+local CATEGORY = 00
4+local HARD = 00
5+local INDEX = 00
6+function onSay(player, words, param)
7+ local split = param:splitTrimmed(" ")
8+ HARD = tonumber(split[01])
9+ if HARD < 01 then
10+ HARD = 01
11+ end
12+
13+ CATEGORY = tonumber(split[02])
14+ if CATEGORY < 01 then
15+ CATEGORY = 01
16+ end
17+
18+ if _DEBUG_MODE then
19+ local _TYPE = {
20+ ["1"] = 'Versus',
21+ ["2"] = 'Wave',
22+ ["3"] = 'Survival',
23+ }
24+
25+ if _TYPE[split[02]] then
26+ if split[02] == "1" then
27+ print("[TALK - COLISEU] " ..player:getName().. " - " .._TYPE[split[02]].. " | " .._GLOBAL_RANDOM.COLISEUM.ORDER[HARD][tonumber(split[01])][tonumber(split[04])].NAME)
28+ else
29+ print("[TALK - COLISEU] " ..player:getName().. " - " .._TYPE[split[02]])
30+ end
31+ else
32+ print("[TALK - COLISEU] " ..player:getName().. " - " ..split[02])
33+ end
34+ end
35+
36+ ONLINE_PRICE = tonumber(split[03])
37+ INDEX = tonumber(split[04])
38+ local OnlineCoins = player:getStorageValue(_SYSTEM.ONLINE_COIN)
39+ --print(HARD.. " | " ..CATEGORY.. " | " ..INDEX)
40+
41+ local party = player:getParty()
42+ if party then
43+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� precisa sair de sua Party para poder entrar.")
44+ return false
45+ end
46+ if player:getLevel() < 200 then
47+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� precisa ter n�vel 200 ou maior para participar do coliseu.")
48+ return false
49+ end
50+
51+ if CATEGORY == 01 then
52+ local MonsterName = _GLOBAL_RANDOM.COLISEUM.ORDER[HARD][CATEGORY][INDEX].NAME
53+ local MonsterPos = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_MONSTER_POS
54+ local ColiseuPoints = ONLINE_PRICE
55+ if OnlineCoins >= ColiseuPoints then
56+ local from = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_X_POS
57+ local to = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_Y_POS
58+ for A = from.x, to.x do
59+ for B = from.y, to.y do
60+ for C = from.z, to.z do
61+ local tile = Tile(A, B, C)
62+ local creature = tile:getTopCreature()
63+ if creature and creature:isPlayer() then
64+ player:popupFYI("Outro jogador est� usando a �rea no momento. Tente novamente mais tarde.")
65+ return false
66+ end
67+ end
68+ end
69+ end
70+ for A = from.x, to.x do
71+ for B = from.y, to.y do
72+ for C = from.z, to.z do
73+ local tile = Tile(A, B, C)
74+ local creature = tile:getTopCreature()
75+ if creature and creature:isMonster() then
76+ doRemoveCreature(creature:getId())
77+ end
78+ end
79+ end
80+ end
81+
82+ Game.createMonster(MonsterName, MonsterPos, false, true)
83+ player:setStorageValue(_SYSTEM.COLISEU[05], nil)
84+ player:setStorageValue(_SYSTEM.COLISEU[06], HARD)
85+ player:setStorageValue(_SYSTEM.COLISEU[07], INDEX)
86+ player:teleportTo(_GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_PLAYER_POS)
87+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
88+ player:setStorageValue(_SYSTEM.ONLINE_COIN, (OnlineCoins - ColiseuPoints))
89+ doBackpack(player, 11)
90+ player:sendCancelMessage("@NoTeleport 01")
91+ else
92+ player:popupFYI("Voc� n�o possui Pontos Online suficientes.")
93+ return false
94+ end
95+ end
96+ if CATEGORY == 02 then
97+ local ColiseuPoints = ONLINE_PRICE
98+ if OnlineCoins >= ColiseuPoints then
99+ local from = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_X_POS
100+ local to = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_Y_POS
101+ for A = from.x, to.x do
102+ for B = from.y, to.y do
103+ for C = from.z, to.z do
104+ local tile = Tile(A, B, C)
105+ local creature = tile:getTopCreature()
106+ if creature and creature:isPlayer() then
107+ player:popupFYI("Outro jogador est� usando a �rea no momento. Tente novamente mais tarde.")
108+ return false
109+ end
110+ end
111+ end
112+ end
113+ for A = from.x, to.x do
114+ for B = from.y, to.y do
115+ for C = from.z, to.z do
116+ local tile = Tile(A, B, C)
117+ local creature = tile:getTopCreature()
118+ if creature and creature:isMonster() then
119+ doRemoveCreature(creature:getId())
120+ end
121+ end
122+ end
123+ end
124+ player:teleportTo(_GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_PLAYER_POS)
125+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
126+ player:setStorageValue(_SYSTEM.COLISEU[06], HARD)
127+ player:setStorageValue(_SYSTEM.COLISEU[07], INDEX)
128+ player:setStorageValue(_SYSTEM.COLISEU[08], 01)
129+ player:setStorageValue(_SYSTEM.ONLINE_COIN, (OnlineCoins - ColiseuPoints))
130+ doBackpack(player, 11)
131+ player:sendCancelMessage("@NoTeleport 01")
132+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "ONDA [ 01/05 ]\nPrepare-se!")
133+ addEvent(function()
134+ local MonsterName = _GLOBAL_RANDOM.COLISEUM.ORDER[HARD][CATEGORY][INDEX].NAME
135+ for M = 01, #_GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY][01] do
136+ Game.createMonster(MonsterName, _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY][01][M], false, true)
137+ player:setStorageValue(_SYSTEM.COLISEU[05], M)
138+ end
139+ end, 5000)
140+ else
141+ player:popupFYI("Voc� n�o possui Pontos Online suficientes.")
142+ return false
143+ end
144+ end
145+ if CATEGORY == 03 then
146+ local ColiseuPoints = ONLINE_PRICE
147+ if OnlineCoins >= ColiseuPoints then
148+ local from = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_X_POS
149+ local to = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_Y_POS
150+ for A = from.x, to.x do
151+ for B = from.y, to.y do
152+ for C = from.z, to.z do
153+ local tile = Tile(A, B, C)
154+ local creature = tile:getTopCreature()
155+ if creature and creature:isPlayer() then
156+ player:popupFYI("Outro jogador est� usando a �rea no momento. Tente novamente mais tarde.")
157+ return false
158+ end
159+ end
160+ end
161+ end
162+ for A = from.x, to.x do
163+ for B = from.y, to.y do
164+ for C = from.z, to.z do
165+ local tile = Tile(A, B, C)
166+ local creature = tile:getTopCreature()
167+ if creature and creature:isMonster() then
168+ doRemoveCreature(creature:getId())
169+ end
170+ end
171+ end
172+ end
173+
174+ WaveTimer = 04
175+ Wave = 00
176+ player:teleportTo(_GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_PLAYER_POS)
177+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
178+ player:setStorageValue(_SYSTEM.ONLINE_COIN, (OnlineCoins - ColiseuPoints))
179+ player:setStorageValue(_SYSTEM.COLISEU[05], nil)
180+ player:setStorageValue(_SYSTEM.COLISEU[06], tonumber(split[05]))
181+ player:setStorageValue(_SYSTEM.COLISEU[07], INDEX)
182+ player:setStorageValue(_SYSTEM.COLISEU[08], 01)
183+ doBackpack(player, 11)
184+ player:sendCancelMessage("@NoTeleport 01")
185+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Fique vivo e limpe a �rea para a arena liberar sua saida.")
186+ onCheckWave(player)
187+ else
188+ player:popupFYI("Voc� n�o possui Pontos Online suficientes.")
189+ return false
190+ end
191+ end
192+
193+ player:setStorageValue(_SYSTEM.DANGEROUS[01][01].STORAGE, 01)
194+ player:setStorageValue(_SYSTEM.FIRST_DEAD_TUTOR, 02)
195+ return false
196+end
197+function onCheckWave(cid)
198+ local player = Player(cid)
199+ local check = 00
200+ local from = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_X_POS
201+ local to = _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY].ARENA_Y_POS
202+ for A = from.x, to.x do
203+ for B = from.y, to.y do
204+ for C = from.z, to.z do
205+ local tile = Tile(A, B, C)
206+ local creature = tile:getTopCreature()
207+ if creature and creature:isPlayer() then
208+ check = 01
209+ end
210+ end
211+ end
212+ end
213+
214+ if check > 00 then
215+ check = 00
216+ if WaveTimer > 00 and Wave < 05 then
217+ if WaveTimer == 05 then
218+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Novos monstros em alguns segundos.")
219+ end
220+ WaveTimer = WaveTimer - 01
221+ addEvent(function() onCheckWave(player) end, 1000)
222+ else
223+ if Wave == 05 then
224+ for A = from.x, to.x do
225+ for B = from.y, to.y do
226+ for C = from.z, to.z do
227+ local tile = Tile(A, B, C)
228+ local creature = tile:getTopCreature()
229+ if creature and creature:isMonster() then
230+ check = 01
231+ end
232+ end
233+ end
234+ end
235+ if check == 00 then
236+ player:setStorageValue(_SYSTEM.COLISEU[08], 02)
237+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Saida da Arena liberado.\nClique na est�tua para finalizar.")
238+ return false
239+ end
240+
241+ addEvent(function() onCheckWave(player) end, 1000)
242+ else
243+ if Wave <= 04 then
244+ Wave = Wave + 01
245+ local QntMonster = math.random(01, 04)
246+ for M = 01, #_GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY][QntMonster] do
247+ local MonsterName = _GLOBAL_RANDOM.COLISEUM.ORDER[HARD][CATEGORY][INDEX].MONSTER[math.random(01, #_GLOBAL_RANDOM.COLISEUM.ORDER[HARD][CATEGORY][INDEX].MONSTER)]
248+ Game.createMonster(MonsterName, _GLOBAL_RANDOM.COLISEUM.ORDER[00][CATEGORY][QntMonster][M], false, true)
249+ end
250+
251+ WaveTimer = math.random(20, 30)
252+ addEvent(function() onCheckWave(player) end, 1000)
253+ end
254+ end
255+ end
256+ end
257+end
A data/talkactions/scripts/custom/convert_runes.lua +95-0 View file
@@ -0,0 +1,95 @@
1+function onSay(player, words, param)
2+ local split = param:splitTrimmed(" ")
3+ local FORJA = 3--tonumber(split[01])
4+ local INDEX = tonumber(split[02])
5+
6+ if _DEBUG_MODE then
7+ print("[TALK - CONVERT RUNAS] " ..player:getName().. " - " ..split[02])
8+ end
9+ if _GLOBAL_RANDOM.FORJAS[FORJA] then
10+ if _GLOBAL_RANDOM.FORJAS[FORJA][INDEX] then
11+ local X = _GLOBAL_RANDOM.FORJAS[FORJA][INDEX]
12+ local PlayerCoin = PlayerGoldCoins(player, 00)
13+
14+ if player:getLevel() >= X.LEVEL then
15+ if PlayerCoin >= X.PRICE then
16+ if FORJA == 03 then
17+ local myTokens = 0
18+ if X.ITEMID == 01 then
19+ myTokens = player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_1)
20+ elseif X.ITEMID == 02 then
21+ myTokens = player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_2)
22+ elseif X.ITEMID == 03 then
23+ myTokens = player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_3)
24+ end
25+
26+ if myTokens >= X.QNT_ITEM then
27+ if X.ITEMID == 01 then
28+ player:setStorageValue(_SYSTEM.TASK[00].TASK_COIN_1, (player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_1) - X.QNT_ITEM))
29+ elseif X.ITEMID == 02 then
30+ player:setStorageValue(_SYSTEM.TASK[00].TASK_COIN_2, (player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_2) - X.QNT_ITEM))
31+ elseif X.ITEMID == 03 then
32+ player:setStorageValue(_SYSTEM.TASK[00].TASK_COIN_3, (player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_3) - X.QNT_ITEM))
33+ end
34+
35+ -- DESAFIO
36+ if player:getStorageValue(_DESAFIOS[00].DESAFIO_ID) > 00 then
37+ if INDEX == 01 then
38+ onPlayerDesafios(player, 65, 01)
39+ elseif INDEX == 02 then
40+ onPlayerDesafios(player, 66, 01)
41+ elseif INDEX == 03 then
42+ onPlayerDesafios(player, 67, 01)
43+ elseif INDEX == 04 then
44+ onPlayerDesafios(player, 68, 01)
45+ end
46+ end
47+ PlayerTokenCoins(player, X.CONVERT, X.QNT_CONVERT, 01)
48+ PlayerGoldCoins(player, 01, X.PRICE)
49+ doBackpack(player, 11)
50+ else
51+ player:popupFYI("Voc� n�o possui as Task Points necess�rias para a conver��o.")
52+ return false
53+ end
54+ else
55+ doBackpack(player, 03, 03, 00, 01, X.ITEMID)
56+ local QT_P = doBackpack(player, 04)
57+ if QT_P >= X.QNT_ITEM then
58+ if doBackpack(player, 00, 03, 00, 01) then
59+ doBackpack(player, 03, 03, 00, 01, X.ITEMID)
60+ local PosBag = doBackpack(player, 05)
61+ local ExtBag = doBackpack(player, 06)
62+ if QT_P > X.QNT_ITEM then
63+ player:setStorageValue(_BACKPACK[03][ExtBag][PosBag].UID_04, (QT_P - X.QNT_ITEM))
64+ else
65+ doBackpack(player, 02, 03, ExtBag, PosBag)
66+ end
67+
68+ doBackpack(player, 03, 03, 00, 01, X.CONVERT)
69+ if doBackpack(player, 01, 03, 00, 00, X.CONVERT, _ITEMS[X.CONVERT].RARE, 00, X.QNT_CONVERT) then
70+ player:getPosition():sendMagicEffect(14)
71+ end
72+
73+ PlayerGoldCoins(player, 01, X.PRICE)
74+ doBackpack(player, 11)
75+ else
76+ player:popupFYI("Sua Backpack esta cheia.\nObtenha espaco para finalizar a convers�o.")
77+ player:getPosition():sendMagicEffect(03)
78+ end
79+ else
80+ player:popupFYI("Voc� precisa ter x10 Runes para converter.")
81+ end
82+ end
83+ else
84+ player:popupFYI("Voc� n�o tem dinheiro suficiente.")
85+ return false
86+ end
87+ else
88+ player:popupFYI("Voc� n�o possui o nivel necessario para forjar este item.")
89+ return false
90+ end
91+ end
92+ end
93+
94+ return false
95+end
A data/talkactions/scripts/custom/create_item_storage.lua +64-0 View file
@@ -0,0 +1,64 @@
1+function onSay(player, words, param)
2+
3+ local t = param:splitTrimmed(",")
4+ if(not t[2]) then
5+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
6+ return false
7+ end
8+
9+ local tid = Player(t[1])
10+ if(not tid) then
11+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
12+ return false
13+ end
14+
15+ local qnt = 1
16+ if(not t[3]) then
17+ qnt = 1
18+ else
19+ if isNumber(t[3]) then
20+ qnt = t[3]
21+ else
22+ qnt = 1
23+ end
24+ end
25+
26+ if isNumber(t[2]) then
27+ local id = tonumber(t[2])
28+ if _ITEMS[id] then
29+ local slot = _ITEMS[id].SLOT_EQUIP
30+
31+ local check = 0
32+ for x = 01, _SYSTEM.MAX_BAG_SLOT do
33+ if player:getStorageValue(_BACKPACK[slot][00][x].UID_01) <= 0 then
34+ if slot == 3 then -- NOT EQUIP
35+ tid:setStorageValue(_BACKPACK[slot][00][x].UID_01, tonumber(t[2])) -- ID
36+ tid:setStorageValue(_BACKPACK[slot][00][x].UID_02, qnt) -- Qnt
37+ tid:setStorageValue(_BACKPACK[slot][00][x].UID_03, math.random(0, 4)) -- Rare
38+ tid:setStorageValue(_BACKPACK[slot][00][x].UID_04, math.random(0, 3)) -- Star
39+ check = 1
40+ break
41+ else
42+ tid:setStorageValue(_BACKPACK[slot][00][x].UID_01, tonumber(t[2])) -- ID
43+ tid:setStorageValue(_BACKPACK[slot][00][x].UID_02, math.random(0, 4)) -- Rare
44+ tid:setStorageValue(_BACKPACK[slot][00][x].UID_03, math.random(0, 3)) -- Star
45+ check = 1
46+ break
47+ end
48+ end
49+ end
50+
51+ if check == 0 then
52+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sua backpack esta cheia.")
53+ else
54+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "O player [" .. t[1] .. "] recebeu o item [" .. _ITEMS[id].NAME .. ", x" ..qnt.. "].")
55+ end
56+ else
57+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Item não encontrado.")
58+ end
59+ else
60+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
61+ end
62+
63+ return false
64+end
A data/talkactions/scripts/custom/cursestree.lua +78-0 View file
@@ -0,0 +1,78 @@
1+local NINHO_DIFICULTY = {
2+ ["FACIL"] = {01, 30};
3+ ["MEDIO"] = {02, 70};
4+ ["DIFICIL"] = {03, 125};
5+ ["IMPOSSIVEL"] = {04, 185};
6+}
7+function onSay(player, words, param)
8+ local split = param:splitTrimmed(" ")
9+ local Dificuldade = split[01]
10+ local OnlineCoins = player:getStorageValue(_SYSTEM.ONLINE_COIN)
11+ local CursedPoints = NINHO_DIFICULTY[Dificuldade][01]
12+ local party = player:getParty()
13+
14+ if _DEBUG_MODE then
15+ local _TYPE = {
16+ ["1"] = 'Facil',
17+ ["2"] = 'Medio',
18+ ["3"] = 'Dificil',
19+ ["4"] = 'Impossivel',
20+ }
21+
22+ if _TYPE[split[01]] then
23+ print("[TALK - CURSEDTREE] " ..player:getName().. " - " .._TYPE[split[01]])
24+ else
25+ print("[TALK - CURSEDTREE] " ..player:getName().. " - " ..split[01])
26+ end
27+ end
28+ if party then
29+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� precisa sair de sua Party para poder entrar.")
30+ return false
31+ end
32+ if player:getLevel() < NINHO_DIFICULTY[Dificuldade][02] then
33+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� precisa ser n�vel " ..NINHO_DIFICULTY[Dificuldade][02].. " ou maior para poder entrar.")
34+ return false
35+ end
36+ if _CHEATS.CURSED_ONLINE_FREE or OnlineCoins >= CursedPoints then
37+ local from = {x=4043, y=934, z=08}
38+ local to = {x=4067, y=955, z=08}
39+ for A = from.x, to.x do
40+ for B = from.y, to.y do
41+ for C = from.z, to.z do
42+ local tile = Tile(A, B, C)
43+ local creature = tile:getTopCreature()
44+ if creature and creature:isPlayer() then
45+ player:popupFYI("Outro jogador est� usando a �rea no momento. Tente novamente mais tarde.")
46+ return false
47+ end
48+ end
49+ end
50+ end
51+ for A = from.x, to.x do
52+ for B = from.y, to.y do
53+ for C = from.z, to.z do
54+ local tile = Tile(A, B, C)
55+ local creature = tile:getTopCreature()
56+ if creature and creature:isMonster() then
57+ doRemoveCreature(creature:getId())
58+ end
59+ end
60+ end
61+ end
62+
63+ if _CHEATS.CURSED_ONLINE_FREE == false then
64+ player:setStorageValue(_SYSTEM.ONLINE_COIN, (OnlineCoins - CursedPoints))
65+ end
66+
67+ player:setStorageValue(_SYSTEM.GLOBAL_INDEX[02], 00)
68+ player:setStorageValue(_SYSTEM.CURSED_TREE, NINHO_DIFICULTY[Dificuldade][01])
69+ player:setStorageValue(_SYSTEM.GLOBAL_INDEX[01], NINHO_DIFICULTY[Dificuldade][01])
70+ player:teleportTo({x=4054, y=941, z=08})
71+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
72+ doBackpack(player, 11)
73+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique nas partes da Arvore para dar inicio ao desafio.")
74+ else
75+ player:popupFYI("Voc� n�o possui Pontos Online suficientes.")
76+ end
77+ return false
78+end
A data/talkactions/scripts/custom/dangerous.lua +97-0 View file
@@ -0,0 +1,97 @@
1+function onSay(player, words, param)
2+ local split = param:splitTrimmed(" ")
3+ local checkDG = 0
4+ for X = 01, #_SYSTEM.DANGEROUS do
5+ for Z = 01, #_SYSTEM.DANGEROUS[X] do
6+ if player:getStorageValue(_SYSTEM.DANGEROUS[X][Z].STORAGE) > 0 then
7+ checkDG = 01
8+ break
9+ end
10+ end
11+ end
12+
13+ if _DEBUG_MODE then
14+ print("[TALK - DG] " ..player:getName())
15+ end
16+ if checkDG == 1 then
17+ local NEXUS = tonumber(split[02])
18+ local INDEX = tonumber(split[03])
19+ if split[01] ~= nil then
20+ if split[02] ~= nil then
21+ if split[03] ~= nil then
22+ if split[01] == "0" then
23+ player:teleportTo(_SYSTEM.NEXUS[NEXUS].POS)
24+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
25+ player:sendCancelMessage("@DGTime 00 " ..NEXUS.. " " ..INDEX)
26+ player:setTown(Town(01))
27+ player:sendCancelMessage("@ResetDG")
28+
29+ for X = 01, #_SYSTEM.DANGEROUS do
30+ for Z = 01, #_SYSTEM.DANGEROUS[X] do
31+ player:setStorageValue(_SYSTEM.DANGEROUS[X][Z].STORAGE, nil)
32+ player:setStorageValue(_SYSTEM.DANGEROUS[X][Z].RECOMPENSA, nil)
33+ end
34+ end
35+
36+ player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
37+ player:popupFYI("Voc� desistiu da Dangerous.")
38+ Game.setStorageValue(_SYSTEM.DANGEROUS[NEXUS][INDEX].STORAGE, nil)
39+ return false
40+ elseif split[01] == "1" then
41+ local party = player:getParty()
42+ local members = party:getMembers()
43+ members[#members + 1] = party:getLeader()
44+ for _, member in ipairs(members) do
45+ member:teleportTo({x=3999, y=991, z=7})
46+ member:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
47+ member:sendCancelMessage("@DGTime 00 " ..NEXUS.. " " ..INDEX)
48+ member:sendCancelMessage("@ResetDG")
49+
50+ member:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil)
51+ for X = 01, #_SYSTEM.DANGEROUS do
52+ for Z = 01, #_SYSTEM.DANGEROUS[X] do
53+ member:setStorageValue(_SYSTEM.DANGEROUS[X][Z].STORAGE, nil)
54+ member:setStorageValue(_SYSTEM.DANGEROUS[X][Z].RECOMPENSA, nil)
55+ member:setTown(Town(01))
56+ end
57+ end
58+
59+ member:popupFYI("Seu grupo n�o concluiu a Dangerous.")
60+ end
61+
62+ Game.setStorageValue(_SYSTEM.DANGEROUS[NEXUS][INDEX].STORAGE, nil)
63+ end
64+ end
65+ end
66+ end
67+ else
68+ local party = player:getParty()
69+ if not party then
70+ player:teleportTo({x=3999, y=991, z=7})
71+ player:setStorageValue(_SYSTEM.TASK[00].TIMER, nil)
72+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
73+ player:sendCancelMessage("@DGTime 0 0 0")
74+ player:sendCancelMessage("@ResetDG")
75+ player:setTown(Town(01))
76+
77+ player:popupFYI("Voc� desistiu do Boss.")
78+ return false
79+ else
80+ local members = party:getMembers()
81+ members[#members + 1] = party:getLeader()
82+ for _, member in ipairs(members) do
83+ member:teleportTo({x=3999, y=991, z=7})
84+ member:setStorageValue(_SYSTEM.TASK[00].TIMER, nil)
85+ member:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
86+ member:sendCancelMessage("@DGTime 0 0 0")
87+ member:sendCancelMessage("@ResetDG")
88+ member:setTown(Town(01))
89+
90+ member:popupFYI("O lider do grupo desistiu do Boss.")
91+ end
92+ end
93+ end
94+
95+ return false
96+end
97+
A data/talkactions/scripts/custom/depot.lua +48-0 View file
@@ -0,0 +1,48 @@
1+function onSay(player, words, param)
2+ local split = param:splitTrimmed(" ")
3+ if split[01] then
4+ if _DEBUG_MODE then
5+ local _TYPE = {
6+ ["00"] = 'Atualizando Depot',
7+ ["01"] = 'Adicionando Itens ao Depot',
8+ ["02"] = 'Retirando Itens no Depot',
9+ }
10+
11+ if _TYPE[split[01]] then
12+ print("[TALK - DEPOT] " ..player:getName().. " - " .._TYPE[split[01]])
13+ else
14+ print("[TALK - DEPOT] " ..player:getName().. " - " ..split[01])
15+ end
16+ end
17+ if split[01] == "00" then -- ATUALIZANDO DEPOT
18+ onDepot(player, 00, 01)
19+ doBackpack(player, 00, 03, 00, 01)
20+ return false
21+ end
22+ if split[01] == "01" then -- ADICIONANDO ITENS NO DEPOT
23+ local slot = tonumber(split[02]) or nil
24+ local ext = tonumber(split[03]) or nil
25+ local pos = tonumber(split[04]) or nil
26+ local qnt = tonumber(split[05]) or nil
27+
28+ if slot == nil or ext == nil or pos == nil or qnt == nil then
29+ return false
30+ end
31+ onDepot(player, 01, 01, 00, slot, ext, pos, qnt)
32+ return false
33+ end
34+ if split[01] == "02" then --RETIRANDO ITENS NO DEPOT
35+ local slot = tonumber(split[02]) or nil
36+ local ext = tonumber(split[03]) or nil
37+ local pos = tonumber(split[04]) or nil
38+ local qnt = tonumber(split[05]) or nil
39+
40+ if slot == nil or ext == nil or pos == nil or qnt == nil then
41+ return false
42+ end
43+ onDepot(player, 02, 01, pos, slot, ext, 00, qnt)
44+ return false
45+ end
46+ end
47+ return false
48+end
A data/talkactions/scripts/custom/desafios.lua +101-0 View file
@@ -0,0 +1,101 @@
1+function onSay(player, words, param)
2+ local split = param:splitTrimmed(" ")
3+ local SECTION = tonumber(split[01])
4+ local INDEX = tonumber(split[02])
5+
6+ if SECTION == 01 then
7+ player:setStorageValue(_DESAFIOS[00].DESAFIO_ID, INDEX)
8+ player:setStorageValue(_DESAFIOS[00].DESAFIO_COUNT, 00)
9+ local K = player:getStorageValue(_DESAFIOS[00].DESAFIO_ID)
10+ local L = player:getStorageValue(_DESAFIOS[00].DESAFIO_COUNT)
11+ local M = player:getStorageValue(_SYSTEM.DESAFIOS_COIN) or 0
12+
13+ player:sendCancelMessage("@reloadDesafios " ..K.. " " ..L.. " " ..M)
14+ return false
15+ end
16+ if SECTION == 02 then
17+ local PAY_TYPE = tonumber(split[03])
18+ if PAY_TYPE == 01 then
19+ if player:getStorageValue(_SYSTEM.DESAFIOS_COIN) < _SHOP_DESAFIO[INDEX].COINS then
20+ player:popupFYI("Voc� n�o possui pontos de desafio suficientes.")
21+ return false
22+ end
23+ else
24+ local SALDO_VIP = PlayerVipCoins(player, 00)
25+ if SALDO_VIP < _SHOP_DESAFIO[INDEX].VIP[02] then
26+ player:popupFYI("Voc� n�o possui vip coins suficientes.")
27+ return false
28+ end
29+ end
30+
31+ if INDEX == 01 then -- EXTENSOR DE TASK
32+ if player:getStorageValue(_DESAFIOS[00].DESAFIO_SHOP) < 01 then
33+ player:setStorageValue(_DESAFIOS[00].DESAFIO_TYPE, 01)
34+ player:setStorageValue(_DESAFIOS[00].DESAFIO_SHOP, 05)
35+ player:getPosition():sendMagicEffect(13)
36+
37+ player:popupFYI("Compra realizada com sucesso.")
38+ else
39+ player:popupFYI("Voc� s� pode ter 1 benef�cio ativo ao mesmo tempo.")
40+ return false
41+ end
42+ end
43+ if INDEX == 02 then -- DESCONSTRUTOR
44+ if player:getStorageValue(_DESAFIOS[00].DESAFIO_SHOP) < 01 then
45+ player:setStorageValue(_DESAFIOS[00].DESAFIO_TYPE, 02)
46+ player:setStorageValue(_DESAFIOS[00].DESAFIO_SHOP, 05)
47+ player:getPosition():sendMagicEffect(13)
48+
49+ player:sendCancelMessage("@ToolsLoad " ..player:getStorageValue(_SYSTEM.TOOLS[01]).. " " ..player:getStorageValue(_SYSTEM.TOOLS[02]).. " 1")
50+ player:popupFYI("Compra realizada com sucesso.")
51+ player:sendCancelMessage("@TutorShow 51")
52+ else
53+ player:popupFYI("Voc� s� pode ter 1 benef�cio ativo ao mesmo tempo.")
54+ return false
55+ end
56+ end
57+ if INDEX >= 03 then
58+ if _SHOP_DESAFIO[INDEX].SPECIAL_ID[01] == 01 then -- OUTFIT
59+ local OUTFIT_HE = _SHOP_DESAFIO[INDEX].SPECIAL_ID[02]
60+ local OUTFIT_SHE = _SHOP_DESAFIO[INDEX].SPECIAL_ID[03]
61+ if player:hasOutfit(OUTFIT_HE, 00) or player:hasOutfit(OUTFIT_SHE, 00) then
62+ player:getPosition():sendMagicEffect(CONST_ME_POFF)
63+ player:popupFYI("Voc� j� possui esta outfit.")
64+ return false
65+ else
66+ player:addOutfit(OUTFIT_HE, 01)
67+ player:addOutfit(OUTFIT_SHE, 01)
68+ player:popupFYI("Compra realizada com sucesso.")
69+ end
70+ end
71+ if _SHOP_DESAFIO[INDEX].SPECIAL_ID[01] == 02 then -- MONTARIAS
72+ local MOUNT_ID = _SHOP_DESAFIO[INDEX].SPECIAL_ID[02]
73+ if player:hasMount(MOUNT_ID) then
74+ player:getPosition():sendMagicEffect(CONST_ME_POFF)
75+ player:popupFYI("Voc� j� possui esta montaria.")
76+ return false
77+ else
78+ player:addMount(MOUNT_ID)
79+ player:popupFYI("Compra realizada com sucesso.")
80+ player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
81+ end
82+ end
83+ end
84+
85+ if PAY_TYPE == 02 then
86+ PlayerVipCoins(player, 01, _SHOP_DESAFIO[INDEX].COINS)
87+ else
88+ player:setStorageValue(_SYSTEM.DESAFIOS_COIN, player:getStorageValue(_SYSTEM.DESAFIOS_COIN) - _SHOP_DESAFIO[INDEX].COINS)
89+ end
90+
91+ local K = player:getStorageValue(_DESAFIOS[00].DESAFIO_ID)
92+ local L = player:getStorageValue(_DESAFIOS[00].DESAFIO_COUNT)
93+ local M = player:getStorageValue(_SYSTEM.DESAFIOS_COIN) or 0
94+
95+ player:sendCancelMessage("@reloadDesafios " ..K.. " " ..L.. " " ..M)
96+ doBackpack(player, 11)
97+ return false
98+ end
99+
100+ return false
101+end
Top