GoGoJJTech
(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
- 2,475
- Posts
- 12
- Years
- Age 26
- Earth
- Seen Dec 9, 2016
Hello Pokecommunity today I will show you how to do time-based events into your hacks. :D
Here is an example of what I mean: https://www.youtube.com/watch?v=h98OV4W1ZsU
Please ignore the noobishness, still was starting out when this tutorial was made.
First, apply the DNS to your ROM (any ROM type).
0x0300553C TIME IS WRITTEN HERE
Pay close attention to WHERE the time is REALLY stored.
In VBA go to the memory viewer and jump to 0x0300553C and you will
If you are like me, you will most likely want to check only for the hours, which is stored at 0x3005542, NOT 0x0300553C.
My script is based on the mysterious TV that Rotom lived in Platinum Version. Tested and works 100%.
We will be using the comparefarbytetobyte command which is like the compare command, but instead of checking variables, it checks the bytes in the specified RAM location.
Here it goes:
This is simple enough, and you CAN check for minutes and seconds and days and months and years and all that.
For the comparefarbytetobyte command, refer to this list:
0x0 means less than
0x1 means equal to
0x2 means greater than
0x3 means less than or equal to
0x4 means greater than or equal to
Please credit karatekid552 for creating it, and robin22gongon for testing it, and me for finalizing it.
Here is an example of what I mean: https://www.youtube.com/watch?v=h98OV4W1ZsU
Please ignore the noobishness, still was starting out when this tutorial was made.
First, apply the DNS to your ROM (any ROM type).
![[PokeCommunity.com] Time-Based Events [PokeCommunity.com] Time-Based Events](https://i49.tinypic.com/34867ab.png)
0x0300553C TIME IS WRITTEN HERE
Pay close attention to WHERE the time is REALLY stored.
![[PokeCommunity.com] Time-Based Events [PokeCommunity.com] Time-Based Events](https://i46.tinypic.com/99f4ew.png)
In VBA go to the memory viewer and jump to 0x0300553C and you will
If you are like me, you will most likely want to check only for the hours, which is stored at 0x3005542, NOT 0x0300553C.
My script is based on the mysterious TV that Rotom lived in Platinum Version. Tested and works 100%.
We will be using the comparefarbytetobyte command which is like the compare command, but instead of checking variables, it checks the bytes in the specified RAM location.
Here it goes:
Code:
'---------------
#org 0x75E186
lock
checkflag 0x1001 /Checks if the script occurred before/
if 0x1 goto 0x875E1AA
comparefarbytetobyte 0x3005542 0x4 /Checks the hour if it is 4:00 AM/
if 0x0 goto 0x875E166 /If it is less than 4:00AM (3:59, etc.) go to the "now" message/
goto 0x875DFC7 /jumps to part 2/
'---------------
#org 0x75E1AA
msgbox 0x875E1B6 MSG_NORMAL '"The TV still has an odd feel to\ni..."
end
'---------------
#org 0x75E166
msgbox 0x875E0E9 MSG_YESNO '"Inside the TV...\nThere appears to..."
compare LASTRESULT 0x1
if 0x1 goto 0x875E06C
closeonkeypress
end
'---------------
#org 0x75DFC7
comparefarbytetobyte 0x3005542 0x14 /Checks the hour again (14 in HEX is 20:00 or 8:00PM)
if 0x4 goto 0x875E166 /If greater than or equal to 8:00PM go to the "now" message
goto 0x875E02A /Jumps to the "not time yet" message
'---------------
#org 0x75E06C
msgbox 0x875E08B MSG_NORMAL '"[player] thumped the TV set!"
setflag 0x1001
setvar 0x6000 0x12A
setvar 0x6002 0x148
wildbattle 0x97 0x14 0x0
release
end
'---------------
#org 0x75E02A
msgbox 0x875E0A4 MSG_NORMAL '"The TV has an oddly malevolent\nfe..."
end
'---------
' Strings
'---------
#org 0x75E1B6
= The TV still has an odd feel to\nit...
#org 0x75E0E9
= Inside the TV...\nThere appears to be a Pokémon?...\pThe Pokémon appears as if it will\ncome out. Want to thump the TV?
#org 0x75E08B
= [player] thumped the TV set!
#org 0x75E0A4
= The TV has an oddly malevolent\nfeel...\pIt's as if it is staring...
This is simple enough, and you CAN check for minutes and seconds and days and months and years and all that.
For the comparefarbytetobyte command, refer to this list:
0x0 means less than
0x1 means equal to
0x2 means greater than
0x3 means less than or equal to
0x4 means greater than or equal to
Please credit karatekid552 for creating it, and robin22gongon for testing it, and me for finalizing it.
Last edited: