Postado Fevereiro 12, 2021 4 anos .Qual servidor ou website você utiliza como base? 8.60 Qual o motivo deste tópico? Potion não funciona se usar mais de 10k HEALTH\MANA Você tem o código disponível? Se tiver publique-o aqui: usableOnTarget = getBooleanFromString(usableOnTarget) local potion = { [11609] = {health = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 13}, [11610] = {mana = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 5}, [7618] = {health = {2700, 3600}, mana = {2700, 3600}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [7620] = {health = {1700, 2600}, mana = {2700, 3600}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [2150] = {health = {600, 700}, mana = {2700, 3600}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 13}, [7520] = {mana = {700, 1200}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2151] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2144] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local hp = potion[item.itemid] if(not hp) then return false end if not(getCreatureStorage(cid, hp.storage) <= os.time()) then doPlayerSendTextMessage(cid, 27,"Espere [".. exhaustion.get(cid, hp.storage).."] Segundo(s)") return false end if(not isPlayer(itemEx.uid) or (not usableOnTarget and cid ~= itemEx.uid)) then if(not splashable) then return false end end local health = hp.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * 1.0))) then return false end local mana = hp.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * 1.0))) then return false end doCreatureSay(cid, hp.msg, TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), hp.effect) doRemoveItem(item.uid, 1) exhaustion.set(cid, hp.storage, hp.cooldown) return true end Boa noite, eu queria que alguém me ajudasse a colocar pra POTION de ID 7618 Healar de 70000 a 60000. Quando eu coloco 9999, a Potion ainda funciona, porém se eu colocar 10000+ ela não funciona mais. Alguém da uma força ai, tmj Editado Fevereiro 12, 2021 4 anos por raphadoidera (veja o histórico de edições)
Postado Fevereiro 15, 2021 4 anos Solução Spoiler usableOnTarget = getBooleanFromString(usableOnTarget) local potion = { [11609] = {health = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 13}, [11610] = {mana = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 5}, [7618] = {health = {60000, 70000}, mana = {60000, 70000}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [7620] = {health = {1700, 2600}, mana = {2700, 3600}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [2150] = {health = {600, 700}, mana = {2700, 3600}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 13}, [7520] = {mana = {700, 1200}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2151] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2144] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local hp = potion[item.itemid] if(not hp) then return false end if not(getCreatureStorage(cid, hp.storage) <= os.time()) then doPlayerSendTextMessage(cid, 27,"Espere [".. exhaustion.get(cid, hp.storage).."] Segundo(s)") return false end if(not isPlayer(itemEx.uid) or (not usableOnTarget and cid ~= itemEx.uid)) then if(not splashable) then return false end end local health = hp.health if health then doCreatureAddHealth(itemEx.uid, math.random(health[1], health[2])) end local mana = hp.mana if mana then doPlayerAddMana(itemEx.uid, math.random(mana[1], mana[2])) end doCreatureSay(cid, hp.msg, TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), hp.effect) doRemoveItem(item.uid, 1) exhaustion.set(cid, hp.storage, hp.cooldown) return true end
Postado Fevereiro 16, 2021 4 anos Autor 20 horas atrás, 139 disse: Ocultar conteúdo usableOnTarget = getBooleanFromString(usableOnTarget) local potion = { [11609] = {health = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 13}, [11610] = {mana = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 5}, [7618] = {health = {60000, 70000}, mana = {60000, 70000}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [7620] = {health = {1700, 2600}, mana = {2700, 3600}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [2150] = {health = {600, 700}, mana = {2700, 3600}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 13}, [7520] = {mana = {700, 1200}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2151] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2144] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local hp = potion[item.itemid] if(not hp) then return false end if not(getCreatureStorage(cid, hp.storage) <= os.time()) then doPlayerSendTextMessage(cid, 27,"Espere [".. exhaustion.get(cid, hp.storage).."] Segundo(s)") return false end if(not isPlayer(itemEx.uid) or (not usableOnTarget and cid ~= itemEx.uid)) then if(not splashable) then return false end end local health = hp.health if health then doCreatureAddHealth(itemEx.uid, math.random(health[1], health[2])) end local mana = hp.mana if mana then doPlayerAddMana(itemEx.uid, math.random(mana[1], mana[2])) end doCreatureSay(cid, hp.msg, TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), hp.effect) doRemoveItem(item.uid, 1) exhaustion.set(cid, hp.storage, hp.cooldown) return true end Irmão funcionou certinho, muito obrigado! Mas nesse Script esqueci de falar que toda hora que ele tenta usar a Potion dentro do CD dela, aparece no chat "21:05 Espere [3] Segundo(s)" Eu queria que aparecesse em cima do chatzinho "Você está exausto" Obrigado desde já mano! REP+
Postado Fevereiro 16, 2021 4 anos Em 11/02/2021 em 21:26, raphadoidera disse: .Qual servidor ou website você utiliza como base? 8.60 Qual o motivo deste tópico? Potion não funciona se usar mais de 10k HEALTH\MANA Você tem o código disponível? Se tiver publique-o aqui: usableOnTarget = getBooleanFromString(usableOnTarget) local potion = { [11609] = {health = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 13}, [11610] = {mana = {5700, 6600}, msg = "I feel the better", storage = 10020, cooldown = 6, effect = 5}, [7618] = {health = {2700, 3600}, mana = {2700, 3600}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [7620] = {health = {1700, 2600}, mana = {2700, 3600}, msg = "I feel better", storage = 10020, cooldown = 3, effect = 13}, [2150] = {health = {600, 700}, mana = {2700, 3600}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 13}, [7520] = {mana = {700, 1200}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2151] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, [2144] = {mana = {600, 700}, msg = "I feel the best", storage = 10021,cooldown = 3, effect = 5}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local hp = potion[item.itemid] if(not hp) then return false end if not(getCreatureStorage(cid, hp.storage) <= os.time()) then doPlayerSendTextMessage(cid, 27,"Espere [".. exhaustion.get(cid, hp.storage).."] Segundo(s)") return false end if(not isPlayer(itemEx.uid) or (not usableOnTarget and cid ~= itemEx.uid)) then if(not splashable) then return false end end local health = hp.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * 1.0))) then return false end local mana = hp.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * 1.0))) then return false end doCreatureSay(cid, hp.msg, TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), hp.effect) doRemoveItem(item.uid, 1) exhaustion.set(cid, hp.storage, hp.cooldown) return true end Boa noite, eu queria que alguém me ajudasse a colocar pra POTION de ID 7618 Healar de 70000 a 60000. Quando eu coloco 9999, a Potion ainda funciona, porém se eu colocar 10000+ ela não funciona mais. Alguém da uma força ai, tmj local ITEM = IDDOITEM local storagepotion = 8000 local wait = 1 local REG_HEALTH = 70000 local REG_MANA = 70000 function onUse(cid, item, fromPosition, itemEx, toPosition) if exhaustion.get(cid, storagepotion) then doPlayerSendCancel(cid, "You are exhausted.") return true end if fromPosition.x ~= CONTAINER_POSITION then doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) exhaustion.set(cid, storagepotion, wait) elseif item.itemid == ITEM then doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) exhaustion.set(cid, storagepotion, wait) end return true end Editado Fevereiro 16, 2021 4 anos por Celulose (veja o histórico de edições)
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.