Postado Junho 9, 2023 1 ano Estou voltando com um projeto old de 2017 de wodbo, infelizmente perdi um script da senzu healando % de vida e mana. Alguém da um help? não encontrei no forum Versão TFS 0.4 - 8.60 actions/script/senzu bean.lua function onUse(cid, item, fromPosition, itemEx, toPosition) ITEM = 12780 local storage = 50000 local wait = 1.0 local pos1 = {x = getPlayerPosition(cid).x + 1, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} if fromPosition.x ~= CONTAINER_POSITION and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = 200000 REG_MANA = 200000 doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Aaahhh! Bem Melhor!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 80) doRemoveItem(item.uid, 0) exhaustion.set(cid, storage, wait) elseif item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = 200000 REG_MANA = 200000 doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Aaahhh! Bem Melhor!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 80) doRemoveItem(item.uid, 0) exhaustion.set(cid, storage, wait) else doPlayerSendCancel(cid, "You are exhausted.") end return TRUE end
Postado Junho 11, 2023 1 ano Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) ITEM = 12780 local storage = 50000 local wait = 1.0 local pos1 = {x = getPlayerPosition(cid).x + 1, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} if fromPosition.x ~= CONTAINER_POSITION and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = getCreatureMaxHealth(cid) * 0.3 -- regenera 30% do hp REG_MANA = getCreatureMaxMana(cid) * 0.3 -- regenera 30% da mana doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Aaahhh! Bem Melhor!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 80) doRemoveItem(item.uid, 0) exhaustion.set(cid, storage, wait) elseif item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = getCreatureMaxHealth(cid) * 0.3 -- regenera 30% do hp REG_MANA = getCreatureMaxMana(cid) * 0.3 -- regenera 30% da mana doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Aaahhh! Bem Melhor!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 80) doRemoveItem(item.uid, 0) exhaustion.set(cid, storage, wait) else doPlayerSendCancel(cid, "You are exhausted.") end return TRUE end @moleza Editado Junho 11, 2023 1 ano por ernaix69 (veja o histórico de edições)
Postado Junho 11, 2023 1 ano Autor @ernaix69 quando uso a senzu, nada acontece, sem erros também aparece isso no serverlog 17:01 Using the last Senzu Bean... mas não usa ** edit ** não sei se interfere em algo mas meu servidor a vida e a mana estão em % então fica 100/100 Editado Junho 11, 2023 1 ano por moleza (veja o histórico de edições)
Postado Junho 13, 2023 1 ano Diretor Em 09/06/2023 em 17:25, moleza disse: Estou voltando com um projeto old de 2017 de wodbo, infelizmente perdi um script da senzu healando % de vida e mana. Alguém da um help? não encontrei no forum Versão TFS 0.4 - 8.60 actions/script/senzu bean.lua function onUse(cid, item, fromPosition, itemEx, toPosition) ITEM = 12780 local storage = 50000 local wait = 1.0 local pos1 = {x = getPlayerPosition(cid).x + 1, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} if fromPosition.x ~= CONTAINER_POSITION and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = 200000 REG_MANA = 200000 doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Aaahhh! Bem Melhor!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 80) doRemoveItem(item.uid, 0) exhaustion.set(cid, storage, wait) elseif item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = 200000 REG_MANA = 200000 doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Aaahhh! Bem Melhor!', TALKTYPE_ORANGE_1) doSendMagicEffect(pos1, 80) doRemoveItem(item.uid, 0) exhaustion.set(cid, storage, wait) else doPlayerSendCancel(cid, "You are exhausted.") end return TRUE end Te ajuda? function onUse(cid, item, fromPosition, itemEx, toPosition) local ITEM_ID = 12780 -- ID do item Senzu Bean local STORAGE_ID = 50000 -- ID de armazenamento para controle de cooldown local COOLDOWN_TIME = 60 -- Tempo de recarga em segundos local HEAL_AMOUNT = 200000 -- Quantidade de vida e mana a ser curada local EFFECT_ID = 80 -- ID do efeito visual ao usar a Senzu Bean local pos = getPlayerPosition(cid) local newPos = {x = pos.x + 1, y = pos.y, z = pos.z} -- Verifica se o item usado é uma Senzu Bean if item.itemid ~= ITEM_ID then doPlayerSendCancel(cid, "You must use a Senzu Bean.") return TRUE end -- Verifica se o jogador está em cooldown if exhaustion.get(cid, STORAGE_ID) == TRUE then local cooldownTime = exhaustion.get(cid, STORAGE_ID) / 1000 doPlayerSendCancel(cid, "You are still in cooldown for " .. cooldownTime .. " seconds.") return TRUE end -- Cura o jogador doPlayerAddMana(cid, HEAL_AMOUNT) doCreatureAddHealth(cid, HEAL_AMOUNT) -- Exibe a mensagem e o efeito visual doCreatureSay(cid, "Aaahhh! Bem melhor!", TALKTYPE_ORANGE_1) doSendMagicEffect(newPos, EFFECT_ID) -- Remove a Senzu Bean do inventário doRemoveItem(item.uid, 1) -- Define o tempo de cooldown exhaustion.set(cid, STORAGE_ID, COOLDOWN_TIME * 1000) return TRUE end Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Junho 14, 2023 1 ano Autor 16 horas atrás, L3K0T disse: Te ajuda? function onUse(cid, item, fromPosition, itemEx, toPosition) local ITEM_ID = 12780 -- ID do item Senzu Bean local STORAGE_ID = 50000 -- ID de armazenamento para controle de cooldown local COOLDOWN_TIME = 60 -- Tempo de recarga em segundos local HEAL_AMOUNT = 200000 -- Quantidade de vida e mana a ser curada local EFFECT_ID = 80 -- ID do efeito visual ao usar a Senzu Bean local pos = getPlayerPosition(cid) local newPos = {x = pos.x + 1, y = pos.y, z = pos.z} -- Verifica se o item usado é uma Senzu Bean if item.itemid ~= ITEM_ID then doPlayerSendCancel(cid, "You must use a Senzu Bean.") return TRUE end -- Verifica se o jogador está em cooldown if exhaustion.get(cid, STORAGE_ID) == TRUE then local cooldownTime = exhaustion.get(cid, STORAGE_ID) / 1000 doPlayerSendCancel(cid, "You are still in cooldown for " .. cooldownTime .. " seconds.") return TRUE end -- Cura o jogador doPlayerAddMana(cid, HEAL_AMOUNT) doCreatureAddHealth(cid, HEAL_AMOUNT) -- Exibe a mensagem e o efeito visual doCreatureSay(cid, "Aaahhh! Bem melhor!", TALKTYPE_ORANGE_1) doSendMagicEffect(newPos, EFFECT_ID) -- Remove a Senzu Bean do inventário doRemoveItem(item.uid, 1) -- Define o tempo de cooldown exhaustion.set(cid, STORAGE_ID, COOLDOWN_TIME * 1000) return TRUE end Boa noite tudo bem? então a ideia era healar % da vida maxima, por exemplo encher 20% da mana e da vida, esse script continua enchendo 200k
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.