The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script giving pokerus to a pokemon?

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 18th, 2018 (7:40 AM).
LuizComZ's Avatar
LuizComZ LuizComZ is offline
 
Join Date: Dec 2016
Location: Brazil
Age: 18
Gender: Male
Posts: 18
There is anyway to trigger pokerus stats via script? I'm thinking in doing like a "black market" with a doctor that gives your pokemon a pokerus
__________________
Sorry for the bad english ;-;
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 18th, 2018 (12:49 PM). Edited April 8th, 2020 by Z-Max.
Z-Max Z-Max is offline
 
Join Date: Sep 2015
Location: France
Gender: Male
Nature: Quirky
Posts: 60
Use these commands in your script:
...
setvar 0x8004 0x0 //0x0 is for the 1st pokemon in the party, 0x1 is for the 2nd pokemon...
callasm 0x8?????? //offset of the decrypt routine (replace the ? by a free space offset)
setvar 0x8005 0xF //0xf is the maximum duration of the virus (4 days I think...)
callasm 0x8?????? //offset of the give_pokerus routine
callasm 0x8?????? //offset of the encrypt routine
...

Now, you put the machine code of the routines at the offsets you choose:
Spoiler:
*decrypt = FF B5 04 4D 2D 88 04 4C 64 26 04 4F 75 43 64 19 06 E0 00 00 C0 70 03 02 84 42 02 02 00 F4 03 02 20 68 01 B4 61 68 41 40 39 60 A1 8B F9 80 20 22 10 19 18 22 D1 19 0C 22 3D 68 03 68 6B 40 0B 60 04 31 04 30 01 3A 00 2A F7 D1 01 BC 18 21 C0 22 12 06 82 42 00 D8 80 1A 52 08 82 42 01 D2 80 1A 00 00 06 DF 08 1C 06 21 06 DF 00 28 01 D1 18 22 0A E0 01 29 01 DC 24 22 06 E0 01 22 0A 40 01 2A 01 D0 30 22 00 E0 3C 22 BA 18 BA 60 03 28 01 D1 18 22 0A E0 04 29 01 DB 24 22 06 E0 01 22 0A 40 01 2A 01 D1 30 22 00 E0 3C 22 BA 18 7A 61 01 28 03 DC 00 28 0F D0 18 22 18 E0 02 23 07 D0 03 29 05 D0 00 29 05 D0 05 29 03 D0 3C 22 0E E0 24 22 0C E0 30 22 0A E0 01 29 01 DC 24 22 06 E0 01 22 0A 40 02 2A 01 D1 30 22 00 E0 3C 22 BA 18 FA 60 02 28 03 DB 02 28 0F DC 18 22 18 E0 02 29 07 D0 03 29 05 D0 00 29 05 D0 05 29 03 D0 3C 22 0E E0 24 22 0C E0 30 22 0A E0 05 29 01 DB 24 22 06 E0 01 22 0A 40 00 2A 01 D0 30 22 00 E0 3C 22 BA 18 3A 61 FF BD

*give_pokerus = 07 B5 06 48 00 68 06 49 02 78 0F 2A 04 DC 09 88 10 29 00 DB 10 21 01 70 07 BD 00 00 14 F4 03 02 C2 70 03 02

*encrypt = FF B5 04 4D 2D 88 04 4C 64 26 04 4F 75 43 64 19 06 E0 00 00 C0 70 03 02 84 42 02 02 00 F4 03 02 1C 22 A0 18 18 22 B9 18 00 25 0B 88 5D 19 02 31 01 3A 00 2A F9 D8 2D 04 2D 0C 05 80 30 39 04 30 0C 22 3D 68 0B 68 6B 40 03 60 04 30 04 31 01 3A 00 2A F7 D8 FF BD C0 46


After that, when you talk to the person (or trigger the event) that uses the script, your pokemon will get the pokerus.

Edit: this works for fire red US, I guess you would need to change the routines for other versions.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old November 20th, 2018 (5:29 AM).
LuizComZ's Avatar
LuizComZ LuizComZ is offline
 
Join Date: Dec 2016
Location: Brazil
Age: 18
Gender: Male
Posts: 18
Thanks! It just worked perfectly!
__________________
Sorry for the bad english ;-;
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:17 AM.