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

Spirit rune - Only showing either mana or health not both

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,488
Solutions
18
Reaction score
199
Location
Sweden
Hello i have a problem with this script below, i recently found a good working mana rune and made it to heal health also (like great spirit potion) but only the mana shows when using.
If i put:
LUA:
doCreatureAddHealth(cid, health_add)
below the mana, the health only shows. Have also been looking around in potions.lua since spirit potions both shows health and mana but couldn't find anything there.

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)

local config = {
	level = 200000
	}
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level = getPlayerLevel(cid)
	local health_minimum = (level * 2.9) - 50
	local health_maximum = (level * 3.4)
	local health_add = math.random(health_minimum, health_maximum)
	local mana_minimum = (level * 2.9) - 50
	local mana_maximum = (level * 3.4)
	local mana_add = math.random(mana_minimum, mana_maximum)
	
	if getPlayerLevel(cid) >= config.level and getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
     doCreatureAddHealth(cid, health_add)
     doPlayerAddMana(cid, mana_add)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "[Spirit rune]", TALKTYPE_ORANGE_1)
else
	doPlayerSendCancel(cid, "You need to be at least level 200.000 to use this rune. Only paladins can use this rune.")
	return TRUE
end
end

Rep for help.
 
Last edited:
it will show at the same time, so you'll see two text on top of each other (most likely), just do an addevent(doSendAnimatedText,50,cid,text) or so (not correct script, but you get the idea)
Yep i was aware of that, i will try that however, thanks and rep!

(You can't exhaust the addmana with some milliseconds in some way?)
 
Back
Top