Toma aí
data/creaturescripts/scripts/advanceequip.lua
local config = {
[1] = {
[CONST_SLOT_HEAD] = 2323,
[CONST_SLOT_ARMOR] = 8871,
[CONST_SLOT_RIGHT] = 0,
[CONST_SLOT_LEFT] = 8901,
[CONST_SLOT_LEGS] = 7730,
[CONST_SLOT_FEET] = 2195
},
[2] = {
[CONST_SLOT_HEAD] = 2323,
[CONST_SLOT_ARMOR] = 8871,
[CONST_SLOT_RIGHT] = 0,
[CONST_SLOT_LEFT] = 8901,
[CONST_SLOT_LEGS] = 7730,
[CONST_SLOT_FEET] = 2195
},
[3] = {
[CONST_SLOT_HEAD] = 2498,
[CONST_SLOT_ARMOR] = 8891,
[CONST_SLOT_RIGHT] = 0,
[CONST_SLOT_LEFT] = 2520,
[CONST_SLOT_LEGS] = 2470,
[CONST_SLOT_FEET] = 2195
},
[4] = {
[CONST_SLOT_HEAD] = 2498,
[CONST_SLOT_ARMOR] = 2487,
[CONST_SLOT_RIGHT] = 0,
[CONST_SLOT_LEFT] = 2520,
[CONST_SLOT_LEGS] = 2470,
[CONST_SLOT_FEET] = 2645
}
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL) then
if(newLevel == 65) then
if not config[getPlayerVocation(cid)] then
return true
end
local tmp = config[getPlayerVocation(cid)]
for slotid, itemid in pairs(tmp) do
local g = getPlayerSlotItem(cid, slotid)
if g.uid > 0 then
doRemoveItem(g.uid)
end
if itemid > 0 then
doPlayerAddItemEx(cid, doCreateItemEx(itemid, 1), false, slotid)
end
end
end
end
return true
end
creaturescripts.xml
<event type="advance" name="AdvanceEquip" event="script" value="advanceequips.lua"/>
login.lua
registerCreatureEvent(cid, "AdvanceEquip")
Lembrando que em alguns servidores antigos, como o 0.3.6pl1, não tem como adicionar o equipamento EXATAMENTE em um certo slot.
Abraços.



info
Grupo: Marquês
Registrado: 06/11/11
Posts: 1.1k
Reputação: +109
Char no Tibia: Stroked
1: Transformar item tal level...
Como Funciona:
Exemplo: O jogador ao pegar level 65, os itens que estam em seu corpo (seu set), todos se quebram, e se transformam em outros.
Mas claro depende da vocação e do set:
Paladins:
- Helmet <-> Royal Helmet -
- Armor <-> Paladin Armor -
- Shield <-> Demon Shield -
- Legs <-> Golden Legs -
- Boots <-> Boh -
Knight:
- Helmet <-> Royal Helmet -
- Armor <-> Crown Armor -
- Shield <-> Demon Shield -
- Legs <-> Golden Legs -
- Boots <-> Steel Boots
Druid / Sorcerer:
- Helmet <-> Hat Of The Mad -
- Armor <-> Focus Cape -
- Legs <-> Blue Legs
- Shield <-> Spellbook of Warding
- Boots <-> Boots Of Haste
__________________________
Obrigado! Me ajude também: http://www.xtibia.com/forum/topic/203278-tutorial-inicial-script-nivel-medio/page__fromsearch__1
Editado Janeiro 4 por GuizitoG