Hello There, Guest! Login Register


Multipurpose Catcher 1.5 Mount-Support is back :D
#1
Hi Guys,
this script went from a really basic one to an easy configurable for several porposes.

What's planned
  • Updating onBattleAction when using 'False Swipe'
  • Adding use of synchronized status alignments
  • Adding 'Rpleplay' support
  • Uploading example configurations
  • Fixing possible issues like:
    • You need to go mapA then mapB then again mapA but another entrance
    • moveToFrikinWater() won't work
    [/*]

Changelog
-- 1.0  Initial: Catch 1 Pokemon: PokeCenter <-> City <-> Route
-- 1.1  Added several counters, logmessages and more possible Pokemon to catch
-- 1.2  Added several configurations, tweaks and dokumentation
-- 1.2a Added bikesupport and stops between catchplace and rest place
-- 1.2b Deleted bikesupport because of accompanied bugs
-- 1.2c Small tweaks
-- 1.3  Added ground/cave/water support and updated moving between stops
-- 1.3a Bugfixes
-- 1.3b Seperated config.lu and script.lua
-- 1.4  Added working and famous 'Bellsprout-exception', updated onBattleAction and lots of tweaks
-- 1.5  Added Any-Mount-Suppot, some tweaks

Instructions:
  1. Make a new folder for this script
  2. Copy the configuration and save it as "config.lua"
  3. Copy the ExpShare script and save it as "EMPC1.3a.lua"
  4. Change the configuration file to fit your needs
  5. Load ans start the script at any configured keylocation and enjoy

Configuration - config.lua
You can configure this pretty easy. Just make sure you follow the instructions.
-- **************************** Configuration ****************************
-- ***********************************************************************

-- Leaving something 'blank' always means means: ""

-- Please specify which Pokemon(s) you want to catch,
-- leave not used blank and fill from top to bottom:
poke1 = "Pidgey"
poke2 = ""
poke3 = ""
poke4 = ""
poke5 = ""

-- Please specify which special Pokemon you want to catch,
-- they won't be attacked, just catched with Balls of quality you like:
pokeball = true
greatball = false
ultraball = false
special1 = ""
special2 = ""

-- Please specify if you want to catch uncaught and shinys:
catchNotCaught = true
catchShinys = true

-- Please specifiy keylocations:
mobileNurse = false -- if you're using a standing around 'Nurse Joy' i.e. Pokemon Tower F5 make it true
pokeCenter = "Pokecenter Vermilion" -- place the name of PokeCenter OR mapname where mobile nurse stays
restPlace = "Vermilion City" -- place the mapname where PokeCenter is located here OR if you're using a mobile nurse    leave it blank                  
stop1 = "" -- 1st stop from pokeCenter/restPlace to catchPlace, if unused leave it blank
stop2 = "" -- 2st stop
stop3 = "" -- 3st stop
stop4 = "" -- 4st stop
stop5 = "" -- 5st stop
catchPlace = "Route 6" -- place the final destination here, even if its placed before in pokeCenter or restPlace

-- Please specifiy grass, water or cave/ground (i.e. Mt. Moon or Poke Tower)
-- BEWARE thet only ONE can be true, so make sure you don't make a mistake:
grass = true
water = false
caveground = false
-- You have to some work here if caveground = true:
-- 1.) go to the room/catchPlace
-- 2.) go to the top left of this room and type '/loc' then note minX and minY
-- 3.) go to the bottom right of this room and type '/loc' then note maxX and maxY
-- ATTENTION the rectangle you're creating with this should NOT include
-- ladders, ports, doors or something like that
minX = 0
minY = 0
maxX = 0
maxY = 0

-- Please specify which weak move you want to use,
-- your 1st Pokemon will use it until enemy is under 50% HP:
-- (or at 1 HP if you're using 'False Swipe' -- not implementet yet)
move = "Dragon Rage"

-- Please specifiy if you want to use a mount and which one:
mountUse = true
mount = "Bicycle" -- every mount possible

-- Please specify if you want to use synchronized status alignments:
synchronize = false -- not implemented yet

-- Please specify if you need money from crap Pokemon, this will take a bit longer than 'only catch':
earnMoney = false

-- Please specify if you wanna use Pokeball Buyer:
buyBalls = false -- not implemented yet

-- The bot will use your Bike, if you have one. -- REMOVED THIS ONE, UPDATE INCOMING

-- Please specify if you want to recieve private messages:
privateMessage = true

-- ***********************************************************************
-- ***********************************************************************

The Script - EMPC1.3a.lua - Do not touch any of the code below, if you don't know what you're doing.
name = "EMPC 1.5"
author = "Elunius"
description = "This is Elunius' Multipurpose-Catcher and it does what you configured."

dofile "config.lua"

function onStart()
    encounter = 0
    poke1counter = 0
    poke2counter = 0
    poke3counter = 0
    poke4counter = 0
    poke5counter = 0
    special1counter = 0
    Special2counter = 0
    shinyCounter = 0
    
    allCatch = 0
    poke1catch = 0
    poke2catch = 0
    poke3catch = 0
    poke4catch = 0
    poke5catch = 0
    special1catch = 0
    Special2catch = 0
    shinyCatch = 0
    
    pokecenterCounter = 0
    startMoney = getMoney()
    
    log("=======================================")
    log("This Script will catch the configured Pokemon for you.")
    if special1 ~= "" and special2 ~= "" then
        log("It also throws Balls at Shinys, " ..special1.. " and " ..special2.. " for you.")
    elseif special1 ~= "" and special2 == "" then
        log("It also throws Balls at Shinys and " ..special1.. " for you.")
    elseif special1 == "" and special2 == "" then
        log("It also throws Balls at Shinys for you.")
    end
    log("The Pokemon with '" ..move.. "' should be in 1st place.")
    if earnMoney == true then
        log("You will farm Pokedollar from crappy Pokemon.")
    else
        log("You choosed the fast way and will flee from all crappy Pokemon.")
    end
    if buyBalls == false then
        log("Please make sure you got enough Pokeballs with you.")
    end
    if privateMessage == false then
        if isPrivateMessageEnabled() then
            log("Private messages disabled.")
            disablePrivateMessage()
        end
    else log("Private messages are enabled.")
    end
    log("=======================================")
    
end

function RunningTime()
    RunTime = math.floor(os.clock())
    if (RunTime / 60) < 60 then -- is less than 1 hr
        return log("Running Bot Time: " .. math.floor(RunTime / 60) .. " Minutes.")
    else --more than 1 hr
        local hr = math.floor((RunTime / 60) / 60)
        return log("Running Bot Time: " .. hr .. " Hours  and " .. (math.floor(RunTime / 60) - (hr * 60)) .. " Minutes.")
    end
end

function bellsproutException()
    function onBattleMessage(wrapped)
        if stringContains(wrapped, "wrapped")then
--            return anyMove()
            return attack() or fatal("You got wrapped - relog and start from Pokemon Center.")
        end
    end
end

function onPathAction()

-- False swiper status recover
    -- if (getPokemonStatus(2)=="PAPALYZE" or getPokemonStatus(2)=="POISON") and getItemQuantity("Lum Berry")>0 then
    --     return useItemOnPokemon("Lum Berry", pkmn#)
    -- end
    
-- Pokeball Conditions
    if getItemQuantity("Pokeball") < 5 then
        -- if buyBalls = true then
        --     things()
        -- elseif
        fatal("BOT HAS STOPPED - You dont have enough Pokeballs with you, go and get some!")
        --        end
    
-- Mounting
    elseif not isMounted() and mountUse == true and hasItem(mount) and not isSurfing() and isOutside() then
            return useItem(mount)
            
-- Pokemon Center Conditions
    elseif isPokemonUsable(1) and getRemainingPowerPoints(1,move) > 1 then

        -- Way there
        if getMapName() == pokeCenter then
            if restPlace ~= catchPlace and restPlace ~= "" then
                moveToMap(restPlace)
            elseif stop1 ~= "" and restPlace == "" then
                moveToMap(stop1)
            elseif pokeCenter ~= catchPlace and restPlace == "" and stop1 == "" then
                moveToMap(catchPlace)
            elseif pokeCenter ~= catchPlace and restPlace ~= "" then
                moveToMap(restPlace)
            else
                if grass == true then
                    moveToGrass()
                elseif water == true then
                    moveToWater()
                elseif caveground == true then
                    moveToRectangle(minX, minY, maxX, maxY)
                end
            end
        elseif getMapName() == restPlace and restPlace ~= catchPlace then
            if stop1 ~= "" then
                moveToMap(stop1)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop1 then
            if stop2 ~= "" then
                moveToMap(stop2)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop2 then
            if stop3 ~= "" then
                moveToMap(stop3)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop3 then
            if stop4 ~= "" then
                moveToMap(stop4)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop4 then
            if stop5 ~= "" then
                moveToMap(stop5)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop5 then
            moveToMap(catchPlace)
        elseif getMapName() == catchPlace then
            if grass == true then
                moveToGrass()
            elseif water == true then
                moveToWater()
            elseif caveground == true then
                moveToRectangle(minX, minY, maxX, maxY)
            end
        end
    -- Way home
    else
        if getMapName() == catchPlace then
            if stop5 ~= "" then
                moveToMap(stop5)
            elseif stop4 ~= "" and stop5 == "" then
                moveToMap(stop4)
            elseif stop3 ~= "" and stop4 == "" then
                moveToMap(stop3)
            elseif stop2 ~= "" and stop3 == "" then
                moveToMap(stop2)
            elseif stop1 ~= "" and stop2 == "" then
                moveToMap(stop1)
            elseif restPlace ~= "" and stop1 == "" then
                moveToMap(restPlace)
            elseif pokeCenter ~= "" and restPlace == "" then
                moveToMap(pokeCenter)
            elseif pokeCenter == catchPlace then
                talkToNpc("Nurse Joy")
            end
        elseif getMapName() == stop5 then
            moveToMap(stop4)
        elseif getMapName() == stop4 then
            moveToMap(stop3)
        elseif getMapName() == stop3 then
            moveToMap(stop2)
        elseif getMapName() == stop2 then
            moveToMap(stop1)
        elseif getMapName() == stop1 then
            if restPlace ~= "" then
                moveToMap(restPlace)
            else
                moveToMap(pokeCenter)
            end
        elseif getMapName() == restPlace then
            moveToMap(pokeCenter)
        elseif getMapName() == pokeCenter then
            if mobileNurse == false then
                usePokecenter()
            elseif mobileNurse == true then
                talkToNpc("Nurse Joy")
            end
        end
    end
end

    
function onBattleAction()
    encounter = encounter + 1
-- Enemy is on catchlist
    if  getOpponentName() == poke1
    or  getOpponentName() == poke2
    or  getOpponentName() == poke3
    or  getOpponentName() == poke4
    or  getOpponentName() == poke5
    or  (catchNotCaught == true and not isAlreadyCaught() and not isOpponentShiny()) then
        -- Weakens enemy then catch or kill if #1 is dead
        if isPokemonUsable(1) then
            if getOpponentHealthPercent() > 50 then
                if getRemainingPowerPoints(1, move) ~= 0 then
                    return useMove(move)
                else return useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()
                end
            else
                return useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()
            end
        else
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        end
        
-- Enemy is on special-catchlist
    elseif getOpponentName() == special1 or getOpponentName() == special2 then
        if ultraball == true and greatball == true and pokeball == true then
            return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()
        elseif ultraball == true and greatball == true and pokeball == false then
            return useItem("Ultra Ball") or useItem("Great Ball") or attack() or bellsproutException() or sendUsablePokemon() or run()            
        elseif ultraball == true and greatball == false and pokeball == true then
            return useItem("Ultra Ball") or useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()                
        elseif ultraball == false and greatball == true and pokeball == true then
            return useItem("Great Ball") or useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()        
        elseif ultraball == true and greatball == false and pokeball == false then
            return useItem("Ultra Ball") or attack() or bellsproutException() or sendUsablePokemon() or run()
        elseif ultraball == false and greatball == true and pokeball == false then
            return useItem("Great Ball") or attack() or bellsproutException() or sendUsablePokemon() or run()            
        elseif ultraball == false and greatball == false and pokeball == true then
            return useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()        
        else
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        end
                
-- Enemy is shiny
    elseif catchShinys == true and isOpponentShiny()
    and not (getOpponentName() == special1 or getOpponentName() == special2) then
        if isPokemonUsable(1)then
            if getOpponentHealthPercent() > 50 then
                if getRemainingPowerPoints(1, move) ~= 0 then
                    return useMove(move)
                else
                    return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball")
                    or attack() or bellsproutException() or sendUsablePokemon() or run()
                end
            else
                return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball")
                or attack() or bellsproutException() or sendUsablePokemon() or run()
            end
        else
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        end
-- Enemy is crap
    else
        if earnMoney == true then
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        else
            return run() or attack() or bellsproutException() or sendUsablePokemon()
        end
    end
end

function onBattleMessage(message)
-- Catchlist encounters and caughts
    if     stringContains(message, "A Wild") and stringContains(message, poke1) then
        poke1counter = poke1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke1) then
        poke1catch = poke1catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke2) then
        poke2counter = poke2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke2) then
        poke2catch = poke2catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke3) then
        poke3counter = poke3counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke3) then
        poke3catch = poke3catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke4) then
        poke4counter = poke4counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke4) then
        poke4catch = poke4catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke5) then
        poke5counter = poke5counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke5) then
        poke5catch = poke5catch + 1
        allCatch = allCatch + 1
        
-- Special-catchlist encounters and caughts
    elseif stringContains(message, "A Wild") and stringContains(message, special1) then
        special1counter = special1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special1) then
        special1catch = special1catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, special2) then
        special2counter = special2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special2) then
        special2catch = special2catch + 1
        allCatch = allCatch + 1
        
-- Shiny encounters and caughts
    elseif stringContains(message, "A Wild SHINY") then
        shinyCounter = shinyCounter + 1
    elseif stringContains(message, "caught") and stringContains(message, "SHINY") then
        shinyCatch = shinyCatch + 1
        allCatch = allCatch + 1
    end
end

function onDialogMessage(pokecenter)
    if stringContains(pokecenter, "heal your Pokemon?") then
        pokecenterCounter = pokecenterCounter + 1
    end
end

function onPause()
    recentMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if earnMoney == true then
        log("You have earned ".. tostring(recentMoney - startMoney) .." PokeDollars so far!")
    end
    RunningTime()
    log("=======================================")
end

function onResume()
    log("=======================================")
end

function onStop()
    endMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 ~= "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. ", "..poke4counter.. " " ..poke4.. " and "..poke5counter.. " " ..poke5)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. ", "..poke4catch.. " " ..poke4.. " and "..poke5catch.. " " ..poke5.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. " and "..poke4counter.. " " ..poke4)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. " and "..poke4catch.. " " ..poke4.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. " and "..poke3counter.. " " ..poke3)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. " and "..poke3catch.. " " ..poke3.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. " and " ..poke2counter.. " " ..poke2)
        log("and have caught " ..poke1catch.. " " ..poke1.. " and " ..poke2catch.. " " ..poke2.. ".")
    elseif poke1 ~= "" and poke2 == "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1)
        log("and have caught " ..poke1catch.. " " ..poke1.. ".")
    end
    if special1 ~= "" and special2 ~= "" then
        log("You also have seen " ..shinyCounter.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2)
        log("and caught " ..shinyCatch.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2.. ".")
    elseif     special1 ~= "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and " ..special1counter.. " " ..special1)
        log("and caught " ..shinyCatch.. " Shinys and " ..special1counter.. " " ..special1.. ".")
    elseif     special1 == "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and caught " ..shinyCatch.. " Shinys.")
    end
    if earnMoney == true then
        log("You have earned ".. tostring(endMoney - startMoney) .." PokeDollars!")
    end
    RunningTime()
    log("=======================================")
end


Greetings
 
Reply
#2
A suggestion I have is to add sync support!
 
Reply
#3
jluong96 A suggestion I have is to add sync support!

The reason i didn't implemented yet is simple: i got no syncer nor falseswiper^^ so i edited my script to get one Tongue
While hoping for an epic gastly/haunter

name = "EFSC 1.0"
Author = "Elunius"
Description = "This is Elunius' 'False Swipe' Catcher. Start this script in Pokemon Tower 5F"

-- **************************** Configuration ****************************
-- ***********************************************************************

-- Please specify which Pokemon(s) you want to catch,
-- leave not used blank and fill from top to bottom:
poke1 = "Gastly"
poke2 = "Haunter"
poke3 = "Cubone"
poke4 = ""
poke5 = ""

-- Please specify which special Pokemon you want to catch,
-- they won't be attacked, just catched with Balls of quality you like:
pokeball = true
greatBall = true
ultraBall = false
special1 = ""
special2 = ""

-- Please specify if you want to catch uncaught and shinys:
catchNotCaught = true
catchShinys = true

-- Please specify which weak move you want to use,
-- your 1st Pokemon will use it until enemy is under 50% HP:
move = "Dragon Rage"

-- Please specify if you need money from crap Pokemon, this will take a bit longer than 'only catch':
earnMoney = true

-- Please specify if you want to recieve private messages:
privateMessage = true

-- Synchonize not implementet yet
-- Falseswipe not implementet yet

-- ***********************************************************************
-- ***********************************************************************



function onStart()
    encounter = 0
    poke1counter = 0
    poke2counter = 0
    poke3counter = 0
    poke4counter = 0
    poke5counter = 0
    special1counter = 0
    Special2counter = 0
    shinyCounter = 0
    
    allCatch = 0
    poke1catch = 0
    poke2catch = 0
    poke3catch = 0
    poke4catch = 0
    poke5catch = 0
    special1catch = 0
    Special2catch = 0
    shinyCatch = 0
    
    pokecenterCounter = 0
    startMoney = getMoney()

    log("=======================================")
    log("This Script will catch the configured Pokemon for you.")
    if special1 ~= "" and special2 ~= "" then
        log("It also throws Balls at Shinys, " ..special1.. " and " ..special2.. " for you.")
    elseif special1 ~= "" and special2 == "" then
        log("It also throws Balls at Shinys and " ..special1.. " for you.")
    elseif special1 == "" and special2 == "" then
        log("It also throws Balls at Shinys for you.")
    end
    log("The Pokemon with '" ..move.. "' should be in 1st place.")
    if earnMoney == true then
        log("You will farm Pokedollar from crappy Pokemon.")
    else
        log("You choosed the fast way and will flee from all crappy Pokemon.")
    end
    if buyBalls == false then
        log("Please make sure you got enough Pokeballs with you.")
    end
    if privateMessage == false then
        if isPrivateMessageEnabled() then
            log("Private messages disabled.")
            return disablePrivateMessage()
        end
    else log("Private messages are enabled.")
    end
    log("=======================================")
    
end

function onPathAction()

-- Pokeball Conditions
    if getItemQuantity("Pokeball") < 5 then
        fatal("BOT HAS STOPPED - You dont have enough Pokeballs with you, go and get some!")
    end
    
-- Pokemon Center Conditions
    if isPokemonUsable(1) and getRemainingPowerPoints(1,move) > 1 then
        moveToRectangle(3, 4, 15, 19)
    else
        talkToNpc("Nurse Joy")
    end
end

function onBattleAction()
    encounter = encounter + 1
-- Enemy is on catchlist
    if  getOpponentName() == poke1
    or  getOpponentName() == poke2
    or  getOpponentName() == poke3
    or  getOpponentName() == poke4
    or  getOpponentName() == poke5
    or  (catchNotCaught == true and not isAlreadyCaught()) then
-- Use move then catch, or kill if #1 is dead
        if isPokemonUsable(1)then
            if getOpponentHealthPercent() > 50 then
                if getRemainingPowerPoints(1, move) ~= 0 then
                    return useMove(move)
                else return useItem("Pokeball") or attack() or sendUsablePokemon() or run()
                end
            else
                return useItem("Pokeball") or attack() or sendUsablePokemon() or run()
            end
        else
            return attack() or sendUsablePokemon() or run()
        end

-- Enemy is on special-catchlist    
    elseif getOpponentName() == special1 or getOpponentName() == special2 then
        if     ultraball == true then return useItem("Ultra Ball")
        elseif greatball == true then return useItem("Great Ball")
        elseif pokeball  == true then return useItem("Pokeball")
        else   return attack() or sendUsablePokemon() or run()
        end

-- Enemy is shiny
    elseif catchShinys == true and isOpponentShiny() then
        if isPokemonUsable(1)then
            if getOpponentHealthPercent() > 50 then
                if getRemainingPowerPoints(1, move) ~= 0 then
                    return useMove(move)
                else
                    return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball")
                    or attack()    or sendUsablePokemon() or run()
                end
            else
                return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball")
                or attack() or sendUsablePokemon() or run()
            end
        else
            return attack() or sendUsablePokemon() or run()
        end
        
-- Enemy is crap
    else
        if earnMoney == true then
            return attack() or sendUsablePokemon() or run()
        else
            return run()
        end
    end
end

function RunningTime()
    RunTime = math.floor(os.clock())
    if (RunTime / 60) < 60 then -- is less than 1 hr
        return log("Running Bot Time: " .. math.floor(RunTime / 60) .. " Minutes.")
    else --mote than 1 hr
        local hr = math.floor((RunTime / 60) / 60)
        return log("Running Bot Time: " .. hr .. " Hours  and " .. (math.floor(RunTime / 60) - (hr * 60)) .. " Minutes.")
    end
end

function onBattleMessage(message)
-- Catchlist encounters and caughts        
    if     stringContains(message, "A Wild") and stringContains(message, poke1) then
        poke1counter = poke1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke1) then
        poke1catch = poke1catch + 1    
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke2) then
        poke2counter = poke2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke2) then
        poke2catch = poke2catch + 1    
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke3) then
        poke3counter = poke3counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke3) then
        poke3catch = poke3catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke4) then
        poke4counter = poke4counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke4) then
        poke4catch = poke4catch + 1
        allCatch = allCatch + 1

    elseif stringContains(message, "A Wild") and stringContains(message, poke5) then
        poke5counter = poke5counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke5) then
        poke5catch = poke5catch + 1
        allCatch = allCatch + 1
        
-- Special-catchlist encounters and caughts
    elseif stringContains(message, "A Wild") and stringContains(message, special1) then
        special1counter = special1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special1) then
        special1catch = special1catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, special2) then
        special2counter = special2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special2) then
        special2catch = special2catch + 1
        allCatch = allCatch + 1

-- Shiny encounters and caughts    
    elseif stringContains(message, "A Wild SHINY") then
        shinyCounter = shinyCounter + 1    
    elseif stringContains(message, "caught") and stringContains(message, "SHINY") then
        shinyCatch = shinyCatch + 1
        allCatch = allCatch + 1
    end
end

function onDialogMessage(pokecenter)
    if stringContains(pokecenter, "heal your Pokemon?") then
        pokecenterCounter = pokecenterCounter + 1
    end
end

function onPause()
    recentMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if earnMoney == true then
        log("You have earned ".. tostring(recentMoney - startMoney) .." PokeDollars so far!")
    end
    RunningTime()
    log("=======================================")
end

function onResume()
    log("=======================================")
end

function onStop()
    endMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 ~= "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. ", "..poke4counter.. " " ..poke4.. " and "..poke5counter.. " " ..poke5)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. ", "..poke4catch.. " " ..poke4.. " and "..poke5catch.. " " ..poke5.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. " and "..poke4counter.. " " ..poke4)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. " and "..poke4catch.. " " ..poke4.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. " and "..poke3counter.. " " ..poke3)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. " and "..poke3catch.. " " ..poke3.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. " and " ..poke2counter.. " " ..poke2)
        log("and have caught " ..poke1catch.. " " ..poke1.. " and " ..poke2catch.. " " ..poke2.. ".")
    elseif poke1 ~= "" and poke2 == "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1)
        log("and have caught " ..poke1catch.. " " ..poke1.. ".")
    end
    if special1 ~= "" and special2 ~= "" then
        log("You also have seen " ..shinyCounter.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2)
        log("and caught " ..shinyCatch.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2.. ".")
    elseif     special1 ~= "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and " ..special1counter.. " " ..special1)
        log("and caught " ..shinyCatch.. " Shinys and " ..special1counter.. " " ..special1.. ".")
    elseif     special1 == "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and caught " ..shinyCatch.. " Shinys.")
    end
    if earnMoney == true then
        log("You have earned ".. tostring(endMoney - startMoney) .." PokeDollars!")
    end    
    RunningTime()
    log("=======================================")
end
 
Reply
#4
name = "EMPC 1.2a"
Author = "Elunius"
Description = "This Multipurpose-Catcher is for easy use - configure it like you need it."

-- **************************** Configuration ****************************
-- ***********************************************************************

-- Please specify which Pokemon(s) you want to catch,
-- leave not used blank and fill from top to bottom:
poke1 = "Absol"
poke2 = "Larvitar"
poke3 = "Misdreavus"
poke4 = "Magmar"
poke5 = ""

-- Please specify which special Pokemon you want to catch,
-- they won't be attacked, just catched with Balls of quality you like:
pokeball = true
greatBall = true
ultraBall = false
special1 = ""
special2 = ""

-- uncaught and shinys?
catchNotCaught = true
catchShinys = true

-- Please specifiy keylocations, leave unused locations blank:
pokeCenter = "Mt. Silver Pokecenter" -- mobile nurses won't work
restPlace = "" -- if Pokemon Center on Route, leave it blank
stop1 = "Mt. Silver Exterior" -- 1st stop from Pokemon center/ City to catch place, if unused leave it blank
stop2 = "Mt. Silver 1F" -- 2st stop from Pokemon center/ City to catch place, if unused leave it blank
stop3 = "Mt. Silver Lower Mountainside" -- 3st stop from Pokemon center/ City to catch place, if unused leave it blank
stop4 = "Mt. Silver 2F" -- 4st stop from Pokemon center/ City to catch place, if unused leave it blank
stop5 = "Mt. Silver 3F" -- 5st stop from Pokemon center/ City to catch place, if unused leave it blank
catchPlace = "Mt. Silver 2F" -- always place the final destination here

-- The bot will use your Bike, if you have one.

-- Please specifiy ground, grass or water:
grass = false
cave = true --
water = false--

-- Please specify if you wanna use Pokeball Buyer:
buyBalls = false -- not implemented yet

-- Please specify which weak move you want to use,
-- your 1st Pokemon will use it: (until enemy is under 50% or at 1 HP -- not implemented yet)
move = "False Swipe"

-- Please specify if you need money from crap Pokemon, this will take a bit longer than 'only catch':
earnMoney = false

-- Please specify if you want to recieve private messages:
privateMessage = false

-- Synchonize?
-- Falseswipe?

-- ***********************************************************************
-- ***********************************************************************



function onStart()
    encounter = 0
    poke1counter = 0
    poke2counter = 0
    poke3counter = 0
    poke4counter = 0
    poke5counter = 0
    special1counter = 0
    Special2counter = 0
    shinyCounter = 0
    
    allCatch = 0
    poke1catch = 0
    poke2catch = 0
    poke3catch = 0
    poke4catch = 0
    poke5catch = 0
    special1catch = 0
    Special2catch = 0
    shinyCatch = 0
    
    pokecenterCounter = 0
    usedMove = false
    startMoney = getMoney()
    getOnBike()

    log("=======================================")
    log("This Script will catch the configured Pokemon for you.")
    if special1 ~= "" and special2 ~= "" then
        log("It also throws Balls at Shinys, " ..special1.. " and " ..special2.. " for you.")
    elseif special1 ~= "" and special2 == "" then
        log("It also throws Balls at Shinys and " ..special1.. " for you.")
    elseif special1 == "" and special2 == "" then
        log("It also throws Balls at Shinys for you.")
    end
    log("The Pokemon with '" ..move.. "' should be in 1st place.")
    if earnMoney == true then
        log("You will farm Pokedollar from crappy Pokemon.")
    else
        log("You choosed the fast way and will flee from all crappy Pokemon.")
    end
    if buyBalls == false then
        log("Please make sure you got enough Pokeballs with you.")
    end
    if privateMessage == false then
        if isPrivateMessageEnabled() then
            log("Private messages disabled.")
            return disablePrivateMessage()
        end
    else log("Private messages are enabled.")
    end
    log("=======================================")
    
end

function getOnBike()
    if not isMounted()
    and hasItem("Bicycle")
    and not string.find(getMapName(), "Pokecenter")
    and not string.find(getMapName(), "Tunnel")
    and not string.find(getMapName(), "Stop")
    and not string.find(getMapName(), "Cave")
    and not string.find(getMapName(), "Mt")
    and not string.find(getMapName(), "Tower")
    and not string.find(getMapName(), "mansion")
    and not string.find(getMapName(), "Victory") then
        useItem("Bicycle")
    end
end

function onPathAction()
    usedMove = false
-- False swiper status recover
--    if (getPokemonStatus(2)=="PAPALYZE" or getPokemonStatus(2)=="POISON") and getItemQuantity("Lum Berry")>0 then return useItemOnPokemon("Lum Berry", pkmn#) end

-- Pokeball Conditions
        if getItemQuantity("Pokeball") < 5 then
    --        if buyBalls = true then
    --            pokeball buy script
    --        elseif
            fatal("BOT HAS STOPPED - You dont have enough Pokeballs with you, go and get some!")
    --        end    
        end
    
-- Pokemon Center Conditions
    if isPokemonUsable(1) and getRemainingPowerPoints(1,move) > 0 then
--         Way there
        if getMapName() == pokeCenter then
            if restPlace ~= "" then
                moveToMap(restPlace)
            elseif stop1 ~= "" then
                moveToMap(stop1)
            else
                moveToMap(catchPlace)
            end                
        elseif getMapName() == restPlace then
            if stop1 ~= "" then
                moveToMap(stop1)
            else
                moveToMap(catchPlace)
            end                
        elseif getMapName() == stop1 then
            if stop2 ~= "" then
                moveToMap(stop2)
            else
                moveToMap(catchPlace)
            end    
        elseif getMapName() == stop2 then
            if stop3 ~= "" then
                moveToMap(stop3)
            else
                moveToMap(catchPlace)
            end    
        elseif getMapName() == stop3 then
            if stop4 ~= "" then
                moveToMap(stop4)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop4 then
            if stop5 ~= "" then
                moveToMap(stop5)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop5 then
            moveToMap(catchPlace)
        elseif getMapName() == catchPlace then
--                if lookForGrass then
                    moveToGrass()
--                else
--                    moveToRectangle(rectX1, rectY1, rectX2, rectY2)
--                end
        end
--     Way home    
    else
        if getMapName() == catchPlace then
            if stop5 ~= "" then
                moveToMap(stop5)
            elseif stop4 ~= "" then
                moveToMap(stop4)
            elseif stop3 ~= "" then
                moveToMap(stop3)
            elseif stop2 ~= "" then
                moveToMap(stop2)
            elseif stop1 ~= "" then
                moveToMap(stop1)
            elseif restPlace ~= "" then
                moveToMap(restPlace)
            else
                moveToMap(pokeCenter)
            end    
        elseif getMapName() == stop5 then
            moveToMap(stop4)
        elseif getMapName() == stop4 then
            moveToMap(stop3)
        elseif getMapName() == stop3 then
            moveToMap(stop2)
        elseif getMapName() == stop2 then
            moveToMap(stop1)
        elseif getMapName() == stop1 then
            if restPlace ~= "" then
                moveToMap(restPlace)
            else
                moveToMap(pokeCenter)
            end
        elseif getMapName() == restPlace then
            moveToMap(pokeCenter)
        elseif getMapName() == pokeCenter then
            usePokecenter()
        end
    
    end
end

function onBattleAction()
    encounter = encounter + 1
-- Enemy is on catchlist
    if  getOpponentName() == poke1
    or  getOpponentName() == poke2
    or  getOpponentName() == poke3
    or  getOpponentName() == poke4
    or  getOpponentName() == poke5
    or  (catchNotCaught == true and not isAlreadyCaught()) then
-- Use Move ONCE then catch, or kill if #1 is dead
        if isPokemonUsable(1)then
            if  usedMove == false then
                pp_left = useMove(move)
                usedMove = true
            else
                return useItem("Pokeball") or attack() or sendUsablePokemon() or run()
            end
        else
            return attack() or sendUsablePokemon() or run()
        end

-- Enemy is on special-catchlist    
    elseif getOpponentName() == special1 or getOpponentName() == special2 then
        if     ultraball == true then return useItem("Ultra Ball")
        elseif greatball == true then return useItem("Great Ball")
        elseif pokeball  == true then return useItem("Pokeball")
        else   return attack() or sendUsablePokemon() or run()
        end
-- Bellsprout-exeption
    elseif getOpponentName() == "Bellsprout" then
        return run() or attack() or sendUsablePokemon()
-- Enemy is shiny
    elseif catchShinys == true and isOpponentShiny() then
        return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or attack() or sendUsablePokemon() or run()
-- Enemy is crap
    else
        if earnMoney == true then
                return attack() or sendUsablePokemon() or run()
        else
            return run()
        end
    end
end

function RunningTime()
    RunTime = math.floor(os.clock())
    if (RunTime / 60) < 60 then -- is less than 1 hr
        return log("Running Bot Time: " .. math.floor(RunTime / 60) .. " Minutes.")
    else --mote than 1 hr
        local hr = math.floor((RunTime / 60) / 60)
        return log("Running Bot Time: " .. hr .. " Hours  and " .. (math.floor(RunTime / 60) - (hr * 60)) .. " Minutes.")
    end
end

function onBattleMessage(message)
-- Catchlist encounters and caughts        
    if     stringContains(message, "A Wild") and stringContains(message, poke1) then
        poke1counter = poke1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke1) then
        poke1catch = poke1catch + 1    
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke2) then
        poke2counter = poke2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke2) then
        poke2catch = poke2catch + 1    
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke3) then
        poke3counter = poke3counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke3) then
        poke3catch = poke3catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke4) then
        poke4counter = poke4counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke4) then
        poke4catch = poke4catch + 1
        allCatch = allCatch + 1

    elseif stringContains(message, "A Wild") and stringContains(message, poke5) then
        poke5counter = poke5counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke5) then
        poke5catch = poke5catch + 1
        allCatch = allCatch + 1
        
-- Special-catchlist encounters and caughts
    elseif stringContains(message, "A Wild") and stringContains(message, special1) then
        special1counter = special1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special1) then
        special1catch = special1catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, special2) then
        special2counter = special2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special2) then
        special2catch = special2catch + 1
        allCatch = allCatch + 1

-- Shiny encounters and caughts    
    elseif stringContains(message, "A Wild SHINY") then
        shinyCounter = shinyCounter + 1    
    elseif stringContains(message, "caught") and stringContains(message, "SHINY") then
        shinyCatch = shinyCatch + 1
        allCatch = allCatch + 1
    end
end

function onDialogMessage(pokecenter)
    if stringContains(pokecenter, "Would you like me to heal your Pokemon?") then
        pokecenterCounter = pokecenterCounter + 1
    end
end

function onPause()
    recentMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if earnMoney == true then
        log("You have earned ".. tostring(recentMoney - startMoney) .." PokeDollars so far!")
    end
    RunningTime()
    log("=======================================")
end

function onResume()
    log("=======================================")
end

function onStop()
    endMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 ~= "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. ", "..poke4counter.. " " ..poke4.. " and "..poke5counter.. " " ..poke5)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. ", "..poke4catch.. " " ..poke4.. " and "..poke5catch.. " " ..poke5.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. " and "..poke4counter.. " " ..poke4)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. " and "..poke4catch.. " " ..poke4.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. " and "..poke3counter.. " " ..poke3)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. " and "..poke3catch.. " " ..poke3.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. " and " ..poke2counter.. " " ..poke2)
        log("and have caught " ..poke1catch.. " " ..poke1.. " and " ..poke2catch.. " " ..poke2.. ".")
    elseif poke1 ~= "" and poke2 == "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1)
        log("and have caught " ..poke1catch.. " " ..poke1.. ".")
    end
    if special1 ~= "" and special2 ~= "" then
        log("You also have seen " ..shinyCounter.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2)
        log("and caught " ..shinyCatch.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2.. ".")
    elseif     special1 ~= "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and " ..special1counter.. " " ..special1)
        log("and caught " ..shinyCatch.. " Shinys and " ..special1counter.. " " ..special1.. ".")
    elseif     special1 == "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and caught " ..shinyCatch.. " Shinys.")
    end
    if earnMoney == true then
        log("You have earned ".. tostring(endMoney - startMoney) .." PokeDollars!")
    end    
    RunningTime()
    log("=======================================")
end


Quote[7:24:04 AM] Script "EMPC 1.2a" by "" successfully loaded
[7:24:06 AM] Bot started
[7:24:06 AM] =======================================
[7:24:06 AM] This Script will catch the configured Pokemon for you.
[7:24:06 AM] It also throws Balls at Shinys for you.
[7:24:06 AM] The Pokemon with 'False Swipe' should be in 1st place.
[7:24:06 AM] You choosed the fast way and will flee from all crappy Pokemon.
[7:24:06 AM] Please make sure you got enough Pokeballs with you.
[7:24:06 AM] =======================================
[7:24:16 AM] No action executed: stopping the bot.
[7:24:16 AM] Bot stopped
[7:24:16 AM] =======================================
[7:24:16 AM] Pokecenter visits: 0
[7:24:16 AM] You have encountered 0 Pokemon and catched 0 Pokemon.
[7:24:16 AM] You have seen 0 Absol, 0 Larvitar, 0 Misdreavus and 0 Magmar
[7:24:16 AM] and have caught 0 Absol, 0 Larvitar, 0 Misdreavus and 0 Magmar.
[7:24:16 AM] You also have seen 0 Shinys and caught 0 Shinys.
[7:24:16 AM] Running Bot Time: 1 Hours and 34 Minutes.
[7:24:16 AM] =======================================

So the bot can moved from the pokemon centre to Mt Silver 1F, but when i get to Mt. Silver Lower Mountainside, it just suck there, doesn't continue to get to Mt Silver 2F anyone know why?
 
Reply
#5
Hello,
please edit your post with "[ code ] CODE [/ code ]" without the spaces, so its way more easy to read.

First of all the configuration in the most recent version (1.2c) says:
caveground = false -- not implemented yet (rectX1, rectY1, rectX2, rectY2) (but will today)


But the main problem lays in here i guess:
-- Please specifiy keylocations, leave unused locations blank:
pokeCenter = "Mt. Silver Pokecenter" -- mobile nurses won't work
restPlace = "" -- if Pokemon Center on Route, leave it blank
stop1 = "Mt. Silver Exterior" -- 1st stop from Pokemon center/ City to catch place, if unused leave it blank
stop2 = "Mt. Silver 1F" -- 2st stop from Pokemon center/ City to catch place, if unused leave it blank
stop3 = "Mt. Silver Lower Mountainside" -- 3st stop from Pokemon center/ City to catch place, if unused leave it blank
stop4 = "Mt. Silver 2F" -- 4st stop from Pokemon center/ City to catch place, if unused leave it blank
stop5 = "Mt. Silver 3F" -- 5st stop from Pokemon center/ City to catch place, if unused leave it blank
catchPlace = "Mt. Silver 2F" -- always place the final destination here
I wasnt in Mt. Silver yet but think it should be like this:
-- Please specifiy keylocations, leave unused locations blank:
pokeCenter = "Mt. Silver Pokecenter"
restPlace = "Mt. Silver Exterior" -- if Pokemon Center on Route, leave it blank
stop1 = "Mt. Silver 1F"
stop2 = ""
stop3 = ""
stop4 = ""
stop5 = ""
catchPlace = "Mt. Silver 2F" -- always place the final destination here
Please tell me exactly where you need to go to get from 1F to 2F

Greetings
 
Reply
#6
Elunius Hello,
please edit your post with "[ code ] CODE [/ code ]" without the spaces, so its way more easy to read.

First of all the configuration in the most recent version (1.2c) says:
caveground = false -- not implemented yet (rectX1, rectY1, rectX2, rectY2) (but will today)


But the main problem lays in here i guess:
-- Please specifiy keylocations, leave unused locations blank:
pokeCenter = "Mt. Silver Pokecenter" -- mobile nurses won't work
restPlace = "" -- if Pokemon Center on Route, leave it blank
stop1 = "Mt. Silver Exterior" -- 1st stop from Pokemon center/ City to catch place, if unused leave it blank
stop2 = "Mt. Silver 1F" -- 2st stop from Pokemon center/ City to catch place, if unused leave it blank
stop3 = "Mt. Silver Lower Mountainside" -- 3st stop from Pokemon center/ City to catch place, if unused leave it blank
stop4 = "Mt. Silver 2F" -- 4st stop from Pokemon center/ City to catch place, if unused leave it blank
stop5 = "Mt. Silver 3F" -- 5st stop from Pokemon center/ City to catch place, if unused leave it blank
catchPlace = "Mt. Silver 2F" -- always place the final destination here
I wasnt in Mt. Silver yet but think it should be like this:
-- Please specifiy keylocations, leave unused locations blank:
pokeCenter = "Mt. Silver Pokecenter"
restPlace = "Mt. Silver Exterior" -- if Pokemon Center on Route, leave it blank
stop1 = "Mt. Silver 1F"
stop2 = ""
stop3 = ""
stop4 = ""
stop5 = ""
catchPlace = "Mt. Silver 2F" -- always place the final destination here
Please tell me exactly where you need to go to get from 1F to 2F

Greetings

Its okay Smile
it didnt work, thanks for your repsond anyway ^_^
maybe someone else out there who can help me, if they been to Mt Silver
But goodjob on making this script
 
Reply
#7
As i said: Please tell me exactly where you need to go to get from 1F to 2F

then ill configure the script until it work
 
Reply
#8
i got a error that it shoutdown when a new pokemon appear but work i start bot again
 
Reply
#9
miguelusas12 i got a error that it shoutdown when a new pokemon appear but work i start bot again

please copy the logs, show me your configuration (and please JUST the configuration Big Grin) and tell me which version you are using
 
Reply
#10
guys please some help...
i need to a script for lvl up and auto evolve pokemon..
i dont have the skills to configure myself so it will be kind if someone already has a script and cant give it to me!
thanks in advance
 
Reply
#11
neofer guys please some help...
i need to a script for lvl up and auto evolve pokemon..
i dont have the skills to configure myself so it will be kind if someone already has a script and cant give it to me!
thanks in advance
Why you dont use the included levling sctipts and turn 'auto evolve' in bot confuguration 'on'.

if rudeMode ~= true then
    return rudeMode = true
end
Anyway this topic says clearly 'Multipurpose Catcher' and not 'Come around begging even if you didn't invest a single second in figuring our yourself!'
if rudeMode and evilnessFinished then
    return rudeMode = true
end

Greetings
 
Reply
#12
Neato!
 
Reply
#13
you should put Roleplay in this to plz and thanks if you do it Smile
 
Reply
#14
how to add sync swap to this bot?
 
Reply
#15
roleplay and syc is planned. just take a bit of time. schould be ready soon!
 
Reply
#16
"
-- Please specify which special Pokemon you want to catch,
-- they won't be attacked, just catched with Balls of quality you like:
pokeball = true
greatball = false
ultraball = false
special1 = ""
special2 = ""

-- Please specify if you want to catch uncaught and shinys:
catchNotCaught = false
catchShinys = true

-- Please specifiy keylocations:
mobileNurse = false -- if you're using a standing around 'Nurse Joy' i.e. Pokemon Tower F5 make it true
pokeCenter = "pokeCenter Cerulean" -- place the name of PokeCenter OR mapname where mobile nurse stays
restPlace = "Cerulean City" -- place the mapname where PokeCenter is located here OR if you're using a mobile nurse    leave it blank                  
stop1 = "pokeCenter Cerulean" -- 1st stop from pokeCenter/restPlace to catchPlace, if unused leave it blank
stop2 = "" -- 2st stop
stop3 = "" -- 3st stop
stop4 = "" -- 4st stop
stop5 = "" -- 5st stop
catchPlace = "Route 25" -- place the final destination here, even if its placed before in pokeCenter or restPlace

-- Please specifiy grass, water or cave/ground (i.e. Mt. Moon or Poke Tower)
-- BEWARE thet only ONE can be true, so make sure you don't make a mistake:
grass = true
water = false
caveground = false
-- You have to some work here if caveground = true:
-- 1.) go to the room/catchPlace
-- 2.) go to the top left of this room and type '/loc' then note minX and minY
-- 3.) go to the bottom right of this room and type '/loc' then note maxX and maxY
-- ATTENTION the rectangle you're creating with this should NOT include
-- ladders, ports, doors or something like that
minX = 0
minY = 0
maxX = 0
maxY = 0

-- Please specify which weak move you want to use,
-- your 1st Pokemon will use it until enemy is under 50% HP:
-- (or at 1 HP if you're using 'False Swipe' -- not implementet yet)
move = "Quick Attack"

-- Please specifiy if you want to use a mount and which one:
mountUse = false
mount = "Bicycle" -- every mount possible

-- Please specify if you want to use synchronized status alignments:
synchronize = false -- not implemented yet

-- Please specify if you need money from crap Pokemon, this will take a bit longer than 'only catch':
earnMoney = false
"
[16:37:26] You have encountered 1 Pokemon and catched 0 Pokemon.
[16:37:26] Error during the execution of 'onStop': attempt to concatenate a nil value
[16:37:26] A Wild Bellsprout Attacks!
[16:38:27] System: You are now AFK!
What is causing the issue? everytime i see a pokemon the bot just stop until i press "start" again
 
Reply
#17
What do we copy the scripts on to like notes or a certain program?When i go to load the script it says that it cannot find the config part. Also what is the pokecenter place called on route 3 before the cave?

Sorry I'm new too all this Tongue
 
Reply
#18
does this works fine with hoenn safari?
 
Reply
#19
hi i've tried this scipt you can only attack just once after that you have to restart the script manually to catch the pokemon pls fix it
 
Reply
#20
Hi, great script. It does work efficiently! I want to ask something. Why dows it sometimes catch some Pokemons that are not shinnies? Overall, it escapes when it's time but it happens that it catches some Pokemons. Not much but it happened to me that he catched two on a two hours session. And they are not in the list to catch.

EDIT : Oh... I just looked at something and they were not in my catched Pokemons yet. This is why. My bad...
 
Reply
#21
(2016-08-23, 00:45:16)BadassMustangs What do we copy the scripts on to like notes or a certain program?When i go to load the script it says that it cannot find the config part. Also what is the pokecenter place called on route 3 before the cave?

Sorry I'm new too all this Tongue

the instructions are right here (copy the script onto a notepad file)
QuoteInstructions:
  1. Make a new folder for this script

  2. Copy the configuration and save it as "config.lua"

  3. Copy the ExpShare script and save it as "EMPC1.3a.lua"

  4. Change the configuration file to fit your needs

  5. Load ans start the script at any configured keylocation and enjoy

go inside the pokecenter and look at the top right of your screen to see it's name
 
Reply
#22
edit.
 
Reply
#23
(2016-08-10, 15:03:36)Elunius Hi Guys,
este script passou de uma muito básico para um fácil configurável para vários porposes.

O que está planejado
  • Atualizando onBattleAction ao usar 'Passe False'
  • Adicionando uso de alinhamentos de estado sincronizados
  • Adicionando suporte 'Rpleplay'
  • Upload exemplos de configurações
  • Fixação possíveis problemas como:
    • Você precisa ir MAPA, em seguida, mapB em seguida, novamente mapa, mas uma outra entrada
    • moveToFrikinWater () não funcionará

Changelog Instruções:
-- 1.0  Initial: Catch 1 Pokemon: PokeCenter <-> City <-> Route
-- 1.1  Added several counters, logmessages and more possible Pokemon to catch
-- 1.2  Added several configurations, tweaks and dokumentation
-- 1.2a Added bikesupport and stops between catchplace and rest place
-- 1.2b Deleted bikesupport because of accompanied bugs
-- 1.2c Small tweaks
-- 1.3  Added ground/cave/water support and updated moving between stops
-- 1.3a Bugfixes
-- 1.3b Seperated config.lu and script.lua
-- 1.4  Added working and famous 'Bellsprout-exception', updated onBattleAction and lots of tweaks
-- 1.5  Added Any-Mount-Suppot, some tweaks


  1. Criar uma nova pasta para este script
  2. Copiar a configuração e salve-o como "config.lua"
  3. Copie o script ExpShare e salve-o como "EMPC1.3a.lua"
  4. Alterar o arquivo de configuração para atender às suas necessidades
  5. Carga ans iniciar o script em qualquer KeyLocation configurado e desfrutar

Configuração - config.lua
Você pode configurar esta muito fácil. Apenas certifique-se que você siga as instruções. The Script - EMPC1.3a.lua - Não toque em nada do código abaixo ., Se você não sabe o que está fazendo Greetings
-- **************************** Configuration ****************************
-- ***********************************************************************

-- Leaving something 'blank' always means means: ""

-- Please specify which Pokemon(s) you want to catch,
-- leave not used blank and fill from top to bottom:
poke1 = "Pidgey"
poke2 = ""
poke3 = ""
poke4 = ""
poke5 = ""

-- Please specify which special Pokemon you want to catch,
-- they won't be attacked, just catched with Balls of quality you like:
pokeball = true
greatball = false
ultraball = false
special1 = ""
special2 = ""

-- Please specify if you want to catch uncaught and shinys:
catchNotCaught = true
catchShinys = true

-- Please specifiy keylocations:
mobileNurse = false -- if you're using a standing around 'Nurse Joy' i.e. Pokemon Tower F5 make it true
pokeCenter = "Pokecenter Vermilion" -- place the name of PokeCenter OR mapname where mobile nurse stays
restPlace = "Vermilion City" -- place the mapname where PokeCenter is located here OR if you're using a mobile nurse    leave it blank                  
stop1 = "" -- 1st stop from pokeCenter/restPlace to catchPlace, if unused leave it blank
stop2 = "" -- 2st stop
stop3 = "" -- 3st stop
stop4 = "" -- 4st stop
stop5 = "" -- 5st stop
catchPlace = "Route 6" -- place the final destination here, even if its placed before in pokeCenter or restPlace

-- Please specifiy grass, water or cave/ground (i.e. Mt. Moon or Poke Tower)
-- BEWARE thet only ONE can be true, so make sure you don't make a mistake:
grass = true
water = false
caveground = false
-- You have to some work here if caveground = true:
-- 1.) go to the room/catchPlace
-- 2.) go to the top left of this room and type '/loc' then note minX and minY
-- 3.) go to the bottom right of this room and type '/loc' then note maxX and maxY
-- ATTENTION the rectangle you're creating with this should NOT include
-- ladders, ports, doors or something like that
minX = 0
minY = 0
maxX = 0
maxY = 0

-- Please specify which weak move you want to use,
-- your 1st Pokemon will use it until enemy is under 50% HP:
-- (or at 1 HP if you're using 'False Swipe' -- not implementet yet)
move = "Dragon Rage"

-- Please specifiy if you want to use a mount and which one:
mountUse = true
mount = "Bicycle" -- every mount possible

-- Please specify if you want to use synchronized status alignments:
synchronize = false -- not implemented yet

-- Please specify if you need money from crap Pokemon, this will take a bit longer than 'only catch':
earnMoney = false

-- Please specify if you wanna use Pokeball Buyer:
buyBalls = false -- not implemented yet

-- The bot will use your Bike, if you have one. -- REMOVED THIS ONE, UPDATE INCOMING

-- Please specify if you want to recieve private messages:
privateMessage = true

-- ***********************************************************************
-- ***********************************************************************


name = "EMPC 1.5"
author = "Elunius"
description = "This is Elunius' Multipurpose-Catcher and it does what you configured."

dofile "config.lua"

function onStart()
    encounter = 0
    poke1counter = 0
    poke2counter = 0
    poke3counter = 0
    poke4counter = 0
    poke5counter = 0
    special1counter = 0
    Special2counter = 0
    shinyCounter = 0
    
    allCatch = 0
    poke1catch = 0
    poke2catch = 0
    poke3catch = 0
    poke4catch = 0
    poke5catch = 0
    special1catch = 0
    Special2catch = 0
    shinyCatch = 0
    
    pokecenterCounter = 0
    startMoney = getMoney()
    
    log("=======================================")
    log("This Script will catch the configured Pokemon for you.")
    if special1 ~= "" and special2 ~= "" then
        log("It also throws Balls at Shinys, " ..special1.. " and " ..special2.. " for you.")
    elseif special1 ~= "" and special2 == "" then
        log("It also throws Balls at Shinys and " ..special1.. " for you.")
    elseif special1 == "" and special2 == "" then
        log("It also throws Balls at Shinys for you.")
    end
    log("The Pokemon with '" ..move.. "' should be in 1st place.")
    if earnMoney == true then
        log("You will farm Pokedollar from crappy Pokemon.")
    else
        log("You choosed the fast way and will flee from all crappy Pokemon.")
    end
    if buyBalls == false then
        log("Please make sure you got enough Pokeballs with you.")
    end
    if privateMessage == false then
        if isPrivateMessageEnabled() then
            log("Private messages disabled.")
            disablePrivateMessage()
        end
    else log("Private messages are enabled.")
    end
    log("=======================================")
    
end

function RunningTime()
    RunTime = math.floor(os.clock())
    if (RunTime / 60) < 60 then -- is less than 1 hr
        return log("Running Bot Time: " .. math.floor(RunTime / 60) .. " Minutes.")
    else --more than 1 hr
        local hr = math.floor((RunTime / 60) / 60)
        return log("Running Bot Time: " .. hr .. " Hours  and " .. (math.floor(RunTime / 60) - (hr * 60)) .. " Minutes.")
    end
end

function bellsproutException()
    function onBattleMessage(wrapped)
        if stringContains(wrapped, "wrapped")then
--            return anyMove()
            return attack() or fatal("You got wrapped - relog and start from Pokemon Center.")
        end
    end
end

function onPathAction()

-- False swiper status recover
    -- if (getPokemonStatus(2)=="PAPALYZE" or getPokemonStatus(2)=="POISON") and getItemQuantity("Lum Berry")>0 then
    --     return useItemOnPokemon("Lum Berry", pkmn#)
    -- end
    
-- Pokeball Conditions
    if getItemQuantity("Pokeball") < 5 then
        -- if buyBalls = true then
        --     things()
        -- elseif
        fatal("BOT HAS STOPPED - You dont have enough Pokeballs with you, go and get some!")
        --        end
    
-- Mounting
    elseif not isMounted() and mountUse == true and hasItem(mount) and not isSurfing() and isOutside() then
            return useItem(mount)
            
-- Pokemon Center Conditions
    elseif isPokemonUsable(1) and getRemainingPowerPoints(1,move) > 1 then

        -- Way there
        if getMapName() == pokeCenter then
            if restPlace ~= catchPlace and restPlace ~= "" then
                moveToMap(restPlace)
            elseif stop1 ~= "" and restPlace == "" then
                moveToMap(stop1)
            elseif pokeCenter ~= catchPlace and restPlace == "" and stop1 == "" then
                moveToMap(catchPlace)
            elseif pokeCenter ~= catchPlace and restPlace ~= "" then
                moveToMap(restPlace)
            else
                if grass == true then
                    moveToGrass()
                elseif water == true then
                    moveToWater()
                elseif caveground == true then
                    moveToRectangle(minX, minY, maxX, maxY)
                end
            end
        elseif getMapName() == restPlace and restPlace ~= catchPlace then
            if stop1 ~= "" then
                moveToMap(stop1)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop1 then
            if stop2 ~= "" then
                moveToMap(stop2)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop2 then
            if stop3 ~= "" then
                moveToMap(stop3)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop3 then
            if stop4 ~= "" then
                moveToMap(stop4)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop4 then
            if stop5 ~= "" then
                moveToMap(stop5)
            else
                moveToMap(catchPlace)
            end
        elseif getMapName() == stop5 then
            moveToMap(catchPlace)
        elseif getMapName() == catchPlace then
            if grass == true then
                moveToGrass()
            elseif water == true then
                moveToWater()
            elseif caveground == true then
                moveToRectangle(minX, minY, maxX, maxY)
            end
        end
    -- Way home
    else
        if getMapName() == catchPlace then
            if stop5 ~= "" then
                moveToMap(stop5)
            elseif stop4 ~= "" and stop5 == "" then
                moveToMap(stop4)
            elseif stop3 ~= "" and stop4 == "" then
                moveToMap(stop3)
            elseif stop2 ~= "" and stop3 == "" then
                moveToMap(stop2)
            elseif stop1 ~= "" and stop2 == "" then
                moveToMap(stop1)
            elseif restPlace ~= "" and stop1 == "" then
                moveToMap(restPlace)
            elseif pokeCenter ~= "" and restPlace == "" then
                moveToMap(pokeCenter)
            elseif pokeCenter == catchPlace then
                talkToNpc("Nurse Joy")
            end
        elseif getMapName() == stop5 then
            moveToMap(stop4)
        elseif getMapName() == stop4 then
            moveToMap(stop3)
        elseif getMapName() == stop3 then
            moveToMap(stop2)
        elseif getMapName() == stop2 then
            moveToMap(stop1)
        elseif getMapName() == stop1 then
            if restPlace ~= "" then
                moveToMap(restPlace)
            else
                moveToMap(pokeCenter)
            end
        elseif getMapName() == restPlace then
            moveToMap(pokeCenter)
        elseif getMapName() == pokeCenter then
            if mobileNurse == false then
                usePokecenter()
            elseif mobileNurse == true then
                talkToNpc("Nurse Joy")
            end
        end
    end
end

    
function onBattleAction()
    encounter = encounter + 1
-- Enemy is on catchlist
    if  getOpponentName() == poke1
    or  getOpponentName() == poke2
    or  getOpponentName() == poke3
    or  getOpponentName() == poke4
    or  getOpponentName() == poke5
    or  (catchNotCaught == true and not isAlreadyCaught() and not isOpponentShiny()) then
        -- Weakens enemy then catch or kill if #1 is dead
        if isPokemonUsable(1) then
            if getOpponentHealthPercent() > 50 then
                if getRemainingPowerPoints(1, move) ~= 0 then
                    return useMove(move)
                else return useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()
                end
            else
                return useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()
            end
        else
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        end
        
-- Enemy is on special-catchlist
    elseif getOpponentName() == special1 or getOpponentName() == special2 then
        if ultraball == true and greatball == true and pokeball == true then
            return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()
        elseif ultraball == true and greatball == true and pokeball == false then
            return useItem("Ultra Ball") or useItem("Great Ball") or attack() or bellsproutException() or sendUsablePokemon() or run()            
        elseif ultraball == true and greatball == false and pokeball == true then
            return useItem("Ultra Ball") or useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()                
        elseif ultraball == false and greatball == true and pokeball == true then
            return useItem("Great Ball") or useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()        
        elseif ultraball == true and greatball == false and pokeball == false then
            return useItem("Ultra Ball") or attack() or bellsproutException() or sendUsablePokemon() or run()
        elseif ultraball == false and greatball == true and pokeball == false then
            return useItem("Great Ball") or attack() or bellsproutException() or sendUsablePokemon() or run()            
        elseif ultraball == false and greatball == false and pokeball == true then
            return useItem("Pokeball") or attack() or bellsproutException() or sendUsablePokemon() or run()        
        else
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        end
                
-- Enemy is shiny
    elseif catchShinys == true and isOpponentShiny()
    and not (getOpponentName() == special1 or getOpponentName() == special2) then
        if isPokemonUsable(1)then
            if getOpponentHealthPercent() > 50 then
                if getRemainingPowerPoints(1, move) ~= 0 then
                    return useMove(move)
                else
                    return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball")
                    or attack() or bellsproutException() or sendUsablePokemon() or run()
                end
            else
                return useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball")
                or attack() or bellsproutException() or sendUsablePokemon() or run()
            end
        else
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        end
-- Enemy is crap
    else
        if earnMoney == true then
            return attack() or bellsproutException() or sendUsablePokemon() or run()
        else
            return run() or attack() or bellsproutException() or sendUsablePokemon()
        end
    end
end

function onBattleMessage(message)
-- Catchlist encounters and caughts
    if     stringContains(message, "A Wild") and stringContains(message, poke1) then
        poke1counter = poke1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke1) then
        poke1catch = poke1catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke2) then
        poke2counter = poke2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke2) then
        poke2catch = poke2catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke3) then
        poke3counter = poke3counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke3) then
        poke3catch = poke3catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke4) then
        poke4counter = poke4counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke4) then
        poke4catch = poke4catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, poke5) then
        poke5counter = poke5counter + 1
    elseif stringContains(message, "caught") and stringContains(message, poke5) then
        poke5catch = poke5catch + 1
        allCatch = allCatch + 1
        
-- Special-catchlist encounters and caughts
    elseif stringContains(message, "A Wild") and stringContains(message, special1) then
        special1counter = special1counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special1) then
        special1catch = special1catch + 1
        allCatch = allCatch + 1
        
    elseif stringContains(message, "A Wild") and stringContains(message, special2) then
        special2counter = special2counter + 1
    elseif stringContains(message, "caught") and stringContains(message, special2) then
        special2catch = special2catch + 1
        allCatch = allCatch + 1
        
-- Shiny encounters and caughts
    elseif stringContains(message, "A Wild SHINY") then
        shinyCounter = shinyCounter + 1
    elseif stringContains(message, "caught") and stringContains(message, "SHINY") then
        shinyCatch = shinyCatch + 1
        allCatch = allCatch + 1
    end
end

function onDialogMessage(pokecenter)
    if stringContains(pokecenter, "heal your Pokemon?") then
        pokecenterCounter = pokecenterCounter + 1
    end
end

function onPause()
    recentMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if earnMoney == true then
        log("You have earned ".. tostring(recentMoney - startMoney) .." PokeDollars so far!")
    end
    RunningTime()
    log("=======================================")
end

function onResume()
    log("=======================================")
end

function onStop()
    endMoney = getMoney()
    log("=======================================")
    log("Pokecenter visits: " .. pokecenterCounter)
    log("You have encountered " ..encounter.. " Pokemon and catched " ..allCatch.. " Pokemon.")
    if poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 ~= "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. ", "..poke4counter.. " " ..poke4.. " and "..poke5counter.. " " ..poke5)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. ", "..poke4catch.. " " ..poke4.. " and "..poke5catch.. " " ..poke5.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 ~= "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. ", "..poke3counter.. " " ..poke3.. " and "..poke4counter.. " " ..poke4)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. ", "..poke3catch.. " " ..poke3.. " and "..poke4catch.. " " ..poke4.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 ~= "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. ", " ..poke2counter.. " " ..poke2.. " and "..poke3counter.. " " ..poke3)
        log("and have caught " ..poke1catch.. " " ..poke1.. ", " ..poke2catch.. " " ..poke2.. " and "..poke3catch.. " " ..poke3.. ".")
    elseif poke1 ~= "" and poke2 ~= "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1.. " and " ..poke2counter.. " " ..poke2)
        log("and have caught " ..poke1catch.. " " ..poke1.. " and " ..poke2catch.. " " ..poke2.. ".")
    elseif poke1 ~= "" and poke2 == "" and poke3 == "" and poke4 == "" and poke5 == "" then
        log("You have seen " ..poke1counter.. " " ..poke1)
        log("and have caught " ..poke1catch.. " " ..poke1.. ".")
    end
    if special1 ~= "" and special2 ~= "" then
        log("You also have seen " ..shinyCounter.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2)
        log("and caught " ..shinyCatch.. " Shinys, " ..special1counter.. " " ..special1.. " and " ..special2counter.. " " ..special2.. ".")
    elseif     special1 ~= "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and " ..special1counter.. " " ..special1)
        log("and caught " ..shinyCatch.. " Shinys and " ..special1counter.. " " ..special1.. ".")
    elseif     special1 == "" and special2 == "" then
        log("You also have seen " ..shinyCounter.. " Shinys and caught " ..shinyCatch.. " Shinys.")
    end
    if earnMoney == true then
        log("You have earned ".. tostring(endMoney - startMoney) .." PokeDollars!")
    end
    RunningTime()
    log("=======================================")
end


[09:23:47] duração PROShine por Silv3r, versão 2.3.2.0
[09:30:08] Não foi possível carregar o script EMPC1.3a.lua: 
chunk_2: (1,0-1): Símbolo inesperada perto '-'
[09:31:02] Não foi possível carregar o script EMPC1.3a.lua: 
símbolo inesperado perto '-'
 
Reply
#24
please add sync and false swipe
 
Reply
#25
This script able catch shiny poke?
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)