Ir para conteúdo
  • 0

Como Colocar Potions Para Healar Mais Ot Serv 8.60?


Pergunta

local MIN = 500

local MAX = 700

local EMPTY_POTION = 7635

 

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

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

return TRUE

end

 

if doCreatureAddHealth(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

 

 

um exemplo!

Link para o comentário
https://xtibia.com/forum/topic/200890-como-colocar-potions-para-healar-mais-ot-serv-860/
Compartilhar em outros sites

8 respostass a esta questão

Posts Recomendados

  • 0

Está vendo lá em cima, nas váriaveis locais? "local = 500, local = 700". O 500 repesenta o mínimo que a pot poderá healar. Já o max representa o contrário, o máximo que ela poderá healar. Ajuste conforme seu gosto ! Bença :))

  • 0

Não, o senhor postou a potion do elite knight. de heal ! Uma dica, vá na pasta data/actions/scripts/liquids. Lá procure pelo arquivo great_mana.lua ou algo parecido. E poste aqui para eu analisar :D

  • 0

local MIN = 550

local MAX = 750

local EMPTY_POTION = 7635

 

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(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)

doRemoveItem(item.uid, 1)

doPlayerAddItem(cid, EMPTY_POTION, 1)

return TRUE

end

  • 0

Teste oque eu disse, mude os valores, coloque 1000 e 2000. E me fale se deu resultado. Se der você ajusta os valores até ficar healando o tanto desejado por você !

×
×
  • Criar Novo...