• 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.

Pokepal17

More cowbell~
1,519
Posts
15
Years
Spoiler:


still need help

If you upgrade to XSE, this would be the fixed script:

#org @start
lock
message @hey 0x6
applymovement 0xFF @move
waitmovement 0x0
message @end 0x6
applymovement 0xFF @out
waitmovement 0x0
release
end

#org @hey
= Hey Kid! Hold your horses!

#org @move
#raw 0x02 0xFE

#org @end
= Sorry, but this is the end of the\ndemo, check the Pokemon\pCommunity thread for future\nupdates.

#org @out
#raw 0x01 0x0D 0x0D 0xFE
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
I've learned alot since I last posted here... I'm still using Pokescript and will continue to, so hopefully someone can help me with it.
I'm attempting to recreate in Fire Red Oak's scripts, starting with him walking up to you at the grass then leading you into the lab. Here is my script;

Spoiler:


What I did was recreate what happens in the script, except change his path, your path and the text. What happens though, is Oak says 'HOLD UP!' and then the movement does not proceed, the next text proceeds. Then, after the text, the player is forced to move into the door of the lab(which is also where the warp is) however nothing happens and the script ends. Hope someone can help, thanks.
-Jarcon
Wow, pokescript scripts look soooo unorganized nowadays, but anyways, your problem is not the script. Well, for the warping part, it is. Your problem lies in the overworld placement. It should be 1 tile down from where the screen ends in VBA.
_____________________________________
| Visual Boy advance 97% | - | ¤ | X |
| -----------------------------------------|
| -----------------------------------------|
| -----------------------------------------|
| ----------------HIRO-------------------|
| -----------------------------------------|
| -----------------------------------------|
| -----------------------------------------|
| -----------------------------------------| <-End of screen
|____________________________________| <- Put owerworld somewhere down here

And your Owerworld should be one tile down from the end of the VBA display screen if you understand what I'm trying to say..
 
1,501
Posts
18
Years
Hey guys. I'm working in XSE on fire red, and looking at the following offsets:
0x169BAB
0x169D78
0x169DAE

They're all scripts on professor oak's three pokeballs.

I'll break them down to what I dont understand

Spoiler:

Spoiler:

Spoiler:


I dont understand all those setvars and what effect they have on choosing the pokemon.

here is the rest of the script (its the same in all of them)

Spoiler:


Also, please tell me if I can PM you for further questions (incase you dont like random pms) as I'm completely new to Scripting and I will be asking for a lot of help.
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Well instead of having a separate script for each pokéball (which is unnecessary given how similar each script would be), the makers of the game decided to save space by reusing the same "main" script for each pokéball but use variables for the parts which differed for each pokéball. For example, instead of having three different 'givepokemon' commands, they used one 'givepokemon' but set the parameter which defines which pokémon the player is to recieve to be a variable (0x4002 to be exact). This way, the pokémon that the player receives will be the pokémon that corresponds to the value stored in 0x4002. Same thing for the commands like 'bufferpokemon' and 'showpokepic'.
Each pokéball has a script which sets those variables and then a 'goto' which points to the main script.
 
1,501
Posts
18
Years
Well instead of having a separate script for each pokéball (which is unnecessary given how similar each script would be), the makers of the game decided to save space by reusing the same "main" script for each pokéball but use variables for the parts which differed for each pokéball. For example, instead of having three different 'givepokemon' commands, they used one 'givepokemon' but set the parameter which defines which pokémon the player is to recieve to be a variable (0x4002 to be exact). This way, the pokémon that the player receives will be the pokémon that corresponds to the value stored in 0x4002. Same thing for the commands like 'bufferpokemon' and 'showpokepic'.
Each pokéball has a script which sets those variables and then a 'goto' which points to the main script.

Hmmm... Okay...

Spoiler:

I cant get the pokeball to hide by using hidesprite.

I tested hidesprite LASTTALKED aswell.
 
Last edited:

Q-Bone

Musician and Pixel Artist
243
Posts
15
Years
Hmmm... Okay...

Spoiler:

I cant get the pokeball to hide by using hidesprite.

I tested hidesprite LASTTALKED aswell.

After 'hidesprite' you need to use 'setflag', and the Sprite you want to hide has to have it's 'Person ID' the same number as the 'Flag'.
 

Tropical Sunlight

The Faltine
3,476
Posts
16
Years
I was just wandering, why won't this script work?
Spoiler:
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
I was just wandering, why won't this script work?
Spoiler:
May I ask what's wrong with it? And why you chose the offset you did?
I understand you're trying to make another field move though.
 

Tropical Sunlight

The Faltine
3,476
Posts
16
Years
May I ask what's wrong with it? And why you chose the offset you did?
I understand you're trying to make another field move though.
Nah, forget it.
I figured it out.

It was the offset.
I don't know why I chose it.
Also, why do I need to insert x and y positions if I have the warp chosen...?
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
Nah, forget it.
I figured it out.

It was the offset.
I don't know why I chose it.
Also, why do I need to insert x and y positions if I have the warp chosen...?
Well the things is.. you don't :)

You can do it two ways:
Warp 0x(bank) 0x(map) 0x(warp #) 0xFF 0xFF
or
Warp 0x(bank) 0x(map) 0xFF 0x(X) 0x(Y)

If you chose the warp # instead of X/Y, then you should replace them with 0xFF, as shown above.

If you choose the X/Y, replace the warp # with 0xFF. It's just how the command was made ;)
 
27
Posts
14
Years
  • Seen May 3, 2010
How do I stop item balls respawning when I move? When I put an item ball where there wasn't one it respawns when I take one step. Is there a way to fix this? I'm testing Emerald and I've seen non-Emerald hacks with this problem too.
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
How do I stop item balls respawning when I move? When I put an item ball where there wasn't one it respawns when I take one step. Is there a way to fix this? I'm testing Emerald and I've seen non-Emerald hacks with this problem too.

Give it an ID doce of an unused flag.
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Is there a script that finds the number of badges?
Well, it's possible but you would have to check each badge sequentially until one returned false. There isn't a nice easy special which returns the number of badges that the player has acquired; you'll have to check each one individually.

By the way, the badges (which are activated using a flag) for each version can be found in XSE's 'std.rbh' header file.
 
6
Posts
14
Years
  • Seen Jan 3, 2010
I'm having problems getting an official battle script to work right, here is the script I have.

#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Help would be appreciated :D
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
I'm having problems getting an official battle script to work right, here is the script I have.

#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Help would be appreciated :D

What's the problem? Next time please tell us what's wrong, we're not psychic and if we don't know what's wrong we won't know how to fix it.
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Well, it's possible but you would have to check each badge sequentially until one returned false. There isn't a nice easy special which returns the number of badges that the player has acquired; you'll have to check each one individually.

By the way, the badges (which are activated using a flag) for each version can be found in XSE's 'std.rbh' header file.

There's better way. You check each badge flag. For each check, if the flag is enabled, you call a little sub-script that increment a defined variable. At the end, you'll get the number of badges. Below there's an example, assuming you're using FR/LG, if not just change the flags accordingly. The number of badges will be put into var 0x8000.

Spoiler:
 
6
Posts
14
Years
  • Seen Jan 3, 2010
#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Well as you can probably tell, that is the "official battle" script example from the guide provided with xse. Well, I compile the script and copy the offset to the correct elite four member using advance map.

But when I talk to him he just says the #org @msg2 text and doesn't initiate battle or anything.

What am I doing wrong?

EDIT: "The script i compiled and used had the correct trainer id :P just thought i'd make that clear."
 
Last edited:

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Well as you can probably tell, that is the "official battle" script example from the guide provided with xse. Well, I compile the script and copy the offset to the correct elite four member using advance map.

But when I talk to him he just says the #org @msg2 text and doesn't initiate battle or anything.

What am I doing wrong?

EDIT: "The script i compiled and used had the correct trainer id :P just thought i'd make that clear."

Has the trainer already been fought?
If so, there trainer flag is activated and you need to clear it.
 
6
Posts
14
Years
  • Seen Jan 3, 2010
The trainer is an elite four member.

I've already beaten the elite four of course. Would I still have to do something with the trainer flag?
 
Status
Not open for further replies.
Back
Top