HeberPcL
[PowerOT.com.br]
Gentlemen, I can't get the movement add the Magic Level to the player using Script.
Any idea how to solve?
items.xml
movements.xml
No script, add magic level 3.
Need work magic level with script.
EquipAlert.lua Script
Any idea how to solve?
items.xml
PHP:
<item id="2542" article="a" name="tempest shield">
<attribute key="weight" value="5100"/>
<attribute key="defense" value="30"/>
<attribute key="weaponType" value="shield"/>
<attribute key="magiclevelpoints" value="3"/>
</item>
movements.xml
No script, add magic level 3.
PHP:
<movevent type="Equip" itemid="2542" slot="shield" event="function" value="onEquipItem">
<vocation id="1"/>
<vocation id="5" showInDescription="1"/>
<vocation id="2"/>
<vocation id="6" showInDescription="1"/>
</movevent>
<movevent type="DeEquip" itemid="2542" slot="shield" event="function" value="onDeEquipItem"/>
Need work magic level with script.
PHP:
<movevent event="Equip" itemid="2542" slot="shield" function="onEquipItem" script="EquipAlert.lua">
<vocation id="1"/>
<vocation id="5" showInDescription="1"/>
<vocation id="2"/>
<vocation id="6" showInDescription="1"/>
</movevent>
<movevent event="DeEquip" itemid="2542" slot="shield" function="onDeEquipItem" script="EquipAlert.lua"/>[/COLOR]
PHP:
function onEquip(cid, item, slot)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Equip Tempest Shield - Magic Level +3")
return true
end
function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "DeEquip Tempest Shield - Magic Level -3")
return true
end
Last edited: