View Single Post
Old August 13th, 2013 (5:37 AM).
Wobbu's Avatar
Wobbu Wobbu is offline
Join Date: Mar 2012
Location: Last Laugh Lane
Gender: Male
Nature: Relaxed
Posts: 2,639
Quote originally posted by Mauri:
So, like this?

trainerbattle <etc>..
checktrainerflag 0x<ID>
if 0x1 goto @win
// if you loose
Right? Or have i to compare the last result?
Yeah, if the trainer has been defeated, then the flag will be set. You don't need to check a variable, just do if 0x1 goto.
If you want to do a script with the actual trainerbattle in it, then this is what you want:
trainerbattle 0x3 0xYYY 0x0 @intro @defeat
Iirc, trainerbattle 0x3 allows execution after the battle, even if you lose.