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

customized manarune?

Zane Bloodshed

New Member
Joined
Dec 8, 2010
Messages
3
Reaction score
0
Im looking for a script for a mana rune that give mana and acts like a healing rune (gives mana and heals player when used) needs to be staged to give 150 mana/150 hp between lvls 20-50,200 mana/200 hp between lvl 51-100,250 mana/250 hp between lvl 101-150,300 mana/300 hp between lvl 151-200,400 mana/400 hp from lvl 201+,needs to be able to work with all vocations also needs to be infinit,could this be possible?if it could be can some 1 create this for me
 
Edit made:
Lua:
local t = {
	[{20,50}] = 150,
	[{51,100}] = 200,
	[{101,150}] = 250,
	[{151,200}] = 300,
	[{201,math.huge}] = 400
}
 
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, EXHAUST_HEAL)
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if hasCondition(cid, CONDITION_EXHAUST, EXHAUST_HEAL) then
		return doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
	elseif not isPlayer(itemEx.uid) then
		return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
	end
 
	local lvl = getPlayerLevel(cid)
	for k, v in pairs(t) do
		if lvl >= k[1] and lvl <= k[2] then
			doPlayerAddMana(itemEx.uid, v)
			doCreatureAddHealth(itemEx.uid, v)
			doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
			doAddCondition(cid, exhaust)
			doSendAnimatedText(toPosition, 'Manarune!', math.random(255))
			return true
		end
	end
end
 
Back
Top