Criei um script do 0 para as poções:
local potions = { [266] = { -- Health Potion minHeal = 50, maxHeal = 100, emptyVial = 2874 }, [268] = { -- Mana Potion minMana = 25, maxMana = 75, emptyVial = 2874 } } function onUse(cid, item, fromPosition, itemEx, toPosition) local target = itemEx.uid local potion = potions[item.itemid] if not isPlayer(target) or isMonster(target) or isNpc(target) then return false end if potion then if potion.minHeal then local healAmount = math.random(potion.minHeal, potion.maxHeal) doCreatureAddHealth(target, healAmount) elseif potion.minMana then local manaAmount = math.random(potion.minMana, potion.maxMana) doCreatureAddMana(target, manaAmount) end doCreatureSay(target, "Ahhhh!", TALKTYPE_MONSTER_SAY) local exhaustStorage = 6499135761 local exhaustTime = os.time() + 1 if getPlayerStorageValue(cid, exhaustStorage) <= exhaustTime then setPlayerStorageValue(cid, exhaustStorage, exhaustTime) doSendMagicEffect(getPlayerPosition(target), CONST_ME_MAGIC_BLUE) doPlayerRemoveItem(cid, item.uid, 1) doPlayerAddItem(cid, potion.emptyVial, 1) else doPlayerSendCancel(cid, "You are exhausted and cannot use this potion yet.") end end return true end
Está bem fácil de configurar, é só adicionar mais poções na tabela "potions"


info
Grupo: Campones
Registrado: 05/12/18
Posts: 4
Reputação: 0
Boa noite galera!!
Meu primeiro post aqui espero que não esteja postando no local errado, mas vamos lá!
Estou com um Otserver que o PVP e PVE os chares estão invencíveis e para não ter tanto problema mexendo com Spells, quero equilibrar mexendo no delay das Potions de regeneração.
Por exemplo: Quando vou potar mana, hp ou spirit que seja eu consigo potar a cada 0.2 segundos ou seja instantâneo, preciso colocar pelo menos 1 a 1,5 segundos.
Poderiam me ajudar por gentileza, inclusive se possível explicar o diretório onde fica a Action.
Desde já agradeço demais!!