Hello There, Guest! Login Register


[LUA] Johto Natu Sync catcher using False Swipe and Role Play
#1
Catches Natus having sync nature in Union Cave.
Might also catch a Lapras if you're lucky. Tongue

Requirements:
* Must have 4 badges in johto in order to use SURF
*Pokemon in team which knows SURF
*Pokemon which knows Role Play at first slot, e.g. Kadabra. (Should work without it, give it a try and tell me if there is any issue)
*Pokemon which knows False Swipe must be at 2nd slot.

Code is open for all community members to make any changes to fit their needs

I made some last minute changes which I could not verify, tell me if something is messed up.

name = "Natu catcher"
author = "LoneAcer"
description = "Captures Natus having sync nature in Union Cave"

function onStart()
    natu_found = 0
    used_roleplay = true
    sync = false
end

function onPathAction()
    used_roleplay = false
    
    if isPokemonUsable(1) and getRemainingPowerPoints(1,"Role Play") > 0 then
        if getMapName() == "Pokecenter Route 32" then
            moveToMap("Route 32")
        elseif getMapName() == "Route 32" then
            moveToCell(13,137)
        elseif getMapName() == "Union Cave 1F" then
            return moveToMap("Union Cave B1F") or moveToCell(40,19)
        elseif getMapName() == "Union Cave B1F" then
            moveToCell(16,16)
        elseif getMapName() == "Union Cave B2F" then
            moveToMap("Union Cave 1F")
        elseif getMapName("Ruins Of Alph") then
            moveToGrass()
        end
    
    else
        if getMapName() == "Ruins Of Alph" then
            moveToCell(10,30)
        elseif getMapName() == "Union Cave 1F" then
            return moveToMap("Union Cave B2F") or moveToMap("Route 32")
        elseif getMapName() == "Union Cave B2F" then
            moveToMap("Union Cave B1F")
        elseif getMapName() == "Union Cave B1F" then
            moveToCell(43,48)
        elseif getMapName() == "Route 32" then
            moveToMap("Pokecenter Route 32")
        elseif getMapName() == "Pokecenter Route 32" then
            usePokecenter()
        end
    end
    
    
end

function onBattleAction()
    if isOpponentShiny() then
        return useItem("Pokeball") or sendUsablePokemon()
    elseif getOpponentName() == "Natu" then
        --[[if getOpponentHealthPercent() > 1 then
            return useMove("False Swipe") or weakAttack() or sendUsablePokemon() or run()
        else
            return useItem("Pokeball") or sendUsablePokemon() or run()
        end]]--
        if used_roleplay == false then
            used_roleplay = true
            useMove("Role Play")
        else
            if sync == true then
                if getActivePokemonNumber() == 1 then
                    sendUsablePokemon()
                else
                    if getOpponentHealthPercent() > 50 then
                        return useMove("False Swipe") or weakAttack() or sendUsablePokemon()
                    else
                        return useItem("Pokeball") or sendUsablePokemon()
                    end
                end
            else
                return run() or sendUsablePokemon()
            end
        end
    elseif getOpponentName() == "Lapras" then
        if getActivePokemonNumber() == 1 then
            sendUsablePokemon()
        else
            if getOpponentHealthPercent() > 50 then
                return useMove("False Swipe") or weakAttack() or sendUsablePokemon()
            else
                return useItem("Pokeball") or sendUsablePokemon()
            end
        end
    else
        return run() or sendUsablePokemon()
    end
end

function onPause()
    log("Natu: " .. natu_found .. "\n Remaining PP: " .. getRemainingPowerPoints(1,"Role Play"))
end

function onBattleMessage(message)
    if stringContains(message, "Wild") and stringContains(message, "Natu") then
        natu_found = natu_found + 1
    end
    if stringContains(message, "Synchronize") then
        sync = true
    else
        sync = false
    end
end
 
Reply
#2
Is Hypnose also effective for catching? If yes what Would be the Code for this instead of false swipe?
 
Reply
#3
hitdolf adler Is Hypnose also effective for catching? If yes what Would be the Code for this instead of false swipe?

replace
if getOpponentHealthPercent() > 50 then
                        return useMove("False Swipe") or weakAttack() or sendUsablePokemon()
                    else
                        return useItem("Pokeball") or sendUsablePokemon()
                    end

by
if getOpponentStatus() ~= "SLEEP" then
                        return useMove("Hypnosis") or weakAttack() or sendUsablePokemon()
                    else
                        return useItem("Pokeball") or sendUsablePokemon()
                    end
 
Reply
#4
Amazing. Do you have a simple way to catch h.a vulpix. It summon sun when appear
 
Reply
#5
megaman Amazing. Do you have a simple way to catch h.a vulpix. It summon sun when appear
Yes, infact I made a script to catch hidden ability magikarp and poliwag as well which is very similar to this script.

The script is here:
https://proshine-bot.com/viewtopic.php?id=772

All you need to do is include the onBattleMessage() in your vulpix catcher script similarly to what I have done.
 
Reply
#6
[Image: w6pEM6o.png] @@
 
Reply
#7
line 72 change
return run()
 
Reply
#8
megaman http://i.imgur.com/w6pEM6o.png @@
Oops, my bad. Thanks for pointing it out. Updated.
 
Reply
#9
The script runs away from Natu's with Sync btw.
 
Reply
#10
can you fix this?it runs away from natu's with sync
 
Reply
#11
http://imgur.com/5tCYqb0 Run away from syncro natus Sad
 
Reply
#12
I posted a quick fix here:
https://proshine-bot.com/viewtopic.php?pid=5083#p5083
 
Reply
#13
(2016-07-12, 07:29:43)Silv3r I posted a quick fix here:
https://proshine-bot.com/viewtopic.php?pid=5083#p5083

link isnt working.
 
Reply
#14
(2016-07-12, 03:47:42)Inia http://imgur.com/5tCYqb0 Run away from syncro natus Sad

it still there any solution anyone ?
 
Reply
#15
(2016-06-20, 03:34:51)megaman Amazing. Do you have a simple way to catch h.a vulpix. It summon sun when appear

where u want to?
I don't accept any request for at the moment.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)