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

Light Healing - Talkaction

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
Someone to test it for me? please. I do not know if is working.
...and add the exhaust:
Code:
				function onSay(cid, words, param)
 local config =
{
   reqPlayerLevel = 9,
   reqPlayerMana = 20,
}
 local lvl = getPlayerLevel(cid)
 local mlvl = getPlayerMagLevel(cid)
	if getPlayerLevel(cid) < config.reqPlayerLevel then
	   doPlayerSendCancel(cid, "You are not level "..config.reqPlayerLevel.." or higher.".")
	if getPlayerMana(cid) < config.reqPlayerMana then
	   doPlayerSendCancel(cid, "You need "..config.reqPlayerMana.." mana points to cast this spell.")
	 elseif ((getPlayerLevel(cid) => config.reqPlayerLevel) and (getPlayerMana(cid) => config.reqPlayerMana)) then
	   doCreatureAddHealth(cid, (1, (lvl + 4 * mlvl / 100))
	   doCreatureSay(cid, "exura", TALKTYPE_SAY)
  end
 end
  return TRUE
end
 
Maybe this works

Lua:
function onSay(cid, words, param, channel)

local config =
{
        reqPlayerLevel = 9,
        reqPlayerMana = 20,
}
local lvl = getPlayerLevel(cid)
local mlvl = getPlayerMagLevel(cid)

        if getPlayerLevel(cid) < config.reqPlayerLevel then
                doPlayerSendCancel(cid, "You are not level " .. config.reqPlayerLevel .. " or higher.")
                return TRUE
        end

        if getCreatureMana(cid) < config.reqPlayerMana then
                doPlayerSendCancel(cid, "You need " .. config.reqPlayerMana .. " mana points to cast this spell.")
                return TRUE
        end

                doCreatureAddHealth(cid, (lvl + 4 * mlvl / 100) * 1)
                doCreatureSay(cid, "exura", TALKTYPE_SAY)
                return TRUE
end
 
Back
Top