• 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.
24
Posts
15
Years
  • Seen Mar 2, 2013
Why the hell isnt this working :P

Its for when you come downstairs from your bedroom and your friend rushes over and then afterwards your mother talks to you. But all that is happenning is the friend walks two or 3 steps and dissapears then when you walk it plays another bit of the script. Then nothing.

'-----------------------
#org 0x80040B
applymovement 0x1 0x880047D
waitmovement 0x0
applymovement 0x1 0x8800480
waitmovement 0x0
applymovement 0x1 0x8800485
msgbox 0x880048B '"IT'S ABOUT TIME!\pI've been waiting..."
applymovement 0x1 0x8800562
hidesprite 0x1
pause 0x20
applymovement 0x2 0x8800570
waitmovement 0x0
msgbox 0x8800578 '"I'm sorry about that honey.\pYou kn..."
applymovement 0x2 0x880061F
pause 0x20
msgbox 0x8800622 '"I sure will miss you..."
pause 0x20
applymovement 0x2 0x880063B
msgbox 0x880063F '"Well, I guess this is goodbye for\n..."
waitmovement 0x0
applymovement 0x2 0x8800718
pause 0x20
setvar 0x4033 0x1
end

'-----------
' Movements
'-----------
#org 0x80047D
#raw 62 'Exclamation Mark (!)
#raw FE 'End of Movements
#org 0x800480
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 20 'Step Right (Fast)
#raw FE 'End of Movements
#org 0x800485
#raw 55 'Jump in Place (Facing Right)
#raw 55 'Jump in Place (Facing Right)
#raw 55 'Jump in Place (Facing Right)
#raw 55 'Jump in Place (Facing Right)
#raw FE 'End of Movements
#org 0x800562
#raw 1D 'Step Down (Fast)
#raw 1D 'Step Down (Fast)
#raw 1D 'Step Down (Fast)
#raw 1D 'Step Down (Fast)
#raw 1F 'Step Left (Fast)
#raw 1F 'Step Left (Fast)
#raw 1D 'Step Down (Fast)
#raw 1F 'Step Left (Fast)
#raw 1F 'Step Left (Fast)
#raw 1D 'Step Down (Fast)
#raw 1F 'Step Left (Fast)
#raw 1D 'Step Down (Fast)
#raw FE 'End of Movements
#org 0x800570
#raw D 'Step Up (Slow)
#raw D 'Step Up (Slow)
#raw F 'Step Right (Slow)
#raw F 'Step Right (Slow)
#raw F 'Step Right (Slow)
#raw F 'Step Right (Slow)
#raw FE 'End of Movements
#org 0x80061F
#raw 0 'Face Down
#raw FE 'End of Movements
#org 0x80063B
#raw 62 'Exclamation Mark (!)
#raw 3 'Face Right
#raw FE 'End of Movements
#org 0x800718
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 3 'Face Right
#raw FE 'End of Movements

'---------
' Strings
'---------
#org 0x80048B
= IT'S ABOUT TIME!\pI've been waiting here all morning!\pToday is the day we graduate from\nPOKÈMON ACADEMY.\pToday is the day we finally can\nbegin our journey!\pSo hurry up and say your goodbyes!\pCatch you later!
#org 0x800578
= I'm sorry about that honey.\pYou know how Eloisa can be.\pThe two of you are always pushing\neach other and now to think you are\lleaving on your very own journey...
#org 0x800622
= I sure will miss you...
#org 0x80063F
= Well, I guess this is goodbye for\nnow.\pDon't forget to visit so I can see\nhow well you are doing.\pThe POKÈMON ACADEMY is located in\nthe south part of the village...\pBut of course you know that!\pBye now honey!
 
Last edited:
49
Posts
14
Years
  • Seen Sep 10, 2011
Some possible changes in bold. You can't really "return" from an 0x1 trainerbattle. You don't really need the checkflag or the setflag (if it's only for the checkflag) because once you set variable 0x5500 to 0x1, the script won't activate again.



The gist of how it works is this:

variable 0x405A is the map you want the player to appear at when he faints. The bank # and the map # are reversed, and you must change it to hex. So, if you want the player to heal at map 4.0, you would write:

setvar 0x405A 0x0004

Make sense?

Second, variable 405B and 405C determine your X-Y position on the map. 405B is X and 405C is Y. So if you want the player to revive at position 0x7 0x4, you would write:

setvar 0x405B 0x7
setvar 0x405C 0X4

Lastly, use the sethealingplace command. If I remember correctly, sethealingplace 0x1 will display the mother's message, and anything else will display the Pokemon Center message, along with the balls in the healing machine animation, I think. However, setting it to 0x0 never works for me, so I always set it to 0x1 for the mother message and 0x2 for the Pokemon Center message.

In Fire Red, the sethealingplace for the mom is set in the header of the player's room when the game first starts. If you want the mother to be the first place to heal you, you should do the same.


Thanks man, you deffinatly helped clear up some things. Now I add this to moms script right? So far I did, and for some reason when I added it its changing my script around. I had a small movement script in it and once I added the healingplace, it removes my movement and when I talk to mom it freezes where the movement should take place. The movement is to just face where she was before I talked to her, so its not like its some long movement. I've decompiled and added, I've #remove(d) all the offsets and rerwote it, and it still does it. Any idea of why it does this?
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Thanks man, you deffinatly helped clear up some things. Now I add this to moms script right? So far I did, and for some reason when I added it its changing my script around. I had a small movement script in it and once I added the healingplace, it removes my movement and when I talk to mom it freezes where the movement should take place. The movement is to just face where she was before I talked to her, so its not like its some long movement. I've decompiled and added, I've #remove(d) all the offsets and rerwote it, and it still does it. Any idea of why it does this?

You can add it to the mom sprite, but be aware that the game puts it in the header. Basically, the sethealingplace commands are in the headers of Pokemon Centers. For the mom, it's in the header of the player's room, when you first start the game. You can look at a clean Fire Red Rom to see what I mean. Of course, if you want it to be in the mom script, you can do that, but that means you will only set the healing location for the mother in the event that you talk to the mother, which could cause some problems if the player chooses not to talk to her.

That being said, you've probably run out of room at that particular offset. Just put #dynamic 0x800000 at the start of the script, and have the script start with something like #org @start, like this:

Code:
#dynamic 0x800000

#org @start
setvar (etc. etc.)
msgbox (etc.)
applymovement (etc.)
waitmovement (etc.)
release
end

^ Something like that. Compile and copy the offset and use that.
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
So I just tested it. I can't really tell if the movements for the other sprites work properly. I also see that you didn't put waitmovement 0x0 after most of the applymovement commands. Add those to make the movements that aren't working work.

That being said, the script released fine for me at the end. Did you make sure to fix the Map Script Offset in the Professional Header of A-Map? That would definitely cause some problems if you didn't.

http://www.pokecommunity.com/showthread.php?t=191500


Thanks for the link it solved my problem. I didn't know about AM changing the 0x0 to 0xFFFF.
 
49
Posts
14
Years
  • Seen Sep 10, 2011
You can add it to the mom sprite, but be aware that the game puts it in the header. Basically, the sethealingplace commands are in the headers of Pokemon Centers. For the mom, it's in the header of the player's room, when you first start the game. You can look at a clean Fire Red Rom to see what I mean. Of course, if you want it to be in the mom script, you can do that, but that means you will only set the healing location for the mother in the event that you talk to the mother, which could cause some problems if the player chooses not to talk to her.

That being said, you've probably run out of room at that particular offset. Just put #dynamic 0x800000 at the start of the script, and have the script start with something like #org @start, like this:

Code:
#dynamic 0x800000
 
#org @start
setvar (etc. etc.)
msgbox (etc.)
applymovement (etc.)
waitmovement (etc.)
release
end

^ Something like that. Compile and copy the offset and use that.


I'm trying to make it so you have to talk to her, so that shouldn't be a problem. So If I didn't set it to mom where would I put it? I don't see it at all in a clean rom, probably since I'ma noob, lol.

EDIT: Ok... Getting fustrated... It's still not working, I still keep getting sent to celedon dept when I white out...

Here it is.

Spoiler:


Looks the same after compiled except setvar 450A 0x0004 is compiled to setvar 450A 0x4, and offsets are set instead of @m2, ect.
 
Last edited:

KotovSyndrome_

Consumer of many asparagus.
57
Posts
15
Years
For some reason, this script doesn't seem to be activating the Running Shoes.. :/

Could someone please help?
I'm using XSE on FR.
thanks in advance.
Spoiler:
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Why did you change the trainerbattle from 0x1 to 0x0? If I'm not mistaken, any trainerbattle but 0x1 will cut off the script when the battle's over. Anything in the script after the trainerbattle is then taken as what is said when you talk to the person after the battle is over.

I'll just write again what I think should work in the spoilers.
Just for the record, I believe 0x4 (double battle) continues, or at least, has a third pointer.
@Kotov, There are several problems in your script, though I'm not sure if any of them impact the setflag, but you may as well fix them and try it. Put a lockall at the beginning (releaseall at the end, of course), and change all of your msgbox's to 0x6 instead of 0x2. Also, you may want to consider doing away with flag 0x1253, and just using 0x82F, since the script is using that flag anyway. It'll simplify things.

@1-up, this is probably unrelated to your main problem, but I notice that you have the following sequence in your script:
Spoiler:

I'm pretty sure you need a seperate "goto" for flag 0x828, as follows:
Spoiler:

As it is, the goto only applies to your second checkflag.
 
Last edited:

KotovSyndrome_

Consumer of many asparagus.
57
Posts
15
Years
Thanks :D
I'll try it now...

EDIT: Uhh.. Did it all, and still no luck :/

The only thing I didn't do was get rid of that other setflag because another script relies on it being active.

EDIT2: Ok, I made a seperate checkflag script, and the mom script DOES activate the 0x82F flag..
Soo.. Could there be something not right in AdvanceMap or something? :S

 
Last edited:

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Try inserting the script on a clean ROM and see if it works. It may be your ROM is just messed up.
 

KotovSyndrome_

Consumer of many asparagus.
57
Posts
15
Years
Uhh ok I'll try that sometime ><
...Another script I need help with XD
it's in FR again on XSE
Whether you pick yes or no, the guy just keeps 'looping' when he's asking you which egg you want.
Help ><
Spoiler:

 
Last edited:

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I'm trying to make it so you have to talk to her, so that shouldn't be a problem. So If I didn't set it to mom where would I put it? I don't see it at all in a clean rom, probably since I'ma noob, lol.

EDIT: Ok... Getting fustrated... It's still not working, I still keep getting sent to celedon dept when I white out...

Here it is.

Spoiler:


Looks the same after compiled except setvar 450A 0x0004 is compiled to setvar 450A 0x4, and offsets are set instead of @m2, ect.

Are you sure JPAN's Hacked Engine has been patched to your rom? All of the original scripts in the game are wiped clean, right? Otherwise, I don't see why it wouldn't work.

And as I said before, the game puts the sethealingplace command in the Header, which is nowhere in the map itself. The Header is for scripts that activate when you enter the map, not for tile scripts.
 

Teh Newbeh

Yellow Gold™
29
Posts
13
Years
  • Seen Oct 27, 2023
Uhh ok I'll try that sometime ><
...Another script I need help with XD
it's in FR again on XSE
Whether you pick yes or no, the guy just keeps 'looping' when he's asking you which egg you want.
Help ><
Spoiler:

Hmm, well is this a person script or a green tile and does the person dissapear afterwards?
 

pkmntrainerpaul

New account: P-Sign
440
Posts
15
Years
Can someone fix this script?
I'll really appreciate it.

Game: Fire Red
Type: Green "S" Tile Script
Editor: XSE
Script:
Spoiler:
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Uhh ok I'll try that sometime ><
...Another script I need help with XD
it's in FR again on XSE
Whether you pick yes or no, the guy just keeps 'looping' when he's asking you which egg you want.
Help ><
Spoiler:

Okay, so this one needs a lot of work... changes in bold.
 

Chad -

 
687
Posts
14
Years
  • Seen Aug 27, 2012
@pkmntrainerpaul,

First, you need a waitmovement 0x0 command after each applymovement used. What waitmovement means is a perfect pause.

And what's with the 0x0 parameter in the applymovement? The command needs the person event number after the applymovement:

Code:
applymovement 0x[person event number] @pointer
[B]waitmovement 0x0[/B]
The person event number is in Advance Map. (Note the waitmovement 0x0 command)

Second, it being a green script tile, did you set the Unknown to 0003 and Var Number t0 5040 or 4050 in Advance Map?
 

pkmntrainerpaul

New account: P-Sign
440
Posts
15
Years
@pkmntrainerpaul,

First, you need a waitmovement 0x0 command after each applymovement used. What waitmovement means is a perfect pause.

And what's with the 0x0 parameter in the applymovement? The command needs the person event number after the applymovement:

Code:
applymovement 0x[person event number] @pointer
[B]waitmovement 0x0[/B]
The person event number is in Advance Map. (Note the waitmovement 0x0 command)

Second, it being a green script tile, did you set the Unknown to 0003 and Var Number t0 5040 or 4050 in Advance Map?

Thank you, but I'm still having a problem:
When I step on the tile in-game, nothing happens.
Could that have something to do with the flag?
 

Chad -

 
687
Posts
14
Years
  • Seen Aug 27, 2012
See this part:

Code:
checkflag 0x1000
if 0x0 goto 0x88001DE

Replace if 0x0 with if 0x1. That's it. Tell me if it works xD
 
Status
Not open for further replies.
Back
Top