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

Heath Rune Help!

grogan

New Member
Joined
Dec 6, 2007
Messages
133
Reaction score
0
I Need to make this a health rune. I tryed using doPlayerAddHealth but nil value so just wondering if someone could quickly fix this script to heal health or tell me the function thanks.


local t = {
min = 1000,
max = 1200,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
if isInArray({12},getPlayerVocation(cid)) then
if getPlayerMagLevel(cid) >= 10 then
doPlayerAddMana(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You dont have the required magic level to use this rune.")
end
else
doPlayerSendCancel(cid, "You dont have the required vocation to use this rune.")
end
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end
 
LUA:
local t = {
	min = 1000,
	max = 1200,
	text = "Aaaah...",
	effect = CONST_ME_MAGIC_BLUE
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) then
		if isInArray({12},getPlayerVocation(cid)) then
			if getPlayerMagLevel(cid) >= 10 then
				doCreatureAddHealth(itemEx.uid, math.random(t.min, t.max))
				doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
				doSendMagicEffect(toPosition, t.effect)
			else
				doPlayerSendCancel(cid, "You dont have the required magic level to use this rune.")
			end
		else
			doPlayerSendCancel(cid, "You dont have the required vocation to use this rune.")
		end
	else
		doPlayerSendCancel(cid, "You can only use this rune on players.")
	end
	return true
end
 
ahh thanks thought it might of been that but was put of my the "creature' part thought it would of said "player" :) thanks REP++
 
Back
Top