• 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.
69
Posts
11
Years
  • Seen Nov 17, 2013
I fixed that and it still doesn't release.
Code:
#dyn 0x740000
#org @start
lockall
msgbox @Hey
callstd MSG_NOCLOSE
applymovement PLAYER @FirstM
pauseevent 0x1
closemsg
message @MeijiCapture //Edit
callstd MSG_NOCLOSE
pause 0x1
closemsg
addpokemon PIKACHU 0x5 LEFTOVERS 0 0 0
fanfare 0x101
waitfanfare
fadedefault
trainerbattle 0x1 0x001 0x0 @intro @defeat @continue
end 

#org @Hey
= What's going on over there?

#org @MeijiCapture
= Proffessor you're under arrest.

#org @intro
= I'll finish you!

#org @defeat
= What? Impossible!

#org @FirstM
m walk_down walk_down walk_down walk_left walk_left walk_left walk_up walk_up walk_up walk_up walk_left look_up end

#org @continue
msgbox @afterwards
callstd msg_normal
fadescreen FADEOUT_BLACK
disappear 0x3
applymovement 0x2 @DefeatGrunt1
applymovement PLAYER @DefeatGrunt2
fadescreen FADEIN_BLACK
msgbox @GruntDefeated //Edit
callstd msg_normal
fadescreen FADEOUT_BLACK
disappear 0x1
disappear 0x2
fadescreen FADEIN_BLACK
addvar 0x4011 0x1
releaseall
end 

#org @afterwards
= Beaten! By a child!?\nI guess I should be going\pnow! Pidgey use fly.

#org @GruntDefeated
= Now I should tell you what to do.

#org @DefeatGrunt1
m look_right end

#org @DefeatGrunt2
m look_right end
 

Rezordaxx

Asks many questions!
290
Posts
10
Years
I fixed that and it still doesn't release.
Code:
#dyn 0x740000
#org @start
lockall
msgbox @Hey
callstd MSG_NOCLOSE
applymovement PLAYER @FirstM
pauseevent 0x1
closemsg
message @MeijiCapture //Edit
callstd MSG_NOCLOSE
pause 0x1
closemsg
addpokemon PIKACHU 0x5 LEFTOVERS 0 0 0
fanfare 0x101
waitfanfare
fadedefault
trainerbattle 0x1 0x001 0x0 @intro @defeat @continue
end 

#org @Hey
= What's going on over there?

#org @MeijiCapture
= Proffessor you're under arrest.

#org @intro
= I'll finish you!

#org @defeat
= What? Impossible!

#org @FirstM
m walk_down walk_down walk_down walk_left walk_left walk_left walk_up walk_up walk_up walk_up walk_left look_up end

#org @continue
msgbox @afterwards
callstd msg_normal
fadescreen FADEOUT_BLACK
disappear 0x3
applymovement 0x2 @DefeatGrunt1
applymovement PLAYER @DefeatGrunt2
fadescreen FADEIN_BLACK
msgbox @GruntDefeated //Edit
callstd msg_normal
fadescreen FADEOUT_BLACK
disappear 0x1
disappear 0x2
fadescreen FADEIN_BLACK
addvar 0x4011 0x1
releaseall
end 

#org @afterwards
= Beaten! By a child!?\nI guess I should be going\pnow! Pidgey use fly.

#org @GruntDefeated
= Now I should tell you what to do.

#org @DefeatGrunt1
m look_right end

#org @DefeatGrunt2
m look_right end

Try to use a dynamic after 800000 scripts often dont work that well with a dynamic below 800000.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
FR - 720000
Em - E70000
Ru - 6D0000

You guys should write this down. I may be wrong with emerald, but it DOES use FF bytes, not 00

Stop worrying about this guys. Just use FSF set to search for 1000 bytes. Then it will find a good start offset. Also, for scripting, just use a #Dynamic anywhere, XSE will find room. I even once, just to see what would happen, did #Dynamic 0x000000 and managed not to break anything. It isn't a good idea, but it shows that the start offset for dynamic scripting is merely a start offset, so that nothing is compiled before it, which is useful for grouping your scripts away from image data and such. (due to laziness with NSE 2.X image insertion, all of my scripts for DC are at 0xB00000, because NSE defaults to 0x800000.)
 
947
Posts
11
Years
I see Special 0x187 used sometimes before setting a pokemart, it apparently puts some result in the var 0x800D, does anyone know what does that Special do exactly?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
It's an error checker of some kind, and when it returns 2, it ends. There's a thread here:
http://www.pokecommunity.com/showthread.php?t=184273

Yeah, I think it is essentially a try block. I have never used it once, so don't worry about it. The chance that it will be necessary is close to never, and all it will do is prevent the script from running, which is stupid in it's own right: if there is an error to deal with at that point, then the script not running will look like an error in itself, and will only serve to confuse you more.
 
2
Posts
10
Years
  • Age 36
  • Seen Sep 28, 2013
I am trying to make a signpost, which should be an extremely simple script, but its not working O.o
When I press A on the sign, nothing happens.

Code:
#org 0x1658A2
msgbox 0x81658AA '"[player]'s house"
end

#org 0x1658AA
= [player]'s house

Any idea what I'm doing wrong?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I am trying to make a signpost, which should be an extremely simple script, but its not working O.o
When I press A on the sign, nothing happens.

Code:
#org 0x1658A2
msgbox 0x81658AA '"[player]'s house"
end

#org 0x1658AA
= [player]'s house

Any idea what I'm doing wrong?

Make sure your signpost tile has these values on Advance Map.
lz3sw.jpg
 
8
Posts
10
Years
  • Age 29
  • Seen Oct 13, 2016
Ok, so, I wondered if you could help me with this. It is a script I made to give the starter Pokemon to the players, but after "showpokepic", it releases the player with the pic and message still open.

I use:
Scripting and compiling: XSE
I edit:
Fire Red.

Spoiler:


Can anyone help?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Ok, so, I wondered if you could help me with this. It is a script I made to give the starter Pokemon to the players, but after "showpokepic", it releases the player with the pic and message still open.

I use:
Scripting and compiling: XSE
I edit:
Fire Red.

Spoiler:


Can anyone help?

Code:
message @gotpoke 0x0
...There is no message type number zero (0)...
That is probably the one causing the problem.
 
8
Posts
10
Years
  • Age 29
  • Seen Oct 13, 2016
I can not believe I didn't see that... I probably left them as fillers when I was doing the "sketch". I changed them all to 0x6. That fixes the problem with the pic and text, but now it just stops after the fanfare and @gotpoke message. Any idea why? I'm sorry if I cause too much trouble :/
Oh, and also, which number plays the sound that happens when an "!" and an "'?" comes up? Thanks in advance.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I am trying to make a signpost, which should be an extremely simple script, but its not working O.o
When I press A on the sign, nothing happens.

Code:
#org 0x1658A2
msgbox 0x81658AA '"[player]'s house"
end

#org 0x1658AA
= [player]'s house

Any idea what I'm doing wrong?

You seem to be missing the message type after the pointer to the "[player]'s house" text. Since you were able to compile it at all makes me believe that you are using an outdated version of XSE (here's a link to the latest release). Try rewriting your script in that as well as adding the message type, hopefully that will work.

Oh, and also, which number plays the sound that happens when an "!" and an "'?" comes up? Thanks in advance.

That would be 'sound 0x15'. I'm not sure why your script is stopping again though.
 
30
Posts
10
Years
  • Age 33
  • Seen Sep 12, 2015
Evening people :] I have encountered an issue with my Emerald ROM hacking project. Basically, whenever I go upstairs in the house you start in, or in your Rival's house, the player sprite and music changes to surfing!

I have not done much, I downloaded a hacked "Hard Edition" patch that I applied (to my Emerald game), and then I added 5 sprites that each gives me a pokemon. I also added some grass with some random legendary pokemon just for show-off (everyone does this the first time, right?). All of this is happening in Littleroot Town, I just expanded the map a bit to add my stuff.

When I added these sprites, I used these stages:
- I first added all the sprite people to give me the Pokemon, and gave them an unique Person ID (Starting from 1250++), using AdvanceMap.
- I then used FreeSpaceFinder, copied the thing I got from there, opened PKSV UI (poke script) and used the numbers in the Dynamic at the top (Im not 100% sure about whats actually happening at this stage, now that I think of it).
- I then used the built-in give Pokemon script in PKSV UI, compiled and copied the Offset that PKSV UI created for me, over to the Script Offset in AdvanceMap for the right Sprite.
... And that is mostly it.

Does anyone have any clue what can have happened? This was not an issue before I "used my magic" on the ROM.. And Im just as intrested in an explanation to how/why this is happening as I am in a fix :)

Thanks!
 
2
Posts
10
Years
  • Age 36
  • Seen Sep 28, 2013
I'm now having a problem with compiling. I'm trying to set the flag for the person so that it stays hidden, so i put
Code:
setflag 0x200
return
It compiles fine, but when I re-open the code (or de-compile) it changes the above code to the red code below:
Code:
'---------------
#org 0x2DD289
lock
faceplayer
msgbox 0x82DD2C0 MSG_NORMAL '"The girl that lives here is so\ncu..."
checkgender
compare LASTRESULT 0x1
if 0x1 goto 0x82DD2A1
release
end

'---------------
#org 0x2DD2A1
applymovement LASTTALKED 0x82DD32B
waitmovement LASTTALKED
msgbox 0x82DD303 MSG_NORMAL '"Oh... that's you... uh... I gotta\..."
applymovement LASTTALKED 0x82DD32E
waitmovement LASTTALKED
hidesprite 0x2
[COLOR="Red"]checkobedience 0xD9DC
nop[/COLOR]

'---------
' Strings
'---------
#org 0x2DD2C0
= The girl that lives here is so\ncute... I have to get her number!

#org 0x2DD303
= Oh... that's you... uh... I gotta\ngo.


'-----------
' Movements
'-----------
#org 0x2DD32B
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0x2DD32E
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0xFE 'End of Movements

Why is this happening?
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
I'm now having a problem with compiling. I'm trying to set the flag for the person so that it stays hidden, so i put
Code:
setflag 0x200
return
It compiles fine, but when I re-open the code (or de-compile) it changes the above code to the red code below:
Code:
'---------------
#org 0x2DD289
lock
faceplayer
msgbox 0x82DD2C0 MSG_NORMAL '"The girl that lives here is so\ncu..."
checkgender
compare LASTRESULT 0x1
if 0x1 goto 0x82DD2A1
release
end

'---------------
#org 0x2DD2A1
applymovement LASTTALKED 0x82DD32B
waitmovement LASTTALKED
msgbox 0x82DD303 MSG_NORMAL '"Oh... that's you... uh... I gotta\..."
applymovement LASTTALKED 0x82DD32E
waitmovement LASTTALKED
hidesprite 0x2
[COLOR="Red"]checkobedience 0xD9DC
nop[/COLOR]

'---------
' Strings
'---------
#org 0x2DD2C0
= The girl that lives here is so\ncute... I have to get her number!

#org 0x2DD303
= Oh... that's you... uh... I gotta\ngo.


'-----------
' Movements
'-----------
#org 0x2DD32B
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0x2DD32E
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0xFE 'End of Movements

Why is this happening?

You must repoint since the area you're using is out of space. You know free space starts at 720000 in FR and Ruby, and Emerald at E50000 or something.
 
Status
Not open for further replies.
Back
Top