• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua custom amulet does nothing

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

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.
 
It's a movement, not an action, you can look at the other onEquip lines how to add it, but then add them as a script instead of a function.
 
Back
Top