• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.
Game: FireRed
Type: BPRE (I think)
Editor: XSE
Script:
Spoiler:
Spoiler:

Spoiler:
Spoiler:
Spoiler:
Spoiler:
Spoiler:
 
Game: FireRed
Type: two Person events
Editor: XSE
Script: I've got two scripts, a character and an itemball. You get your first Pokémon from the itemball. The itemball isn't supposed to disappear after you click on it. I have a flag so that if you click the character or the itemball after clicking the itemball once, they will say different things. The flag works, but if I leave the room and come back in, it seems to be reset: the character will say his first, pre-flag script again, and the itemball will give you a second Pokémon. What am I doing wrong?

The character's script:
Spoiler:


The itemball's script:
Spoiler:


(In addition, I also don't know how to make a script that can give a Pokémon a nickname--which is why I tried to avoid the issue altogether in the dialogue above--because I haven't found any instructions on how to do that in any tutorials so far. I've gone through several looking for just that. So if anyone could just tell me what that bit of script is, I'd be grateful.)

Screenshots and/or Videos: I don't have any, and in any case, I think this is a simple problem. The flag just seemingly removes itself if I leave the room and come back into it.
I'm not totally sure but I wouldn't use flag number 7. It's one of those flags that probably doesn't work. Use the flags from 200: so 201, 202. Then it might work.
 
Game: FireRed
Type: two Person events
Editor: XSE
Script: I've got two scripts, a character and an itemball. You get your first Pokémon from the itemball. The itemball isn't supposed to disappear after you click on it. I have a flag so that if you click the character or the itemball after clicking the itemball once, they will say different things. The flag works, but if I leave the room and come back in, it seems to be reset: the character will say his first, pre-flag script again, and the itemball will give you a second Pokémon. What am I doing wrong?

The character's script:
Spoiler:


The itemball's script:
Spoiler:


(In addition, I also don't know how to make a script that can give a Pokémon a nickname--which is why I tried to avoid the issue altogether in the dialogue above--because I haven't found any instructions on how to do that in any tutorials so far. I've gone through several looking for just that. So if anyone could just tell me what that bit of script is, I'd be grateful.)

Screenshots and/or Videos: I don't have any, and in any case, I think this is a simple problem. The flag just seemingly removes itself if I leave the room and come back into it.
Fixed.

Don't use flag 0x7. Use one that's not being used. And you can find out how to nickname a Pokemon in my tut, located here: https://www.pokecommunity.com/showthread.php?t=164276.
 
I'm not totally sure but I wouldn't use flag number 7. It's one of those flags that probably doesn't work. Use the flags from 200: so 201, 202. Then it might work.

So, there are some flags that just don't work all together? Okay, I'll keep that in mind. Just out of curiosity, does anyone know the reason behind why some flags don't work?

The one thing that still concerns me is that the flag DOES work until I leave the room and come back. Is that normal with flags that "don't work," that it will work temporarily and then stop working?

Anyway, thanks for the suggestion. I'll try changing the flag. In fact, if it's the flag itself that's messed up and not how I'm using the flag, I might just use the Pokémon menu flag, since I have to set 0x828 anyway.
 
So, there are some flags that just don't work all together? Okay, I'll keep that in mind. Just out of curiosity, does anyone know the reason behind why some flags don't work?

The one thing that still concerns me is that the flag DOES work until I leave the room and come back. Is that normal with flags that "don't work," that it will work temporarily and then stop working?

Anyway, thanks for the suggestion. I'll try changing the flag. In fact, if it's the flag itself that's messed up and not how I'm using the flag, I might just use the Pokémon menu flag, since I have to set 0x828 anyway.
Why these flags don't work? I don't know but they always reset after exiting the map. So if something with a flag keeps resetting you'll know you got a wrong one.
 
Don't use flag 0x7. Use one that's not being used. And you can find out how to nickname a Pokemon in my tut, located here: https://www.pokecommunity.com/showthread.php?t=164276.

Ah, thank you! I've been using your tutorial, but somehow managed to miss that section; I guess because when I'm looking for something, I use control-F to find the keyword I need rather than scroll through it. Won't make that mistake again.

Why these flags don't work? I don't know but they always reset after exiting the map. So if something with a flag keeps resetting you'll know you got a wrong one.

Okay, good to know. And that's definitely what's going on with my script. Thanks again!
 
So does anyone know how I can do these things?

1. Here's a sample script (I used XSE, and made this for R/S roms):

Spoiler:


2. Make a script checking the "Elite Four beaten" flag (ask the others about that flag, since I have no idea) and put it in the entrance(s) of the area.
 
Firered scripting

Using XSE i put this script in (modified from a celadon dept store script):
Code:
'---------------
#org 0x71B008
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lock
faceplayer
preparemsg 0x81A6211 '"Hi, there!\nMay I help you?"
waitmsg
pokemart 0x871A7EC
msgbox 0x81A5190 MSG_KEEPOPEN '"Please come again!"
release
end

'---------------
#org 0x1A7AE0
release
end


'---------
' Strings
'---------
#org 0x1A6211
= Hi, there!\nMay I help you?

#org 0x1A5190
= Please come again!


'-----------
' MartItems
'-----------
#org 0x71A7EC
#raw word 0xB6
#raw word 0xC5
#raw word 0x165
#raw word 0x166
#raw word 0x162
#raw word 0x12D
#raw word 0x139
#raw word 0x143
#raw word 0x0
to change the items at a pokemart. I did this with two pokemarts and the first one worked fine but then this one did this:
[PokeCommunity.com] Script Help Thread (DO NOT REQUEST SCRIPTS)


My problem should be clear:text off screen item names screwing up; also kinda weird that Ice Beam doesnt screw up.

How do I hide content?
 
My problem should be clear:text off screen item names screwing up; also kinda weird that Ice Beam doesnt screw up.

This happens because the game has two ways to treat items in pokemarts: one for showing the picture on regular items, and one for displaying TMs, that shows their number and attack.

The pokemart command gives analizes the data and, if a TM is present, treats all items a TMs. But because normal items don't have TM number or attack, the glitched response appears.

the pokemart2 command, however, always presents pictures, so if really necessary to have both normal items and TMs in the same display, use it instead.
 
Game: FireRed (U)
Type: basic talking script
Editor: Pokescript Version 1.00
Script:
Spoiler:

Screenshots and/or Videos:

I've put the offset ($800000) to a new created person in Advance Map, however, when I talk to the person who I assigned the script too just say nothing (dialogue box appears but no words). What did I did wron
g? Please help me.
 
Game: FireRed (U)
Type: basic talking script
Editor: Pokescript Version 1.00
Script:
Spoiler:

Screenshots and/or Videos:

I've put the offset ($800000) to a new created person in Advance Map, however, when I talk to the person who I assigned the script too just say nothing (dialogue box appears but no words). What did I did wron
g? Please help me.
I don't use pokescript, but i think the "1" is wrong... i corrected your script
 
Game: FireRed (U)
Type: basic talking script
Editor: Pokescript Version 1.00
Script:
Spoiler:

Screenshots and/or Videos:

I've put the offset ($800000) to a new created person in Advance Map, however, when I talk to the person who I assigned the script too just say nothing (dialogue box appears but no words). What did I did wron
g? Please help me.
You accidentally put messages instead of message.
 
Last edited:
Hey all. This is my first script using the writebytooffset command. It's for pokemon Ruby.
The problem with my script is: It won't write the byte to the offset. What I'm trying to do is change the main player's OW, and I'm using writebytetooffset to change the pointer to the sprite graphics of the player's OW to another pointer to different sprite graphics.

Here is the script


Spoiler:



 
Ok Darthatron or Seth-Kun could not really help on this and I have tried every setting on AMap. Whats wrong with this level script? I think its a type 5.

Code:
'---------------
#org 0x7300ED
lock
checkflag 0x828
if 0x1 goto 0x8730136
applymovement MOVE_PLAYER 0x8730139
waitmovement 0x0
msgbox 0x873013D MSG_NORMAL '"[player]: You scared me there!\nKe..."
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
msgbox 0x87301AA MSG_NORMAL '"[player] received a Charmander. \n..."
applymovement 0x3 0x87301E2
waitmovement 0x0
hidesprite 0x3
setflag 0x828
setflag 0x829
Setvar 0x4033 0x1
release
end

'---------------
#org 0x730136
releaseall
end


'---------
' Strings
'---------
#org 0x73013D
= [player]: You scared me there!\nKetchum: Sorry 'bout that but your\lmom told me to surprise you with\la few things!

#org 0x7301AA
= [player] received a Charmander. \nPLayer received a Pokedex.


'-----------
' Movements
'-----------
#org 0x730139
#raw 0x63 'Question Mark (?)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org 0x7301E2
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
 
Last edited:
Hey all. This is my first script using the writebytooffset command. It's for pokemon Ruby.
The problem with my script is: It won't write the byte to the offset. What I'm trying to do is change the main player's OW, and I'm using writebytetooffset to change the pointer to the sprite graphics of the player's OW to another pointer to different sprite graphics.

Here is the script


Spoiler:




You switched the writebytetooffset paramaters.
 
Ok Darthatron or Seth-Kun could not really help on this and I have tried every setting on AMap. Whats wrong with this level script? I think its a type 5.

Code:
'---------------
#org 0x7300ED
lockall
checkflag 0x828
applymovement MOVE_PLAYER 0x8730139
waitmovement 0x0
msgbox 0x73013D MSG_NORMAL '"[player]: You scared me there!\nKe..."
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
msgbox 0x7301AA MSG_NORMAL '"[player] received a Charmander. \n..."
applymovement 0x3 0x87301E2
waitmovement 0x0
hidesprite 0x03
setflag 0x828
setflag 0x829
Setvar 0x4033 0x1
releaseall
end
 
'---------
' Strings
'---------
#org 0x73013D
= [player]: You scared me there!\nKetchum: Sorry 'bout that but your\lmom told me to surprise you with\la few things!
 
#org 0x7301AA
= [player] received a Charmander. \nPLayer received a Pokedex.
 
 
'-----------
' Movements
'-----------
#org 0x730139
#raw 0x63 'Question Mark (?)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements
 
#org 0x7301E2
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements


Woah how does this mess up.. Ok try this.
 
This happens because the game has two ways to treat items in pokemarts: one for showing the picture on regular items, and one for displaying TMs, that shows their number and attack.

The pokemart command gives analizes the data and, if a TM is present, treats all items a TMs. But because normal items don't have TM number or attack, the glitched response appears.

the pokemart2 command, however, always presents pictures, so if really necessary to have both normal items and TMs in the same display, use it instead.


thanks that worked. Is there a limit to the amount of items I can have in a pokemart through scripting. Like can I have one shop person sell all the tms?
 
Hey all. This is my first script using the writebytooffset command. It's for pokemon Ruby.
The problem with my script is: It won't write the byte to the offset. What I'm trying to do is change the main player's OW, and I'm using writebytetooffset to change the pointer to the sprite graphics of the player's OW to another pointer to different sprite graphics.

Here is the script


Spoiler:




You went wrong with offsets... 003718F0 is the BIOS code, and it's Read only... pheraps you wanted to write 023718F0? (the ram (Wram) address)? If you wanted to write ROM's bytes, you cannot do it... Rom (like the name say) is Read-Only-Memory
 
You went wrong with offsets... 003718F0 is the BIOS code, and it's Read only... pheraps you wanted to write 023718F0? (the ram (Wram) address)? If you wanted to write ROM's bytes, you cannot do it... Rom (like the name say) is Read-Only-Memory

I wanted to write over the Player OW's offset in the Ram, yes. I took the offset from a hex editor because I assumed that would work. Guess not. Do you know the offset in the memory viewer that points to the main player's OW?
 
Status
Not open for further replies.
Back
Top