Olá clã eu tenho um script de mana runa aqui só que o problema dele é que ele heala todas as vocations eu queria que somente ,druid (elder) usa-se segue abaixo o script:
local MIN = 3000 local MAX = 6000
local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end
if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE
end if(getPlayerLevel(itemEx.uid) < 250) then doPlayerSendTextMessage(cid, 22, "Somente lvl 250!") return TRUE end if(isInArray({2,6}, getPlayerVocation(cid)) or getPlayerLevel(itemEx.uid) < 250) then if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then end
doSendAnimatedText(getPlayerPosition(cid), "Free Rune", TEXTCOLOR_BLUE) return TRUE end
if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end
info
Grupo: Campones
Registrado: 11/10/11
Posts: 44
Reputação: +3
Olá clã eu tenho um script de mana runa aqui só que o problema dele é que ele heala todas as vocations eu queria que somente ,druid (elder) usa-se segue abaixo o script:
local MIN = 3000
local MAX = 6000
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end
if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if(getPlayerLevel(itemEx.uid) < 250) then
doPlayerSendTextMessage(cid, 22, "Somente lvl 250!")
return TRUE
end
if(isInArray({2,6}, getPlayerVocation(cid)) or getPlayerLevel(itemEx.uid) < 250) then
if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
end
doSendAnimatedText(getPlayerPosition(cid), "Free Rune", TEXTCOLOR_BLUE)
return TRUE
end
if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end
doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doSendAnimatedText(getPlayerPosition(cid), "Free Rune", TEXTCOLOR_BLUE)
return TRUE
end
Todas vocations estão conseguindo usar, ele está healando normal porque?