Hello again,
Which is the flag, or the var, where i can check if a battle has been won or not? I need it because i would realize a battle that i'm sure i'll loose, and after that i would move my sprite to another bank map and position.
So, like this?
Code:trainerbattle <etc>.. checktrainerflag 0x<ID> if 0x1 goto @win // if you loose
Right? Or have i to compare the last result?
So, like this?
Code:trainerbattle <etc>.. checktrainerflag 0x<ID> if 0x1 goto @win // if you loose
Right? Or have i to compare the last result?
trainerbattle 0x3 0xYYY 0x0 @intro @defeat
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:
Code:trainerbattle 0x3 0xYYY 0x0 @intro @defeat
Iirc, trainerbattle 0x3 allows execution after the battle, even if you lose.
So it should be like this:
Code:checktrainerflag 0x<value> compare LASTRESULT 0x0 if 0x1 goto @Win
Thanks for the insight on the hidden scripts, but the problem is that I the grunts won't leave their "hiding place" but still move the way they are supposed to minus the appearing which you have just informed me how to do. I will post a video, but seeing as I can't post links yet, just check out my youtube channel for the video if you are willing to help. the channel name is cclemur
NO!
Sorry bro, but this is completely wrong. Trainerflags are cleared when you win.
hey guys, i wanted to know is it possible to give money in a script in the same way you would an item? Ive done a lot of scripting already, ive just never wanted to do this until now, so i havent payed any attention to whether or not i could.
There is literally a command called "givemoney".:P One sec, I'll go get the syntax...
Here: https://www.pokecommunity.com/posts/4228426/
Pfft, haha, thanks. And im assuming paymoney and givemoney are the same thing right? I just read it, but i want to make sure theres not some secret way of using them, haha.
Im trying to give the hero the HM Fly...
But all that comes up is Hero has received ?????????????
Why?
Code:#dynamic 0x800000 #org @start lock faceplayer checkflag 0x835 if 0x1 goto @done msgbox @1 0x5 compare 0x800D 0x1 if 0x1 goto @take msgbox @2 0x6 release end #org @done msgbox @3 0x6 release end #org @take giveitem [COLOR="Red"]0x[/COLOR]340 0x1 MSG_OBTAIN msgbox @3 0x6 setflag 0x835 release end #org @1 = Hey kid,\nI found this item....\pBut I have no use for it......\pYou want it? #org @2 = It's a pretty nice item! #org @3 = If you plan on using it,\nYou need the VoidBadge first!