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/online.lua +23-0 View file
@@ -0,0 +1,23 @@
1+function onSay(player, words, param)
2+ local hasAccess = player:getGroup():getAccess()
3+ local players = Game.getPlayers()
4+
5+ if _DEBUG_MODE then
6+ print("[TALK - PLAYERS ONLINE] " ..player:getName())
7+ end
8+ local i = 1
9+ for _, targetPlayer in ipairs(players) do
10+ if hasAccess or not targetPlayer:isInGhostMode() then
11+ local isTrainer = 00
12+ local tile = Tile(targetPlayer:getPosition().x, targetPlayer:getPosition().y, targetPlayer:getPosition().z)
13+ local ground = tile:getGround()
14+ if ground:getId() == 11062 or ground:getId() == 11063 then
15+ isTrainer = 01
16+ end
17+
18+ player:sendCancelMessage("@PlayersOnline#" ..i.. "#" ..targetPlayer:getName().. "#" ..targetPlayer:getLevel().. "#" ..targetPlayer:getVocation():getName().. "#" ..isTrainer)
19+ i = i + 1
20+ end
21+ end
22+ return false
23+end
A data/talkactions/scripts/custom/open_backpack.lua +65-0 View file
@@ -0,0 +1,65 @@
1+function onSay(player, words, param)
2+ local split = param:splitTrimmed(" ")
3+ local _ITEM = _ITEM
4+ if split[01] then
5+ if _DEBUG_MODE then
6+ local _TYPE = {
7+ ["50"] = 'Abrindo aba de Vendas na Central Box',
8+ ["51"] = 'Abrindo aba de Upgrade na Central Box',
9+ ["52"] = 'Abrindo aba de Skill na Central Box',
10+ ["53"] = 'Abrindo aba de Market na Central Box',
11+ ["54"] = 'Abrindo aba de Depot na Central Box',
12+ }
13+
14+ if _TYPE[split[01]] then
15+ print("[TALK - OPEN BACKPACK] " ..player:getName().. " - " .._TYPE[split[01]])
16+ else
17+ print("[TALK - OPEN BACKPACK] " ..player:getName().. " - Abrindo Backpack (" ..split[01].. ")")
18+ end
19+ end
20+ if split[01] == "50" then
21+ local slot = tonumber(split[02])
22+ local ext = tonumber(split[03])
23+
24+ if ext < 0 then ext = 0 end
25+ doBackpack(player, 00, slot, ext, 01)
26+ player:sendCancelMessage("@OpenSellComboBox")
27+ elseif split[01] == "51" then
28+ local slot = tonumber(split[02])
29+ local ext = tonumber(split[03])
30+
31+ if ext < 0 then ext = 0 end
32+ doBackpack(player, 00, slot, ext, 01)
33+ player:sendCancelMessage("@OpenUpgradeBox")
34+ elseif split[01] == "52" then
35+ local slot = tonumber(split[02])
36+ local ext = tonumber(split[03])
37+
38+ if ext < 0 then ext = 0 end
39+ doBackpack(player, 00, slot, ext, 01)
40+ player:sendCancelMessage("@OpenSkillBag")
41+ elseif split[01] == "53" then
42+ local slot = tonumber(split[02])
43+ local ext = tonumber(split[03])
44+
45+ if ext < 0 then ext = 0 end
46+ doBackpack(player, 00, slot, ext, 01)
47+ player:sendCancelMessage("@MarketInsertComboBox")
48+ elseif split[01] == "54" then
49+ local slot = tonumber(split[02])
50+ local ext = tonumber(split[03])
51+
52+ if ext < 0 then ext = 0 end
53+ doBackpack(player, 00, slot, ext, 01)
54+ player:sendCancelMessage("@DepotBackpack")
55+ else
56+ local slot = tonumber(split[01])
57+ local ext = tonumber(split[02])
58+
59+ if ext < 0 then ext = 0 end
60+ doBackpack(player, 00, slot, ext, 01)
61+ player:sendCancelMessage("@OpenBackpack")
62+ end
63+ end
64+ return false
65+end
A data/talkactions/scripts/custom/passchest.lua +130-0 View file
@@ -0,0 +1,130 @@
1+local PASSWORD_CHEST = {
2+ [01] = {PASS = 9255, TYPE = "COINS", ITEM = {003000, 00, 00, 00}, STORAGE = {_QUESTLOG[33].UID_01, 100}};
3+ [02] = {PASS = 1383, TYPE = "COINS", ITEM = {010000, 00, 00, 00}, STORAGE = {_QUESTLOG[34].UID_01, 100}};
4+ [03] = {PASS = 2431, TYPE = "COINS", ITEM = {025000, 00, 00, 00}, STORAGE = {_QUESTLOG[35].UID_01, 100}};
5+ [04] = {PASS = 4659, TYPE = "COINS", ITEM = {099000, 00, 00, 00}, STORAGE = {_QUESTLOG[37].UID_01, 100}};
6+
7+ [05] = {PASS = 1736, TYPE = "EQUIP", ITEM = {009006, 09, 01, 00, 01}, STORAGE = {_QUESTLOG[52].UID_01, 100}};
8+ [06] = {PASS = 9467, TYPE = "EQUIP", ITEM = {007005, 07, 01, 00, 01}, STORAGE = {_QUESTLOG[53].UID_01, 100}};
9+ [07] = {PASS = 8342, TYPE = "EQUIP", ITEM = {004022, 04, 02, 00, 01}, STORAGE = {_QUESTLOG[54].UID_01, 100}};
10+ [08] = {PASS = 6621, TYPE = "EQUIP", ITEM = {005038, 05, 03, 00, 01}, STORAGE = {_QUESTLOG[55].UID_01, 100}};
11+ [09] = {PASS = 9446, TYPE = "ITEMS", ITEM = {003055, 03, 00, 00, 30}, STORAGE = {_QUESTLOG[65].UID_01, 100}};
12+
13+ -- SAQUEADORES
14+ [10] = {PASS = 2552, TYPE = "ITEMS", ITEM = {03081, 03, 00, 00, 15}, STORAGE = {00002, 003}}; -- 00002 = INDICA SAQUEADORES (SEMPRE 02) | 003 = INDICA RANK QUE ESSE BAU EST�
15+ [11] = {PASS = 8349, TYPE = "ITEMS", ITEM = {03240, 03, 00, 00, 15}, STORAGE = {00002, 003}}; -- 00002 = INDICA SAQUEADORES (SEMPRE 02) | 003 = INDICA RANK QUE ESSE BAU EST�
16+ [12] = {PASS = 6397, TYPE = "ITEMS", ITEM = {03134, 03, 00, 00, 15}, STORAGE = {00002, 003}}; -- 00002 = INDICA SAQUEADORES (SEMPRE 02) | 003 = INDICA RANK QUE ESSE BAU EST�
17+ [13] = {PASS = 5412, TYPE = "ITEMS", ITEM = {03141, 03, 00, 00, 05}, STORAGE = {00002, 003}}; -- 00002 = INDICA SAQUEADORES (SEMPRE 02) | 003 = INDICA RANK QUE ESSE BAU EST�
18+ [14] = {PASS = 6141, TYPE = "ITEMS", ITEM = {03007, 03, 00, 00, 20}, STORAGE = {00002, 003}}; -- 00002 = INDICA SAQUEADORES (SEMPRE 02) | 003 = INDICA RANK QUE ESSE BAU EST�
19+}
20+function onSay(player, words, param)
21+ local split = param:splitTrimmed(" ")
22+ local ChestID = tonumber(split[01])
23+ local ChestPass = tonumber(split[02])
24+
25+ if _DEBUG_MODE then
26+ print("[TALK - BAU SENHA] " ..player:getName().. " - Bau ID: " ..split[01].. " | (" ..split[02].. " = " ..PASSWORD_CHEST[ChestID].PASS.. ")")
27+ end
28+ if PASSWORD_CHEST[ChestID] then
29+ if PASSWORD_CHEST[ChestID].PASS == ChestPass then
30+ if player:getStorageValue(PASSWORD_CHEST[ChestID].STORAGE[01]) < PASSWORD_CHEST[ChestID].STORAGE[02] then
31+ addEvent(function()
32+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Recompensa Desbloqueada.")
33+
34+ if PASSWORD_CHEST[ChestID].STORAGE[01] == 00002 then
35+ local ITEMID = PASSWORD_CHEST[ChestID].ITEM[01]
36+ local SLOT = 03
37+ local RARE = _ITEMS[ITEMID].RARE
38+ local STAR = PASSWORD_CHEST[ChestID].ITEM[04]
39+ local QNT = PASSWORD_CHEST[ChestID].ITEM[05]
40+
41+ local GLOBAL_RANK = PASSWORD_CHEST[ChestID].STORAGE[02]
42+ local GLOBAL_POSITION = tonumber(split[03])
43+ local CHEST_ID = tonumber(split[04])
44+
45+ doBackpack(player, 03, SLOT, 00, 01, ITEMID) -- Procurar
46+ if doBackpack(player, 01, SLOT, 00, 00, ITEMID, RARE, STAR, QNT) then
47+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� recebeu o item [ " .._ITEMS[ITEMID].NAME.. ", x" ..QNT.." ].")
48+ end
49+
50+ player:setStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][02][GLOBAL_RANK][GLOBAL_POSITION], CHEST_ID)
51+ player:getPosition():sendMagicEffect(14)
52+
53+ local PLAYER_RANK = player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][01])
54+ local PLAYER_VALUE = player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][02])
55+ if PLAYER_RANK < 01 then PLAYER_RANK = 01 end
56+ if PLAYER_VALUE < 00 then PLAYER_VALUE = 00 end
57+
58+ if PLAYER_RANK == GLOBAL_RANK then
59+ if player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][02]) < 00 then
60+ player:setStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][02], 01)
61+ else
62+ player:setStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][02], (player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][02]) + 01))
63+ local MAX_RANK = _GLOBAL_RANDOM.SAQUEADORES[00][00][PLAYER_RANK]
64+ if player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][01]) < 05 then
65+ if player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][02]) == MAX_RANK then
66+ if player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][01]) < 01 then
67+ player:setStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][01], 02)
68+ else
69+ player:setStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][01], (player:getStorageValue(_GLOBAL_RANDOM.SAQUEADORES[00][03][01]) + 01))
70+ end
71+
72+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "[SAQUEADOR] Voc� avan�ou de RANK.")
73+ end
74+ end
75+ end
76+ end
77+
78+ return false
79+ end
80+ if PASSWORD_CHEST[ChestID].TYPE == "COINS" then
81+ local GoldQnt = PASSWORD_CHEST[ChestID].ITEM[01]
82+ PlayerGoldCoins(player, 02, GoldQnt)
83+ end
84+ if PASSWORD_CHEST[ChestID].TYPE == "EQUIP" then
85+ local ITEMID = PASSWORD_CHEST[ChestID].ITEM[01]
86+ local SLOT = PASSWORD_CHEST[ChestID].ITEM[02]
87+ local RARE = PASSWORD_CHEST[ChestID].ITEM[03]
88+ local STAR = PASSWORD_CHEST[ChestID].ITEM[04]
89+ local QNT = PASSWORD_CHEST[ChestID].ITEM[05]
90+
91+ if doBackpack(player, 00, SLOT, 00, 01) then
92+ if doBackpack(player, 01, SLOT, 00, 00, ITEMID, RARE, STAR, QNT) then
93+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� recebeu o item [ " .._ITEMS[ITEMID].NAME.. " ].")
94+ end
95+ else
96+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Sua Backpack esta cheia.")
97+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sua Backpack esta cheia.")
98+ player:getPosition():sendMagicEffect(03)
99+ return false
100+ end
101+ end
102+ if PASSWORD_CHEST[ChestID].TYPE == "ITEMS" then
103+ local ITEMID = PASSWORD_CHEST[ChestID].ITEM[01]
104+ local SLOT = 03
105+ local RARE = _ITEMS[ITEMID].RARE
106+ local STAR = PASSWORD_CHEST[ChestID].ITEM[04]
107+ local QNT = PASSWORD_CHEST[ChestID].ITEM[05]
108+
109+ doBackpack(player, 03, SLOT, 00, 01, ITEMID) -- Procurar
110+ if doBackpack(player, 01, SLOT, 00, 00, ITEMID, RARE, STAR, QNT) then
111+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� recebeu o item [ " .._ITEMS[ITEMID].NAME.. ", x" ..QNT.." ].")
112+ end
113+ end
114+
115+ player:getPosition():sendMagicEffect(14)
116+ player:setStorageValue(PASSWORD_CHEST[ChestID].STORAGE[01], PASSWORD_CHEST[ChestID].STORAGE[02])
117+
118+ doBackpack(player, 12)
119+ player:sendCancelMessage("@RemoveMarkMap")
120+ player:sendCancelMessage("@LoadQuestMap")
121+ player:sendCancelMessage("@LoadQuestWindows")
122+ end, 500)
123+ else
124+ player:getPosition():sendMagicEffect(03)
125+ return false
126+ end
127+ end
128+ end
129+ return false
130+end
A data/talkactions/scripts/custom/pvp.lua +357-0 View file
@@ -0,0 +1,357 @@
1+local EnableLoad = true
2+local WaveCount = 00
3+local condition = Condition(CONDITION_OUTFIT)
4+local function onRewardPVP(cid, reward)
5+ local player = Player(cid)
6+ if player then
7+ reward = reward * 02
8+ if Game.getStorageValue(_GLOBAL_RANDOM.DAILY_EVENTS.STORAGE) == 05 then
9+ reward = reward + reward
10+ end
11+ if player:getStorageValue(_SYSTEM.PVP_POINTS) < 00 then
12+ player:setStorageValue(_SYSTEM.PVP_POINTS, reward)
13+ else
14+ player:setStorageValue(_SYSTEM.PVP_POINTS, (player:getStorageValue(_SYSTEM.PVP_POINTS) + reward))
15+ end
16+
17+ player:sendCancelMessage("@LootMSG 3219 05 00 " ..reward)
18+ doBackpack(player, 11)
19+ end
20+end
21+local function onLoadPVPRoom(cid, step)
22+ local player = Player(cid)
23+ if player then
24+ local A = Game.getStorageValue(_PVP_ROOM[01].CONTAGEM_PLAYER) or 0
25+ local B = Game.getStorageValue(_PVP_ROOM[02].CONTAGEM_PLAYER) or 0
26+ local C = Game.getStorageValue(_PVP_ROOM[03].CONTAGEM_PLAYER) or 0
27+ local D = Game.getStorageValue(_PVP_ROOM[04].CONTAGEM_PLAYER) or 0
28+ local E = Game.getStorageValue(_PVP_ROOM[05].CONTAGEM_PLAYER) or 0
29+ local F = Game.getStorageValue(_PVP_ROOM[06].CONTAGEM_PLAYER) or 0
30+
31+ if step == 00 then
32+ player:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F)
33+ return false
34+ end
35+ if step == 01 then
36+ if EnableLoad then
37+ local players = Game.getPlayers()
38+ for _, targetPlayer in ipairs(players) do
39+ targetPlayer:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F)
40+ end
41+ else
42+ onLoadPVPRoom(player, 00)
43+ end
44+ return false
45+ end
46+ end
47+ return false
48+end
49+local function onBattleroyalZone(timer)
50+ local id = 04
51+ local DmgZone = 500
52+ local ZoneEffect = 11
53+ if Game.getStorageValue(_PVP_ROOM[00].BATTLE_PLAYER) == 01 then
54+ Game.setStorageValue(_PVP_ROOM[00].BATTLE_PLAYER, nil)
55+ local from = _PVP_ROOM[id].ARENA_POS[00].POS_X
56+ local to = _PVP_ROOM[id].ARENA_POS[00].POS_Y
57+ for A = from.x, to.x do
58+ for B = from.y, to.y do
59+ for C = from.z, to.z do
60+ local tile = Tile(A, B, C)
61+ if tile then
62+ local creature = tile:getTopCreature()
63+ if creature and creature:isPlayer() then
64+ Game.setStorageValue(_PVP_ROOM[id].CONTAGEM_PLAYER, nil)
65+ Game.setStorageValue(_PVP_ROOM[00].BATTLE_PLAYER, nil)
66+ creature:setTown(Town(01))
67+ creature:sendCancelMessage("@NoTeleport 00")
68+ creature:sendCancelMessage("@CronOff")
69+ creature:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, nil)
70+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, nil)
71+ creature:teleportTo({x=3999, y=991, z=7})
72+ creature:getPosition():sendMagicEffect(11)
73+ onLoadPVPRoom(creature, 00)
74+
75+ onRewardPVP(creature, _PVP_ROOM[id].CRONOMETRO)
76+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� venceu o BattleRoyal.")
77+ return true
78+ end
79+ end
80+ end
81+ end
82+ end
83+
84+ return true
85+ end
86+ if WaveCount > 00 then
87+ local from = _PVP_ROOM[id].WAVE[WaveCount].POS_X
88+ local to = _PVP_ROOM[id].WAVE[WaveCount].POS_Y
89+ for A = from.x, to.x do
90+ for B = from.y, to.y do
91+ for C = from.z, to.z do
92+ local PosEffect = Position(A, B, C)
93+ PosEffect:sendMagicEffect(ZoneEffect)
94+ local tile = Tile(A, B, C)
95+ if tile then
96+ local creature = tile:getTopCreature()
97+ if creature and creature:isPlayer() then
98+ doTargetCombat(0, creature, COMBAT_PHYSICALDAMAGE, -DmgZone, -DmgZone, CONST_ME_NONE)
99+ end
100+ end
101+ end
102+ end
103+ end
104+ end
105+ if WaveCount < 05 then
106+ if timer > 00 then
107+ timer = timer - 01
108+ if timer == 60 then
109+ local from = _PVP_ROOM[id].ARENA_POS[00].POS_X
110+ local to = _PVP_ROOM[id].ARENA_POS[00].POS_Y
111+ for A = from.x, to.x do
112+ for B = from.y, to.y do
113+ for C = from.z, to.z do
114+ local tile = Tile(A, B, C)
115+ if tile then
116+ local creature = tile:getTopCreature()
117+ if creature and creature:isPlayer() then
118+ creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A Zona de Combate ser� reduzida em 1 minuto.")
119+ end
120+ end
121+ end
122+ end
123+ end
124+ end
125+ else
126+ WaveCount = WaveCount + 01
127+ addEvent(onBattleroyalZone, 1000, 300)
128+ return true
129+ end
130+ addEvent(onBattleroyalZone, 1000, timer)
131+ end
132+end
133+local function onPVPTimer(id)
134+ Game.setStorageValue(_PVP_ROOM[id].CONTAGEM_PLAYER, nil)
135+ local players = Game.getPlayers()
136+ for _, creature in ipairs(players) do
137+ if creature:getStorageValue(_PVP_ROOM[00].PVP_SALA_ID) == id then
138+ creature:setTown(Town(01))
139+ creature:removeCondition(CONDITION_OUTFIT)
140+ creature:sendCancelMessage("@NoTeleport 00")
141+ creature:sendCancelMessage("@CronOff")
142+ creature:teleportTo({x=3999, y=991, z=7})
143+ creature:getPosition():sendMagicEffect(11)
144+ onLoadPVPRoom(creature, 00)
145+
146+ if id == 03 then
147+ if creature:getStorageValue(_PVP_ROOM[00].TIME_ID) == 01 then
148+ onRewardPVP(creature, _PVP_ROOM[id].CRONOMETRO)
149+ end
150+ else
151+ if _PVP_ROOM[id].PLACAR[01] > _PVP_ROOM[id].PLACAR[02] then
152+ if creature:getStorageValue(_PVP_ROOM[00].TIME_ID) == 02 then
153+ onRewardPVP(creature, _PVP_ROOM[id].CRONOMETRO)
154+ end
155+ elseif _PVP_ROOM[id].PLACAR[02] > _PVP_ROOM[id].PLACAR[01] then
156+ if creature:getStorageValue(_PVP_ROOM[00].TIME_ID) == 01 then
157+ onRewardPVP(creature, _PVP_ROOM[id].CRONOMETRO)
158+ end
159+ end
160+ end
161+
162+ -- DESAFIO
163+ if creature:getStorageValue(_DESAFIOS[00].DESAFIO_ID) > 00 then
164+ if id == 01 then
165+ onPlayerDesafios(creature, 69, 01)
166+ elseif id == 02 then
167+ onPlayerDesafios(creature, 70, 01)
168+ elseif id == 03 then
169+ onPlayerDesafios(creature, 71, 01)
170+ elseif id == 04 then
171+ onPlayerDesafios(creature, 72, 01)
172+ end
173+ end
174+ creature:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, nil)
175+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, nil)
176+ end
177+ end
178+
179+ if id == 04 then
180+ Game.setStorageValue(_PVP_ROOM[00].BATTLE_PLAYER, nil)
181+ end
182+ stopEvent(_PVP_ROOM[id].ADDEVENT_TIMER)
183+ _PVP_ROOM[id].ADDEVENT_TIMER = nil
184+end
185+local function onExhaustPVP(timer)
186+ if timer > 00 then
187+ timer = timer - 01
188+ addEvent(onExhaustPVP, 1000, timer)
189+ else
190+ EnableLoad = true
191+ end
192+end
193+local function onEnterPVP(id)
194+ local lobPlayers = {}
195+ local players = Game.getPlayers()
196+ for X = 01, _PVP_ROOM[id].MAX_PLAYER do
197+ for _, creature in ipairs(players) do
198+ if creature:getLevel() == _PVP_ROOM[id].LOB_PLAYERS[X] then
199+ creature:setTown(Town(_PVP_ROOM[id].TOWN_ID))
200+ creature:sendCancelMessage("@NoTeleport 01")
201+ creature:sendCancelMessage("@PVPCronometro ".. _PVP_ROOM[id].CRONOMETRO.. " 0")
202+ creature:teleportTo(_PVP_ROOM[id].ARENA_POS[X])
203+ creature:getPosition():sendMagicEffect(11)
204+
205+ if id == 01 then -- VERSUS
206+ if X == 01 or X == 04 then
207+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 01)
208+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
209+ condition:setTicks(-1)
210+ creature:addCondition(condition)
211+ end
212+ if X == 02 or X == 03 then
213+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 02)
214+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
215+ condition:setTicks(-1)
216+ creature:addCondition(condition)
217+ end
218+ elseif id == 02 then -- ARENA
219+ if X == 01 or X == 03 or X == 05 or X == 07 or X == 09 then
220+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 01)
221+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
222+ condition:setTicks(-1)
223+ creature:addCondition(condition)
224+ end
225+ if X == 02 or X == 04 or X == 06 or X == 08 or X == 10 then
226+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 02)
227+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
228+ condition:setTicks(-1)
229+ creature:addCondition(condition)
230+ end
231+ elseif id == 03 then -- CASTLE WAR
232+ if X == 01 or X == 03 or X == 05 or X == 07 or X == 09 or X == 11 or X == 13 or X == 15 or X == 17 or X == 19 then
233+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 01)
234+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
235+ condition:setTicks(-1)
236+ creature:addCondition(condition)
237+ end
238+ if X == 02 or X == 04 or X == 06 or X == 08 or X == 10 or X == 12 or X == 14 or X == 16 or X == 18 or X == 20 then
239+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 02)
240+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
241+ condition:setTicks(-1)
242+ creature:addCondition(condition)
243+ end
244+ elseif id == 05 then -- WARZONE
245+ if X == 01 or X == 03 or X == 05 or X == 07 or X == 09 or X == 11 or X == 13 or X == 15 or X == 17 or X == 19 or X == 21 or X == 23 or X == 25 or X == 27 or X == 29 then
246+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 01)
247+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
248+ condition:setTicks(-1)
249+ creature:addCondition(condition)
250+ end
251+ if X == 02 or X == 04 or X == 06 or X == 08 or X == 10 or X == 12 or X == 14 or X == 16 or X == 18 or X == 20 or X == 22 or X == 24 or X == 26 or X == 28 or X == 30 then
252+ creature:setStorageValue(_PVP_ROOM[00].TIME_ID, 02)
253+ condition:setOutfit({lookType = creature:getOutfit().lookType, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = creature:getOutfit().lookAddons})
254+ condition:setTicks(-1)
255+ creature:addCondition(condition)
256+ end
257+ end
258+ end
259+ end
260+ end
261+
262+ _PVP_ROOM[id].PLACAR[01] = 00
263+ _PVP_ROOM[id].PLACAR[02] = 00
264+ _PVP_ROOM[id].ADDEVENT_TIMER = addEvent(onPVPTimer, _PVP_ROOM[id].CRONOMETRO * 60 * 1000, id)
265+ if id == 03 then
266+ local MON_POS = {
267+ [01] = {POS = {x=4092, y=1149, z=7}},
268+ [02] = {POS = {x=4092, y=1186, z=7}},
269+ [03] = {POS = {x=4093, y=1165, z=6}},
270+ [04] = {POS = {x=4093, y=1167, z=6}},
271+ [05] = {POS = {x=4093, y=1169, z=6}},
272+ [06] = {POS = {x=4091, y=1167, z=4}},
273+ }
274+ for _MON = 01, #MON_POS do
275+ local tile = Tile(MON_POS[_MON].POS.x, MON_POS[_MON].POS.y, MON_POS[_MON].POS.z)
276+ local creature = tile:getTopCreature()
277+ if creature and creature:isMonster() then
278+ doRemoveCreature(creature:getId())
279+ end
280+ Game.createMonster('Castle Barrier', MON_POS[_MON].POS, false, true)
281+ end
282+ end
283+ if id == 04 then
284+ Game.setStorageValue(_PVP_ROOM[00].BATTLE_PLAYER, _PVP_ROOM[id].MAX_PLAYER)
285+ WaveCount = 00
286+ onBattleroyalZone(301)
287+ end
288+
289+end
290+function onSay(player, words, param)
291+ local split = param:splitTrimmed(" ")
292+ local SALA_PVP_ID = tonumber(split[01])
293+ if split[01] == "00" then
294+ onLoadPVPRoom(player, 00)
295+ return false
296+ end
297+
298+ if SALA_PVP_ID > 00 and SALA_PVP_ID <= #_PVP_ROOM then
299+ if player:getStorageValue(_PVP_ROOM[00].PVP_SALA_ID) > 00 or player:getStorageValue(_SYSTEM.DANGEROUS[01][01].STORAGE) > 0 or player:getStorageValue(_SYSTEM.WARZONE) > 00 then
300+ player:popupFYI("Voc� n�o pode fazer isso nesse momento.")
301+ return false
302+ end
303+ local COUNT_PLAYER = Game.getStorageValue(_PVP_ROOM[SALA_PVP_ID].CONTAGEM_PLAYER) or 00
304+ if COUNT_PLAYER < 00 then
305+ COUNT_PLAYER = 00
306+ end
307+
308+ if COUNT_PLAYER == (_PVP_ROOM[SALA_PVP_ID].MAX_PLAYER - 01) then
309+ if SALA_PVP_ID < 06 then
310+ player:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, SALA_PVP_ID)
311+ Game.setStorageValue(_PVP_ROOM[SALA_PVP_ID].CONTAGEM_PLAYER, _PVP_ROOM[SALA_PVP_ID].MAX_PLAYER)
312+ player:teleportTo(_PVP_ROOM[SALA_PVP_ID].INN)
313+ table.insert(_PVP_ROOM[SALA_PVP_ID].LOB_PLAYERS, player:getLevel())
314+ table.sort(_PVP_ROOM[SALA_PVP_ID].LOB_PLAYERS, function(a, b) return a > b end)
315+ onEnterPVP(SALA_PVP_ID)
316+ else
317+ Game.setStorageValue(_PVP_ROOM[SALA_PVP_ID].CONTAGEM_PLAYER, (COUNT_PLAYER + 01))
318+ player:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, SALA_PVP_ID)
319+ player:teleportTo(_PVP_ROOM[SALA_PVP_ID].INN)
320+
321+ player:getPosition():sendMagicEffect(11)
322+ player:setTown(Town(_PVP_ROOM[SALA_PVP_ID].TOWN_ID))
323+ player:sendCancelMessage("@NoTeleport 01")
324+ player:sendCancelMessage("@EnablePVPMode")
325+ end
326+ elseif COUNT_PLAYER >= _PVP_ROOM[SALA_PVP_ID].MAX_PLAYER then
327+ player:getPosition():sendMagicEffect(03)
328+ return false
329+ else
330+ Game.setStorageValue(_PVP_ROOM[SALA_PVP_ID].CONTAGEM_PLAYER, (COUNT_PLAYER + 01))
331+ player:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, SALA_PVP_ID)
332+ player:teleportTo(_PVP_ROOM[SALA_PVP_ID].INN)
333+
334+ player:getPosition():sendMagicEffect(11)
335+ if SALA_PVP_ID < 06 then
336+ if Game.getStorageValue(_PVP_ROOM[SALA_PVP_ID].CONTAGEM_PLAYER) == 01 then
337+ for k in pairs (_PVP_ROOM[SALA_PVP_ID].LOB_PLAYERS) do
338+ _PVP_ROOM[SALA_PVP_ID].LOB_PLAYERS [k] = nil
339+ end
340+ else
341+ table.sort(_PVP_ROOM[SALA_PVP_ID].LOB_PLAYERS, function(a, b) return a > b end)
342+ end
343+ table.insert(_PVP_ROOM[SALA_PVP_ID].LOB_PLAYERS, player:getLevel())
344+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "O combate iniciar� automaticamente quando a sala completar o n�mero de participantes exigidos.\n[ " .._PVP_ROOM[SALA_PVP_ID].MAX_PLAYER .. " ].")
345+ else
346+ player:setTown(Town(_PVP_ROOM[SALA_PVP_ID].TOWN_ID))
347+ player:sendCancelMessage("@NoTeleport 01")
348+ player:sendCancelMessage("@EnablePVPMode")
349+ end
350+ end
351+ end
352+
353+ onLoadPVPRoom(player, 01)
354+ onExhaustPVP(03)
355+ EnableLoad = false
356+ return false
357+end
A data/talkactions/scripts/custom/rank.lua +70-0 View file
@@ -0,0 +1,70 @@
1+local BlockedName = {"Druid Sample", "Paladin Sample", "Knight Sample", "Rook Sample", "Soldier Sample"}
2+function onSay(player, words, param)
3+ local split = param:splitTrimmed(" ")
4+
5+ if _DEBUG_MODE then
6+ local _TYPE = {
7+ ["00"] = 'Rank Level',
8+ ["01"] = 'Rank Skill',
9+ }
10+ local skillType = {
11+ ["01"] = "Metralhadora",
12+ ["02"] = "Rifle",
13+ ["03"] = "Pistola",
14+ ["04"] = "Espingarda",
15+ }
16+
17+ if _TYPE[split[01]] then
18+ print("[TALK - RANK] " ..player:getName().. " - " .._TYPE[split[01]])
19+ else
20+ print("[TALK - RANK] " ..player:getName().. " - " ..split[01].. " | Skill: " ..skillType[split[02]])
21+ end
22+ end
23+ if split[01] == "00" then -- RANK LEVEL
24+ local RankLevel = db.storeQuery('SELECT name, level FROM `players` WHERE group_id < 2 ORDER BY level DESC LIMIT 50;')
25+ if RankLevel then
26+ local i = 1
27+ repeat
28+ if not isInArray(BlockedName, result.getDataString(RankLevel, "name")) then
29+ player:sendCancelMessage("@RankLevel#" ..i.. "#" ..result.getDataString(RankLevel, "name").. "#" ..result.getDataInt(RankLevel, "level"))
30+ i = i + 1
31+ end
32+ until not result.next(RankLevel)
33+ result.free()
34+ end
35+ end
36+ if split[01] == "01" then -- RANK SKILLS
37+ local SkillType = split[02]
38+ local RankSkills = ""
39+ if SkillType == "01" then -- METRALHADORA
40+ RankSkills = db.storeQuery('SELECT name, skill_club FROM `players` WHERE group_id < 2 ORDER BY skill_club DESC LIMIT 50;')
41+ elseif SkillType == "02" then -- RIFLE
42+ RankSkills = db.storeQuery('SELECT name, skill_sword FROM `players` WHERE group_id < 2 ORDER BY skill_sword DESC LIMIT 50;')
43+ elseif SkillType == "03" then -- PISTOLA
44+ RankSkills = db.storeQuery('SELECT name, skill_axe FROM `players` WHERE group_id < 2 ORDER BY skill_axe DESC LIMIT 50;')
45+ elseif SkillType == "04" then -- ESPINGARDA
46+ RankSkills = db.storeQuery('SELECT name, skill_fist FROM `players` WHERE group_id < 2 ORDER BY skill_fist DESC LIMIT 50;')
47+ end
48+
49+ if RankSkills then
50+ local i = 1
51+ repeat
52+ if not isInArray(BlockedName, result.getDataString(RankSkills, "name")) then
53+ if SkillType == "01" then -- METRALHADORA
54+ player:sendCancelMessage("@RankSkills#" ..i.. "#" ..result.getDataString(RankSkills, "name").. "#" ..result.getDataInt(RankSkills, "skill_club"))
55+ elseif SkillType == "02" then -- RIFLE
56+ player:sendCancelMessage("@RankSkills#" ..i.. "#" ..result.getDataString(RankSkills, "name").. "#" ..result.getDataInt(RankSkills, "skill_sword"))
57+ elseif SkillType == "03" then -- PISTOLA
58+ player:sendCancelMessage("@RankSkills#" ..i.. "#" ..result.getDataString(RankSkills, "name").. "#" ..result.getDataInt(RankSkills, "skill_axe"))
59+ elseif SkillType == "04" then -- ESPINGARDA
60+ player:sendCancelMessage("@RankSkills#" ..i.. "#" ..result.getDataString(RankSkills, "name").. "#" ..result.getDataInt(RankSkills, "skill_fist"))
61+ end
62+ i = i + 1
63+ end
64+ until not result.next(RankSkills)
65+ result.free()
66+ end
67+ end
68+
69+ return false
70+end
A data/talkactions/scripts/custom/rune.lua +24-0 View file
@@ -0,0 +1,24 @@
1+function onSay(player, words, param)
2+ if player:getGroup():getId() < 6 then
3+ return false
4+ end
5+
6+ local effectId, targetName = param:match("(%d+),%s*(.+)")
7+ effectId = tonumber(effectId)
8+
9+ if not effectId or not targetName then
10+ player:sendCancelMessage("Usage: /rune <effectId>, <playerName>")
11+ return false
12+ end
13+
14+ local target = Player(targetName)
15+ if not target then
16+ player:sendCancelMessage("Player not found.")
17+ return false
18+ end
19+
20+ target:addRuneEffect(effectId)
21+ target:setCurrentRuneEffect(effectId)
22+ player:sendCancelMessage("Rune effect " .. effectId .. " assigned to " .. targetName .. ".")
23+ return false
24+end
A data/talkactions/scripts/custom/save.lua +9-0 View file
@@ -0,0 +1,9 @@
1+function onSay(player, words, param)
2+ if player:getGroup():getId() < 3 then
3+ return false
4+ end
5+
6+ saveServer()
7+ Game.broadcastMessage("Todo o servidor foi salvo.")
8+ return false
9+end
A data/talkactions/scripts/custom/spy.lua +34-0 View file
@@ -0,0 +1,34 @@
1+function onSay(player, words, param)
2+ local split = param:splitTrimmed("|")
3+
4+ local NAME = split[01]
5+ local tid = Player(NAME)
6+ if(not tid) then
7+ player:sendCancelMessage("@FechandoSpy")
8+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. NAME .. " not found.")
9+ return false
10+ end
11+
12+ if _DEBUG_MODE then
13+ print("[TALK - SPY] " ..player:getName().. " - Olhando o SET de: " ..NAME)
14+ end
15+ for ITEM_SET = 01, 10 do
16+ local UID_01 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_01)
17+ local UID_02 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_02)
18+ local UID_03 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_03)
19+ local UID_04 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_04)
20+ local UID_05 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_05)
21+ local UID_06 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_06)
22+ local UID_07 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_07)
23+ local UID_08 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_08)
24+ local UID_09 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_09)
25+ local UID_10 = tid:getStorageValue(_SYSTEM.INVENTARIO[ITEM_SET].UID_10)
26+ local GOLD = PlayerGoldCoins(tid, 00)
27+ local ONLI = tid:getStorageValue(_SYSTEM.ONLINE_COIN)
28+
29+ player:sendCancelMessage("@LoadSpySet|" ..ITEM_SET.. "|" ..UID_01.. "|" ..UID_02.. "|" ..UID_03.. "|" ..UID_04.. "|" ..UID_05.. "|" ..UID_06.. "|" ..UID_07.. "|" ..UID_08.. "|" ..UID_09.. "|" ..UID_10.. "|" ..GOLD.. "|" ..ONLI.. "|" ..NAME)
30+ end
31+
32+ player:sendCancelMessage("@SpyShow")
33+ return false
34+end
A data/talkactions/scripts/custom/tarefas.lua +118-0 View file
@@ -0,0 +1,118 @@
1+function onSay(player, words, param)
2+ local BOX_ITEMS = {
3+ [00] = {
4+ [01] = {005000, 02, "Power Box #01", 01, 020};
5+ [02] = {035000, 10, "Power Box #02", 01, 055};
6+ [03] = {070000, 15, "Power Box #03", 02, 090};
7+ [04] = {120000, 25, "Power Box #04", 03, 145};
8+ [05] = {200000, 40, "Power Box #05", 03, 180};
9+ };
10+ -- 11, 20, 22, 29, 32, 42, 51, 53, 60, 61, 65
11+ [01] = {10510, 10519, 10521, 10528, 10531, 10541, 10550, 10552, 10559, 10560, 10564};
12+ -- 04, 06, 14, 19, 23, 35, 36, 37, 39, 40, 43 70
13+ [02] = {10503, 10505, 10513, 10518, 10522, 10534, 10535, 10536, 10538, 10539, 10542, 10569};
14+ -- 01, 02, 05, 07, 09, 13, 33, 41, 46, 52, 59 63
15+ [03] = {10500, 10501, 10504, 10506, 10508, 10512, 10532, 10540, 10545, 10551, 10558, 10562};
16+ -- 03, 12, 16, 17, 30, 44, 47, 55, 56, 58, 68
17+ [04] = {10502, 10511, 10515, 10516, 10529, 10543, 10546, 10554, 10555, 10557, 10567};
18+ -- 15, 21, 24, 25, 38, 45, 48, 49, 50, 66
19+ [05] = {10514, 10520, 10523, 10524, 10537, 10544, 10547, 10548, 10549, 10565};
20+ }
21+ local split = param:splitTrimmed(" ")
22+ local BOX_ID = tonumber(split[01])
23+ local SaldoGold = PlayerGoldCoins(player, 00)
24+ if _DEBUG_MODE then
25+ print("[TALK - POWER BOX] " ..player:getName().. " - BoxID: " ..BOX_ID)
26+ end
27+
28+ if _CHEATS.POWERBOX_GOLD_FREE == false then
29+ if SaldoGold < BOX_ITEMS[00][BOX_ID][01] then
30+ player:getPosition():sendMagicEffect(CONST_ME_POFF)
31+ player:popupFYI("Voc� n�o tem dinheiro suficiente.")
32+ return false
33+ end
34+ end
35+ if player:getLevel() < BOX_ITEMS[00][BOX_ID][05] then
36+ player:getPosition():sendMagicEffect(CONST_ME_POFF)
37+ player:popupFYI("Voc� n�o tem nivel suficiente.")
38+ return false
39+ end
40+ if _CHEATS.POWERBOX_TOKENS_FREE == false then
41+ if BOX_ITEMS[00][BOX_ID][04] == 01 then
42+ if player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_1) < BOX_ITEMS[00][BOX_ID][02] then
43+ player:getPosition():sendMagicEffect(CONST_ME_POFF)
44+ player:popupFYI("Voc� n�o tem pontos suficiente.")
45+ return false
46+ end
47+ elseif BOX_ITEMS[00][BOX_ID][04] == 02 then
48+ if player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_2) < BOX_ITEMS[00][BOX_ID][02] then
49+ player:getPosition():sendMagicEffect(CONST_ME_POFF)
50+ player:popupFYI("Voc� n�o tem pontos suficiente.")
51+ return false
52+ end
53+ elseif BOX_ITEMS[00][BOX_ID][04] == 03 then
54+ if player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_3) < BOX_ITEMS[00][BOX_ID][02] then
55+ player:getPosition():sendMagicEffect(CONST_ME_POFF)
56+ player:popupFYI("Voc� n�o tem pontos suficiente.")
57+ return false
58+ end
59+ end
60+ end
61+
62+ local iid = BOX_ITEMS[BOX_ID][math.random(01, #BOX_ITEMS[BOX_ID])]
63+ local slo = 03
64+ local rar = _ITEMS[iid].RARE
65+ local sta = 00
66+ local qnt = 01
67+ local ext = 00
68+
69+ if doBackpack(player, 00, slo, ext, 01) then
70+ --doBackpack(player, 03, slo, ext, 01, iid) -- Procurar
71+ if doBackpack(player, 01, slo, ext, 0, iid, rar, sta, qnt, true) then
72+ player:getPosition():sendMagicEffect(14)
73+ end
74+
75+ if player:getStorageValue(_QUESTLOG[32].UID_01) == 2 then
76+ player:setStorageValue(_QUESTLOG[32].UID_01, 100)
77+ player:setStorageValue(_QUESTLOG[76].UID_01, 01)
78+ player:setStorageValue(_QUESTLOG[77].UID_01, 01)
79+
80+ player:getPosition():sendMagicEffect(14)
81+ end
82+ else
83+ player:popupFYI("Sua Backpack esta cheia.")
84+ player:getPosition():sendMagicEffect(03)
85+ return false
86+ end
87+
88+ if _CHEATS.POWERBOX_GOLD_FREE == false then
89+ PlayerGoldCoins(player, 01, BOX_ITEMS[00][BOX_ID][01])
90+ --player:setStorageValue(_SYSTEM.GOLD_COIN, player:getStorageValue(_SYSTEM.GOLD_COIN) - BOX_ITEMS[00][BOX_ID][01])
91+ end
92+ if _CHEATS.POWERBOX_TOKENS_FREE == false then
93+ if BOX_ITEMS[00][BOX_ID][04] == 01 then
94+ player:setStorageValue(_SYSTEM.TASK[00].TASK_COIN_1, player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_1) - BOX_ITEMS[00][BOX_ID][02])
95+ elseif BOX_ITEMS[00][BOX_ID][04] == 02 then
96+ player:setStorageValue(_SYSTEM.TASK[00].TASK_COIN_2, player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_2) - BOX_ITEMS[00][BOX_ID][02])
97+ elseif BOX_ITEMS[00][BOX_ID][04] == 03 then
98+ player:setStorageValue(_SYSTEM.TASK[00].TASK_COIN_3, player:getStorageValue(_SYSTEM.TASK[00].TASK_COIN_3) - BOX_ITEMS[00][BOX_ID][02])
99+ end
100+ end
101+
102+ -- DESAFIO
103+ if player:getStorageValue(_DESAFIOS[00].DESAFIO_ID) > 00 then
104+ if BOX_ID == 01 then
105+ onPlayerDesafios(player, 49, 01)
106+ elseif BOX_ID == 02 then
107+ onPlayerDesafios(player, 50, 01)
108+ elseif BOX_ID == 03 then
109+ onPlayerDesafios(player, 51, 01)
110+ elseif BOX_ID == 04 then
111+ onPlayerDesafios(player, 52, 01)
112+ elseif BOX_ID == 05 then
113+ onPlayerDesafios(player, 53, 01)
114+ end
115+ end
116+ doBackpack(player, 11)
117+ return false
118+end
A data/talkactions/scripts/custom/team.lua +475-0 View file
@@ -0,0 +1,475 @@
1+local MembersIds = {
2+ [01] = 00, -- Membro 01
3+ [02] = 00, -- Membro 02
4+}
5+
6+function getPlayerGUIDByName(name)
7+ local player = Player(name)
8+ if player then
9+ return player:getGuid()
10+ end
11+
12+ local resultId = db.storeQuery("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name))
13+ if resultId ~= false then
14+ local guid = result.getDataInt(resultId, "id")
15+ result.free(resultId)
16+ return guid
17+ end
18+ return 0
19+end
20+function getMemberTime(id, guid)
21+ local resultx = db.storeQuery("SELECT `player_id` FROM `player_storage` WHERE `key` = " .. _SISTEMA.TIME_STORAGE .. " AND `value` = " .. guid)
22+ MembersIds[01] = 00
23+ MembersIds[02] = 00
24+ local i = 0
25+ local players = Game.getPlayers()
26+
27+ if id == 01 then -- ENCONTRA OS MEMBROS DO TIME.
28+ for _, targetPlayer in ipairs(players) do
29+ if targetPlayer:getStorageValue(_SISTEMA.TIME_STORAGE) == guid then
30+ if targetPlayer:getGuid() ~= guid then
31+ if MembersIds[01] ~= targetPlayer:getGuid() and MembersIds[02] ~= targetPlayer:getGuid() then
32+ i = i + 1
33+ if MembersIds[i] then
34+ MembersIds[i] = targetPlayer:getGuid()
35+ end
36+ end
37+ end
38+ end
39+ end
40+
41+ if resultx then
42+ repeat
43+ local tid = Player(result.getDataInt(resultx, 'player_id'))
44+ if tid then
45+ if tid:getGuid() ~= guid and tid:getStorageValue(_SISTEMA.TIME_STORAGE) == guid then
46+ if MembersIds[01] ~= tid:getGuid() and MembersIds[02] ~= tid:getGuid() then
47+ i = i + 1
48+ if MembersIds[i] then
49+ MembersIds[i] = tid:getGuid()
50+ end
51+ end
52+ end
53+ else
54+ if result.getDataInt(resultx, 'player_id') ~= guid then
55+ if MembersIds[01] ~= result.getDataInt(resultx, 'player_id') and MembersIds[02] ~= result.getDataInt(resultx, 'player_id') then
56+ i = i + 1
57+ if MembersIds[i] then
58+ MembersIds[i] = result.getDataInt(resultx, 'player_id')
59+ end
60+ end
61+ end
62+ end
63+ until not result.next(resultx)
64+ result.free(resultx)
65+ end
66+
67+ if i > 00 then
68+ return true
69+ else
70+ return false
71+ end
72+ end
73+ return false
74+end
75+function onSay(player, words, param)
76+ local split = param:splitTrimmed(",")
77+
78+ --[[ CHECANDO OS MEMBROS DO SEU PR�PRIO TIME ]]--
79+ if split[01] == nil then
80+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
81+ local _cid = player:getStorageValue(_SISTEMA.TIME_STORAGE)
82+ local leader, member1, member2 = getPlayerNameByGUID(_cid), "<empty>", "<empty>"
83+ if getMemberTime(01, _cid) then
84+ if MembersIds[01] > 00 then
85+ member1 = getPlayerNameByGUID(MembersIds[01])
86+ if MembersIds[02] > 00 then
87+ member2 = getPlayerNameByGUID(MembersIds[02])
88+ end
89+ end
90+
91+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "TIME CRIADO POR [ " ..leader.. " ]\n> " ..member1.. "\n> " ..member2)
92+ return false
93+ else
94+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "TIME CRIADO POR [ " ..leader.. " ]\n> " ..member1.. "\n> " ..member2)
95+ return false
96+ end
97+ else
98+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Voc� n�o participa de nenhum time. Crie seu pr�prio time usando o comando !team create .")
99+ return false
100+ end
101+
102+ return false
103+ end
104+
105+ --[[ CRIANDO SEU PR�PRIO TIME ]]--
106+ if split[01] == "create" then
107+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) < 01 then
108+ player:setStorageValue(_SISTEMA.TIME_STORAGE, player:getGuid())
109+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Voc� acaba de criar seu pr�prio time!\nConvide at� 02 membros usando o comando !team invite nickname .")
110+ return false
111+ else
112+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o pode criar um time enquanto j� participa de um.")
113+ return false
114+ end
115+
116+ return false
117+ end
118+
119+ --[[ DELETANDO SEU PR�PRIO TIME ]]--
120+ if split[01] == "delete" then
121+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
122+ local _cid = player:getStorageValue(_SISTEMA.TIME_STORAGE)
123+ if _cid == player:getGuid() then
124+ if getMemberTime(01, _cid) then
125+ if MembersIds[01] > 00 then
126+ local memberName = getPlayerNameByGUID(MembersIds[01])
127+ local memberCid = Player(memberName)
128+ if memberCid then
129+ memberCid:setStorageValue(_SISTEMA.TIME_STORAGE, nil)
130+ memberCid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O lider desfez esse time. Voc� foi removido.")
131+ else
132+ db.asyncQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. MembersIds[01] .. " AND `key` = " .. _SISTEMA.TIME_STORAGE .. " AND `value` = " .. _cid .. ";")
133+ end
134+
135+ if MembersIds[02] > 00 then
136+ local memberName = getPlayerNameByGUID(MembersIds[02])
137+ local memberCid = Player(memberName)
138+ if memberCid then
139+ memberCid:setStorageValue(_SISTEMA.TIME_STORAGE, nil)
140+ memberCid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O lider desse desfez esse time. Voc� foi removido.")
141+ else
142+ db.asyncQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. MembersIds[02] .. " AND `key` = " .. _SISTEMA.TIME_STORAGE .. " AND `value` = " .. _cid .. ";")
143+ end
144+ end
145+ end
146+
147+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Os jogadores foram removidos da equipe. Voc� deletou seu time com sucesso.")
148+ else
149+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Voc� deletou seu time com sucesso.")
150+ end
151+
152+ player:setStorageValue(_SISTEMA.TIME_STORAGE, nil)
153+ return false
154+ else
155+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Somente o lider desse time pode usar esse comando.")
156+ return false
157+ end
158+ else
159+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o tem permiss�o para usar esse comando.")
160+ return false
161+ end
162+
163+ return false
164+ end
165+
166+ --[[ CONVIDANDO OUTROS JOGADORES PARA SEU TIME ]]--
167+ if split[01] == "invite" then
168+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
169+ local _cid = player:getStorageValue(_SISTEMA.TIME_STORAGE)
170+ if _cid == player:getGuid() then
171+ if split[02] ~= nil then
172+ local tid = Player(split[02])
173+ if(not tid) then
174+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Jogador n�o encontrado ou offline.")
175+ return false
176+ else
177+ if player:getStorageValue(_SISTEMA.INVITE_TIME_DELAY) < 01 then
178+ getMemberTime(01, _cid)
179+ if MembersIds[02] == 00 then
180+ _tid = getPlayerGUIDByName(split[02])
181+ if _tid == player:getGuid() then
182+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o pode enviar um convite para si mesmo.")
183+ return false
184+ end
185+ if tid:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
186+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O jogador alvo j� est� em um time.")
187+ return false
188+ else
189+ if tid:getStorageValue(_SISTEMA.INVITE_TIME_MAIN) < 01 then
190+ player:setStorageValue(_SISTEMA.INVITE_TIME_DELAY, _SISTEMA.INVITE_SECONDS_TIMER)
191+ tid:setStorageValue(_SISTEMA.INVITE_TIME_SECONDS, _SISTEMA.INVITE_SECONDS_TIMER)
192+ tid:setStorageValue(_SISTEMA.INVITE_TIME_MAIN, _cid)
193+
194+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Voc� enviou um convite para " ..tid:getName().. ". Aguarde sua resposta.")
195+ else
196+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Este jogador possui um convite em aberto. Aguarde.")
197+ return false
198+ end
199+ end
200+ else
201+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O limite � de 03 jogadores por time.")
202+ return false
203+ end
204+ else
205+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Aguarde um retorno do convite que voc� j� enviou.")
206+ return false
207+ end
208+ end
209+ else
210+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Falta par�metros. Digite o nome do jogador para enviar o convite.")
211+ return false
212+ end
213+ else
214+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Somente o lider desse time pode usar esse comando.")
215+ return false
216+ end
217+ else
218+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o tem permiss�o para usar esse comando.")
219+ return false
220+ end
221+ end
222+
223+ --[[ ACEITANDO PARTICIPAR DE UM TIME ]]--
224+ if split[01] == "accept" then
225+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) < 01 then
226+ if player:getStorageValue(_SISTEMA.INVITE_TIME_MAIN) > 00 then
227+ player:setStorageValue(_SISTEMA.TIME_STORAGE, player:getStorageValue(_SISTEMA.INVITE_TIME_MAIN))
228+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Voc� aceitou o convite e agora faz parte do time do jogador " ..getPlayerNameByGUID(player:getStorageValue(_SISTEMA.INVITE_TIME_MAIN)).. ".")
229+ local _cid = Player(getPlayerNameByGUID(player:getStorageValue(_SISTEMA.INVITE_TIME_MAIN)))
230+ if _cid then
231+ _cid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O jogador " ..player:getName().. " aceitou seu convite e agora faz parte do seu time.")
232+ end
233+ player:setStorageValue(_SISTEMA.INVITE_TIME_MAIN, nil)
234+ player:setStorageValue(_SISTEMA.INVITE_TIME_SECONDS, nil)
235+ return false
236+ else
237+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o tem permiss�o para usar esse comando no momento.")
238+ return false
239+ end
240+ else
241+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� j� participa de um time.")
242+ return false
243+ end
244+ end
245+
246+ --[[ SAINDO DE UM TIME ]]--
247+ if split[01] == "exit" then
248+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
249+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) ~= player:getGuid() then
250+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Voc� n�o pertence mais ao time do jogador " ..getPlayerNameByGUID(player:getStorageValue(_SISTEMA.TIME_STORAGE)).. ".")
251+ player:setStorageValue(_SISTEMA.TIME_STORAGE, nil)
252+ return false
253+ else
254+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Somente membros do time podem usar esse comando. Lider deve usar o comando !team delete para excluir o grupo por completo.")
255+ return false
256+ end
257+ else
258+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� precisa estar participando de um time para poder usar esse comando.")
259+ return false
260+ end
261+ end
262+
263+ --[[ REMOVENDO UM JOGADOR DO SEU TIME ]]--
264+ if split[01] == "remove" then
265+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
266+ local _cid = player:getStorageValue(_SISTEMA.TIME_STORAGE)
267+ if _cid == player:getGuid() then
268+ if split[02] ~= nil then
269+ local tid = Player(split[02])
270+ if(not tid) then
271+ if getPlayerGUIDByName(split[02]) > 00 then
272+ tid = getPlayerGUIDByName(split[02])
273+ db.asyncQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. tid .. " AND `key` = " .. _SISTEMA.TIME_STORAGE .. " AND `value` = " .. _cid .. ";")
274+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Voc� removeu o jogador " ..split[02].. " do seu time.")
275+ return false
276+ else
277+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Jogador com o nome '" ..split[02].. "' n�o foi encontrado.")
278+ return false
279+ end
280+ else
281+ tid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� foi expulso do time pelo lider " ..getPlayerNameByGUID(player:getStorageValue(_SISTEMA.TIME_STORAGE)).. ".")
282+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Voc� removeu o jogador " ..split[02].. " do seu time.")
283+ tid:setStorageValue(_SISTEMA.TIME_STORAGE, nil)
284+ return false
285+ end
286+ else
287+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Falta par�metros. Digite o nome do jogador para remover do seu time.")
288+ return false
289+ end
290+ else
291+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Somente o lider do time pode usar esse comando.")
292+ return false
293+ end
294+ else
295+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o tem permiss�o para usar esse comando.")
296+ return false
297+ end
298+ end
299+
300+ --[[ VERIFICA O RANK POR VIT�RIA DE TODO O SERVIDOR ]]--
301+ if split[01] == "rank" then
302+ local str = "[ RANK POR VIT�RIAS ]\n\n"
303+ local i = 1
304+ local Rank = db.storeQuery('SELECT * FROM `players` ORDER BY `' .. _SISTEMA.DB_VICTORY .. '` DESC LIMIT ' .. _SISTEMA.TOP_RANK .. ';')
305+ if Rank then
306+ repeat
307+ local number = ""
308+ if i < 10 then
309+ number = "0" ..i
310+ else
311+ number = i
312+ end
313+
314+ local RankName = ""
315+ for X = 01, #_SISTEMA.RANKS do
316+ if result.getDataInt(Rank, _SISTEMA.DB_VICTORY) >= _SISTEMA.RANKS[X].VALUE then
317+ RankName = _SISTEMA.RANKS[X].NAME
318+ break
319+ end
320+ end
321+ str = str.. "[" ..number.. "] - " ..result.getDataString(Rank, "name").. " (" ..RankName.. " | " ..result.getDataInt(Rank, _SISTEMA.DB_VICTORY).. " vit�rias)\n"
322+ i = i + 1
323+ until not result.next(Rank)
324+ result.free()
325+ end
326+
327+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, str)
328+ return false
329+ end
330+
331+ --[[ COMANDO PARA INICIAR/ACEITAR/REJEITAR UMA BATALHA ]]--
332+ if split[01] == "fight" then
333+ if player:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
334+ local _cid = player:getStorageValue(_SISTEMA.TIME_STORAGE)
335+ if _cid == player:getGuid() then
336+ if split[02] ~= nil then
337+ if split[02] == "war" then
338+ if split[03] ~= nil then
339+ local tid = Player(split[03])
340+ if(not tid) then
341+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Jogador n�o encontrado ou offline.")
342+ return false
343+ else
344+ if tid:getStorageValue(_SISTEMA.INVITE_WAR_MAIN) < 01 then
345+ if tid:getStorageValue(_SISTEMA.TIME_STORAGE) > 00 then
346+ if tid:getStorageValue(_SISTEMA.TIME_STORAGE) == tid:getGuid() then
347+ tid:setStorageValue(_SISTEMA.INVITE_WAR_SECONDS, _SISTEMA.WAR_SECONDS_TIMER)
348+ tid:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, _cid)
349+ player:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, _cid)
350+
351+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Voc� enviou um convite para batalhar com o time do jogador " ..tid:getName().. ". Aguarde sua resposta.")
352+ return false
353+ else
354+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O jogador precisa ser o lider do time para receber o convite.")
355+ return false
356+ end
357+ else
358+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O jogador precisa estar em um time para receber o convite.")
359+ return false
360+ end
361+ else
362+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O time advers�rio j� possui um convite para uma batalha. Aguarde sua resposta.")
363+ return false
364+ end
365+ end
366+ else
367+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Falta par�metros. Digite o nome do jogador lider do time que deseja enfrentar.")
368+ return false
369+ end
370+ elseif split[02] == "accept" then
371+ if player:getStorageValue(_SISTEMA.INVITE_WAR_MAIN) > 00 then
372+ local tid = Player(getPlayerNameByGUID(player:getStorageValue(_SISTEMA.INVITE_WAR_MAIN)))
373+ local TotalMyTime = 00
374+ local TotalAdTime = 00
375+ local players = Game.getPlayers()
376+
377+ for _, targetPlayer in ipairs(players) do
378+ if targetPlayer:getStorageValue(_SISTEMA.TIME_STORAGE) == player:getGuid() then
379+ TotalMyTime = TotalMyTime + 01
380+ elseif targetPlayer:getStorageValue(_SISTEMA.TIME_STORAGE) == player:getStorageValue(_SISTEMA.INVITE_WAR_MAIN) then
381+ TotalAdTime = TotalAdTime + 01
382+ end
383+ end
384+
385+ if TotalMyTime == 03 then
386+ if TotalAdTime == 03 then
387+ local checkArea = 0
388+ local from = _SISTEMA.ARENA[01]
389+ local to = _SISTEMA.ARENA[02]
390+ for A = from.x, to.x do
391+ for B = from.y, to.y do
392+ for C = from.z, to.z do
393+ local tile = Tile(A, B, C)
394+ local creature = tile:getTopCreature()
395+ if creature and creature:isPlayer() then
396+ checkArea = 1
397+ break
398+ end
399+ end
400+ end
401+ end
402+
403+ if checkArea == 01 then
404+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "A arena de batalha est� ocupada. Convite para a batalha cancelado.")
405+ tid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "A arena de batalha est� ocupada. Convite para a batalha cancelado.")
406+ tid:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
407+ player:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
408+ return false
409+ else
410+ for _, targetPlayer in ipairs(players) do
411+ if targetPlayer:getStorageValue(_SISTEMA.TIME_STORAGE) == player:getGuid() then
412+ targetPlayer:teleportTo(_SISTEMA.ARENA[03])
413+ targetPlayer:getPosition():sendMagicEffect(03)
414+ targetPlayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Elimine o time advers�rio para subir de Rank")
415+ targetPlayer:setStorageValue(_SISTEMA.TIME_WAR_STORAGE, 01)
416+ elseif targetPlayer:getStorageValue(_SISTEMA.TIME_STORAGE) == player:getStorageValue(_SISTEMA.INVITE_WAR_MAIN) then
417+ targetPlayer:teleportTo(_SISTEMA.ARENA[04])
418+ targetPlayer:getPosition():sendMagicEffect(03)
419+ targetPlayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Elimine o time advers�rio para subir de Rank")
420+ targetPlayer:setStorageValue(_SISTEMA.TIME_WAR_STORAGE, 02)
421+ end
422+ end
423+
424+ Game.setStorageValue(_SISTEMA.FIGHT_PLACAR[01].GLOBAL_PLACAR, 00)
425+ Game.setStorageValue(_SISTEMA.FIGHT_PLACAR[02].GLOBAL_PLACAR, 00)
426+ return false
427+ end
428+ else
429+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O time advers�rio n�o est� totalmente online. Convite para a batalha foi cancelado.")
430+ tid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O seu time n�o est� totalmente online. Convite para a batalha foi cancelado.")
431+ tid:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
432+ player:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
433+ return false
434+ end
435+ else
436+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O seu time n�o est� totalmente online. Convite para a batalha foi cancelado.")
437+ tid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O time advers�rio n�o est� totalmente online. Convite para a batalha foi cancelado.")
438+ player:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
439+ tid:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
440+ return false
441+ end
442+ else
443+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o tem permiss�o para usar esse comando.")
444+ return false
445+ end
446+ elseif split[02] == "reject" then
447+ if player:getStorageValue(_SISTEMA.INVITE_WAR_MAIN) > 00 then
448+ local tid = Player(getPlayerNameByGUID(player:getStorageValue(_SISTEMA.INVITE_WAR_MAIN)))
449+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "O time advers�rio rejeitou o convite para a batalha.")
450+ tid:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� rejeitou o convite para a batalha.")
451+ tid:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
452+ player:setStorageValue(_SISTEMA.INVITE_WAR_MAIN, nil)
453+
454+ return false
455+ else
456+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o tem permiss�o para usar esse comando.")
457+ return false
458+ end
459+ end
460+ else
461+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Falta par�metros. Digite ' war nickname ' para desagiar o time advers�rio.")
462+ return false
463+ end
464+ else
465+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Somente o lider do time pode usar esse comando.")
466+ return false
467+ end
468+ else
469+ player:sendTextMessage(MESSAGE_STATUS_CONSOLE_RED, "Voc� n�o tem permiss�o para usar esse comando.")
470+ return false
471+ end
472+ end
473+
474+ return false
475+end
Top