Hello There, Guest! Login Register


Use pokecenter after time in safari over
#1
Somebody help me build function to restore HP & PP pkm after time over (safari).
 
Reply
#2
do you mean
if getMapName() == "whatever" then
     then moveToMap("Pokecenter Whereeveritis")
elseif getMapName() == "Pokecenter Whereeveritis" then
     usePokecenter()
end
 
Reply
#3
(2016-10-20, 21:21:22)DubsCheckum do you mean
if getMapName() == "whatever" then
    then moveToMap("Pokecenter Whereeveritis")
elseif getMapName() == "Pokecenter Whereeveritis" then
    usePokecenter()
end

No, I think he means use pokecenter after every safari trip, so you don't run out of pp after say 3-4 runs.  

What you can do is to use something like this
if isPokemonUsable(1) and isPokemonUsable(2) and getRemainingPowerPoint(2, "False Swipe") == 40 then
    if getMapName() == "Safari Entrance" then
        moveToMap("Safari Area 1")
    elseif getMapName() == "Pokecenter" then
        moveToMap("Safari Entrance")
    elseif getMapName() == "Safari Area 1" then
        moveToGrass()
    end
else
    if getMapName() == "Safari Entrance" then
        moveToMap("Pokecenter")
    elseif getMapName() == "Pokecenter" then
        usePokecenter()
    elseif getMapName() == "Safari Area 1" then
        moveToGrass()
    end
end

So the basic flow is: if your pokemons are fresh off the pc with full False Swipe pp, then move to Safari Entrance then enter Safari start farming.  If your pokemon doesn't have full False Swipe pp(not 40), then if you are at the Entrance, go back to PC, if you are not at Entrance, continue farming until you get kicked to the entrance(which then will go back to pc to heal).

The code block only gives you the basic flow of how it should work, you will obviously need to change it so it matches your need.  And one down side of this is, if your lead or false swiper dies, you will continue farming.  It's not a problem for me since my hunting pokemons are all lv100, but it might be a problem if your false swiper or lead are low level.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)