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

Help with a Script

neil27

New Member
Joined
Feb 2, 2013
Messages
14
Reaction score
0
I've attempted to create a Manarune that has a required level of 300 and then it will heal more, the more you level.

Could someone pass on a script and lua for it? So stuck....
 
Lua:
local level = getPlayerLevel(cid)
local mana_min, mana_max = (level * 4), (level * 6)
 
function onUse (cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) and level >= 300 then
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 25)
doCreatureAddMana (cid, math.random(mana_min, mana_max))
end
return true
end
 
Lua:
local level = getPlayerLevel(cid)
local mana_min, mana_max = (level * 4), (level * 6)
 
function onUse (cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) and level >= 300 then
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 25)
doCreatureAddMana (cid, math.random(mana_min, mana_max))
end
return true
end
What happend if you use this one at lower level then 300? And I think he wants one that heals under 300 and then at 300+ it heals more. I can be wrong ^^
 
1. Nothing, I forgot that sorry. Here it is:

Lua:
local level = getPlayerLevel(cid)
local mana_min, mana_max = (level * 4), (level * 6)
 
function onUse (cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) and level >= 300 then
		doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
		doSendMagicEffect(getCreaturePosition(cid), 25)
		doCreatureAddMana(cid, math.random(mana_min, mana_max))
	else
		doPlayerSendCancel(cid, "You are too low to use this manarune")
end
return true
end

2.
Manarune that has a required level of 300.
 
Back
Top