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

manrune stage!

Daaslund

New Member
Joined
Dec 13, 2010
Messages
41
Reaction score
0
hi ! i whant a script for manarunestage whit this stage!

35-150 mana
51-100= 150-250
101-250= 250-400
251-350 = 400-600
450-550=600-750
551-650= 750-1000
650+ 1000-1300
 
data/actions/scripts/manarune.lua
Lua:
local t = {
	[{1,35}] =  {150,150},
	[{51,100}] = {150,250},
	[{101,250}] = {250,400},
	[{251,350}] = {400,600},
	[{450,550}] = {600,750},
	[{551,650}] = {750,1000},
	[{650,math.huge}] = {1000,1300}
}
 
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,math.random(v[1], v[2]))
			doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
			doAddCondition(cid, exhaust)
			doSendAnimatedText(toPosition, 'Manarune!', math.random(255))
			return true
		end
	end
end

data/actions/actions.xml
XML:
<action itemid="2263" event="script" value="manarune.lua"/>
itemid="2263" == runeID
Credits to Cyko for the script.
 
Back
Top