• 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!

Heal based on level.

Donio

Banned User
Joined
Jun 24, 2008
Messages
4,004
Reaction score
16
Location
Manhattan, New York
Hey Im having some issues with a rune for the knights on my server..

I got the uhp wich heals 1.5 to 2k.. but thats for all levels above 130...

But im trying to do a rune that heals depending on your level.. maybe even magic level..
How can that be done?.. I tried modifying my manarune script and change AddHealth insted of AddMana but no luck.. so I turned here to the support thread..

If its action it would be great.. if not spells.xml data/spells/healing works just as good i suppose
 
I released a mana rune with instructions on how to change it to refill health.

Search the resources/actions area.
 
I already got a script.. Here is the text from a post that i added in recourses:

Hello, im trying to make a rune or EVEN the ultimate healing pot for knights to heal depending on their level + magic level.. This is how far I'v come-- But the thing is it Dont work!

If any one can see whats causing it to not work please help me out!


Code:
local runes = {
	[2275] = {
		voc = {4, 8},
		min = 'level * 1 + maglv * 3 - 2',
		max = 'level * 1 + maglv * 4'

}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local i = runes[item.itemid]
	if isInArray(i.voc, getPlayerVocation(cid)) then
		if isPlayer(itemEx.uid) == TRUE then
			level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
			doPlayerAddHealth(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
			doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
			doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
			doRemoveItem(item.uid, 0)
		else
			doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
		end
	else
		doPlayerSendCancel(cid, 'Your vocation cannot use this rune.')
	end
	return true
end
 
Back
Top