Hello There, Guest! Login Register


Where to inssert gender script?
#1
this is my script


function onBattleAction()
    if isWildBattle() and ( isOpponentShiny() or not isAlreadyCaught() or getOpponentName() == "Ralts" ) then
        return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball")
    end
    if getActivePokemonNumber() == 1 then
        return attack() or sendUsablePokemon() or run() or sendAnyPokemon()
    else
        if trapped then
            trapped = false
            return attack()
        else
            return run() or sendUsablePokemon()
        end
    end
end
Where do i insert this:

getPokemonGender(pokemonIndex) -- return string
for female gender?
 
Reply
#2
From what I can tell, you are trying to get gender of wild ralts? If so getPokemonGender() doesn't work that way, getPokemonGender() get's the gender of pokemon in your team, not wild ones.
 
Reply
#3
(2016-10-27, 16:59:04)pandabear From what I can tell, you are trying to get gender of wild ralts?  If so getPokemonGender() doesn't work that way, getPokemonGender() get's the gender of pokemon in your team, not wild ones.

so,can you teach me how to make script that catch only female ralts?
 
Reply
#4
(2016-10-29, 07:56:11)genostelar
(2016-10-27, 16:59:04)pandabear From what I can tell, you are trying to get gender of wild ralts?  If so getPokemonGender() doesn't work that way, getPokemonGender() get's the gender of pokemon in your team, not wild ones.

so,can you teach me how to make script that catch only female ralts?

No, I don't believe there is a function to detect wild pokemon gender.  The best thing you can do is catch all and get rid of the female one by yourself, which honestly is not a lot of work.  Ralts are rare to start with, so you wouldn't catch so many to work with.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)