Ir para conteúdo

Posts Recomendados

Iae galera queria dizer que meu revive post-367361-0-59068700-1386197878.png e meu medicine post-367361-0-79748900-1386198115.png não está tirando miss quando eu uso no pokemon ou na ball ¬¬. Server PDA Slicer e minhas scripts do medice e do revive, quem puder me ajudar, grato deis de já.

 

Medicine:

 

 

  Mostrar conteúdo oculto

 

 

Revive :

 

 

  Mostrar conteúdo oculto

 

 

Alguém poderia me ajudar ?

Aguardando resposta !

Link para o comentário
https://xtibia.com/forum/topic/225025-encerrado-d%C3%BAvida-revive-e-medice-n%C3%A3o-tira-miss/
Compartilhar em outros sites

Opa, quando seu pedido/dúvida for relacionado à servidores derivados (pokémon, naruto, etc), opte por postar na área de Pedidos e dúvidas - Servidores derivados. Cuidado da próxima vez, e obrigado :)

Tente isso jovem.

 

  • Medicine:
function onUse(cid, item, frompos, item2, topos)

	if not isSummon(item2.uid) then return doPlayerSendCancel(cid, "This potion can only be used on pokémons.") end
	if getCreatureMaster(item2.uid) ~= cid then return doPlayerSendCancel(cid, "You can only use it in your own pokemon.") end
	if getPlayerStorageValue(cid, 52481) >= 1 then return doPlayerSendCancel(cid, "You can't do that while a duel.") end
	
	local pokeball = getPlayerSlotItem(cid, 8)
    doCureBallStatus(pokeball.uid, "all")
    doCureStatus(item2.uid, "all", false)         
    if (getCreatureCondition(item2.uid, CONDITION_PARALYZE) == true) then
	   doRemoveCondition(item2.uid, CONDITION_PARALYZE)
    end
    if getCreatureSpeed(item2.uid) < getSpeed(item2.uid) then     
       doRegainSpeed(item2.uid)
    end                                                               
	doSendMagicEffect(getThingPos(item2.uid), 14)
	doRemoveItem(item.uid, 1)

return true
end
  • Revive:
function onUse(cid, item, frompos, item2, topos)

	if getPlayerStorageValue(cid, 990) >= 1 then
		doPlayerSendCancel(cid, "Sorry, not possible")
	return true
	end
	
	if getPlayerStorageValue(cid, 52481) >= 1 then
	   return doPlayerSendCancel(cid, "Sorry, not possible") 
    end
                 --
	if item2.itemid <= 0 or not isPokeball(item2.itemid) then
		doPlayerSendCancel(cid, "Sorry, not possible")
	return true
	end

	for a, b in pairs (pokeballs) do
        if item2.itemid == b.on or item2.itemid == b.off then         
           doTransformItem(item2.uid, b.on)
           doSetItemAttribute(item2.uid, "hp", 1)
           for c = 1, 15 do
               local str = "move"..c
               setCD(item2.uid, str, 0)
	       end
	       setCD(item2.uid, "control", 0)
	       setCD(item2.uid, "blink", 0)  
           doSendMagicEffect(getThingPos(cid), 13)
           doRemoveItem(item.uid, 1)
           doCureBallStatus(item2.uid, "all")
           cleanBuffs2(item2.uid)             
           if useOTClient then
              onPokeHealthChange(cid)   
           end
	       return true
        end
	end

return true
end

Atenciosamente, Stigal.

[06/12/2013 10:31:49] [Error - Action Interface]

[06/12/2013 10:31:49] data/actions/scripts/revive.lua:onUse

[06/12/2013 10:31:49] Description:

[06/12/2013 10:31:49] data/actions/scripts/revive.lua:32: attempt to call global 'onPokeHealthChange' (a nil value)

[06/12/2013 10:31:49] stack traceback:

[06/12/2013 10:31:49] data/actions/scripts/revive.lua:32: in function <data/actions/scripts/revive.lua:1>


:p

Esqueci que pda 1.9 não tem onPokeHealthChance :x

 

Tente esse:

function onUse(cid, item, frompos, item2, topos)

	if getPlayerStorageValue(cid, 990) >= 1 then
		doPlayerSendCancel(cid, "Sorry, not possible")
	return true
	end
	
	if getPlayerStorageValue(cid, 52481) >= 1 then
	   return doPlayerSendCancel(cid, "Sorry, not possible") 
    end
                 --
	if item2.itemid <= 0 or not isPokeball(item2.itemid) then
		doPlayerSendCancel(cid, "Sorry, not possible")
	return true
	end

	for a, b in pairs (pokeballs) do
        if item2.itemid == b.on or item2.itemid == b.off then         
           doTransformItem(item2.uid, b.on)
           doSetItemAttribute(item2.uid, "hp", 1)
           for c = 1, 15 do
               local str = "move"..c
               setCD(item2.uid, str, 0)
	       end
	       setCD(item2.uid, "control", 0)
	       setCD(item2.uid, "blink", 0)  
           doSendMagicEffect(getThingPos(cid), 13)
           doRemoveItem(item.uid, 1)
           doCureBallStatus(item2.uid, "all")
           cleanBuffs2(item2.uid)             
           if useOTClient then 
           end
	       return true
        end
	end

return true
end

Revive:

function onUse(cid, item, frompos, item2, topos)

	if getPlayerStorageValue(cid, 990) >= 1 then
		doPlayerSendCancel(cid, "You can't use revive during gym battles.")
	return true
	end
	
	if getPlayerStorageValue(cid, 52481) >= 1 then
	   return doPlayerSendCancel(cid, "You can't do that while a duel.")
    end
                 --
	if item2.itemid <= 0 or not isPokeball(item2.itemid) then
		doPlayerSendCancel(cid, "Please, use revive only on pokeballs.")
	return true
	end

	for a, b in pairs (pokeballs) do
        if item2.itemid == b.on or item2.itemid == b.off then
           doTransformItem(item2.uid, b.on)
           doSetItemAttribute(item2.uid, "hp", 1)
           for c = 1, 15 do
               local str = "move"..c
               setCD(item2.uid, str, 0)
	       end
	       setCD(item2.uid, "control", 0)
	       setCD(item2.uid, "blink", 0)
           doSendMagicEffect(getThingPos(cid), 13)
           doRemoveItem(item.uid, 1)
           doCureBallStatus(item2.uid, "all")
           cleanBuffs2(item2.uid)
           if useOTClient then
           end
	       return true
        end
	end

return true
end

-

Medicine:

function onUse(cid, item, frompos, item2, topos)

	if not isSummon(item2.uid) then return doPlayerSendCancel(cid, "This potion can only be used on pokémons.") end
	if getCreatureMaster(item2.uid) ~= cid then return doPlayerSendCancel(cid, "You can only use it in your own pokemon.") end
	if getPlayerStorageValue(cid, 52481) >= 1 then return doPlayerSendCancel(cid, "You can't do that while a duel.") end
	
	local pokeball = getPlayerSlotItem(cid, 8)
    doCureBallStatus(pokeball.uid, "all")
    doCureStatus(item2.uid, "all", false)         
    if (getCreatureCondition(item2.uid, CONDITION_PARALYZE) == true) then
	   doRemoveCondition(item2.uid, CONDITION_PARALYZE)
    end
    if getCreatureSpeed(item2.uid) < getSpeed(item2.uid) then     
       doRegainSpeed(item2.uid)
    end                                                               
	doSendMagicEffect(getThingPos(item2.uid), 14)
	doRemoveItem(item.uid, 1)

return true
end

Lol aew Stigal será algum bug desse novo revive que eu coloquei ? Sera que é aquele revive antigo azul e branco por isso não quer healar os miss ? Ou é onde este cara falo ? Newstatusyst ? Hehe o medicine ainda não pegou quando o electabuzz da aquele choque e eu uso medicine continua ou quando uso revive também


O único que tira eu acho que é o que faz durmir o resto eu ainda tou testando :p

Dann, faz o seguinte vai em lib/newStatusSyst e substitui o seu por este:

 

 

  Mostrar conteúdo oculto

 

  • 2 weeks later...
  • 4 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...