The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script How to activate the in-game events in Emerald and FireRed through ROM Hacking instead of cheats? (https://www.pokecommunity.com/showthread.php?t=410377)

Foxes July 4th, 2018 3:37 PM

How to activate the in-game events in Emerald and FireRed through ROM Hacking instead of cheats?
 
So currently I've got a script in FireRed that, upon talking to an NPC, will give you the Mysticticket and Auroraticket, but I've heard that just having the items is not enough to trigger the event. I also can't find the item code for the Old Sea Map in Emerald anywhere, so I can't complete my script for that.

1) Does anyone know of a way to activate the events without cheats since they don't work by just having the items?

2) Does anyone know the XSE item code for the Old Sea Map in Emerald, or how I can find it out (like using a cheat to obtain it and then finding it by looking through the save file or something like that)?

EDIT: I found the item code for the Old Sea Map, now I just need to know how to enable the event without using cheats.

Script:
Spoiler:
Code:

#dynamic 0x37F320

#org @start
lock
faceplayer
checkflag 0x1201
if 0x1 goto @nomore
msgbox @talk1 0x6
giveitem 0x113 0x1 0x0
giveitem 0x172 0x1 0x0
giveitem 0x173 0x1 0x0
giveitem 0x178 0x1 0x0
setflag 0x1201
release
end

#org @nomore
msgbox @talk2 0x6
release
end

#org @talk1
= Hey, I've got some neat stuff for \nyou!

#org @talk2
= For my own POKéMON, I give them\nperfectly suited nicknames!\pIt's my expression of, uh[.]\noriginality, yes, that's it!



tkim July 4th, 2018 4:07 PM

setflag 0x84A and setflag 0x84B for FireRed.

Foxes July 4th, 2018 5:20 PM

Quote:

Originally Posted by tkim (Post 9897402)
setflag 0x84A and setflag 0x84B for FireRed.

Thanks man. I'm assuming this script should work for FR?

Spoiler:
Code:

#dynamic 0x71B167

#org @start
lock
faceplayer
checkflag 0x1201
if 0x1 goto @nomore
msgbox @talk1 0x6
giveitem 0x172 0x1 0x0
giveitem 0x173 0x1 0x0
setflag 0x1201
setflag 0x84A
setflag 0x84B
release
end

#org @nomore
msgbox @talk2 0x6
release
end

#org @talk1
= Hey, I've got some neat stuff for \nyou!

#org @talk2
= A POKéMON becomes easier to \ncatch if it has a status problem.\pSleep, poison, burn, or paralysis[.]\nThose are all effective.\pBut catching POKéMON is never\na sure thing!




Also, do you happen to know what to do for the Eon Ticket, Mystic Ticket, Aurora Ticket and Old Sea Map in Emerald? Would the flags for the Mystic Ticket and Aurora Ticket be the same?
I found this when looking at the script for the ferry person in Lilycove, and I assume that the "compare" parts are related to the events, but I'm not entirely sure what I'd do with it. Again, thanks for any help.

Spoiler:
Code:

#org 0x21E00F
lock
faceplayer
checkflag 0x864
if 0x0 goto 0x821E54D
call 0x821E194
call 0x821E1C6
call 0x821E1F8
call 0x821E22A
call 0x821E25C
call 0x821E2A6
compare 0x400C 0x2
if 0x1 goto 0x821E350
compare 0x400B 0x1
if 0x1 goto 0x821E2F0
compare 0x400B 0x2
if 0x1 goto 0x821E320
compare 0x400B 0x4
if 0x1 goto 0x821E350
compare 0x400B 0x8
if 0x1 goto 0x821E41D
compare 0x400B 0x0
if 0x5 goto 0x821E44D
goto 0x821E080



BirdstarCat13 July 6th, 2018 5:29 PM

You can also just write a script to give the player the items...

Foxes July 6th, 2018 6:28 PM

Quote:

Originally Posted by BirdstarCat13 (Post 9898028)
You can also just write a script to give the player the items...

Did you read the post? At all? Just having the items is not enough to trigger the event. I needed to know what the flags were that would allow the event to be activated, and I know them now for both FireRed and Emerald.

BirdstarCat13 July 7th, 2018 6:05 AM

Quote:

Originally Posted by Gameskiller01 (Post 9898041)
Did you read the post? At all? Just having the items is not enough to trigger the event. I needed to know what the flags were that would allow the event to be activated, and I know them now for both FireRed and Emerald.

Additionally, you can also just make your own wild encounters for the respective legendaries and just make a quick hex edit that forces them to obey (in case of something like Mew/Deoxys)

Foxes July 7th, 2018 6:27 AM

Quote:

Originally Posted by BirdstarCat13 (Post 9898142)
Additionally, you can also just make your own wild encounters for the respective legendaries and just make a quick hex edit that forces them to obey (in case of something like Mew/Deoxys)

I don't need to anymore. I've got scripts for both FireRed and Emerald that allows the events themselves to be accessed from within the game.

FireRed:
Spoiler:
Code:

'---------------
#org 0x71B167
lock
faceplayer
checkflag 0x1201
if 0x1 goto 0x871B19E
msgbox 0x871B1A9 MSG_NORMAL '"Hey, I've got some neat stuff for ..."
giveitem 0x172 0x1 MSG_OBTAIN
giveitem 0x173 0x1 MSG_OBTAIN
setflag 0x1201
setflag 0x84A
setflag 0x84B
release
end

'---------------
#org 0x71B19E
msgbox 0x871B1D3 MSG_NORMAL '"A POKéMON becomes easier to \ncatc..."
release
end

'---------
' Strings
'---------
#org 0x71B1A9
= Hey, I've got some neat stuff for \nyou!

#org 0x71B1D3
= A POKéMON becomes easier to \ncatch if it has a status problem.\pSleep, poison, burn, or paralysis[.]\nThose are all effective.\pBut catching POKéMON is never\na sure thing!




Emerald:
Spoiler:
Code:

'---------------
#org 0x37F40B
givecoins 0xE7
buffertrainerclass 0xE8 0xFFAB
lock
faceplayer
checkflag 0x1201
if 0x1 goto 0x837F467
msgbox 0x837F472 MSG_NORMAL '"Hey, I've got some neat stuff for ..."
giveitem 0x113 0x1 MSG_OBTAIN
giveitem 0x172 0x1 MSG_OBTAIN
giveitem 0x173 0x1 MSG_OBTAIN
giveitem 0x178 0x1 MSG_OBTAIN
setflag 0x8B3
setflag 0x8D5
setflag 0x8D6
setflag 0x8E0
setflag 0x1201
release
end

'---------------
#org 0x37F467
msgbox 0x837F49C MSG_NORMAL '"For my own POKéMON, I give them\np..."
release
end

'---------
' Strings
'---------
#org 0x37F472
= Hey, I've got some neat stuff for \nyou!

#org 0x37F49C
= For my own POKéMON, I give them\nperfectly suited nicknames!\pIt's my expression of, uh[.]\noriginality, yes, that's it!



pakrett-bm March 5th, 2021 5:02 AM

Quote:

Originally Posted by Gameskiller01 (Post 9898146)
I don't need to anymore. I've got scripts for both FireRed and Emerald that allows the events themselves to be accessed from within the game.

FireRed:
Spoiler:
Code:

'---------------
#org 0x71B167
lock
faceplayer
checkflag 0x1201
if 0x1 goto 0x871B19E
msgbox 0x871B1A9 MSG_NORMAL '"Hey, I've got some neat stuff for ..."
giveitem 0x172 0x1 MSG_OBTAIN
giveitem 0x173 0x1 MSG_OBTAIN
setflag 0x1201
setflag 0x84A
setflag 0x84B
release
end

'---------------
#org 0x71B19E
msgbox 0x871B1D3 MSG_NORMAL '"A POKéMON becomes easier to \ncatc..."
release
end

'---------
' Strings
'---------
#org 0x71B1A9
= Hey, I've got some neat stuff for \nyou!

#org 0x71B1D3
= A POKéMON becomes easier to \ncatch if it has a status problem.\pSleep, poison, burn, or paralysis[.]\nThose are all effective.\pBut catching POKéMON is never\na sure thing!




Emerald:
Spoiler:
Code:

'---------------
#org 0x37F40B
givecoins 0xE7
buffertrainerclass 0xE8 0xFFAB
lock
faceplayer
checkflag 0x1201
if 0x1 goto 0x837F467
msgbox 0x837F472 MSG_NORMAL '"Hey, I've got some neat stuff for ..."
giveitem 0x113 0x1 MSG_OBTAIN
giveitem 0x172 0x1 MSG_OBTAIN
giveitem 0x173 0x1 MSG_OBTAIN
giveitem 0x178 0x1 MSG_OBTAIN
setflag 0x8B3
setflag 0x8D5
setflag 0x8D6
setflag 0x8E0
setflag 0x1201
release
end

'---------------
#org 0x37F467
msgbox 0x837F49C MSG_NORMAL '"For my own POKéMON, I give them\np..."
release
end

'---------
' Strings
'---------
#org 0x37F472
= Hey, I've got some neat stuff for \nyou!

#org 0x37F49C
= For my own POKéMON, I give them\nperfectly suited nicknames!\pIt's my expression of, uh[.]\noriginality, yes, that's it!



What I need to change to make this script compatible with fire red french version ?

Edit: I understood how it works, here is my adaptation for "rouge feu". The flags are the same so it was easy port. I give this script to a rocket grunt.

Spoiler:
Code:

#org 0x7106B0
lock
faceplayer
checkflag 0x1201
if 0x1 goto 0x87106F0
msgbox 0x8710700 MSG_NORMAL
giveitem 0x172 0x1 MSG_OBTAIN
giveitem 0x173 0x1 MSG_OBTAIN
setflag 0x1201
setflag 0x84A
setflag 0x84B
release
end

#org 0x7106F0
msgbox 0x8710790 MSG_NORMAL
release
end

#org 0x710700
= La TEAM ROCKET est en mauvaise \nposture, je quitte le navire.\pJ'ai fouillé l'ENTREPOT avant de \npartir, regardes ce que j'ai trouvé!

#org 0x710790
= Gardes ça pour toi, \nce sera notre petit secret.



Super Versekr Dark July 18th, 2021 7:03 AM

#dynamic 0xX00000

#org @inicio
msgbox @msg msg_normal
checkflag 0x3D8
if 0x0 goto 0x8488EB5
checkflag 0x84A
if 0x0 goto 0x8489689
checkflag 0x84B
if 0x0 goto 0x84894B9
msgbox @msg1 msg_normal
release
end


#org @msg
= Welcome to the mystery event\nsystem.

#org @msg1
= There are still events to\ndiscover.

GildedSpirit February 25th, 2022 11:09 PM

Quote:

Originally Posted by Gameskiller01 (Post 9897390)
So currently I've got a script in FireRed that, upon talking to an NPC, will give you the Mysticticket and Auroraticket, but I've heard that just having the items is not enough to trigger the event. I also can't find the item code for the Old Sea Map in Emerald anywhere, so I can't complete my script for that.

1) Does anyone know of a way to activate the events without cheats since they don't work by just having the items?

2) Does anyone know the XSE item code for the Old Sea Map in Emerald, or how I can find it out (like using a cheat to obtain it and then finding it by looking through the save file or something like that)?

EDIT: I found the item code for the Old Sea Map, now I just need to know how to enable the event without using cheats.

Script:
Spoiler:
Code:

#dynamic 0x37F320

#org @start
lock
faceplayer
checkflag 0x1201
if 0x1 goto @nomore
msgbox @talk1 0x6
giveitem 0x113 0x1 0x0
giveitem 0x172 0x1 0x0
giveitem 0x173 0x1 0x0
giveitem 0x178 0x1 0x0
setflag 0x1201
release
end

#org @nomore
msgbox @talk2 0x6
release
end

#org @talk1
= Hey, I've got some neat stuff for \nyou!

#org @talk2
= For my own POKéMON, I give them\nperfectly suited nicknames!\pIt's my expression of, uh[.]\noriginality, yes, that's it!



How do I use this?

GildedSpirit February 25th, 2022 11:09 PM

Quote:

Originally Posted by Super Versekr Dark (Post 10383004)
#dynamic 0xX00000

#org @inicio
msgbox @msg msg_normal
checkflag 0x3D8
if 0x0 goto 0x8488EB5
checkflag 0x84A
if 0x0 goto 0x8489689
checkflag 0x84B
if 0x0 goto 0x84894B9
msgbox @msg1 msg_normal
release
end


#org @msg
= Welcome to the mystery event\nsystem.

#org @msg1
= There are still events to\ndiscover.

How do I use this code?

Super Versekr Dark February 26th, 2022 2:07 AM

Quote:

Originally Posted by GildedSpirit (Post 10474524)
How do I use this code?

just put it on an npc

Tacobell24 February 27th, 2022 3:02 AM

Pretty sure you can jut use Advance Map to change an existing item script to get the items you want instead.
Or else just change a warp to end up on Faraway Island etc .

Hiroshi Sotomura February 28th, 2022 12:16 AM

Just gonna point out that the answer is there in posts #2 and #7, and it doesn’t need to be repeated ad nauseam that just giving the item does not work.

Anyone needing script help should check out Avara’s excellent scripting tutorial for answers on how to put scripts together, compile them, and apply them to NPCs and triggers.


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


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.