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

Yusshin

♪ Yggdrasil ♪
2,414
Posts
14
Years
Okay, so ignore the sub-blargh error when you start the rom, that's just a clock issue that won't affect your script. Your setflag needs to come right before the end of your script, after the pause 0x30 would be great. However, 0x200 isn't a good flag to use, are you aiming for a specific event flag? 0x1000 is a lot safer, as it isn't used by the game.

I'm'a delete all events in the game at one point anyway, so 0x200 shouldn't matter much, nyaa? or should I still change it regardless?
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Yes, you can use the same variable for every level.
if you use 4050, you can use it for EVERY script.

Well, yeah you can but I'd recommend one that the game doesn't use. Even if you don't reuse any of the original scripts beyond the PokéCenters et al., it's probably a good idea to err on the safe side and use different variables.
But yes, you can reuse variables. For example, I use 0x7000 as a general story progress meter.
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Well, yeah you can but I'd recommend one that the game doesn't use. Even if you don't reuse any of the original scripts beyond the PokéCenters et al., it's probably a good idea to err on the safe side and use different variables.
But yes, you can reuse variables. For example, I use 0x7000 as a general story progress meter.

That is a smart idea.
if the game at any point changes the variable in a bad way for you many scrips could get turned off... I think I'll start doing that. (I've grown so accustomed to using 4050, lol)
 

locoroco

Ginga Densetsu Weed ANIME PWNS
251
Posts
14
Years
im learning how to script and each time i compile the script is not as i put it my game is fire red look

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Do you have any pokemon.\nCheck if PROF.OAK\lgives you one.


and this is how it looks after i compile it and put it on a sprite in a-map

'-----------------------
#org 0x4567DE
lock
faceplayer
msgbox 0x84567E9 '"Will you get any\npokemon check if\..."
release
end


'---------
' Strings
'---------
#org 0x4567E9
= Will you get any\npokemon check if\lPROF.OAK will give you\lany

and i dont get it and then when i talk to the person it doesn't say anything i just hear the ping sound and nothing else help!!!
 

Omega Zero

Is back...
444
Posts
14
Years
im learning how to script and each time i compile the script is not as i put it my game is fire red look

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Do you have any pokemon.\nCheck if PROF.OAK\lgives you one.


and this is how it looks after i compile it and put it on a sprite in a-map

'-----------------------
#org 0x4567DE
lock
faceplayer
msgbox 0x84567E9 '"Will you get any\npokemon check if\..."
release
end


'---------
' Strings
'---------
#org 0x4567E9
= Will you get any\npokemon check if\lPROF.OAK will give you\lany

and i dont get it and then when i talk to the person it doesn't say anything i just hear the ping sound and nothing else help!!!
Well did you compile it to the right rom?
 

arpeejajo

King Of Muay Thai
36
Posts
16
Years
Whenever I compile this code
Code:
'---------------
#org 0x34EB8C
lockall
applymovement MOVE_PLAYER 0x834EBC6
waitmovement 0x0
applymovement MOVE_PLAYER 0x834EBFE
waitmovement 0x0
msgbox 0x834EC0E MSG_KEEPOPEN '"[player]: Hmm, where am I?"
closeonkeypress
applymovement 0x1 0x834EBCC
waitmovement 0x0
msgbox 0x834EBDC MSG_KEEPOPEN '"Julia: Hey! Where'd you come from?..."
closeonkeypress
msgbox 0x834EC59 MSG_KEEPOPEN '"[player]: I don't know."
releaseall
end

'---------
' Strings
'---------
#org 0x34EC0E
= [player]: Hmm, where am I?

#org 0x34EBDC
= Julia: Hey! Where'd you come from?

#org 0x34EC59
= [player]: I don't know.


'-----------
' Movements
'-----------
#org 0x34EBC6
#raw 0x62 'Exclamation Mark (!)
#raw 0x1A 'Delay3
#raw 0x2F 'Face Left (Delayed)
#raw 0x1A 'Delay3
#raw 0x30 'Face Right (Delayed)
#raw 0xFE 'End of Movements

#org 0x34EBFE
#raw 0x1A 'Delay3
#raw 0x2E 'Face Up (Delayed)
#raw 0x1A 'Delay3
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements

#org 0x34EBCC
#raw 0x62 'Exclamation Mark (!)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
and then close the editor and then open the script again, it changes to this
Code:
'---------------
#org 0x34EB8C
lockall
applymovement MOVE_PLAYER 0x834EBC6
waitmovement 0x0
applymovement MOVE_PLAYER 0x834EBFE
waitmovement 0x0
msgbox 0x834EC0E MSG_KEEPOPEN '"[player]: Hmm, where am I?"
closeonkeypress
applymovement 0x1 0x834EBCC
waitmovement 0x0
msgbox 0x834EBDC MSG_KEEPOPEN '"Julia: Hey! Where'd you come from?..."
closeonkeypress
msgbox 0x834EC59 MSG_KEEPOPEN '"[player]: I don't know."
releaseall
settrainerflag 0x2F1A
copyvarifnotzero 0xFE30 0x1262
loadbytefrompointer 0x2E 0xFFFFFFFE

'---------
' Strings
'---------
#org 0x34EC0E
= [player]: Hmm, where am I?

#org 0x34EBDC
= Julia: Hey! Where'd you come from?è+è&\n

#org 0x34EC59
= [player]: I don't know.


'-----------
' Movements
'-----------
#org 0x34EBC6
#raw 0x62 'Exclamation Mark (!)
#raw 0x1A 'Delay3
#raw 0x2F 'Face Left (Delayed)
#raw 0x1A 'Delay3
#raw 0x30 'Face Right (Delayed)
#raw 0xFE 'End of Movements

#org 0x34EBFE
#raw 0x1A 'Delay3
#raw 0x2E 'Face Up (Delayed)
#raw 0x1A 'Delay3
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements

#org 0x34EBCC
#raw 0x62 'Exclamation Mark (!)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements

I use XSE and open the editor through Advance Map 1.92
 
21
Posts
14
Years
  • Seen Apr 5, 2010
does anyone know why this doesnt work? i kind of need help on the givepoemon line

'-----------------------
#org 0x1B1439
msgbox 0x904734 "theres a note\pit reads: i cant do this, please\capture my pokemon"
msgbox 0x904735 "will you accept the challenge?"
boxset 6
compare LASTRESULT 0x0
if 0x1 goto 0x85FB257
releaseall
end
#org 0x5FB257
givepokemon 0x054 0x5 0x0
return

and it isnt the #dynamic
 
Last edited:

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
I'm'a delete all events in the game at one point anyway, so 0x200 shouldn't matter much, nyaa? or should I still change it regardless?
Well, as far as I know, it's best to avoid flags used by the game either way, but it's your call. Also, certain flags already have set effects that I don't know how to edit (for instance, the gym badges, firstpokemon, and pokedex flags).
@NarutoActor, chill out, seriously. I wasn't aware that any var could be used, I didn't realize that it was the same type of var that I'd use in a script :P. No need to be rude about it. Anyway, thanks for teaching me something new, I'll try messing with that a bit.
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
does anyone know why this doesnt work? i kind of need help on the givepoemon line

'-----------------------
#org 0x1B1439
msgbox 0x904734 0x6 "theres a note\pit reads: i cant do this, please\capture my pokemon"
msgbox 0x904735 0x5 "will you accept the challenge?"
compare LASTRESULT 0x0
if 0x1 call 0x85FB257
releaseall
end
#org 0x5FB257
givepokemon 0x054 0x5 0x0 0x0 0x0 0x0
return

and it isnt the #dynamic

5 problems...
1. You were using boxset, that no longer exists.
2. You were missing a 'boxset' command.
3. You were missing some buffers in 'givepokemon'
4. A 'goto' should have been a 'call'.
5. One of those boxsets was a Yes/No box, right? That's boxset #5.

Fixes are in bold.
 

arpeejajo

King Of Muay Thai
36
Posts
16
Years
I have a question about dynamic offsets. When I made the below code as dynamic and then compiled it and copied the first offset into the Advance Map, and opened it up again it changed to the code below. Is that supposed to happen?
Also, why is it when I walk into this script nothing happens?
Code:
'---------------
#org 0x800008
lock
msgbox 0x800027 MSG_NORMAL '"Hmm. Where am I?"
closeonkeypress
applymovement 0x1 0x880003A
waitmovement 0x0
applymovement 0x1 0x8800040
waitmovement 0x0
release
end


'---------
' Strings
'---------
#org 0x800027
= Hmm. Where am I?


'-----------
' Movements
'-----------
#org 0x80003A
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

#org 0x800040
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
 

Quickster

Dream or Drop?
351
Posts
16
Years
  • Seen Apr 4, 2016
I have a question about dynamic offsets. When I made the below code as dynamic and then compiled it and copied the first offset into the Advance Map, and opened it up again it changed to the code below. Is that supposed to happen?
Also, why is it when I walk into this script nothing happens?
Code:
'---------------
#org 0x800008
lock
msgbox 0x800027 [B]0x4[/B] '"Hmm. Where am I?"
closeonkeypress
applymovement 0x1 0x880003A
waitmovement 0x0
release
end


'---------
' Strings
'---------
#org 0x800027
= Hmm. Where am I?


'-----------
' Movements
'-----------
#org 0x80003A
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
[B]#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
[/B]#raw 0xFE 'End of Movements


Hmm, what exactly are you talking about? I only see one problem with the script itself and make sure the unkown in amap is 0003 and the var is 4050. Changes in bold and removed some stuff. Also the script will keep happening unless you set a flag.
 
Status
Not open for further replies.
Back
Top