Thorn
Spriting since 2013
hii, i'm trying to make a copy of the great spirit potion, i did a copy, edit the healings and put it in xml unde rthe id of 8474 (antidote potion) but it didn't work, cannot be used, plzz guys help me :/ here is the info:
and the xml is
plzz guys help
LUA:
local MIN_HEALTH = 1000
local MAX_HEALTH = 2000
local MIN_MANA = 1000
local MAX_MANA = 2000
local EMPTY_POTION = 7636
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((not(isPaladin(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
doCreatureSay(itemEx.uid, "Only paladins of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
return TRUE
end
if doCreatureAddHealth(itemEx.uid, math.random(MIN_HEALTH, MAX_HEALTH)) == LUA_ERROR or doPlayerAddMana(itemEx.uid, math.random(MIN_MANA, MAX_MANA)) == LUA_ERROR then
return FALSE
end
doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Marihuana...", TALKTYPE_ORANGE_1)
return TRUE
end
and the xml is
XML:
<!-- Potions -->
<action itemid="7588-7591;8472-8474;7618;7620;8704" event="script" value="liquids/potions.lua"/>
plzz guys help