Advertisement
Torchickens

Pokemon Yellow encounters lua script

Feb 21st, 2022
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.67 KB | None | 0 0
  1. --Simple encounter table printing Lua script by Evie (ChickasaurusGL). Yellow Version. Feel free to use or modify with credit.
  2. --Define the Pokémon or Trainer table (ignores ID 00, this is handled later).
  3. pokemonortrainer = {"RHYDON",
  4. "KANGASKHAN",
  5. "NIDORAN M",
  6. "CLEFAIRY",
  7. "SPEAROW",
  8. "VOLTORB",
  9. "NIDOKING",
  10. "SLOWBRO",
  11. "IVYSAUR",
  12. "EXEGGUTOR",
  13. "LICKITUNG",
  14. "EXEGGCUTE",
  15. "GRIMER",
  16. "GENGAR",
  17. "NIDORAN F",
  18. "NIDOQUEEN",
  19. "CUBONE",
  20. "RHYHORN",
  21. "LAPRAS",
  22. "ARCANINE",
  23. "MEW",
  24. "GYARADOS",
  25. "SHELLDER",
  26. "TENTACOOL",
  27. "GASTLY",
  28. "SCYTHER",
  29. "STARYU",
  30. "BLASTOISE",
  31. "PINSIR",
  32. "TANGELA",
  33. "MISSINGNO. 0x1F",
  34. "MISSINGNO. 0x20",
  35. "GROWLITHE",
  36. "ONIX",
  37. "FEAROW",
  38. "PIDGEY",
  39. "SLOWPOKE",
  40. "KADABRA",
  41. "GRAVELER",
  42. "CHANSEY",
  43. "MACHOKE",
  44. "MR.MIME",
  45. "HITMONLEE",
  46. "HITMONCHAN",
  47. "ARBOK",
  48. "PARASECT",
  49. "PSYDUCK",
  50. "DROWZEE",
  51. "GOLEM",
  52. "MISSINGNO. 0x32",
  53. "MAGMAR",
  54. "MISSINGNO. 0x34",
  55. "ELECTABUZZ",
  56. "MAGNETON",
  57. "KOFFING",
  58. "MISSINGNO. 0x38",
  59. "MANKEY",
  60. "SEEL",
  61. "DIGLETT",
  62. "TAUROS",
  63. "MISSINGNO. 0x3D",
  64. "MISSINGNO. 0x3E",
  65. "MISSINGNO. 0x3F",
  66. "FARFETCH'D",
  67. "VENONAT",
  68. "DRAGONITE",
  69. "MISSINGNO. 0x43",
  70. "MISSINGNO. 0x44",
  71. "MISSINGNO. 0x45",
  72. "DODUO",
  73. "POLIWAG",
  74. "JYNX",
  75. "MOLTRES",
  76. "ARTICUNO",
  77. "ZAPDOS",
  78. "DITTO",
  79. "MEOWTH",
  80. "KRABBY",
  81. "MISSINGNO.",
  82. "MISSINGNO.",
  83. "MISSINGNO.",
  84. "VULPIX",
  85. "NINETALES",
  86. "PIKACHU",
  87. "RAICHU",
  88. "MISSINGNO.",
  89. "MISSINGNO.",
  90. "DRATINI",
  91. "DRAGONAIR",
  92. "KABUTO",
  93. "KABUTOPS",
  94. "HORSEA",
  95. "SEADRA",
  96. "MISSINGNO. 0x5E",
  97. "MISSINGNO. 0x5F",
  98. "SANDSHREW",
  99. "SANDSLASH",
  100. "OMANYTE",
  101. "OMASTAR",
  102. "JIGGLYPUFF",
  103. "WIGGLYTUFF",
  104. "EEVEE",
  105. "FLAREON",
  106. "JOLTEON",
  107. "VAPOREON",
  108. "MACHOP",
  109. "ZUBAT",
  110. "EKANS",
  111. "PARAS",
  112. "POLIWHIRL",
  113. "POLIWRATH",
  114. "WEEDLE",
  115. "KAKUNA",
  116. "BEEDRILL",
  117. "MISSINGNO. 0x73",
  118. "DODRIO",
  119. "PRIMEAPE",
  120. "DUGTRIO",
  121. "VENOMOTH",
  122. "DEWGONG",
  123. "MISSINGNO. 0x79",
  124. "MISSINGNO. 0x7A",
  125. "CATERPIE",
  126. "METAPOD",
  127. "BUTTERFREE",
  128. "MACHAMP",
  129. "MISSINGNO. 0x7F",
  130. "GOLDUCK",
  131. "HYPNO",
  132. "GOLBAT",
  133. "MEWTWO",
  134. "SNORLAX",
  135. "MAGIKARP",
  136. "MISSINGNO. 0x86",
  137. "MISSINGNO. 0x87",
  138. "MUK",
  139. "MISSINGNO. 0x89",
  140. "KINGLER",
  141. "CLOYSTER",
  142. "MISSINGNO. 0x8C",
  143. "ELECTRODE",
  144. "CLEFABLE",
  145. "WEEZING",
  146. "PERSIAN",
  147. "MAROWAK",
  148. "MISSINGNO. 0x92",
  149. "HAUNTER",
  150. "ABRA",
  151. "ALAKAZAM",
  152. "PIDGEOTTO",
  153. "PIDGEOT",
  154. "STARMIE",
  155. "BULBASAUR",
  156. "VENUSAUR",
  157. "TENTACRUEL",
  158. "MISSINGNO. 0x9C",
  159. "GOLDEEN",
  160. "SEAKING",
  161. "MISSINGNO. 0x9F",
  162. "MISSINGNO. 0xA0",
  163. "MISSINGNO. 0xA1",
  164. "MISSINGNO. 0xA2",
  165. "PONYTA",
  166. "RAPIDASH",
  167. "RATTATA",
  168. "RATICATE",
  169. "NIDORINO",
  170. "NIDORINA",
  171. "GEODUDE",
  172. "PORYGON",
  173. "AERODACTYL",
  174. "MISSINGNO. 0xAC",
  175. "MAGNEMITE",
  176. "MISSINGNO. 0xAE",
  177. "MISSINGNO. 0xAF",
  178. "CHARMANDER",
  179. "SQUIRTLE",
  180. "CHARMELEON",
  181. "WARTORTLE",
  182. "CHARIZARD",
  183. "MISSINGNO. 0xB5",
  184. "MISSINGNO. 0xB6 (KABUTOPS FOSSIL)",
  185. "MISSINGNO. 0xB7 (AERODACTYL FOSSIL)",
  186. "MISSINGNO. 0xB8 (TOWER GHOST)",
  187. "ODDISH",
  188. "GLOOM",
  189. "VILEPLUME",
  190. "BELLSPROUT",
  191. "WEEPINBELL",
  192. "VICTREEBEL",
  193. "4 4 (0xBF)",
  194. "4 4 Hy (0xC0)",
  195. "Female Symbol . (0xC1)",
  196. "p PkMn p (0xC2)",
  197. "( Z4 (0xC3)",
  198. "X - x, (0xC4)",
  199. "4 . . (0xC5)",
  200. "7g (0xC6)",
  201. "u (0xC7)",
  202. "(Random name) (Trainer/0xC8)",
  203. "Youngster (Trainer/0xC9)",
  204. "Bug Catcher (Trainer/0xCA)",
  205. "Lass (Trainer/0xCB)",
  206. "Sailor (Trainer/0xCC)",
  207. "Jr. Trainer M (Trainer/0xCD)",
  208. "Jr. Trainer F (Trainer/0xCE)",
  209. "Pokemaniac (Trainer/0xCF)",
  210. "Super Nerd (Trainer/0xD0)",
  211. "Hiker (Trainer/0xD1)",
  212. "Biker (Trainer/0xD2)",
  213. "Burglar (Trainer/0xD3)",
  214. "Engineer (Trainer/0xD4)",
  215. "Juggler (unused copy) (Trainer/0xD5)",
  216. "Fisherman (Trainer/0xD6)",
  217. "Swimmer (Trainer/0xD7)",
  218. "Cue Ball (Trainer/0xD8)",
  219. "Gambler (Trainer/0xD9)",
  220. "Beauty (Trainer/0xDA)",
  221. "Psychic (Trainer/0xDB)",
  222. "Rocker (Trainer/0xDC)",
  223. "Juggler (Trainer/0xDD)",
  224. "Tamer (Trainer/0xDE)",
  225. "Bird Keeper (Trainer/0xDF)",
  226. "Blackbelt (Trainer/0xE0)",
  227. "Rival Class 1 (Trainer/0xE1)",
  228. "Prof. Oak (Trainer/0xE2)",
  229. "Chief (Trainer/0xE3)",
  230. "Scientist (Trainer/0xE4)",
  231. "Giovanni (Trainer/0xE5)",
  232. "Rocket (Trainer/0xE6)",
  233. "CoolTrainer M (Trainer/0xE7)",
  234. "CoolTrainer F (Trainer/0xE8)",
  235. "Bruno (Trainer/0xE9)",
  236. "Brock (Trainer/0xEA)",
  237. "Misty (Trainer/0xEB)",
  238. "Lt. Surge (Trainer/0xEC)",
  239. "Erika (Trainer/0xED)",
  240. "Koga (Trainer/0xEE)",
  241. "Blaine (Trainer/0xEF)",
  242. "Sabrina (Trainer/0xF0)",
  243. "Gentleman (Trainer/0xF1)",
  244. "Rival Class 2 (Trainer/0xF2)",
  245. "Rival Class Final (Trainer/0xF3)",
  246. "Lorelei (Trainer/0xF4)",
  247. "Channeler (Trainer/0xF5)",
  248. "Agatha (Trainer/0xF6)",
  249. "Lance (Trainer/0xF7)",
  250. "' (Trainer/0xF8)",
  251. "1 . (Trainer/0xF9)",
  252. "4 8 ) (Trainer/0xFA)",
  253. "No name (Trainer/0xFB)",
  254. "4! (Trainer/0xFC)",
  255. "/9 4 ...... (Trainer/0xFD)",
  256. "p , (Trainer/0xFE)",
  257. ", A (Trainer/0xFF)",
  258. }
  259. --Print encounter rate for grass or caves
  260. grassrate = memory.readbyteunsigned(0xd886);
  261. vba.print("Grass or cave encounter RATE:")
  262. vba.print(grassrate)
  263. --;Slot 1 Level
  264. grass1level = memory.readbyteunsigned(0xd887);
  265. vba.print("Grass or cave encounter LEVEL slot 1:")
  266. vba.print(grass1level)
  267. --;Slot 1 Species
  268. grass1species = memory.readbyteunsigned(0xd888);
  269. vba.print("Grass or cave encounter SPECIES slot 1:")
  270. vba.print(grass1species)
  271. --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.
  272. while grass1species==00 do
  273. grass1string="3TrainerPoke (00)"
  274. vba.print(grass1string)
  275. emu.frameadvance()
  276. grass1species=257
  277. end
  278. --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).
  279. while grass1species<256 do
  280. grass1string=pokemonortrainer[grass1species]
  281. vba.print(grass1string)
  282. emu.frameadvance()
  283. grass1species=257
  284. end
  285. --;Slot 2 Level
  286. grass2level = memory.readbyteunsigned(0xd889);
  287. vba.print("Grass or cave encounter LEVEL slot 2:")
  288. vba.print(grass2level)
  289. --;Slot 2 Species
  290. grass2species = memory.readbyteunsigned(0xd88a);
  291. vba.print("Grass or cave encounter SPECIES slot 2:")
  292. vba.print(grass2species)
  293. --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.
  294. while grass2species==00 do
  295. grass2string="3TrainerPoke (00)"
  296. vba.print(grass2string)
  297. emu.frameadvance()
  298. grass2species=257
  299. end
  300. --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).
  301. while grass2species<256 do
  302. grass2string=pokemonortrainer[grass2species]
  303. vba.print(grass2string)
  304. emu.frameadvance()
  305. grass2species=257
  306. end
  307. --;Slot 3 Level
  308. grass3level = memory.readbyteunsigned(0xd88b);
  309. vba.print("Grass or cave encounter LEVEL slot 3:")
  310. vba.print(grass3level)
  311. --;Slot 3 Species
  312. grass3species = memory.readbyteunsigned(0xd88c);
  313. vba.print("Grass or cave encounter SPECIES slot 3:")
  314. vba.print(grass3species)
  315. --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.
  316. while grass3species==00 do
  317. grass3string="3TrainerPoke (00)"
  318. vba.print(grass3string)
  319. emu.frameadvance()
  320. grass3species=257
  321. end
  322. --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).
  323. while grass3species<256 do
  324. grass3string=pokemonortrainer[grass3species]
  325. vba.print(grass3string)
  326. emu.frameadvance()
  327. grass3species=257
  328. end
  329. --;Slot 4 Level
  330. grass4level = memory.readbyteunsigned(0xd88d);
  331. vba.print("Grass or cave encounter LEVEL slot 4:")
  332. vba.print(grass4level)
  333. --;Slot 4 Species
  334. grass4species = memory.readbyteunsigned(0xd88e);
  335. vba.print("Grass or cave encounter SPECIES slot 4:")
  336. vba.print(grass4species)
  337. --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.
  338. while grass4species==00 do
  339. grass4string="3TrainerPoke (00)"
  340. vba.print(grass4string)
  341. emu.frameadvance()
  342. grass4species=257
  343. end
  344. --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).
  345. while grass4species<256 do
  346. grass4string=pokemonortrainer[grass4species]
  347. vba.print(grass4string)
  348. emu.frameadvance()
  349. grass4species=257
  350. end
  351. --;Slot 5 Level
  352. grass5level = memory.readbyteunsigned(0xd88f);
  353. vba.print("Grass or cave encounter LEVEL slot 5:")
  354. vba.print(grass5level)
  355. --;Slot 5 Species
  356. grass5species = memory.readbyteunsigned(0xd890);
  357. vba.print("Grass or cave encounter SPECIES slot 5:")
  358. vba.print(grass5species)
  359. --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.
  360. while grass5species==00 do
  361. grass5string="3TrainerPoke (00)"
  362. vba.print(grass5string)
  363. emu.frameadvance()
  364. grass5species=257
  365. end
  366. --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).
  367. while grass5species<256 do
  368. grass5string=pokemonortrainer[grass5species]
  369. vba.print(grass5string)
  370. emu.frameadvance()
  371. grass5species=257
  372. end
  373. --;Slot 6 Level
  374. grass6level = memory.readbyteunsigned(0xd891);
  375. vba.print("Grass or cave encounter LEVEL slot 6:")
  376. vba.print(grass6level)
  377. --;Slot 6 Species
  378. grass6species = memory.readbyteunsigned(0xd892);
  379. vba.print("Grass or cave encounter SPECIES slot 6:")
  380. vba.print(grass6species)
  381. --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.
  382. while grass6species==00 do
  383. grass6string="3TrainerPoke (00)"
  384. vba.print(grass6string)
  385. emu.frameadvance()
  386. grass6species=257
  387. end
  388. --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).
  389. while grass6species<256 do
  390. grass6string=pokemonortrainer[grass6species]
  391. vba.print(grass6string)
  392. emu.frameadvance()
  393. grass6species=257
  394. end
  395. --;Slot 7 Level
  396. grass7level = memory.readbyteunsigned(0xd893);
  397. vba.print("Grass or cave encounter LEVEL slot 7:")
  398. vba.print(grass7level)
  399. --;Slot 7 Species
  400. grass7species = memory.readbyteunsigned(0xd894);
  401. vba.print("Grass or cave encounter SPECIES slot 7:")
  402. vba.print(grass7species)
  403. --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.
  404. while grass7species==00 do
  405. grass7string="3TrainerPoke (00)"
  406. vba.print(grass7string)
  407. emu.frameadvance()
  408. grass7species=257
  409. end
  410. --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).
  411. while grass7species<257 do
  412. grass7string=pokemonortrainer[grass7species]
  413. vba.print(grass7string)
  414. emu.frameadvance()
  415. grass7species=257
  416. end
  417. --;Slot 8 Level
  418. grass8level = memory.readbyteunsigned(0xd895);
  419. vba.print("Grass or cave encounter LEVEL slot 8:")
  420. vba.print(grass8level)
  421. --;Slot 8 Species
  422. grass8species = memory.readbyteunsigned(0xd896);
  423. vba.print("Grass or cave encounter SPECIES slot 8:")
  424. vba.print(grass8species)
  425. --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.
  426. while grass8species==00 do
  427. grass8string="3TrainerPoke (00)"
  428. vba.print(grass8string)
  429. emu.frameadvance()
  430. grass8species=257
  431. end
  432. --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).
  433. while grass8species<257 do
  434. grass8string=pokemonortrainer[grass8species]
  435. vba.print(grass8string)
  436. emu.frameadvance()
  437. grass8species=257
  438. end
  439. --;Slot 9 Level
  440. grass9level = memory.readbyteunsigned(0xd897);
  441. vba.print("Grass or cave encounter LEVEL slot 9:")
  442. vba.print(grass9level)
  443. --;Slot 9 Species
  444. grass9species = memory.readbyteunsigned(0xd898);
  445. vba.print("Grass or cave encounter SPECIES slot 9:")
  446. vba.print(grass9species)
  447. --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.
  448. while grass9species==00 do
  449. grass9string="3TrainerPoke (00)"
  450. vba.print(grass9string)
  451. emu.frameadvance()
  452. grass9species=257
  453. end
  454. --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).
  455. while grass9species<257 do
  456. grass9string=pokemonortrainer[grass9species]
  457. vba.print(grass9string)
  458. emu.frameadvance()
  459. grass9species=257
  460. end
  461. --;Slot 10 Level
  462. grass10level = memory.readbyteunsigned(0xd899);
  463. vba.print("Grass or cave encounter LEVEL slot 10:")
  464. vba.print(grass10level)
  465. --;Slot 10 Species
  466. grass10species = memory.readbyteunsigned(0xd89a);
  467. vba.print("Grass or cave encounter SPECIES slot 10:")
  468. vba.print(grass10species)
  469. --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.
  470. while grass10species==00 do
  471. grass10string="3TrainerPoke (00)"
  472. vba.print(grass10string)
  473. emu.frameadvance()
  474. grass10species=257
  475. end
  476. --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).
  477. while grass10species<257 do
  478. grass10string=pokemonortrainer[grass10species]
  479. vba.print(grass10string)
  480. emu.frameadvance()
  481. grass10species=257
  482. end
  483. --Print encounter rate for water
  484. waterrate = memory.readbyteunsigned(0xd8a3);
  485. vba.print("Water encounter RATE:")
  486. vba.print(waterrate)
  487. --;Slot 1 Level
  488. water1level = memory.readbyteunsigned(0xd8a4);
  489. vba.print("Water encounter LEVEL slot 1:")
  490. vba.print(water1level)
  491. --;Slot 1 Species
  492. water1species = memory.readbyteunsigned(0xd8a5);
  493. vba.print("Water encounter SPECIES slot 1:")
  494. vba.print(water1species)
  495. --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.
  496. while water1species==00 do
  497. water1string="3TrainerPoke (00)"
  498. vba.print(water1string)
  499. emu.frameadvance()
  500. water1species=257
  501. end
  502. --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).
  503. while water1species<256 do
  504. water1string=pokemonortrainer[water1species]
  505. vba.print(water1string)
  506. emu.frameadvance()
  507. water1species=257
  508. end
  509. --;Slot 2 Level
  510. water2level = memory.readbyteunsigned(0xd8a6);
  511. vba.print("Water encounter LEVEL Slot 2:")
  512. vba.print(water2level)
  513. --;Slot 2 Species
  514. water2species = memory.readbyteunsigned(0xd8a7);
  515. vba.print("Water encounter SPECIES Slot 2:")
  516. vba.print(water2species)
  517. --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.
  518. while water2species==00 do
  519. water2string="3TrainerPoke (00)"
  520. vba.print(water2string)
  521. emu.frameadvance()
  522. water2species=257
  523. end
  524. --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).
  525. while water2species<256 do
  526. water2string=pokemonortrainer[water2species]
  527. vba.print(water2string)
  528. emu.frameadvance()
  529. water2species=257
  530. end
  531. --;Slot 3 Level
  532. water3level = memory.readbyteunsigned(0xd8a8);
  533. vba.print("Water encounter LEVEL Slot 3:")
  534. vba.print(water3level)
  535. --;Slot 3 Species
  536. water3species = memory.readbyteunsigned(0xd8a9);
  537. vba.print("Water encounter SPECIES Slot 3:")
  538. vba.print(water3species)
  539. --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.
  540. while water3species==00 do
  541. water3string="3TrainerPoke (00)"
  542. vba.print(water3string)
  543. emu.frameadvance()
  544. water3species=257
  545. end
  546. --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).
  547. while water3species<256 do
  548. water3string=pokemonortrainer[water3species]
  549. vba.print(water3string)
  550. emu.frameadvance()
  551. water3species=257
  552. end
  553. --;Slot 4 Level
  554. water4level = memory.readbyteunsigned(0xd8aa);
  555. vba.print("Water encounter LEVEL Slot 4:")
  556. vba.print(water4level)
  557. --;Slot 4 Species
  558. water4species = memory.readbyteunsigned(0xd8ab);
  559. vba.print("Water encounter SPECIES Slot 4:")
  560. vba.print(water4species)
  561. --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.
  562. while water4species==00 do
  563. water4string="3TrainerPoke (00)"
  564. vba.print(water4string)
  565. emu.frameadvance()
  566. water4species=257
  567. end
  568. --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).
  569. while water4species<256 do
  570. water4string=pokemonortrainer[water4species]
  571. vba.print(water4string)
  572. emu.frameadvance()
  573. water4species=257
  574. end
  575. --;Slot 5 Level
  576. water5level = memory.readbyteunsigned(0xd8ac);
  577. vba.print("Water encounter LEVEL Slot 5:")
  578. vba.print(water5level)
  579. --;Slot 5 Species
  580. water5species = memory.readbyteunsigned(0xd8ad);
  581. vba.print("Water encounter SPECIES Slot 5:")
  582. vba.print(water5species)
  583. --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.
  584. while water5species==00 do
  585. water5string="3TrainerPoke (00)"
  586. vba.print(water5string)
  587. emu.frameadvance()
  588. water5species=257
  589. end
  590. --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).
  591. while water5species<256 do
  592. water5string=pokemonortrainer[water5species]
  593. vba.print(water5string)
  594. emu.frameadvance()
  595. water5species=257
  596. end
  597. --;Slot 6 Level
  598. water6level = memory.readbyteunsigned(0xd8ae);
  599. vba.print("Water encounter LEVEL Slot 6:")
  600. vba.print(water6level)
  601. --;Slot 6 Species
  602. water6species = memory.readbyteunsigned(0xd8af);
  603. vba.print("Water encounter SPECIES Slot 6:")
  604. vba.print(water6species)
  605. --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.
  606. while water6species==00 do
  607. water6string="3TrainerPoke (00)"
  608. vba.print(water6string)
  609. emu.frameadvance()
  610. water6species=257
  611. end
  612. --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).
  613. while water6species<256 do
  614. water6string=pokemonortrainer[water6species]
  615. vba.print(water6string)
  616. emu.frameadvance()
  617. water6species=257
  618. end
  619. --;Slot 7 Level
  620. water7level = memory.readbyteunsigned(0xd8b0);
  621. vba.print("Water encounter LEVEL Slot 7:")
  622. vba.print(water7level)
  623. --;Slot 7 Species
  624. water7species = memory.readbyteunsigned(0xd8b1);
  625. vba.print("Water encounter SPECIES Slot 7:")
  626. vba.print(water7species)
  627. --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.
  628. while water7species==00 do
  629. water7string="3TrainerPoke (00)"
  630. vba.print(water7string)
  631. emu.frameadvance()
  632. water7species=257
  633. end
  634. --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).
  635. while water7species<256 do
  636. water7string=pokemonortrainer[water7species]
  637. vba.print(water7string)
  638. emu.frameadvance()
  639. water7species=257
  640. end
  641. --;Slot 8 Level
  642. water8level = memory.readbyteunsigned(0xd8b2);
  643. vba.print("Water encounter LEVEL Slot 8:")
  644. vba.print(water8level)
  645. --;Slot 8 Species
  646. water8species = memory.readbyteunsigned(0xd8b3);
  647. vba.print("Water encounter SPECIES Slot 8:")
  648. vba.print(water8species)
  649. --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.
  650. while water8species==00 do
  651. water8string="3TrainerPoke (00)"
  652. vba.print(water8string)
  653. emu.frameadvance()
  654. water8species=257
  655. end
  656. --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).
  657. while water8species<256 do
  658. water8string=pokemonortrainer[water8species]
  659. vba.print(water8string)
  660. emu.frameadvance()
  661. water8species=257
  662. end
  663. --;Slot 9 Level
  664. water9level = memory.readbyteunsigned(0xd8b4);
  665. vba.print("Water encounter LEVEL Slot 9:")
  666. vba.print(water9level)
  667. --;Slot 9 Species
  668. water9species = memory.readbyteunsigned(0xd8b5);
  669. vba.print("Water encounter SPECIES Slot 9:")
  670. vba.print(water9species)
  671. --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.
  672. while water9species==00 do
  673. water9string="3TrainerPoke (00)"
  674. vba.print(water9string)
  675. emu.frameadvance()
  676. water9species=257
  677. end
  678. --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).
  679. while water9species<256 do
  680. water9string=pokemonortrainer[water9species]
  681. vba.print(water9string)
  682. emu.frameadvance()
  683. water9species=257
  684. end
  685. --;Slot 10 Level
  686. water10level = memory.readbyteunsigned(0xd8b6);
  687. vba.print("Water encounter LEVEL Slot 10:")
  688. vba.print(water10level)
  689. --;Slot 10 Species
  690. water10species = memory.readbyteunsigned(0xd8b7);
  691. vba.print("Water encounter SPECIES Slot 10:")
  692. vba.print(water10species)
  693. --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.
  694. while water10species==00 do
  695. water10string="3TrainerPoke (00)"
  696. vba.print(water10string)
  697. emu.frameadvance()
  698. water10species=257
  699. end
  700. --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).
  701. while water10species<256 do
  702. water10string=pokemonortrainer[water10species]
  703. vba.print(water10string)
  704. emu.frameadvance()
  705. water10species=257
  706. end
  707. vba.print(" ")
  708. --;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).
  709. vba.print("Old Rod encounters:")
  710. vba.print("MAGIKARP, Level 5 (100%)")
  711. vba.print("Will always fish up a Pokemon.")
  712. vba.print(" ")
  713. --;Good Rod gives the same outputs regardless of the map.
  714. vba.print("Good Rod encounters:")
  715. vba.print("GOLDEEN, Level 10 (50%)")
  716. vba.print("POLIWAG, Level 10 (50%)")
  717. vba.print("May fail to fish up a Pokemon.")
  718. vba.print(" ")
  719. --;Super Rod not implemented yet, but should always give as such for glitch maps.
  720. vba.print("Super Rod encounters:")
  721. vba.print("I haven't implemented this yet, but all glitch maps would return: Looks like there's nothing here.")
  722. vba.print(" ")
  723. 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).")
  724. vba.print("The current tileset is:")
  725. tileset = memory.readbyteunsigned(0xd366);
  726. vba.print(tileset)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement