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)
-   -   Other Help with JPAN's special 0x65 (https://www.pokecommunity.com/showthread.php?t=350035)

Criminon June 3rd, 2015 11:09 PM

Help with JPAN's special 0x65
 
So Here is the documentation for it:
Special 0x65 –HP Checker

Receives Arguments? Yes.
0x8004 – Party pokémon slot to check.

Returns Values? Yes, the current hp of the asked pokémon.
.

The way I'm using it is as follows:
Spoiler:
setvar 0x8004 0x0
special 0x65
compare LASTRESULT 0x1
if < jump @end ' Smaller Than
///do code

This is supposed to check to make sure the pokemon is alive, and if not it ends the code.
My problem is that its still activating the code, which leads me to believe I'm using this incorrectly. Is there another way to check HP? Am I using this correctly?

Edit:
The way around this is:

0x20242DA is the address stored in RAM for the 1st pokemon in your party's HP.
0x20242DC is the max HP.
0x20242D4 is the status ailment a pokemon is currently suffering. (00 being nothing)

Using comparefarbytetobyte 0x20242DA 0xnumber you want to check
you can easily check a pokemon's hp.

using comparefarbytetobyte 0x20242DC 0xnumber you want to check
you can easily see if a pokemon has enough hp for something.

using writebytetooffset 0xstatus 0x20242D4
you can easily edit the status effecting them.

For the rest of your party, take these offsets and add 0x64 to them.

Lance32497 June 5th, 2015 4:19 PM

try using this

setvar 0x8004 0x0
special2 LASTRESULT 0x65
compare LASTRESULT 0x0
if 0x1 goto @it's_now_fainted


All times are GMT -8. The time now is 2:22 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.