• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011


indeed it's not caused by your script. It's a very well-known annoying error/bug that happens when you changed the position/direction of where an NPC is...
Try and change the unknown values(in A-Map) of the person that you control, and if it still doesn't fix it, then change the direction of where that NPC is facing...

Nope. It happens because when AM creates a new NPC, all its values are set to zero. And if you don't set them correctly, that problem could happen.
So, how did you set the trainer up, exactly?
 

Lanzar

~Zelda fan #1~
28
Posts
15
Years
haha yes, I think you're right. I was just throwing out a 4 digit number out there. I start my flags at 0x1200.
Okay, thanks. ^^


Gah, problem again. xD Okay, this Gym-script is all messed up. The leader doesn't say anything, and I don't get the badge, just the TM...
Code:
#dynamic 0x805799

#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @done
trainerbattle 0x1 0x00B 0x0 @before @after @later
end

#org @before
= Welcome to BALEMORE CITY GYM!\nMy name is MAXI, and I am a \nNormal type leader!\nYou want to challenge me?

#org @after
= What!?

#org @later
msgbox @3 0x6
fanfare 0x13E
msgbox @4 0x4
waitfanfare
closeonkeypress
msgbox @5 0x6
giveitem 0x131 0x1 0x0
setflag 0x820
release
end

#org @done
msgbox @1 0x6
release
end

#org @1
= You should travel to CELINIA CITY\nto get your next badge.

#org @3
= Congratulations!\pFor beating me, you get\nthis badge!

#org @4
= \v\h01 recieved a badge!

#org @5
= Oh, and please take this.


And another problem...This Rocket grunt is meant to say ''Hey, kids are not allowed here'' if you haven't got the first badge, but he don't say anything, and if you have the badge, he's messed up too...:
Code:
#dynamic 0x80566A

#org @start
lock
faceplayer
checkflag 0x820
if 0x0 goto @end
if 0x1 goto @done
release
end

#org @done
trainerbattle 0x1 0x15F 0x0 @1 @2 @after
end

#org @after
msgbox @4 0x6
applymovement 0x1 @move
waitmovement 0x0
setflag 0x0661
end

#org @1
= Hey, what are you\ndoing here kid?\nWe're doing private\nTEAM ROCKET stuff...so scram!\nHuh? What, you want to battle? Okay!

#org @2
= You little...!

#org @end
msgbox @3 0x6
release
end

#org @3
= Hey, kids are not allowed here!

#org @4
= Argh! Well, you can't\nstop our evil plan, though!

#org @move
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x60
#raw 0xFE
 

ExitWound

Boggle
79
Posts
16
Years
  • Age 32
  • Seen Sep 22, 2016
Nope. It happens because when AM creates a new NPC, all its values are set to zero. And if you don't set them correctly, that problem could happen.
So, how did you set the trainer up, exactly?
Same way I set up most of my other trainers...
untitled-6.png
 

ExitWound

Boggle
79
Posts
16
Years
  • Age 32
  • Seen Sep 22, 2016
What if you set the second Unknown value to 03? The rest seems okay.
I've tried that and I just tried it again. It still does the same thing... This trainer isn't the only one either. I have 4 trainers and a GYM Leader in there. 2 of the trainers and the leader do this. But all of them are set up the same.

Okay, thanks. ^^


Gah, problem again. xD Okay, this Gym-script is all messed up. The leader doesn't say anything, and I don't get the badge, just the TM...


And another problem...This Rocket grunt is meant to say ''Hey, kids are not allowed here'' if you haven't got the first badge, but he don't say anything, and if you have the badge, he's messed up too...:
GYM Leader:
Spoiler:

Rocket:
Spoiler:
Try that
 
Last edited:

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
I've tried that and I just tried it again. It still does the same thing... This trainer isn't the only one either. I have 4 trainers and a GYM Leader in there. 2 of the trainers and the leader do this. But all of them are set up the same.

Just to be sure, post the settings for all of them into a spoiler.
 

forestw785

I divide by 0.
60
Posts
14
Years
  • Seen Dec 8, 2010
You know, trainerbattle 0x1 is meant for gym leaders.

Yeah, I've heard that, but I can't find any list telling me what all the other 0xX's are. I know 0x0 is trainer battle, 0x1 is gym, 0x9 is tutorial battle, and 0x3 is supposed to be rival battle (checked script from original firered), but I still get the first badge even when I use 0x3.

If there is a guide that can show me how to properly set up a 0x3 or 0xX trainerbattle script, please show me.
 

ExitWound

Boggle
79
Posts
16
Years
  • Age 32
  • Seen Sep 22, 2016
Just to be sure, post the settings for all of them into a spoiler.

First Trainer(works fine):
Spoiler:


Second Trainer(works fine):
Spoiler:


Third Trainer(same problem):
Spoiler:


Forth Trainer(same problem):
Spoiler:


Gym Leader(same problem):
Spoiler:
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
First Trainer(works fine):
Spoiler:


Second Trainer(works fine):
Spoiler:


Third Trainer(same problem):
Spoiler:


Forth Trainer(same problem):
Spoiler:


Gym Leader(same problem):
Spoiler:

As you can see, the Unknown value for the fourth trainer is set to 00 instead of 03. Change that and see what happens.
 

Lanzar

~Zelda fan #1~
28
Posts
15
Years
I've tried that and I just tried it again. It still does the same thing... This trainer isn't the only one either. I have 4 trainers and a GYM Leader in there. 2 of the trainers and the leader do this. But all of them are set up the same.


GYM Leader:
Spoiler:

Rocket:
Spoiler:
Try that
Nope, not working. :S The Rocket trainer still dont say anything if you not have a badge, and the gym leader is the same.
 

ExitWound

Boggle
79
Posts
16
Years
  • Age 32
  • Seen Sep 22, 2016
As you can see, the Unknown value for the fourth trainer is set to 00 instead of 03. Change that and see what happens.
Oh that's because I used the old picture. But they're all set to 03 and it still does the same thing.

Nope, not working. :S The Rocket trainer still dont say anything if you not have a badge, and the gym leader is the same.
Well they both worked when I tested them... I'm not sure what else to say. Unless it the rom your hacking. What version is it? R/S or FR/LG?
 

Lanzar

~Zelda fan #1~
28
Posts
15
Years
Oh that's because I used the old picture. But they're all set to 03 and it still does the same thing.


Well they both worked when I tested them... I'm not sure what else to say. Unless it the rom your hacking. What version is it? R/S or FR/LG?
FireRed.
I tested it again, and now the Gym worked, but the Rocket grunt dont say anything...
 

ExitWound

Boggle
79
Posts
16
Years
  • Age 32
  • Seen Sep 22, 2016
FireRed.
I tested it again, and now the Gym worked, but the Rocket grunt dont say anything...
Well I just tested the grunt again and it worked perfect. I'm not sure what you're doing wrong... Check the person event in A-map because this is what happens when I test it:
Spoiler:
 
Last edited:

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Oh that's because I used the old picture. But they're all set to 03 and it still does the same thing.

Are you using some saves perhaps?


FireRed.
I tested it again, and now the Gym worked, but the Rocket grunt dont say anything...

Are you using a save state/game? If so, make sure to enter/exit a building before trying. If it still doesn't work, try putting them on a clean ROM and see what happens.
 

ExitWound

Boggle
79
Posts
16
Years
  • Age 32
  • Seen Sep 22, 2016
Are there any other people besides the trainers and the gym leader?
No. In the town there is, but other than that, no. Only the Gym Leader and the trainers are in the gym.
 
Last edited:

forestw785

I divide by 0.
60
Posts
14
Years
  • Seen Dec 8, 2010
So does nobody know what the difference between trainerbattle 0x1 and 0x3 is?

and any others besides 0x0?

To be more specific, is there a list/guide that can tell me any of this in detail? I've set up a script with 0x3, but I guess I did it wrong, because it still sets the first badge, and the battle is on route 1 after leaving what would be pallet town.

The flag that is set is not the first badge flag either.
 
Last edited:
Status
Not open for further replies.
Back
Top