Ir para conteúdo
  • 0

[Script] Heal Potion Para Ser Usada Enquanto Está Em Battle


triickpain

Pergunta

Ai galera, quero que algum MESTRE em script me ajude, no meu server não dá pra usar Heal Potion no pokemon enquanto ele está em battle, eu quero mudar isso, pra poder usar o heal potion a qualquer hora, se alguem quiser me ajudar pede ai qual arquivo .lua voce precisa, ou adiciona meu msn: triick_pain@hotmail.com a cada dia que voce ajudar no meu server vou tar sempre dando rep++

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

posta o script do potion, provavelmente encontrado na pasta data/actions/scripts ai vc vê qual é

achei esse aqui mano, pode me ajudar? smallpotion.lua

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) == FALSE) 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

 

if getPlayerStorageValue(item2.uid, 173) >= 1 then

return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")

end

doCreatureSay(cid, ""..getCreatureName(item2.uid)..", take this potion!", TALKTYPE_SAY)

doSendAnimatedText(getThingPos(item2.uid), "SMALL POTION", 175)

doRemoveItem(item.uid, 1)

setPlayerStorageValue(item2.uid, 173, 1)

local function heal(params)

if isCreature(params.item2) then

if getPlayerStorageValue(item2.uid, 173) >= 2 then

return true

end

if (getCreatureCondition(params.cid, CONDITION_INFIGHT) == true) then

doSendAnimatedText(getThingPos(params.item2), "LOST HEAL", 145)

setPlayerStorageValue(item2.uid, 173, 2)

return true

end

if getCreatureHealth(params.item2) == getCreatureMaxHealth(params.item2) then

return true

end

if item.itemid == 2273 then

doSendMagicEffect(getThingPos(params.item2), 12)

doCreatureAddHealth(item2.uid, 100)

end

end

end

 

 

local function noskull(params)

if isCreature(params.item2) then

setPlayerStorageValue(item2.uid, 173, 0)

end

end

 

local item2 = item2.uid

addEvent(heal, 1200, {cid = cid, item2 = item2})

addEvent(heal, 2400, {cid = cid, item2 = item2})

addEvent(heal, 3600, {cid = cid, item2 = item2})

addEvent(heal, 4800, {cid = cid, item2 = item2})

addEvent(heal, 6000, {cid = cid, item2 = item2})

addEvent(heal, 7200, {cid = cid, item2 = item2})

addEvent(heal, 8400, {cid = cid, item2 = item2})

addEvent(heal, 9600, {cid = cid, item2 = item2})

addEvent(heal, 10800, {cid = cid, item2 = item2})

addEvent(heal, 12000, {cid = cid, item2 = item2})

addEvent(noskull, 12500, {cid = cid, item2 = item2})

return true

end

Link para o comentário
Compartilhar em outros sites

  • 0
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

if getPlayerStorageValue(item2.uid, 173) >= 1 then
return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")
end
doCreatureSay(cid, ""..getCreatureName(item2.uid)..", take this potion!", TALKTYPE_SAY)
doSendAnimatedText(getThingPos(item2.uid), "SMALL POTION", 175)
doRemoveItem(item.uid, 1)
setPlayerStorageValue(item2.uid, 173, 1)
local function heal(params)
if isCreature(params.item2) then
if getPlayerStorageValue(item2.uid, 173) >= 2 then
return true
end
if (getCreatureCondition(params.cid, CONDITION_INFIGHT) == true) then
doSendAnimatedText(getThingPos(params.item2), "LOST HEAL", 145)
setPlayerStorageValue(item2.uid, 173, 2)
return true
end
if getCreatureHealth(params.item2) == getCreatureMaxHealth(params.item2) then
return true
end
if item.itemid == 2273 then
doSendMagicEffect(getThingPos(params.item2), 12)
doCreatureAddHealth(item2.uid, 100)
end
end
end


local function noskull(params)
if isCreature(params.item2) then
setPlayerStorageValue(item2.uid, 173, 0)
end
end

local item2 = item2.uid
addEvent(heal, 1200, {cid = cid, item2 = item2})
addEvent(heal, 2400, {cid = cid, item2 = item2})
addEvent(heal, 3600, {cid = cid, item2 = item2})
addEvent(heal, 4800, {cid = cid, item2 = item2})
addEvent(heal, 6000, {cid = cid, item2 = item2})
addEvent(heal, 7200, {cid = cid, item2 = item2})
addEvent(heal, 8400, {cid = cid, item2 = item2})
addEvent(heal, 9600, {cid = cid, item2 = item2})
addEvent(heal, 10800, {cid = cid, item2 = item2})
addEvent(heal, 12000, {cid = cid, item2 = item2})
addEvent(noskull, 12500, {cid = cid, item2 = item2})
return true
end

Link para o comentário
Compartilhar em outros sites

  • 0

muito obrigado cara, script perfeito, funcionou bem !

REP+ com certeza yy'

 

bom cara, se fosse possivel poderia fazer isso que voce fez na small potion nessas 4 aqui? ;x dou rep+ uma semana !

megapotion.lua

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) == TRUE) 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

 

if getPlayerStorageValue(item2.uid, 173) >= 1 then

return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")

end

doCreatureSay(cid, ""..getCreatureName(item2.uid)..", take this potion!", TALKTYPE_SAY)

doSendAnimatedText(getThingPos(item2.uid), "MEGA POT", 194)

doRemoveItem(item.uid, 1)

setPlayerStorageValue(item2.uid, 173, 1)

local function heal(params)

if isCreature(params.item2) then

if getPlayerStorageValue(item2.uid, 173) >= 2 then

return true

end

if (getCreatureCondition(params.cid, CONDITION_INFIGHT) == true) then

doSendAnimatedText(getThingPos(params.item2), "LOST HEAL", 145)

setPlayerStorageValue(item2.uid, 173, 2)

return true

end

if getCreatureHealth(params.item2) == getCreatureMaxHealth(params.item2) then

return true

end

if item.itemid == 2271 then

doSendMagicEffect(getThingPos(params.item2), 13)

doCreatureAddHealth(item2.uid, 500)

end

end

end

 

 

local function noskull(params)

if isCreature(params.item2) then

setPlayerStorageValue(item2.uid, 173, 0)

end

end

 

local item2 = item2.uid

addEvent(heal, 1200, {cid = cid, item2 = item2})

addEvent(heal, 2400, {cid = cid, item2 = item2})

addEvent(heal, 3600, {cid = cid, item2 = item2})

addEvent(heal, 4800, {cid = cid, item2 = item2})

addEvent(heal, 6000, {cid = cid, item2 = item2})

addEvent(heal, 7200, {cid = cid, item2 = item2})

addEvent(heal, 8400, {cid = cid, item2 = item2})

addEvent(heal, 9600, {cid = cid, item2 = item2})

addEvent(heal, 10800, {cid = cid, item2 = item2})

addEvent(heal, 12000, {cid = cid, item2 = item2})

addEvent(noskull, 12500, {cid = cid, item2 = item2})

return true

end

 

greatpotion.lua

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) == TRUE) 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

 

if getPlayerStorageValue(item2.uid, 173) >= 1 then

return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")

end

doCreatureSay(cid, ""..getCreatureName(item2.uid)..", take this potion!", TALKTYPE_SAY)

doSendAnimatedText(getThingPos(item2.uid), "GREAT POT", 65)

doRemoveItem(item.uid, 1)

setPlayerStorageValue(item2.uid, 173, 1)

local function heal(params)

if isCreature(params.item2) then

if getPlayerStorageValue(item2.uid, 173) >= 2 then

return true

end

if (getCreatureCondition(params.cid, CONDITION_INFIGHT) == true) then

doSendAnimatedText(getThingPos(params.item2), "LOST HEAL", 145)

setPlayerStorageValue(item2.uid, 173, 2)

return true

end

if getCreatureHealth(params.item2) == getCreatureMaxHealth(params.item2) then

return true

end

if item.itemid == 2272 then

doSendMagicEffect(getThingPos(params.item2), 12)

doCreatureAddHealth(item2.uid, 190)

end

end

end

 

 

local function noskull(params)

if isCreature(params.item2) then

setPlayerStorageValue(item2.uid, 173, 0)

end

end

 

local item2 = item2.uid

addEvent(heal, 1200, {cid = cid, item2 = item2})

addEvent(heal, 2400, {cid = cid, item2 = item2})

addEvent(heal, 3600, {cid = cid, item2 = item2})

addEvent(heal, 4800, {cid = cid, item2 = item2})

addEvent(heal, 6000, {cid = cid, item2 = item2})

addEvent(heal, 7200, {cid = cid, item2 = item2})

addEvent(heal, 8400, {cid = cid, item2 = item2})

addEvent(heal, 9600, {cid = cid, item2 = item2})

addEvent(heal, 10800, {cid = cid, item2 = item2})

addEvent(heal, 12000, {cid = cid, item2 = item2})

addEvent(noskull, 12500, {cid = cid, item2 = item2})

return true

end

 

hyperpotion.lua

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) == TRUE) 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

 

if getPlayerStorageValue(item2.uid, 173) >= 1 then

return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")

end

doCreatureSay(cid, ""..getCreatureName(item2.uid)..", take this potion!", TALKTYPE_SAY)

doSendAnimatedText(getThingPos(item2.uid), "HYPER POT", 195)

doRemoveItem(item.uid, 1)

setPlayerStorageValue(item2.uid, 173, 1)

local function heal(params)

if isCreature(params.item2) then

if getPlayerStorageValue(item2.uid, 173) >= 2 then

return true

end

if (getCreatureCondition(params.cid, CONDITION_INFIGHT) == true) then

doSendAnimatedText(getThingPos(params.item2), "LOST HEAL", 145)

setPlayerStorageValue(item2.uid, 173, 2)

return true

end

if getCreatureHealth(params.item2) == getCreatureMaxHealth(params.item2) then

return true

end

if item.itemid == 2275 then

doSendMagicEffect(getThingPos(params.item2), 13)

doCreatureAddHealth(item2.uid, 1400)

end

end

end

 

 

local function noskull(params)

if isCreature(params.item2) then

setPlayerStorageValue(item2.uid, 173, 0)

end

end

 

local item2 = item2.uid

addEvent(heal, 1200, {cid = cid, item2 = item2})

addEvent(heal, 2400, {cid = cid, item2 = item2})

addEvent(heal, 3600, {cid = cid, item2 = item2})

addEvent(heal, 4800, {cid = cid, item2 = item2})

addEvent(heal, 6000, {cid = cid, item2 = item2})

addEvent(heal, 7200, {cid = cid, item2 = item2})

addEvent(heal, 8400, {cid = cid, item2 = item2})

addEvent(heal, 9600, {cid = cid, item2 = item2})

addEvent(heal, 10800, {cid = cid, item2 = item2})

addEvent(heal, 12000, {cid = cid, item2 = item2})

addEvent(noskull, 12500, {cid = cid, item2 = item2})

return true

end

 

superpotion.lua

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) == TRUE) 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

 

if getPlayerStorageValue(item2.uid, 173) >= 1 then

return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")

end

doCreatureSay(cid, ""..getCreatureName(item2.uid)..", take this potion!", TALKTYPE_SAY)

doSendAnimatedText(getThingPos(item2.uid), "SUPER POT", 105)

doRemoveItem(item.uid, 1)

setPlayerStorageValue(item2.uid, 173, 1)

local function heal(params)

if isCreature(params.item2) then

if getPlayerStorageValue(item2.uid, 173) >= 2 then

return true

end

if (getCreatureCondition(params.cid, CONDITION_INFIGHT) == true) then

doSendAnimatedText(getThingPos(params.item2), "LOST HEAL", 145)

setPlayerStorageValue(item2.uid, 173, 2)

return true

end

if getCreatureHealth(params.item2) == getCreatureMaxHealth(params.item2) then

return true

end

if item.itemid == 2274 then

doSendMagicEffect(getThingPos(params.item2), 14)

doCreatureAddHealth(item2.uid, 220)

end

end

end

 

 

local function noskull(params)

if isCreature(params.item2) then

setPlayerStorageValue(item2.uid, 173, 0)

end

end

 

local item2 = item2.uid

addEvent(heal, 1200, {cid = cid, item2 = item2})

addEvent(heal, 2400, {cid = cid, item2 = item2})

addEvent(heal, 3600, {cid = cid, item2 = item2})

addEvent(heal, 4800, {cid = cid, item2 = item2})

addEvent(heal, 6000, {cid = cid, item2 = item2})

addEvent(heal, 7200, {cid = cid, item2 = item2})

addEvent(heal, 8400, {cid = cid, item2 = item2})

addEvent(heal, 9600, {cid = cid, item2 = item2})

addEvent(heal, 10800, {cid = cid, item2 = item2})

addEvent(heal, 12000, {cid = cid, item2 = item2})

addEvent(noskull, 12500, {cid = cid, item2 = item2})

return true

end

Link para o comentário
Compartilhar em outros sites

  • 0

é só remover essas 4 linhas de cada script, elas fica no começo:

 

if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendCancel(cid, "Sorry, you can't heal your pokemon during fights!")
return TRUE
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...