• 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.
2
Posts
13
Years
  • Seen Nov 30, 2011
Hello guys. First post ever. :P I'm trying to hack Fire Red with my gf. It's been fun, but...

I was wondering if anyone knows how to make sudden battles, such as the one the rival makes when you're walking. You don't see the rival, the game just stops you and the rival approaches you, talks, the battle begins, you win or lose, then he talks again and walks away. Does anyone know? I would really appreciate help on this one.

Btw, I'm using Pokewitch, Pocket Script, and Adv. Map 1.90 for my scripts.

So, does anyone know? :) I'd really like to know if it can be done, or if someone knows the right way to do it.

Thanks!
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Hahaha that's ironic! I in fact used your tutorial to write the script! And yes I did make sure to add 1 to the callasm.

Are you using Fire Red as a rom base? I'll try to take a closer look later today after work and see if I can get it to work.

EDIT: I tested just the portion of the script you said you were having trouble with. It erased the Pokemon I selected, then gave me a Relicanth, then erased the first Pokemon in my party. It worked, though, I'm not sure if it's the way you wanted it to.
 
Last edited:
9
Posts
13
Years
  • Seen May 23, 2011
Are you using Fire Red as a rom base? I'll try to take a closer look later today after work and see if I can get it to work.

EDIT: I tested just the portion of the script you said you were having trouble with. It erased the Pokemon I selected, then gave me a Relicanth, then erased the first Pokemon in my party. It worked, though, I'm not sure if it's the way you wanted it to.
Huh that's odd....and not at all how I wanted it. The script should specifically require a Ratatta and Raticate and then give you a Relicanth....I wonder why it's not working for me even that much....Huh maybe I need a BIOS file? I guess?
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Huh that's odd....and not at all how I wanted it. The script should specifically require a Ratatta and Raticate and then give you a Relicanth....I wonder why it's not working for me even that much....Huh maybe I need a BIOS file? I guess?

I worked on a script that should do what you need it to - you can change the dynamic addresses and dialogue:

Spoiler:


As for the BIOS thing, I'm not sure. Does the data for the erase Pokemon script that you inserted read like this in hex?

Code:
FF B5 00 25 11 4E 0F 4F 3C 78 02 2C 18 DB 33 88
A3 42 15 D2 62 1E 3A 70 01 33 E2 1A 64 25 6A 43 52 08
6B 43 08 4F F8 18 41 1B 0B DF 6C 43 3F 19 7F 1B 00 20
19 22 01 25 01 C7 01 3A 00 2A FB D1 35 82 FF BD 29 40
02 02 84 42 02 02 C0 70 03 02

^ That should be what is inserted at offset 0x800594
 

adamb241

Pokémon Raging Fury
656
Posts
16
Years
I failed to get an answer for this question in the "Simple Questions Thread" so I'll ask it here, it's probably as scripting question anyways.

How would I go about changing/removing the default mother script that occurs after the player "Whites Out"? This script only happens before the player reaches a Pokemon center. Any help would be greatly appreciated!
 

colcolstyles

Yours truly
1,588
Posts
15
Years
I failed to get an answer for this question in the "Simple Questions Thread" so I'll ask it here, it's probably as scripting question anyways.

How would I go about changing/removing the default mother script that occurs after the player "Whites Out"? This script only happens before the player reaches a Pokemon center. Any help would be greatly appreciated!

Assuming you're hacking Fire Red (since there is no automatic mother healing script in R/S/E), the script is at '0x1A8DD8'.
 

adamb241

Pokémon Raging Fury
656
Posts
16
Years
Assuming you're hacking Fire Red (since there is no automatic mother healing script in R/S/E), the script is at '0x1A8DD8'.

Thanks, but is there a way to make the player not warp to his mothers house? In my hack, the mother isn't even in the first town so this kind of defeats the point.
 

stocko

Toast Engineer
37
Posts
13
Years
hey, can you please help me with this problem. I made a pokemart script and it works fine in game until I am leaving. When I say See Ya the text box remains on the screen but the player has been released from the conversation and can therefore move around. I will show you the script and a picture of the text box still there. Also the items do not properly appear. Mostly question marks appear instead of the name.


#org $StartMarket
lock
faceplayer
message $welcome
$welcome 1 = Hey there \v\h01.\n How can I help you today?
boxset 6
pokemart $marketValues
#raw 0x93 0x00 0x00 0x00
#raw 0x93 0x00 0x00
release
end

#org $marketValues
lock
#binary int 0x1 0x168 0x13 0x19 0x44 0x54 0x47 0x5E
#binary int 0xB7 0x15A 0x159 0x165 0x166 0x167 0x0
release
end
 

adamb241

Pokémon Raging Fury
656
Posts
16
Years
I'm confused. What, exactly, are you trying to accomplish?

I'm trying to make it so the player warps to his room, and no text occurs, basically he just wakes up next to his bed. Someone else told me this isn't possible with out hex though, so, I'm going to have to find a way around it.
 

colcolstyles

Yours truly
1,588
Posts
15
Years
I'm trying to make it so the player warps to his room, and no text occurs, basically he just wakes up next to his bed. Someone else told me this isn't possible with out hex though, so, I'm going to have to find a way around it.

Then just remove everything except the "end" command from that script and make the previous first floor into the player's room.
 

Gemini Pika

Sprite Master
27
Posts
16
Years
I've run into a problem involving a yes/no script in Pokemon Gold. Here's what I had (Not what I inserted):

6A 47 4C xx xx 54 4E 09 xx xx 4C xx xx 53 49 90

1225C5(Offset) 00 96 AE B4 AB A3 7F A0 8F 8E 91 98 86 8E 8D E6 57 00

1225D3(Offset) 00 87 A4 B1 A4 7F B8 AE B4 7F A6 AE E7 57 00

1225E2(Offset) 00 85 A8 AD A4 7F B3 A7 A4 AD E8 57 00

All together it was:

6A 47 4C C5 65 54 4E 09 D3 65 4C E2 65 53 49 90 00 96 AE B4 AB A3 7F A0 8F 8E 91 98 86 8E 8D E6 57 00 00 87 A4 B1 A4 7F B8 AE B4 7F A6 AE E7 57 00 00 85 A8 AD A4 7F B3 A7 A4 AD E8 57 00

The result I got was this:

Would aPON?

Yes
No

Yes: Unknown opcode at 8109 error, then a complete freeze up.
No: Fine then.

What I would like to know is how to fix the error and the "Would aPON?" part. Also I know the script is sort of messed up sentence-wise.
 
857
Posts
15
Years
Spoiler:


3 battles in a row, with a wildbattle at the end.
Hidesprite works fine at first, but if I warp in and out of the map, the sprites appear occasionally.(Not the only script I'm having this problem with)
Also, if I lose one of the battles, the event doesn't trigger anymore. I've been out of hacking for a while so I'm not sure if these problems are script related or not.


 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
3 battles in a row, with a wildbattle at the end.
Hidesprite works fine at first, but if I warp in and out of the map, the sprites appear occasionally.(Not the only script I'm having this problem with)
Also, if I lose one of the battles, the event doesn't trigger anymore. I've been out of hacking for a while so I'm not sure if these problems are script related or not.
From the quick look at your script I think nothing is wrong with it...
So... have you put flag 2007 into ID number of Overworld in A-Map?
That will stop sprites from appearing ever again.

And the second problem... well that's something that cannot be avoided... once you beat the first battle, script automaticaly takes that battle as finished and it "deletes" itself. So in other words it cannot continue from where it stopped. It's like normal trainer battles in your ROM. Once you beat trainer he/she won't battle you again immediately.
You can fix it with flags, checkflags and ifs if you are afraid that player might lose.
 

jota_rdk

Spanish hacker [Javi4315]
98
Posts
13
Years
How is used the "loadbytefrompointer" XSE command?
I can not understand the first parameter (memory bank to use).
 
857
Posts
15
Years
From the quick look at your script I think nothing is wrong with it...
So... have you put flag 2007 into ID number of Overworld in A-Map?
That will stop sprites from appearing ever again.

And the second problem... well that's something that cannot be avoided... once you beat the first battle, script automaticaly takes that battle as finished and it "deletes" itself. So in other words it cannot continue from where it stopped. It's like normal trainer battles in your ROM. Once you beat trainer he/she won't battle you again immediately.
You can fix it with flags, checkflags and ifs if you are afraid that player might lose.
Thanks for the quick reply.
Yeah, I have put the flag # into the ID # of the overworld in A-map before posting here. The sprite stays hidden, but if I warp to another map it may or may not reappear.

So I'll need to adjust the script as if the trainer were a Gym Leader, which allows you to rebattle them again after losing?
 
5
Posts
12
Years
My Old Lady script box doesn't activate.

Code:
#org $script
jingle
message $1
$1 1 = Oh! A Visitor!
boxset 6
clearflag 0x1200
showsprite 7
applymovement 7 $walk
$walk 1 ; #binary 0x00 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0xFE
#org $walkcontinued
$walkcontinued 1 ; #binary 0x02 0x02 0x01 0x01 0x01 0x01 0xFE
pausemove 0
applymovement 0xFF $look
$look 1 ; #binary 0x03 0xFE
pausemove 0
message $2
$2 1 = This is So unexpected! \lWhat a nice young man! \lpaying respects to the deceased.
boxset 6
applymovement 7 $walk2
$walk2 1 ; #binary 0x00 0x00 0x00 0x00 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0xFE
$walk2continued 1 ; #binary 0x03 0x03 0x03 0x03 0x03 0x01 0xFE
pausemove 0
removesprite 7
setflag 0x1200
setvar 0x6000 0x0001
release
end

She is supposed to walk away from her front door down the beaten path and up in to her husbands memeorial garden - unfortunately when i step on the script box all she does is stand at her front door and stares off into space blankly not a single twitch. Help?
 

Olli

I am still bathing in a summer's afterglow
2,583
Posts
13
Years
If the character freezes, and nothing in the script triggers, then it might be because you didn't put the variable into the script box.
 
5
Posts
12
Years
If the character freezes, and nothing in the script triggers, then it might be because you didn't put the variable into the script box.


I made sure to do that - twice.
It asks as if the script box doesnt even exist becuase she's standing at her house if i go around the script box and never make contact with it.
If im not mistaken - she is flagged and shouldn't exist until i hit the script box.

EDIT*
ALso i asnt sure if this had to do ith a script or not - but I started fresh due to a bunch of glitches (I kept seeing the exiting building arrow even though i as no here near a warp box or in a building) I have cleared everything off the level it is no script free! but becuase of the ay i built the first ton the player spawns not only in ater but out side of the area i intended to even be reachable - is there a way to change where the player begins or am i going to have to restart...again?
 
Last edited:

colcolstyles

Yours truly
1,588
Posts
15
Years
Code:
#org $script
jingle
message $1
$1 1 = Oh! A Visitor!
boxset 6
clearflag 0x1200
showsprite 7
applymovement 7 $walk
$walk 1 ; #binary 0x00 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0xFE
#org $walkcontinued
$walkcontinued 1 ; #binary 0x02 0x02 0x01 0x01 0x01 0x01 0xFE
pausemove 0
applymovement 0xFF $look
$look 1 ; #binary 0x03 0xFE
pausemove 0
message $2
$2 1 = This is So unexpected! \lWhat a nice young man! \lpaying respects to the deceased.
boxset 6
applymovement 7 $walk2
$walk2 1 ; #binary 0x00 0x00 0x00 0x00 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0xFE
$walk2continued 1 ; #binary 0x03 0x03 0x03 0x03 0x03 0x01 0xFE
pausemove 0
removesprite 7
setflag 0x1200
setvar 0x6000 0x0001
release
end

She is supposed to walk away from her front door down the beaten path and up in to her husbands memeorial garden - unfortunately when i step on the script box all she does is stand at her front door and stares off into space blankly not a single twitch. Help?

I'm not an expert on Pokescript because it's buggy and outdated but maybe you should try something like this:

Spoiler:

I think the way that you formatted your movement data is wrong but I can't say for sure because Pokescript is awful. You should seriously consider switching to XSE. Once you do, you'll regret not switching sooner.
 
Status
Not open for further replies.
Back
Top