Hello, I'm using JPAN hack engine. Anyway, how to target specific pokemon in my party? I know you can target pokemon in your party (e.g. Setvar 0x800D 0x1 something like that) through the number of their slot, but how do I target a specific pokemon? That's because I want to remove a certain POKEMON in the player's party, but I don't know how to target it.
Furthermore, in the JPAN hack engine, can anyone give me an example of a timer event. I don't really get JPAN's guide.
For a lot of JPAN's new specials you need to use the 'special2' command instead of the regular 'special' command. Special2 will assign a value to a chosen variable depending on the outcome of the special. This is the case when trying to determine a Pokemon's species as you have to chose which variable the species value will be given to. I made a quick script that will allow you to remove all of a certain kind of Pokemon from your party, though if you only have one Pokemon it won't work.
#dynamic 0x800000
#org @start
setvar 0x8004 0x0 // Setting 0x8004 to 0x0 will allow us to start looking at the beginning of the party
countpokemon
copyvar 0x8005 0x800D
subvar 0x8005 0x1 // Finding how many Pokemon are in the party then minusing one since that will bring it in line with the format of JPAN's engine and HackMew's ASM
goto @FindPokemon
#org @FindPokemon
special 0x6 // Before using JPAN's specials that alter/ check aspects of party Pokemon you need to decrypt their data which is done by special 0x6
special2 0x8006 0x18 // The special 0x18 check a Pokemon's species, but you need to identify a variable to it to place the value of the species into, which in this case is the variable 0x8006
special 0x6 // Re-encrypt the Pokemon's data
compare 0x8006 0x7
if 0x1 goto @RemoveSquirtle // Checking if the Pokemon we just checked was a Squirtle (0x7) and if it was then the script branches off
addvar 0x8004 0x1 // Selecting the next Pokemon in the party
comparevars 0x8004 0x8005
if 0x2 goto @Ending // If the next Pokemon in the party (0x8004) is greater than the number of Pokemon held (0x8005) then it doesn't exist and we have reached the end of checkable Pokemon
goto @FindPokemon // Starting the checking routine again with the next Pokemon in the party (0x8004)
#org @RemoveSquirtle
callasm 0x720001 // HackMew's Take Away Pokemon ASM routine, the Pokemon to take away was already selected through the 0x8004 variable
countpokemon
copyvar 0x8005 0x800D
subvar 0x8005 0x1 // The number of Pokemon in the party needs to be refreshed as one was just removed
comparevars 0x8004 0x8005
if 0x2 goto @Ending // If the next Pokemon in the party (0x8004) is greater than the number of Pokemon held (0x8005) then it doesn't exist and we have reached the end of checkable Pokemon
goto @FindPokemon // Starting the checking routine again with the next Pokemon in the party (0x8004)
#org @Ending
msgbox @NoSquirtle 0x2
release
end
#org @NoSquirtle
= I stole all your Squirtle!
I've never messed with the timer specials so I can't help you there.
Is there any working links for xse 1.1.1? All I'm finding is 1.0.0.
Here's a link to XSE 1.1.1