Ir para conteúdo
Banner com Efeitos

Featured Replies

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

Top Posters In This Topic

Posted Images

Postado

local min = 550

local max = 750

local EMPTY_POTION = 7635

local exhaust = createConditionObject(CONDITION_EXHAUST)


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

Postado

function onUse(cid, item, pos) 
local exausted = 1
local storage = 10569
if (getPlayerStorageValue(cid, storage) <= os.time()) then
Health1 = (getCreatureMaxHealth(cid)*0.05) + 300
Health2 = (getCreatureMaxHealth(cid)*0.09) + 500
Health = math.random(Health1,Health2)
doCreatureAddHealth(cid,Health)
setCombatParam(combat, COMBAT_PARAM_DISPEL_PARALYZE)
doSendMagicEffect(getPlayerPosition(cid),12)
setPlayerStorageValue(cid, storage, os.time()+exausted)
doSendAnimatedText(getCreaturePosition(cid), health, COLOR_RED)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doPlayerSendCancel(cid,"Você está exausto.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
return 1
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