LocksmithArmy
Mew!
- 416
- Posts
- 12
- Years
- Seen Feb 17, 2025
This short tutorial will teach you a nice script that will add an event into your Pokemon hack in which your player is tasked to defeat (or catch) stronger than normal Pokemon.
This tutorial is written for FireRed but it can be easily altered to fit in any gen 3 game.
What you will need:
AdvanceMap
PKSV (preferred, XSE will work but the scripts will need to be changed)
A brain
A little time
Basic Knowledge on how to use AM and PKSV
SHINYIZER (optioinal)
Let us start with the person who gives the event...
For the player to actually be tasked to fight these pokemon, he must talk to someone who needs them gone. In my hack I will be using a security guard that I have added all around Kanto.
Simply use AMap to add your character to your hack... very simple... Im not even going to explain it, cause this is a Scripting tut not a Mapping tut. but I will give you pictures if it helps ;)
This mans script is very straight forward...
simply copy and paste this code into PKSV and edit it to your liking.
Basically, his main goal is to turn on the strong Pokemon you will be fighting later. and once they are all fought, he rewards you. all the text can be altered to your liking, including the reward item and everything else...
NOW its time for... POKEMON.
you cannot fight strong pokemon without having events for them... so agian, you are going to AMAP and adding your pokemon events... We will be using tiles for this script...
simply add 1 per pokemon that you wish to have, and make the Var number = the var you used to activate the pokemon in the previous script (0x4002 in my example)
The pokemons actual script should look like this: (in this example you will be fighting 5 Golbat)
now that wasnt too hard was it... you can change the pokemon and level of each battle, or use the same @Battle offset and just change the flags for each battle. each one will count down... and when you hit 0, no more battles ;)
now lets talk about options and flexibility... You can do MANY different things with this script. What if you dont want the same pokemon to show up in the same spot every time. players could map it out and know exactly where to go to finish your quest easily. What if you want a 25% chance of finding the pokemon there ;) so they may step on the tile 3 or 4 times before they get into the fight...
Try this:
Place this script in the tile and your pokemon flag script (from above) would be in @pokestart#
Now that makes the pokemon appear to not be in the same spot... what if you want them to face the pokemon in a specific order... maybe weaker pokemon first with a shiny at the end...
check this one out:
Now you can use both the above scripts to have a 25% (or whatever) chance of fighting your event pokemon in the order that you choose...
but what if you cont care the order... what if you just want a percent chance of fighting any of your pokemon in any of your locations...
you would use this script:
If you think hard you can probably figure out how to be even more flexible with your scripts...
for instance, make 10 nidoking battles using levels 40-50 that all count down the counter from 5, use the full random script and DONT give any of the battles flags, instead have them check if your countdown var is 0, if it is than jump to "release end" so there is no battle. place 15 tiles all with the offset to your full random script. Now the player will fight 5 nidoking but their appearance rate and levels will be different, they may fight all 5 at level 48 adn higher, or all 5 at lower levels. they may walk over 3 tiles and then fight on the next 2 tiles in a row.
the event could be a man giving rewards for feinting nidoking... and they arent 5 specific nidoking so levels can be randomized, he has a nidoking overpopulation problem. the possibilities are endless. This is not about making MY events, its an exercise in creativity. THINK, and make cool things happen in your hack.
This tutorial is written for FireRed but it can be easily altered to fit in any gen 3 game.
What you will need:
AdvanceMap
PKSV (preferred, XSE will work but the scripts will need to be changed)
A brain
A little time
Basic Knowledge on how to use AM and PKSV
SHINYIZER (optioinal)
Let us start with the person who gives the event...
For the player to actually be tasked to fight these pokemon, he must talk to someone who needs them gone. In my hack I will be using a security guard that I have added all around Kanto.
Simply use AMap to add your character to your hack... very simple... Im not even going to explain it, cause this is a Scripting tut not a Mapping tut. but I will give you pictures if it helps ;)
"image removed" "image removed" "image removed"
This mans script is very straight forward...
simply copy and paste this code into PKSV and edit it to your liking.
Spoiler:
'--QUEST GIVER------------- (whoever gives the quest has this script)
#dynamic 0x740000 ' any free space
#org @Start
'--------------------------
lock
faceplayer
checkflag 0x200 ' this flag is set once the quest has been given
if true jump @started
msgbox @Hello
callstd MSG_NOCLOSE
setvar 0x4001 0x5 ' a variable must be set to tell how many pokemon there are
Setvar 0x4002 0x1 ' this var activates the tiles
setflag 0x200 ' see, now the player cannot start the quest twice
release
end
#org @started
'-------------------------
compare 0x4001 0x0 ' if the player beat all the pokemon
if == jump @won
storevar 0x0 0x4001 ' buffers the ammount left to \v\h02
msgbox @playing
callstd MSG_NOCLOSE
release
end
#org @won
'-------------------------
checkflag 0x201 ' if this flag is set than the player already won
if true jump @gotprize
msgbox @giveprize
callstd MSG_NOCLOSE
textcolor GRAY
checkitemspaceinbag GREATBALL 5 ' makes sure your bag isnt full
compare LASTRESULT 0x0
if == jump 0x81A6BF9 ' this says your bag is full...
additem GREATBALL 0x5 ' you can give any prize/amount you like
fanfare 0x101 ' happy song
msgbox @ItEm
callstd MSG_NOCLOSE
waitfanfare ' waits for song to end (short song)
setflag 0x201 ' now player cannot get 2 prizes
release
end
#org @gotprize
'-------------------------
msgbox @finished ' player sees this if they already got the prize
callstd MSG_NOCLOSE
release
end
'--- All of theses texts are just examples -----
#org @Hello
= If you are going into MT. MOON,\nbe careful.\pThere are 5 powerful GOLBAT\non a rampage in there.\pIf you take care of them\nI will give you a good reward.
#org @playing
= There are still \v\h02 raging\nGOLBAT left to defeat.\pI am sure you can find\nthem all.
#org @giveprize
= Oh wow, you beat them all.\nYou are a very strong trainer\lindeed.\pPlease take these this as a reward.
#org @ItEm
= You were given 5 GREATBALLs\nfor all your heard work.
#org @finished
= Thank you for clearing out those\nGOLBAT.
#dynamic 0x740000 ' any free space
#org @Start
'--------------------------
lock
faceplayer
checkflag 0x200 ' this flag is set once the quest has been given
if true jump @started
msgbox @Hello
callstd MSG_NOCLOSE
setvar 0x4001 0x5 ' a variable must be set to tell how many pokemon there are
Setvar 0x4002 0x1 ' this var activates the tiles
setflag 0x200 ' see, now the player cannot start the quest twice
release
end
#org @started
'-------------------------
compare 0x4001 0x0 ' if the player beat all the pokemon
if == jump @won
storevar 0x0 0x4001 ' buffers the ammount left to \v\h02
msgbox @playing
callstd MSG_NOCLOSE
release
end
#org @won
'-------------------------
checkflag 0x201 ' if this flag is set than the player already won
if true jump @gotprize
msgbox @giveprize
callstd MSG_NOCLOSE
textcolor GRAY
checkitemspaceinbag GREATBALL 5 ' makes sure your bag isnt full
compare LASTRESULT 0x0
if == jump 0x81A6BF9 ' this says your bag is full...
additem GREATBALL 0x5 ' you can give any prize/amount you like
fanfare 0x101 ' happy song
msgbox @ItEm
callstd MSG_NOCLOSE
waitfanfare ' waits for song to end (short song)
setflag 0x201 ' now player cannot get 2 prizes
release
end
#org @gotprize
'-------------------------
msgbox @finished ' player sees this if they already got the prize
callstd MSG_NOCLOSE
release
end
'--- All of theses texts are just examples -----
#org @Hello
= If you are going into MT. MOON,\nbe careful.\pThere are 5 powerful GOLBAT\non a rampage in there.\pIf you take care of them\nI will give you a good reward.
#org @playing
= There are still \v\h02 raging\nGOLBAT left to defeat.\pI am sure you can find\nthem all.
#org @giveprize
= Oh wow, you beat them all.\nYou are a very strong trainer\lindeed.\pPlease take these this as a reward.
#org @ItEm
= You were given 5 GREATBALLs\nfor all your heard work.
#org @finished
= Thank you for clearing out those\nGOLBAT.
*NOTE: ALL variables and flags must be changed to match YOUR hack layout*
Basically, his main goal is to turn on the strong Pokemon you will be fighting later. and once they are all fought, he rewards you. all the text can be altered to your liking, including the reward item and everything else...
NOW its time for... POKEMON.
you cannot fight strong pokemon without having events for them... so agian, you are going to AMAP and adding your pokemon events... We will be using tiles for this script...
simply add 1 per pokemon that you wish to have, and make the Var number = the var you used to activate the pokemon in the previous script (0x4002 in my example)
"image removed"
The pokemons actual script should look like this: (in this example you will be fighting 5 Golbat)
Spoiler:
'--POKEMON---------------- (every pokemon gets this script)
#org @pokestart# ' Each pokemon gets a DIFFERENT start script
'-------------------------
checkflag 0x202 ' Each pokemon needs a different flag
if true jump 0x81A7AE0 ' if flag is set player cant fight again (jump @picker if using it)
'setvar 0x8003 0x1 ' Use ONLY if you have SHINYIZER in your hack and want a shiny battle
Call @Battle ' A common battle can be used, or a unique one per pokemon
setflag 0x202 ' flag is set if you won or caught pokemon
subtractvar 0x409D 0x1 ' decreases the count of pokemon left to fight
release
end
#org @Battle ' (can be a different offset or the same one per pokemon)
'-------------------------
cry GOLBAT 0x2 ' Pokemon screams when player steps on tile
message @Cry ' pokemon visually screams so player notices its not a normal battle
showmsg
waitcry ' waits to end sound
pause 0x14 ' makes button mashers wait
waitbutton ' makes non observant people read
battle GOLBAT 22 NONE ' if using unique battles, this is what youd change
setflag 0x807 ' some sort of fail check
special BATTLE_PIXELLATE ' starts battle
waitspecial ' makes sure battle ends before it continues
clearflag 0x807 ' stops fail checker
special2 LASTRESULT 0xB4 ' checks how battle ended
compare LASTRESULT 0x4 ' if player ran...
if == jump 0x81A7AE0 ' tiles will still be active
return
#org @Cry ' Cry can be anything you like
= SCREEEE!
#org @pokestart# ' Each pokemon gets a DIFFERENT start script
'-------------------------
checkflag 0x202 ' Each pokemon needs a different flag
if true jump 0x81A7AE0 ' if flag is set player cant fight again (jump @picker if using it)
'setvar 0x8003 0x1 ' Use ONLY if you have SHINYIZER in your hack and want a shiny battle
Call @Battle ' A common battle can be used, or a unique one per pokemon
setflag 0x202 ' flag is set if you won or caught pokemon
subtractvar 0x409D 0x1 ' decreases the count of pokemon left to fight
release
end
#org @Battle ' (can be a different offset or the same one per pokemon)
'-------------------------
cry GOLBAT 0x2 ' Pokemon screams when player steps on tile
message @Cry ' pokemon visually screams so player notices its not a normal battle
showmsg
waitcry ' waits to end sound
pause 0x14 ' makes button mashers wait
waitbutton ' makes non observant people read
battle GOLBAT 22 NONE ' if using unique battles, this is what youd change
setflag 0x807 ' some sort of fail check
special BATTLE_PIXELLATE ' starts battle
waitspecial ' makes sure battle ends before it continues
clearflag 0x807 ' stops fail checker
special2 LASTRESULT 0xB4 ' checks how battle ended
compare LASTRESULT 0x4 ' if player ran...
if == jump 0x81A7AE0 ' tiles will still be active
return
#org @Cry ' Cry can be anything you like
= SCREEEE!
now that wasnt too hard was it... you can change the pokemon and level of each battle, or use the same @Battle offset and just change the flags for each battle. each one will count down... and when you hit 0, no more battles ;)
"image removed"
now lets talk about options and flexibility... You can do MANY different things with this script. What if you dont want the same pokemon to show up in the same spot every time. players could map it out and know exactly where to go to finish your quest easily. What if you want a 25% chance of finding the pokemon there ;) so they may step on the tile 3 or 4 times before they get into the fight...
Try this:
Spoiler:
#org @Randomizer ' Use if you want a % chance of finding the pokemon on that tile
'-------------------------
random 0x3 ' Alter number to alter the % (0x3 = 25%)
compare lastresult 0x0
if == jump @pokestart# ' use @picker if you want ordered battles
release
end
'-------------------------
random 0x3 ' Alter number to alter the % (0x3 = 25%)
compare lastresult 0x0
if == jump @pokestart# ' use @picker if you want ordered battles
release
end
Place this script in the tile and your pokemon flag script (from above) would be in @pokestart#
Now that makes the pokemon appear to not be in the same spot... what if you want them to face the pokemon in a specific order... maybe weaker pokemon first with a shiny at the end...
check this one out:
Spoiler:
#org @picker ' player will battle event pokemon in a specific order
'-------------------------
compare 0x4001 0x5 ' this is your countdown var
if == call @pokestart1
compare 0x4001 0x4
if == call @pokestart2
compare 0x4001 0x3
if == call @pokestart3
compare 0x4001 0x2
if == call @pokestart4
compare 0x4001 0x1
if == call @pokestart5 ' you can have as many as your countdown allows
release
end
'-------------------------
compare 0x4001 0x5 ' this is your countdown var
if == call @pokestart1
compare 0x4001 0x4
if == call @pokestart2
compare 0x4001 0x3
if == call @pokestart3
compare 0x4001 0x2
if == call @pokestart4
compare 0x4001 0x1
if == call @pokestart5 ' you can have as many as your countdown allows
release
end
Now you can use both the above scripts to have a 25% (or whatever) chance of fighting your event pokemon in the order that you choose...
but what if you cont care the order... what if you just want a percent chance of fighting any of your pokemon in any of your locations...
you would use this script:
Spoiler:
#org @fullrandom ' % chance of battteling any event pokemon
'-------------------------
random 0x13 ' math = (n*x)-1 , n=number of pokemon x=%multiplier (4=25%) convert to hex
compare last result 0x0
if == jump @pokestart1
compare last result 0x1
if == jump @pokestart2
compare last result 0x2
if == jump @pokestart3
compare last result 0x3
if == jump @pokestart4
compare last result 0x4
if == jump @pokestart5
release
end
'-------------------------
random 0x13 ' math = (n*x)-1 , n=number of pokemon x=%multiplier (4=25%) convert to hex
compare last result 0x0
if == jump @pokestart1
compare last result 0x1
if == jump @pokestart2
compare last result 0x2
if == jump @pokestart3
compare last result 0x3
if == jump @pokestart4
compare last result 0x4
if == jump @pokestart5
release
end
If you think hard you can probably figure out how to be even more flexible with your scripts...
for instance, make 10 nidoking battles using levels 40-50 that all count down the counter from 5, use the full random script and DONT give any of the battles flags, instead have them check if your countdown var is 0, if it is than jump to "release end" so there is no battle. place 15 tiles all with the offset to your full random script. Now the player will fight 5 nidoking but their appearance rate and levels will be different, they may fight all 5 at level 48 adn higher, or all 5 at lower levels. they may walk over 3 tiles and then fight on the next 2 tiles in a row.
the event could be a man giving rewards for feinting nidoking... and they arent 5 specific nidoking so levels can be randomized, he has a nidoking overpopulation problem. the possibilities are endless. This is not about making MY events, its an exercise in creativity. THINK, and make cool things happen in your hack.
Last edited: