Script Help Thread (DO NOT REQUEST SCRIPTS)
View Single Post
February 27th, 2013 (5:49 AM).
What happens if I push it?....
Join Date: Nov 2012
Location: Do you really want to know? Really?
Originally Posted by
Lets see here.
checktrainerflag 0x66 'Set when trainer is battled
compare lastresult 0x0 'Check if flag is not set (i.e not battled)
if 0x1 goto @finished 'If it's not battled goto @finish
It's only working because you can't do that, and it runs anyways (Atleast not in PKSV's new version. Just do checkflag, if true.)
What you should do is:
if 0x1 goto @finished
Also, logically you're setting the trainerflag if you haven't battled (which is wrong). Here's a PKSV representation of what it should look like.
if TRUE jump @done
compare LASTRESULT YES
if != jump @no
trainerbattle 0x3 0x66 0x1 @defeat
= Do you want to battle?
= Next time then.
= That was a good battle!
= Prepare for battle!
= Damn I lost
Try that PKSV version, you can convert it to XSE easily, if you wish.
Umm FBI, trainer flags work backwards. They are cleared when you beat them. Another name for settrainerflag is enabletrainer. They are interchangeable names for the same command. Same goes for cleartrainerflag, its other optional name is disabletrainer.
I know that the commands themselves work that way, but the settrainerflag 0x0 command may be equivalent to a standard clearflag 0x500 (trainer flags are just regular flags starting at 500 if I remember correctly) so there is a chance that the main names for the commands are misleading. The only way to really tell would be to take a clean rom and right off the bat, checkflag 0x500 and see what it holds.
Proof- I wrote a working script to make every trainer in the game ready to battle again. It didn't work when I logically used cleartrainerflag, so when I switched to setrainerflag, everybody wanted to battle again.
Edit: Comrade likes your Signiture.
Paired with Simba
Also Known As:
View Public Profile
Send a private message to karatekid552
Find all posts by karatekid552
Find threads started by karatekid552