Postado Fevereiro 9, 2021 4 anos Eu to com um problema na senzu do meu dbo. Ela não é infinita, mas quando ela tá no chão fica infinita. Citar function onUse(cid, item, fromPosition, itemEx, toPosition) ITEM = 12780 local storage = 50000 local wait = 1.5 local pos1 = {x = getPlayerPosition(cid).x, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} if fromPosition.x ~= CONTAINER_POSITION and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = 125000 REG_MANA = 125000 doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'I feel much better!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 103) exhaustion.set(cid, storage, wait) elseif item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = 125000 REG_MANA = 125000 doPlayerAddMana(cid, REG_MANA) doRemoveItem(item.uid, 1) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'I feel much better!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 103) exhaustion.set(cid, storage, wait) else doPlayerSendCancel(cid, "You are exhausted.") end return TRUE end Editado Fevereiro 9, 2021 4 anos por Kayzuu (veja o histórico de edições)
Postado Fevereiro 13, 2021 4 anos Solução Mostrar conteúdo oculto function onUse(cid, item, fromPosition, itemEx, toPosition) ITEM = 12780 local storage = 50000 local wait = 1.5 local pos1 = {x = getPlayerPosition(cid).x, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} if item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = 125000 REG_MANA = 125000 doPlayerAddMana(cid, REG_MANA) doRemoveItem(item.uid, 1) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'I feel much better!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 103) exhaustion.set(cid, storage, wait) else doPlayerSendCancel(cid, "You are exhausted.") end 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.