Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Simple encounter table printing Lua script by Evie (ChickasaurusGL). Yellow Version. Feel free to use or modify with credit.
- --Define the Pokémon or Trainer table (ignores ID 00, this is handled later).
- pokemonortrainer = {"RHYDON",
- "KANGASKHAN",
- "NIDORAN M",
- "CLEFAIRY",
- "SPEAROW",
- "VOLTORB",
- "NIDOKING",
- "SLOWBRO",
- "IVYSAUR",
- "EXEGGUTOR",
- "LICKITUNG",
- "EXEGGCUTE",
- "GRIMER",
- "GENGAR",
- "NIDORAN F",
- "NIDOQUEEN",
- "CUBONE",
- "RHYHORN",
- "LAPRAS",
- "ARCANINE",
- "MEW",
- "GYARADOS",
- "SHELLDER",
- "TENTACOOL",
- "GASTLY",
- "SCYTHER",
- "STARYU",
- "BLASTOISE",
- "PINSIR",
- "TANGELA",
- "MISSINGNO. 0x1F",
- "MISSINGNO. 0x20",
- "GROWLITHE",
- "ONIX",
- "FEAROW",
- "PIDGEY",
- "SLOWPOKE",
- "KADABRA",
- "GRAVELER",
- "CHANSEY",
- "MACHOKE",
- "MR.MIME",
- "HITMONLEE",
- "HITMONCHAN",
- "ARBOK",
- "PARASECT",
- "PSYDUCK",
- "DROWZEE",
- "GOLEM",
- "MISSINGNO. 0x32",
- "MAGMAR",
- "MISSINGNO. 0x34",
- "ELECTABUZZ",
- "MAGNETON",
- "KOFFING",
- "MISSINGNO. 0x38",
- "MANKEY",
- "SEEL",
- "DIGLETT",
- "TAUROS",
- "MISSINGNO. 0x3D",
- "MISSINGNO. 0x3E",
- "MISSINGNO. 0x3F",
- "FARFETCH'D",
- "VENONAT",
- "DRAGONITE",
- "MISSINGNO. 0x43",
- "MISSINGNO. 0x44",
- "MISSINGNO. 0x45",
- "DODUO",
- "POLIWAG",
- "JYNX",
- "MOLTRES",
- "ARTICUNO",
- "ZAPDOS",
- "DITTO",
- "MEOWTH",
- "KRABBY",
- "MISSINGNO.",
- "MISSINGNO.",
- "MISSINGNO.",
- "VULPIX",
- "NINETALES",
- "PIKACHU",
- "RAICHU",
- "MISSINGNO.",
- "MISSINGNO.",
- "DRATINI",
- "DRAGONAIR",
- "KABUTO",
- "KABUTOPS",
- "HORSEA",
- "SEADRA",
- "MISSINGNO. 0x5E",
- "MISSINGNO. 0x5F",
- "SANDSHREW",
- "SANDSLASH",
- "OMANYTE",
- "OMASTAR",
- "JIGGLYPUFF",
- "WIGGLYTUFF",
- "EEVEE",
- "FLAREON",
- "JOLTEON",
- "VAPOREON",
- "MACHOP",
- "ZUBAT",
- "EKANS",
- "PARAS",
- "POLIWHIRL",
- "POLIWRATH",
- "WEEDLE",
- "KAKUNA",
- "BEEDRILL",
- "MISSINGNO. 0x73",
- "DODRIO",
- "PRIMEAPE",
- "DUGTRIO",
- "VENOMOTH",
- "DEWGONG",
- "MISSINGNO. 0x79",
- "MISSINGNO. 0x7A",
- "CATERPIE",
- "METAPOD",
- "BUTTERFREE",
- "MACHAMP",
- "MISSINGNO. 0x7F",
- "GOLDUCK",
- "HYPNO",
- "GOLBAT",
- "MEWTWO",
- "SNORLAX",
- "MAGIKARP",
- "MISSINGNO. 0x86",
- "MISSINGNO. 0x87",
- "MUK",
- "MISSINGNO. 0x89",
- "KINGLER",
- "CLOYSTER",
- "MISSINGNO. 0x8C",
- "ELECTRODE",
- "CLEFABLE",
- "WEEZING",
- "PERSIAN",
- "MAROWAK",
- "MISSINGNO. 0x92",
- "HAUNTER",
- "ABRA",
- "ALAKAZAM",
- "PIDGEOTTO",
- "PIDGEOT",
- "STARMIE",
- "BULBASAUR",
- "VENUSAUR",
- "TENTACRUEL",
- "MISSINGNO. 0x9C",
- "GOLDEEN",
- "SEAKING",
- "MISSINGNO. 0x9F",
- "MISSINGNO. 0xA0",
- "MISSINGNO. 0xA1",
- "MISSINGNO. 0xA2",
- "PONYTA",
- "RAPIDASH",
- "RATTATA",
- "RATICATE",
- "NIDORINO",
- "NIDORINA",
- "GEODUDE",
- "PORYGON",
- "AERODACTYL",
- "MISSINGNO. 0xAC",
- "MAGNEMITE",
- "MISSINGNO. 0xAE",
- "MISSINGNO. 0xAF",
- "CHARMANDER",
- "SQUIRTLE",
- "CHARMELEON",
- "WARTORTLE",
- "CHARIZARD",
- "MISSINGNO. 0xB5",
- "MISSINGNO. 0xB6 (KABUTOPS FOSSIL)",
- "MISSINGNO. 0xB7 (AERODACTYL FOSSIL)",
- "MISSINGNO. 0xB8 (TOWER GHOST)",
- "ODDISH",
- "GLOOM",
- "VILEPLUME",
- "BELLSPROUT",
- "WEEPINBELL",
- "VICTREEBEL",
- "4 4 (0xBF)",
- "4 4 Hy (0xC0)",
- "Female Symbol . (0xC1)",
- "p PkMn p (0xC2)",
- "( Z4 (0xC3)",
- "X - x, (0xC4)",
- "4 . . (0xC5)",
- "7g (0xC6)",
- "u (0xC7)",
- "(Random name) (Trainer/0xC8)",
- "Youngster (Trainer/0xC9)",
- "Bug Catcher (Trainer/0xCA)",
- "Lass (Trainer/0xCB)",
- "Sailor (Trainer/0xCC)",
- "Jr. Trainer M (Trainer/0xCD)",
- "Jr. Trainer F (Trainer/0xCE)",
- "Pokemaniac (Trainer/0xCF)",
- "Super Nerd (Trainer/0xD0)",
- "Hiker (Trainer/0xD1)",
- "Biker (Trainer/0xD2)",
- "Burglar (Trainer/0xD3)",
- "Engineer (Trainer/0xD4)",
- "Juggler (unused copy) (Trainer/0xD5)",
- "Fisherman (Trainer/0xD6)",
- "Swimmer (Trainer/0xD7)",
- "Cue Ball (Trainer/0xD8)",
- "Gambler (Trainer/0xD9)",
- "Beauty (Trainer/0xDA)",
- "Psychic (Trainer/0xDB)",
- "Rocker (Trainer/0xDC)",
- "Juggler (Trainer/0xDD)",
- "Tamer (Trainer/0xDE)",
- "Bird Keeper (Trainer/0xDF)",
- "Blackbelt (Trainer/0xE0)",
- "Rival Class 1 (Trainer/0xE1)",
- "Prof. Oak (Trainer/0xE2)",
- "Chief (Trainer/0xE3)",
- "Scientist (Trainer/0xE4)",
- "Giovanni (Trainer/0xE5)",
- "Rocket (Trainer/0xE6)",
- "CoolTrainer M (Trainer/0xE7)",
- "CoolTrainer F (Trainer/0xE8)",
- "Bruno (Trainer/0xE9)",
- "Brock (Trainer/0xEA)",
- "Misty (Trainer/0xEB)",
- "Lt. Surge (Trainer/0xEC)",
- "Erika (Trainer/0xED)",
- "Koga (Trainer/0xEE)",
- "Blaine (Trainer/0xEF)",
- "Sabrina (Trainer/0xF0)",
- "Gentleman (Trainer/0xF1)",
- "Rival Class 2 (Trainer/0xF2)",
- "Rival Class Final (Trainer/0xF3)",
- "Lorelei (Trainer/0xF4)",
- "Channeler (Trainer/0xF5)",
- "Agatha (Trainer/0xF6)",
- "Lance (Trainer/0xF7)",
- "' (Trainer/0xF8)",
- "1 . (Trainer/0xF9)",
- "4 8 ) (Trainer/0xFA)",
- "No name (Trainer/0xFB)",
- "4! (Trainer/0xFC)",
- "/9 4 ...... (Trainer/0xFD)",
- "p , (Trainer/0xFE)",
- ", A (Trainer/0xFF)",
- }
- --Print encounter rate for grass or caves
- grassrate = memory.readbyteunsigned(0xd886);
- vba.print("Grass or cave encounter RATE:")
- vba.print(grassrate)
- --;Slot 1 Level
- grass1level = memory.readbyteunsigned(0xd887);
- vba.print("Grass or cave encounter LEVEL slot 1:")
- vba.print(grass1level)
- --;Slot 1 Species
- grass1species = memory.readbyteunsigned(0xd888);
- vba.print("Grass or cave encounter SPECIES slot 1:")
- vba.print(grass1species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while grass1species==00 do
- grass1string="3TrainerPoke (00)"
- vba.print(grass1string)
- emu.frameadvance()
- grass1species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass1species<256 do
- grass1string=pokemonortrainer[grass1species]
- vba.print(grass1string)
- emu.frameadvance()
- grass1species=257
- end
- --;Slot 2 Level
- grass2level = memory.readbyteunsigned(0xd889);
- vba.print("Grass or cave encounter LEVEL slot 2:")
- vba.print(grass2level)
- --;Slot 2 Species
- grass2species = memory.readbyteunsigned(0xd88a);
- vba.print("Grass or cave encounter SPECIES slot 2:")
- vba.print(grass2species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while grass2species==00 do
- grass2string="3TrainerPoke (00)"
- vba.print(grass2string)
- emu.frameadvance()
- grass2species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass2species<256 do
- grass2string=pokemonortrainer[grass2species]
- vba.print(grass2string)
- emu.frameadvance()
- grass2species=257
- end
- --;Slot 3 Level
- grass3level = memory.readbyteunsigned(0xd88b);
- vba.print("Grass or cave encounter LEVEL slot 3:")
- vba.print(grass3level)
- --;Slot 3 Species
- grass3species = memory.readbyteunsigned(0xd88c);
- vba.print("Grass or cave encounter SPECIES slot 3:")
- vba.print(grass3species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while grass3species==00 do
- grass3string="3TrainerPoke (00)"
- vba.print(grass3string)
- emu.frameadvance()
- grass3species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass3species<256 do
- grass3string=pokemonortrainer[grass3species]
- vba.print(grass3string)
- emu.frameadvance()
- grass3species=257
- end
- --;Slot 4 Level
- grass4level = memory.readbyteunsigned(0xd88d);
- vba.print("Grass or cave encounter LEVEL slot 4:")
- vba.print(grass4level)
- --;Slot 4 Species
- grass4species = memory.readbyteunsigned(0xd88e);
- vba.print("Grass or cave encounter SPECIES slot 4:")
- vba.print(grass4species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 457 (normally impossible) prevents the script from printing the string over and over again.
- while grass4species==00 do
- grass4string="3TrainerPoke (00)"
- vba.print(grass4string)
- emu.frameadvance()
- grass4species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass4species<256 do
- grass4string=pokemonortrainer[grass4species]
- vba.print(grass4string)
- emu.frameadvance()
- grass4species=257
- end
- --;Slot 5 Level
- grass5level = memory.readbyteunsigned(0xd88f);
- vba.print("Grass or cave encounter LEVEL slot 5:")
- vba.print(grass5level)
- --;Slot 5 Species
- grass5species = memory.readbyteunsigned(0xd890);
- vba.print("Grass or cave encounter SPECIES slot 5:")
- vba.print(grass5species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 557 (normally impossible) prevents the script from printing the string over and over again.
- while grass5species==00 do
- grass5string="3TrainerPoke (00)"
- vba.print(grass5string)
- emu.frameadvance()
- grass5species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass5species<256 do
- grass5string=pokemonortrainer[grass5species]
- vba.print(grass5string)
- emu.frameadvance()
- grass5species=257
- end
- --;Slot 6 Level
- grass6level = memory.readbyteunsigned(0xd891);
- vba.print("Grass or cave encounter LEVEL slot 6:")
- vba.print(grass6level)
- --;Slot 6 Species
- grass6species = memory.readbyteunsigned(0xd892);
- vba.print("Grass or cave encounter SPECIES slot 6:")
- vba.print(grass6species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 667 (normally impossible) prevents the script from printing the string over and over again.
- while grass6species==00 do
- grass6string="3TrainerPoke (00)"
- vba.print(grass6string)
- emu.frameadvance()
- grass6species=257
- end
- --If the byte ranges between 1 and 256 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass6species<256 do
- grass6string=pokemonortrainer[grass6species]
- vba.print(grass6string)
- emu.frameadvance()
- grass6species=257
- end
- --;Slot 7 Level
- grass7level = memory.readbyteunsigned(0xd893);
- vba.print("Grass or cave encounter LEVEL slot 7:")
- vba.print(grass7level)
- --;Slot 7 Species
- grass7species = memory.readbyteunsigned(0xd894);
- vba.print("Grass or cave encounter SPECIES slot 7:")
- vba.print(grass7species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 777 (normally impossible) prevents the script from printing the string over and over again.
- while grass7species==00 do
- grass7string="3TrainerPoke (00)"
- vba.print(grass7string)
- emu.frameadvance()
- grass7species=257
- end
- --If the byte ranges between 1 and 257 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass7species<257 do
- grass7string=pokemonortrainer[grass7species]
- vba.print(grass7string)
- emu.frameadvance()
- grass7species=257
- end
- --;Slot 8 Level
- grass8level = memory.readbyteunsigned(0xd895);
- vba.print("Grass or cave encounter LEVEL slot 8:")
- vba.print(grass8level)
- --;Slot 8 Species
- grass8species = memory.readbyteunsigned(0xd896);
- vba.print("Grass or cave encounter SPECIES slot 8:")
- vba.print(grass8species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 256 (normally impossible) prevents the script from printing the string over and over again.
- while grass8species==00 do
- grass8string="3TrainerPoke (00)"
- vba.print(grass8string)
- emu.frameadvance()
- grass8species=257
- end
- --If the byte ranges between 1 and 257 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass8species<257 do
- grass8string=pokemonortrainer[grass8species]
- vba.print(grass8string)
- emu.frameadvance()
- grass8species=257
- end
- --;Slot 9 Level
- grass9level = memory.readbyteunsigned(0xd897);
- vba.print("Grass or cave encounter LEVEL slot 9:")
- vba.print(grass9level)
- --;Slot 9 Species
- grass9species = memory.readbyteunsigned(0xd898);
- vba.print("Grass or cave encounter SPECIES slot 9:")
- vba.print(grass9species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while grass9species==00 do
- grass9string="3TrainerPoke (00)"
- vba.print(grass9string)
- emu.frameadvance()
- grass9species=257
- end
- --If the byte ranges between 1 and 257 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass9species<257 do
- grass9string=pokemonortrainer[grass9species]
- vba.print(grass9string)
- emu.frameadvance()
- grass9species=257
- end
- --;Slot 10 Level
- grass10level = memory.readbyteunsigned(0xd899);
- vba.print("Grass or cave encounter LEVEL slot 10:")
- vba.print(grass10level)
- --;Slot 10 Species
- grass10species = memory.readbyteunsigned(0xd89a);
- vba.print("Grass or cave encounter SPECIES slot 10:")
- vba.print(grass10species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while grass10species==00 do
- grass10string="3TrainerPoke (00)"
- vba.print(grass10string)
- emu.frameadvance()
- grass10species=257
- end
- --If the byte ranges between 1 and 257 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while grass10species<257 do
- grass10string=pokemonortrainer[grass10species]
- vba.print(grass10string)
- emu.frameadvance()
- grass10species=257
- end
- --Print encounter rate for water
- waterrate = memory.readbyteunsigned(0xd8a3);
- vba.print("Water encounter RATE:")
- vba.print(waterrate)
- --;Slot 1 Level
- water1level = memory.readbyteunsigned(0xd8a4);
- vba.print("Water encounter LEVEL slot 1:")
- vba.print(water1level)
- --;Slot 1 Species
- water1species = memory.readbyteunsigned(0xd8a5);
- vba.print("Water encounter SPECIES slot 1:")
- vba.print(water1species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water1species==00 do
- water1string="3TrainerPoke (00)"
- vba.print(water1string)
- emu.frameadvance()
- water1species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water1species<256 do
- water1string=pokemonortrainer[water1species]
- vba.print(water1string)
- emu.frameadvance()
- water1species=257
- end
- --;Slot 2 Level
- water2level = memory.readbyteunsigned(0xd8a6);
- vba.print("Water encounter LEVEL Slot 2:")
- vba.print(water2level)
- --;Slot 2 Species
- water2species = memory.readbyteunsigned(0xd8a7);
- vba.print("Water encounter SPECIES Slot 2:")
- vba.print(water2species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water2species==00 do
- water2string="3TrainerPoke (00)"
- vba.print(water2string)
- emu.frameadvance()
- water2species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water2species<256 do
- water2string=pokemonortrainer[water2species]
- vba.print(water2string)
- emu.frameadvance()
- water2species=257
- end
- --;Slot 3 Level
- water3level = memory.readbyteunsigned(0xd8a8);
- vba.print("Water encounter LEVEL Slot 3:")
- vba.print(water3level)
- --;Slot 3 Species
- water3species = memory.readbyteunsigned(0xd8a9);
- vba.print("Water encounter SPECIES Slot 3:")
- vba.print(water3species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water3species==00 do
- water3string="3TrainerPoke (00)"
- vba.print(water3string)
- emu.frameadvance()
- water3species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water3species<256 do
- water3string=pokemonortrainer[water3species]
- vba.print(water3string)
- emu.frameadvance()
- water3species=257
- end
- --;Slot 4 Level
- water4level = memory.readbyteunsigned(0xd8aa);
- vba.print("Water encounter LEVEL Slot 4:")
- vba.print(water4level)
- --;Slot 4 Species
- water4species = memory.readbyteunsigned(0xd8ab);
- vba.print("Water encounter SPECIES Slot 4:")
- vba.print(water4species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water4species==00 do
- water4string="3TrainerPoke (00)"
- vba.print(water4string)
- emu.frameadvance()
- water4species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water4species<256 do
- water4string=pokemonortrainer[water4species]
- vba.print(water4string)
- emu.frameadvance()
- water4species=257
- end
- --;Slot 5 Level
- water5level = memory.readbyteunsigned(0xd8ac);
- vba.print("Water encounter LEVEL Slot 5:")
- vba.print(water5level)
- --;Slot 5 Species
- water5species = memory.readbyteunsigned(0xd8ad);
- vba.print("Water encounter SPECIES Slot 5:")
- vba.print(water5species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water5species==00 do
- water5string="3TrainerPoke (00)"
- vba.print(water5string)
- emu.frameadvance()
- water5species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water5species<256 do
- water5string=pokemonortrainer[water5species]
- vba.print(water5string)
- emu.frameadvance()
- water5species=257
- end
- --;Slot 6 Level
- water6level = memory.readbyteunsigned(0xd8ae);
- vba.print("Water encounter LEVEL Slot 6:")
- vba.print(water6level)
- --;Slot 6 Species
- water6species = memory.readbyteunsigned(0xd8af);
- vba.print("Water encounter SPECIES Slot 6:")
- vba.print(water6species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water6species==00 do
- water6string="3TrainerPoke (00)"
- vba.print(water6string)
- emu.frameadvance()
- water6species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water6species<256 do
- water6string=pokemonortrainer[water6species]
- vba.print(water6string)
- emu.frameadvance()
- water6species=257
- end
- --;Slot 7 Level
- water7level = memory.readbyteunsigned(0xd8b0);
- vba.print("Water encounter LEVEL Slot 7:")
- vba.print(water7level)
- --;Slot 7 Species
- water7species = memory.readbyteunsigned(0xd8b1);
- vba.print("Water encounter SPECIES Slot 7:")
- vba.print(water7species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water7species==00 do
- water7string="3TrainerPoke (00)"
- vba.print(water7string)
- emu.frameadvance()
- water7species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water7species<256 do
- water7string=pokemonortrainer[water7species]
- vba.print(water7string)
- emu.frameadvance()
- water7species=257
- end
- --;Slot 8 Level
- water8level = memory.readbyteunsigned(0xd8b2);
- vba.print("Water encounter LEVEL Slot 8:")
- vba.print(water8level)
- --;Slot 8 Species
- water8species = memory.readbyteunsigned(0xd8b3);
- vba.print("Water encounter SPECIES Slot 8:")
- vba.print(water8species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water8species==00 do
- water8string="3TrainerPoke (00)"
- vba.print(water8string)
- emu.frameadvance()
- water8species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water8species<256 do
- water8string=pokemonortrainer[water8species]
- vba.print(water8string)
- emu.frameadvance()
- water8species=257
- end
- --;Slot 9 Level
- water9level = memory.readbyteunsigned(0xd8b4);
- vba.print("Water encounter LEVEL Slot 9:")
- vba.print(water9level)
- --;Slot 9 Species
- water9species = memory.readbyteunsigned(0xd8b5);
- vba.print("Water encounter SPECIES Slot 9:")
- vba.print(water9species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water9species==00 do
- water9string="3TrainerPoke (00)"
- vba.print(water9string)
- emu.frameadvance()
- water9species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water9species<256 do
- water9string=pokemonortrainer[water9species]
- vba.print(water9string)
- emu.frameadvance()
- water9species=257
- end
- --;Slot 10 Level
- water10level = memory.readbyteunsigned(0xd8b6);
- vba.print("Water encounter LEVEL Slot 10:")
- vba.print(water10level)
- --;Slot 10 Species
- water10species = memory.readbyteunsigned(0xd8b7);
- vba.print("Water encounter SPECIES Slot 10:")
- vba.print(water10species)
- --Before checking from the table, check if the byte reads 00; return 3TrainerPoke (00) if true. Setting the value to 257 (normally impossible) prevents the script from printing the string over and over again.
- while water10species==00 do
- water10string="3TrainerPoke (00)"
- vba.print(water10string)
- emu.frameadvance()
- water10species=257
- end
- --If the byte ranges between 1 and 255 (should always be true except the 257 exception, return a Pokémon or Trainer name from the table).
- while water10species<256 do
- water10string=pokemonortrainer[water10species]
- vba.print(water10string)
- emu.frameadvance()
- water10species=257
- end
- vba.print(" ")
- --;Old Rod gives the same outputs regardless of the map, but map must be in the WaterTilesets array (00 03 05 07 0D 0E 11 16 17).
- vba.print("Old Rod encounters:")
- vba.print("MAGIKARP, Level 5 (100%)")
- vba.print("Will always fish up a Pokemon.")
- vba.print(" ")
- --;Good Rod gives the same outputs regardless of the map.
- vba.print("Good Rod encounters:")
- vba.print("GOLDEEN, Level 10 (50%)")
- vba.print("POLIWAG, Level 10 (50%)")
- vba.print("May fail to fish up a Pokemon.")
- vba.print(" ")
- --;Super Rod not implemented yet, but should always give as such for glitch maps.
- vba.print("Super Rod encounters:")
- vba.print("I haven't implemented this yet, but all glitch maps would return: Looks like there's nothing here.")
- vba.print(" ")
- vba.print("Rod encounters only work when the tileset is 0, 3, 5, 7, 13, 14, 17, 22 or 23 and when you are facing water. You can adjust this with expanded inventory (D366, item 37 quantity).")
- vba.print("The current tileset is:")
- tileset = memory.readbyteunsigned(0xd366);
- vba.print(tileset)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement