GhostWD
I'm in love with the var_dump()
- Joined
- Jan 25, 2009
- Messages
- 185
- Solutions
- 6
- Reaction score
- 29
Hello OTLanders,
I have problem with my script or maybe engine cause when I use this script and I create item with /i 797 without having helmet or using chest with that item
error occurs Segmentation Fault
<movevent type="Equip" itemid="797" slot="head" event="script" value="frozenhelmet.lua"/>
<movevent type="DeEquip" itemid="797" slot="head" event="script" value="frozenhelmet.lua"/>
Thank you for reply
I have problem with my script or maybe engine cause when I use this script and I create item with /i 797 without having helmet or using chest with that item
error occurs Segmentation Fault
<movevent type="Equip" itemid="797" slot="head" event="script" value="frozenhelmet.lua"/>
<movevent type="DeEquip" itemid="797" slot="head" event="script" value="frozenhelmet.lua"/>
Lua:
local rateAdded = 0.15
function onEquip(cid, item, slot)
local rateNow = getPlayerRates(cid)[SKILL__LEVEL]
if getPlayerSlotItem(cid, slot).itemid == item.itemid then
doPlayerSetExperienceRate(cid, rateNow+rateAdded)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have equipped frozen helmet")
return true
end
return true
end
function onDeEquip(cid, item, slot)
local rateNow = getPlayerRates(cid)[SKILL__LEVEL]
doPlayerSetExperienceRate(cid, rateNow-rateAdded)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have deequipped frozen helmet")
return true
end