Postado Agosto 2, 2015 9 anos Ola galaera estou com un Problema no meu serve queria saber como deixa para usar potion com ou sem batlle normalmente temque espera o battle sair para poder usar mais o battle demora mt para sair e queria saber como eu faço para deixa com ou sem batle para poder usar sera que voceis poderia me ajuda por favor aqui esta o script do potion do meu serve function doHealOverTime(cid, div, turn, effect) if not isCreature(cid) then return true end if turn <= 0 then return true end if getCreatureHealth(cid) == getCreatureMaxHealth(cid) then return true end if getCreatureCondition(getCreatureMaster(cid) , CONDITION_INFIGHT) then doSendAnimatedText(getThingPos(cid), "LOST HEAL", 215) return true end local d = div / 10000 local amount = math.floor(getCreatureMaxHealth(cid) * d) doCreatureAddHealth(cid, amount) if math.floor(turn/10) == turn/10 then doSendMagicEffect(getThingPos(cid), effect) end addEvent(doHealOverTime, 100, cid, div, turn - 1, effect) end local potions = { [12346] = {effect = 12, div = 20}, [12347] = {effect = 13, div = 40}, [12348] = {effect = 13, div = 60}, [12345] = {effect = 14, div = 80}, [12343] = {effect = 12, div = 100}} function onUse(cid, item, frompos, item2, topos) if isPlayer(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Sorry, you can't heal your pokemon during fights!") return TRUE end if not isCreature(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if not isPlayer(getCreatureMaster(item2.uid)) then return doPlayerSendCancel(cid, "You cant use potions on wild pokemons.") end if getCreatureHealth(item2.uid) == getCreatureMaxHealth(item2.uid) then return doPlayerSendCancel(cid, "This pokemon is already at full health.") end doCreatureSay(cid, ""..getPlayerStorageValue(item2.uid, 1007)..", take this potion!", TALKTYPE_SAY) doSendMagicEffect(getThingPos(item2.uid), 172) doRemoveItem(item.uid, 1) local a = potions[item.itemid] doHealOverTime(item2.uid, a.div, 100, a.effect) return true end Darei Rep++ Desculpa se estiver na area errada
Postado Agosto 2, 2015 9 anos function doHealOverTime(cid, div, turn, effect) if not isCreature(cid) then return true end if turn <= 0 then return true end if getCreatureHealth(cid) == getCreatureMaxHealth(cid) then return true end local d = div / 10000 local amount = math.floor(getCreatureMaxHealth(cid) * d) doCreatureAddHealth(cid, amount) if math.floor(turn/10) == turn/10 then doSendMagicEffect(getThingPos(cid), effect) end addEvent(doHealOverTime, 100, cid, div, turn - 1, effect) end local potions = { [12346] = {effect = 12, div = 20}, [12347] = {effect = 13, div = 40}, [12348] = {effect = 13, div = 60}, [12345] = {effect = 14, div = 80}, [12343] = {effect = 12, div = 100}} function onUse(cid, item, frompos, item2, topos) if isPlayer(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Sorry, you can't heal your pokemon during fights!") return TRUE end if not isCreature(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if not isPlayer(getCreatureMaster(item2.uid)) then return doPlayerSendCancel(cid, "You cant use potions on wild pokemons.") end if getCreatureHealth(item2.uid) == getCreatureMaxHealth(item2.uid) then return doPlayerSendCancel(cid, "This pokemon is already at full health.") end doCreatureSay(cid, ""..getPlayerStorageValue(item2.uid, 1007)..", take this potion!", TALKTYPE_SAY) doSendMagicEffect(getThingPos(item2.uid), 172) doRemoveItem(item.uid, 1) local a = potions[item.itemid] doHealOverTime(item2.uid, a.div, 100, a.effect) return true end Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
Postado Agosto 2, 2015 9 anos Autor function doHealOverTime(cid, div, turn, effect) if not isCreature(cid) then return true end if turn <= 0 then return true end if getCreatureHealth(cid) == getCreatureMaxHealth(cid) then return true end local d = div / 10000 local amount = math.floor(getCreatureMaxHealth(cid) * d) doCreatureAddHealth(cid, amount) if math.floor(turn/10) == turn/10 then doSendMagicEffect(getThingPos(cid), effect) end addEvent(doHealOverTime, 100, cid, div, turn - 1, effect) end local potions = { [12346] = {effect = 12, div = 20}, [12347] = {effect = 13, div = 40}, [12348] = {effect = 13, div = 60}, [12345] = {effect = 14, div = 80}, [12343] = {effect = 12, div = 100}} function onUse(cid, item, frompos, item2, topos) if isPlayer(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Sorry, you can't heal your pokemon during fights!") return TRUE end if not isCreature(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if not isPlayer(getCreatureMaster(item2.uid)) then return doPlayerSendCancel(cid, "You cant use potions on wild pokemons.") end if getCreatureHealth(item2.uid) == getCreatureMaxHealth(item2.uid) then return doPlayerSendCancel(cid, "This pokemon is already at full health.") end doCreatureSay(cid, ""..getPlayerStorageValue(item2.uid, 1007)..", take this potion!", TALKTYPE_SAY) doSendMagicEffect(getThingPos(item2.uid), 172) doRemoveItem(item.uid, 1) local a = potions[item.itemid] doHealOverTime(item2.uid, a.div, 100, a.effect) return true end Deu nao mano Ainda fala que nao pode usar durante figths ;c eu quero que de pra usa mesmo se estiver com fight
Postado Agosto 3, 2015 9 anos Solução Deu nao mano Ainda fala que nao pode usar durante figths ;c eu quero que de pra usa mesmo se estiver com fight Desatenção minha, use este: function doHealOverTime(cid, div, turn, effect) if not isCreature(cid) then return true end if turn <= 0 then return true end if getCreatureHealth(cid) == getCreatureMaxHealth(cid) then return true end local d = div / 10000 local amount = math.floor(getCreatureMaxHealth(cid) * d) doCreatureAddHealth(cid, amount) if math.floor(turn/10) == turn/10 then doSendMagicEffect(getThingPos(cid), effect) end addEvent(doHealOverTime, 100, cid, div, turn - 1, effect) end local potions = { [12346] = {effect = 12, div = 20}, [12347] = {effect = 13, div = 40}, [12348] = {effect = 13, div = 60}, [12345] = {effect = 14, div = 80}, [12343] = {effect = 12, div = 100}} function onUse(cid, item, frompos, item2, topos) if isPlayer(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if not isCreature(item2.uid) then return doPlayerSendCancel(cid, "You can only use potions on pokemons!") end if not isPlayer(getCreatureMaster(item2.uid)) then return doPlayerSendCancel(cid, "You cant use potions on wild pokemons.") end if getCreatureHealth(item2.uid) == getCreatureMaxHealth(item2.uid) then return doPlayerSendCancel(cid, "This pokemon is already at full health.") end doCreatureSay(cid, ""..getPlayerStorageValue(item2.uid, 1007)..", take this potion!", TALKTYPE_SAY) doSendMagicEffect(getThingPos(item2.uid), 172) doRemoveItem(item.uid, 1) local a = potions[item.itemid] doHealOverTime(item2.uid, a.div, 100, a.effect) return true end Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
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.