Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

local min = 550

local max = 750

local EMPTY_POTION = 7635

local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, - 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

  • Respostas 19
  • Visualizações 517
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado

Desculpa,é que estou editando pelo cel,ai fica dificil acompanhar todos os erros 

Tente

 

Spoiler

local min = 550

local max = 750

local EMPTY_POTION = 7635

local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, - 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

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo