Code:
#dyn 0x740000
#org @start
'-----------------------------------
checkflag 0x238
if true jump @flagalreadyset
trainerbattle 0x1 0x9 0x0 @begin @defeat @after
end
#org @after
setflag 0x238
end
#org @flagalreadyset
msgbox @sensei ' You've been lucky. I...
callstd MSG_LOCK ' Built-in lock command
end
#org @begin
= You? Beat me? Hah! I can smash\nrocks with my
bare fists!
#org @defeat
= But that doesn't make me a great\ntrainer...
#org @sensei
= You've been lucky. I wonder if\nyou could beat
sensei too.
This will work.
You have to use trainerbattle 0x1 not 0x0 if you want to do something after the battle is finished .
0x1 will give you another parameter which I labeled as @after .