• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

colcolstyles

Yours truly
1,588
Posts
15
Years
How do I make 2 level scripts on one map work? The first one I have works, but the second one wont activate.

AdvanceMap will only allow one level script of each type but there is a way to have two or more. However, you won't be able to access any of them except the first one via AdvanceMap. This is why you can't simply open up most of the level scripts in the player's house in R/S/E.

Open up AdvanceMap and go the map that you want to add the two level scripts two. Go to the "Header" tab and switch to "Professional Header View" (Control + H). Copy the address in the "Map Script offset" field. Now open up your hex editor and navigate to the address that was in the "Map Script offset" field. You should see some data formatted like this:

[Level script type (byte)] [Pointer (word)]

Find the pointer after the '0x02' as that's most likely the type of level script that you want two of. If not, then choose the appropriate one. Next, go to the address that the pointer points to. You'll see some data like this:

[Variable (halfword)] [Value (halfword)] [Script address (word)] ...

For example, for the male player's house in Emerald, I found this:

924003003C781F08

...which, when formatted correctly, looks like this:

0x4092 0x0003 0x081F783C

So that would mean that if the variable 0x4092 contains 0x0003 when the map is loaded, the script at 0x081F783C will be run. To add more than one, just add another string of 8 bytes with the variable, value, and script address. For example, in that same house there are also two other scripts that will run if 0x4092 is 0x0005 and 0x0006 respectively, not to mention a couple others for other situations. Put a '0x00' afterwards which, I think, ends the table. Hope that helps!
 

x Necromorph x

Super Saiyan 4
295
Posts
13
Years
AdvanceMap will only allow one level script of each type but there is a way to have two or more. However, you won't be able to access any of them except the first one via AdvanceMap. This is why you can't simply open up most of the level scripts in the player's house in R/S/E.

Open up AdvanceMap and go the map that you want to add the two level scripts two. Go to the "Header" tab and switch to "Professional Header View" (Control + H). Copy the address in the "Map Script offset" field. Now open up your hex editor and navigate to the address that was in the "Map Script offset" field. You should see some data formatted like this:

[Level script type (byte)] [Pointer (word)]

Find the pointer after the '0x02' as that's most likely the type of level script that you want two of. If not, then choose the appropriate one. Next, go to the address that the pointer points to. You'll see some data like this:

[Variable (halfword)] [Value (halfword)] [Script address (word)] ...

For example, for the male player's house in Emerald, I found this:

924003003C781F08

...which, when formatted correctly, looks like this:

0x4092 0x0003 0x081F783C

So that would mean that if the variable 0x4092 contains 0x0003 when the map is loaded, the script at 0x081F783C will be run. To add more than one, just add another string of 8 bytes with the variable, value, and script address. For example, in that same house there are also two other scripts that will run if 0x4092 is 0x0005 and 0x0006 respectively, not to mention a couple others for other situations. Put a '0x00' afterwards which, I think, ends the table. Hope that helps!


Alright, thank you! I had no idea AdvanceMap only allows one of each type. I'll be trying this out for sure.
 
14
Posts
13
Years
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

You already got an answer on this page, scroll up and read it.
 

yugimon121

3 hearts and failing in battle
25
Posts
13
Years
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

do you use pokescript? if so i can help
if you use XSE, im afraid im no good
 
14
Posts
13
Years
YES!! im using pokescript! help me please!
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

WHAT'S THE PROBLEM IN THIS SCRIPT??
THIS IS A RIVAL SCRIPT..
AND ALSO POKESCRIPT..
HELP APPRECIATED!!




#ORG $begin
jingle
checkflag 0x200
if B_true goto $done
applymovement 0x04 $rivalwalk
pausemove 0
message $rivaltalk
$momtalk 1=Let's battle!
boxset 6
trainerbattle 1 0x003
applymovement 0x04 $rivalwalkback
pausemove 0
setflag 0x200
removesprite 4
release
end

#org $done
release
end

#org $rivalwalk
$momwalk 1 ; 0x10 0x10 0x10 0x13 0x13 0x13 0xFE

#org $rivalwalkback
$momwalkback 1 ; 0x12 0x12 0x12 0x11 0x11 0x11 0xFE


I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
 
Last edited:

yugimon121

3 hearts and failing in battle
25
Posts
13
Years
WHAT'S THE PROBLEM IN THIS SCRIPT??
THIS IS A RIVAL SCRIPT..
AND ALSO POKESCRIPT..
HELP APPRECIATED!!




#ORG $begin
jingle
checkflag 0x200
if B_true goto $done
applymovement 0x04 $rivalwalk
pausemove 0
message $rivaltalk
$momtalk 1=Let's battle!
boxset 6
trainerbattle 1 0x003
applymovement 0x04 $rivalwalkback
pausemove 0
setflag 0x200
removesprite 4
release
end

#org $done
release
end

#org $rivalwalk
$momwalk 1 ; 0x10 0x10 0x10 0x13 0x13 0x13 0xFE

#org $rivalwalkback
$momwalkback 1 ; 0x12 0x12 0x12 0x11 0x11 0x11 0xFE

well for no.1
message $rivaltalk
$momtalk 1=Let's battle!
where did momtalk come in? :p
it should be
message $rivaltalk
$rivaltalk 1 = Let's battle
ill pm u the rest or else itd be too long
 
Last edited:
79
Posts
13
Years
  • Seen Aug 27, 2014
a couple of questions

i was wondering what the flag was after you beat the elite four so i can have certain events only happen after the elite four

and im trying to get oaks aide to give me the national dex only after i get the original pokedex how would i go about this?
 
82
Posts
13
Years
help
#dynamic 0x80007C

#org @start
lockall
applymovement 0xFF @move
waitmovement 0xFF
msgbox @haha 0x6
applymovement 0x4 @move2
waitmovement 0x4
msgbox @what 0x6
setvar 0x6000 0x1
releaseall
end

#org @move
#raw 0x62 0xFE

#org @haha
= ???:hahaha i created a..!\nOh no i'm late!\pIhave to go!

#org @move2
#raw 0x60 0xFE

#org @what
= [PLAYER]:who was that?!\nHe left something\pI'll check!

when i step on the script the ! pops and then the ??? person disapears and nothing happens then..Why?and when i went to a another map and go back the ??? person is again there why?Help!!
 
79
Posts
13
Years
  • Seen Aug 27, 2014
i was wondering what the flag was after you beat the elite four so i can have certain events only happen after the elite four

and im trying to get oaks aide to give me the national dex only after i get the original pokedex how would i go about this?

i was skipped :\
 
79
Posts
13
Years
  • Seen Aug 27, 2014
setvar makes certain events happen a certain amount of time and flags control when they happen i think
 
Status
Not open for further replies.
Back
Top