Ir para conteúdo

Featured Replies

  • Respostas 9
  • Visualizações 508
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Cara meu atks ja tudo na lib agr quero que so tenha um arquivo xml para cada pokemon

Apos registrar o evento, basta ir na pasta monster, e apagar os arquivos que nao tem um "s" no final.. Registre o evento no mesmo..

Postado
  • Autor

olha esse eventos que tem no oddish s

        <script>
<event name="BlockHit3"/>
<event name="Exp"/>
<event name="BlockSpells"/>
<event name="AvoidLook"/>
<event name="Experience"/>
    <event name="Fome"/>
    <event name="SetSkull"/>
        </script>

esse sao do oddish

<script>
<event name="Spawn"/>
</script>

percebi essa linha de codigo no spawn.lua do pda

 

function onSpawn(cid)


registerCreatureEvent(cid, "GeneralConfiguration")
registerCreatureEvent(cid, "DirectionSystem")
registerCreatureEvent(cid, "CastSystem")


if isSummon(cid) then
registerCreatureEvent(cid, "SummonDeath")
return true
end


registerCreatureEvent(cid, "Experience")


addEvent(doPokemonRegisterLevel, 5, cid)
addEvent(doSetRandomGender, 5, cid)
addEvent(doShiny, 10, cid)


return true
end

esse evento faz o poke volta para pokebola 

registerCreatureEvent(cid, "SummonDeath")

so que no erondino nao tem esse evento

sera que alguem pode adaptar ele para erondino olha codigo dele

 

function onLogout(cid)


if getPlayerStorageValue(cid, 888) >= 1 then
doPlayerSendCancel(cid, "You cant logout during control mind.")
return false
end


local summon = getCreatureSummons(cid)[1]
local thisitem = getPlayerSlotItem(cid, 8)
local btype = getPokeballType(thisitem.itemid)


if #getCreatureSummons(cid) == 1 and thisitem.uid > 1 then
doItemSetAttribute(thisitem.uid, "hp", getCreatureHealth(summon) / getCreatureMaxHealth(summon))
doTransformItem(thisitem.uid, pokeballs[btype].on)


doSendMagicEffect(getThingPos(summon), pokeballs[btype].effect)
doRemoveCreature(summon)
end


if getCreatureOutfit(cid).lookType == 814 then
doPlayerStopWatching(cid)
end


if getPlayerStorageValue(cid, 17000) >= 1 then
markFlyingPos(cid, getThingPos(cid))
end
doPlayerSave(cid)
return TRUE
end


local deathtexts = {"Oh no! POKENAME, come back!", "Come back, POKENAME!", "That's enough, POKENAME!", "You did well, POKENAME!",
   "You need to rest, POKENAME!", "Nice job, POKENAME!", "POKENAME, you are too hurt!"}


function onDeath(cid, deathList)


local owner = getCreatureMaster(cid)


    if getPlayerStorageValue(cid, 637500) >= 1 then
           doSendMagicEffect(getThingPos(cid), 211)
           doRemoveCreature(cid)
           return true
        end
        
        if getPlayerStorageValue(cid, 212123) >= 1 then --alterado v2.5
           return true
        end
        
        --////////////////////////////////////////////////////////////////////////////////////////--
        checkDuel(owner)                                                                          --alterado v2.6 duel system
        --////////////////////////////////////////////////////////////////////////////////////////--
        


local thisball = getPlayerSlotItem(owner, 8)
local btype = getPokeballType(thisball.itemid)


doSendMagicEffect(getThingPos(cid), pokeballs[btype].effect)
doTransformItem(thisball.uid, pokeballs[btype].off)


doPlayerSendTextMessage(owner, 22, "Your pokemon fainted.")


local say = deathtexts[math.random(#deathtexts)]
say = string.gsub(say, "POKENAME", getCreatureName(cid))


if getPlayerStorageValue(cid, 33) <= 0 then
doCreatureSay(owner, say, TALKTYPE_SAY)
end


doItemSetAttribute(thisball.uid, "hp", 0)
doItemSetAttribute(thisball.uid, "happy", getPlayerStorageValue(cid, 1008) - happyLostOnDeath)
doItemSetAttribute(thisball.uid, "hunger", getPlayerStorageValue(cid, 1009))


doRemoveCreature(cid)


return false
end
Postado
  • Autor

eu registrei os eventos nos pokemon so que quando tento chama ele para pokebola ele nao volta mais e nao da nenhum erro no console

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo