HUBOL did not define trainercanlose / trainerbattle 09 so we cannot use if for script continue when battle lose.
Sylinuser
Change 804D0 from 2E to 36
Add setvar var0 0xFEFE before the battle command
Happy Hacking!