Ir para conteúdo

Great Mana Potion Infinita


frankvp

Posts Recomendados

Muito bem amigos vamos la aqui nao ta funcionando o que esqueci de fazer?

Peguei o seguinte id de item : em

 

ITEMS.XML

 

<item id="7443" article="a" name="bullseye potion">

<attribute key="weight" value="200"/>

<attribute key="description" value="Drinking this potion increases temporarily your distance skill while decreasing your defense."/>

</item>

 

EM ACTIONS.xml

 

action itemid="7443" event="script" value="liquids/greeat_mana.lua" allowfaruse="1"/>

 

Actions/scripts/liquids

 

local MIN = 200

local MAX = 300

local EMPTY_POTION = 7635

 

local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') + 100000))

 

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(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then

doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)

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)

doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)

doTransformItem(item.uid, EMPTY_POTION)

return TRUE

end

 

Não funciona ele nao bebe nao da use nao faz nada :/

o que estou esquecendo?

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...