ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
I put the script in the actions folder and did edit the actions file as well. Heres the script
I edited it to be a necklace in items.xml and you can wear it, but it does nothing.
LUA:
function onEquip(cid, item, slot)
if isPlayer(cid) then
local sword = getPlayerSkillLevel(cid, 2)
local axe = getPlayerSkillLevel(cid, 3)
local club = getPlayerSkillLevel(cid, 1)
local base = getCreatureMaxHealth(cid)
if sword > axe or sword > club then
setCreatureMaxHealth(cid, (base + sword))
return true
end
if axe > sword or axe > club then
setCreatureMaxHealth(cid, (base + axe))
return true
end
if club > axe and club > sword then
setCreatureMaxHealth(cid, (base + club))
return true
end
return true
end
return true
end
I edited it to be a necklace in items.xml and you can wear it, but it does nothing.