The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Re-Battle Trainers

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 30th, 2014 (1:50 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
#Dynamic 0xA00000

#org @start
checkflag 0x300
if 0x0 goto @Battle1
trainerbattle 0x0 0x0 0x19E @b4 @end
release
end

#org @Battle1
trainerbattle 0x0 0x0 0x19E @b4 @end
release
end

#org @b4
=
#org @end
=
So I want to make a trainer battle anytime I want in that script, but after I defeat him, it just load a blank text..
How to do that?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 30th, 2014 (2:02 PM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Lance32497 View Post
So I want to make a trainer battle anytime I want in that script, but after I defeat him, it just load a blank text..
How to do that?
Hi, you want to set text at the pointers which you've left blank. For a looping trainer script try this:
This is in PKSV.
Code:
#dyn 0x740000
#org @start
lock
faceplayer
trainerbattle 0x0 0x10 0x0 @intro @defeat
msgbox @afterwards
callstd msg_normal
cleartrainerflag 0x10
release
end

#org @intro
= Some text he will say when you talk to him

#org @defeat
= Some text he will say when he loses

#org @afterwards
= some text he will say after he loses
__________________
...
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old November 30th, 2014 (2:04 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 26
Gender: Male
Posts: 252
Quote:
Originally Posted by Lance32497 View Post
So I want to make a trainer battle anytime I want in that script, but after I defeat him, it just load a blank text..
How to do that?
You're screwed buddy. You need da ASMAGIX!!!!1!!1111!!! And da SCRIPTMAGIX!!!11!!!11!!

Ok, in all seriousness, just look at your script. Apply some common sense.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old November 30th, 2014 (2:06 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by FBI agent View Post
Hi, you want to set text at the pointers which you've left blank. For a looping trainer script try this:
This is in PKSV.
Code:
#dyn 0x740000
#org @start
lock
faceplayer
trainerbattle 0x0 0x10 0x0 @intro @defeat
msgbox @afterwards
callstd msg_normal
cleartrainerflag 0x10
release
end

#org @intro
= Some text he will say when you talk to him

#org @defeat
= Some text he will say when he loses

#org @afterwards
= some text he will say after he loses
no, I wanted that everytime I talled to the NPC, he will always battle me
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old November 30th, 2014 (2:18 PM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Lance32497 View Post
no, I wanted that everytime I talled to the NPC, he will always battle me
The script I showed you is a script that does that. Try it out.
__________________
...
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old November 30th, 2014 (2:20 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
ahh, ok ok! Thanks dude! Ill try it!
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old November 30th, 2014 (2:26 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by FBI agent View Post
The script I showed you is a script that does that. Try it out.
bytheway, do I need to put 10 as a person ID of the NPC, or I just let cleartrainerflag 0x10?
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old November 30th, 2014 (4:26 PM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Lance32497 View Post
bytheway, do I need to put 10 as a person ID of the NPC, or I just let cleartrainerflag 0x10?
Hi, the flag you clear depends on the trainer you want to rematch. These two must match:

Code:
...
trainerbattle 0x0 0x10 0x0 @intro @defeat
...
cleartrainerflag 0x10
__________________
...
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old May 8th, 2015 (11:14 AM). Edited May 8th, 2015 by Criminon.
Criminon's Avatar
Criminon Criminon is offline
Forever Spriting
 
Join Date: Aug 2012
Location: California
Gender: Male
Nature: Timid
Posts: 264
Quote:
Originally Posted by FBI agent View Post
Hi, the flag you clear depends on the trainer you want to rematch. These two must match:

Code:
...
trainerbattle 0x0 0x10 0x0 @intro @defeat
...
cleartrainerflag 0x10
Hey FBI, having a bit of trouble getting this to work. The cleartrainerflag seems to not work. I figured I would be smart about it, and put the clear before you even battle the person, and this causes it to set the flag I think. Also when just applying it after the battle, it doesn't work either. It still remains checked off.

EDIT:

I got it working! For anyone else having trouble with this, this is how it should look:


Spoiler:
#org @battle
trainerbattle 0x1 0x(your trainer # goes here) 0x0 @intro @defeat @clear
release
end

#org @clear
settrainerflag 0x(your trainer # goes here) 0x1
release
end



This seems to work the best. Cleartrainerflag doesn't seem to work.
__________________
Unbound Team / Crown Team
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:10 AM.