• 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 wont work

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
Okay, I have it set right in movements.xml and in items.xml because it used to work but was bugged, and ever since I fixed it I can't get it to work again. Here is the script

LUA:
	function onEquip(cid, item, slot)

		if (getPlayerVocation(cid) == 8 or 4) then
			local sword = getPlayerSkillLevel(cid, 2) 
			local axe = getPlayerSkillLevel(cid, 3)
			local club = getPlayerSkillLevel(cid, 1)
			local base = getCreatureMaxHealth(cid)

	if sword => 40 or  then
		setCreatureMaxHealth(cid, (base + sword))
			if (getCreatureMaxHealth(cid) = base - sword) then
				doCreatureAddHealth(cid, sword)
		return true
		end
	return true
	end


	if axe => 40 then
		setCreatureMaxHealth(cid, (base + axe))
			if (getCreatureMaxHealth(cid) = base - axe) then
				doCreatureAddHealth(cid, axe)
			return true
			end
		return true
	end

	if club => 40 then
		setCreatureMaxHealth(cid, (base + club))
		if (getCreatureMaxHealth(cid) = base - club) then
			doCreatureAddHealth(cid, club)
		return true
		end
	return true
	end
return true
end
else
doCreatureSay(cid, "You can not wear this amulet as you are not a knight.", TALKTYPE_ORANGE_1)
return true
end

function onDeEquip(cid, item, slot)
	setCreatureMaxHealth(cid, base)

return true
end

When you put the amulet on, it just does not change your hp at all, even as a knight and with axe as 81
 
Back
Top