Script Help Thread (DO NOT REQUEST SCRIPTS) Page 114

Started by HackMew December 20th, 2008 5:10 AM
  • 625740 views
  • 9682 replies

colcolstyles

Yours truly

Male
The Bay Area
Seen May 18th, 2019
Posted August 13th, 2012
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.

Brother of Vrai

0m3GA ARS3NAL

Im comin' home...

Age 30
Male
Superjail Penitentiary
Seen February 25th, 2023
Posted September 12th, 2013
1,816 posts
15.3 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)
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

locoroco

Ginga Densetsu Weed ANIME PWNS

Age 27
Male
Manati, Puerto rico
Seen January 15th, 2011
Posted December 21st, 2010
251 posts
13.6 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!!!
This signature has been disabled.
Signature needs to be kept to a 600px x 400px area. Your long line of text pushes it over the limit. Put a few enters there and you will be able to get it inside the limits.
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

Omega Zero

Is back...

Age 25
Male
I'm always living aren't I?
Seen December 4th, 2016
Posted October 6th, 2013
444 posts
13.4 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?
Male
Woodbridge, ON
Seen September 22nd, 2013
Posted October 27th, 2012
36 posts
15.2 Years
Whenever I compile 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
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
'---------------
#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

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
You extended the offset 0x34EB8C.
It's normal when you add something to old offset and don't delete something else.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Seen April 5th, 2010
Posted January 10th, 2010
21 posts
13.7 Years
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
Age 30
Male
Seen July 22nd, 2012
Posted June 10th, 2012
516 posts
13.8 Years
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.
Credit for my avatar goes to the Lego company. :)

Darthatron

巨大なトロール。

Age 31
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
17.4 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.
あなた は しきしゃ です
わたし は ばか です

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
So what should I do to fix it? Give it a different offset or what?
Being you I'd start again with the new ROM.
Since if you corrupt some old scripts it might do something really bad to other offsets.
And yes you need different offset you can use #dynamic 0x700000/800000/etc...
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Woodbridge, ON
Seen September 22nd, 2013
Posted October 27th, 2012
36 posts
15.2 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?
'---------------
#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
Male
Seen April 4th, 2016
Posted April 3rd, 2016
351 posts
15.6 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?
'---------------
#org 0x800008
lock
msgbox 0x800027 0x4 '"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)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#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.
I laugh looking at this.

But sometimes I want to come back to it...

Age 28
Male
Seen August 20th, 2010
Posted August 20th, 2010
39 posts
14.4 Years
This script is supposed to make a cave entrance appear when you press A on a signpost, but nothing happens.

'-----------------------
#org 0xE20000
setmaptile 0xE 0x4 0x28B 0x1
setmaptile 0xF 0x4 0x28C 0x1
setmaptile 0x10 0x4 0x28D 0x1
setmaptile 0xE 0x5 0x293 0x1
setmaptile 0xF 0x5 0x294 0x0
setmaptile 0x10 0x5 0x295 0x1
end
Male
Seen April 4th, 2016
Posted April 3rd, 2016
351 posts
15.6 Years
Is the text box 0x4 or 0x6? Either way I tried both and they didn't work.
0x4 is to be used with closeonkeypress but i dont know why its not working. What exactly is happening?
I laugh looking at this.

But sometimes I want to come back to it...

Male
Woodbridge, ON
Seen September 22nd, 2013
Posted October 27th, 2012
36 posts
15.2 Years
0x4 is to be used with closeonkeypress but i don't know why its not working. What exactly is happening?
From XSE it compiles just fine. But in game nothing happens, I walk right through the script.
The sprite that has the movements has an unknown of 03 and it's event number is 1.
The script offset is 800008, unknown 0003, and Var Number I use is 7000 (I also tried with 4050 and nothing happened).
Male
Seen April 4th, 2016
Posted April 3rd, 2016
351 posts
15.6 Years
From XSE it compiles just fine. But in game nothing happens, I walk right through the script.
The sprite that has the movements has an unknown of 03 and it's event number is 1.
The script offset is 800008, unknown 0003, and Var Number I use is 7000 (I also tried with 4050 and nothing happened).
So the person event number is 1. The unknown for the script tile is 0003(the unknown above var number).The var number is 4050. The var value is 0000. If you use var number 7000 put 0001 in the var value and make a script like this.

#dynamic 0x??????

#org @start
compare 0x7000 0x2
if 0x1 goto @end
setvar 0x7000 0x1
release
end

#org @end
release
end
Then in your original script after its done setvar 0x7000 0x2 so it wont happen again.
I laugh looking at this.

But sometimes I want to come back to it...

Male
Woodbridge, ON
Seen September 22nd, 2013
Posted October 27th, 2012
36 posts
15.2 Years
So the person event number is 1. The unknown for the script tile is 0003(the unknown above var number).The var number is 4050. The var value is 0000. If you use var number 7000 put 0001 in the var value and make a script like this.

#dynamic 0x??????

#org @start
compare 0x7000 0x2
if 0x1 goto @end
setvar 0x7000 0x1
release
end

#org @end
release
end
Then in your original script after its done setvar 0x7000 0x2 so it wont happen again.
So that code is in a separate offset right? I did that and added everything else, but it still doesn't work.
Male
Seen April 4th, 2016
Posted April 3rd, 2016
351 posts
15.6 Years
So that code is in a separate offset right? I did that and added everything else, but it still doesn't work.
Hmm,it is in a different offset.Can you tell me the steps you are doing everything in fot the original?
I laugh looking at this.

But sometimes I want to come back to it...

Age 29
Male
CT
Seen January 27th, 2010
Posted January 24th, 2010
18 posts
13.4 Years
This script is supposed to make a cave entrance appear when you press A on a signpost, but nothing happens.

'-----------------------
#org 0xE20000
setmaptile 0xE 0x4 0x28B 0x1
setmaptile 0xF 0x4 0x28C 0x1
setmaptile 0x10 0x4 0x28D 0x1
setmaptile 0xE 0x5 0x293 0x1
setmaptile 0xF 0x5 0x294 0x0
setmaptile 0x10 0x5 0x295 0x1
special 0x8E
end
there. try that, special 0x8E resets the map for it to work.
And I feel, tonight, that I let you die.
But you could have lived forever, it took smiles to keep you alive.
But heroes die, and so did mine.
But you go, and I stay, will it keep you at peace now.
Male
Woodbridge, ON
Seen September 22nd, 2013
Posted October 27th, 2012
36 posts
15.2 Years
Hmm,it is in a different offset.Can you tell me the steps you are doing everything in fot the original?
So I started by placing the script on the map and filling out the variables and made the offset. Then I added the person event on the map that will be part of the script and filled out the unknown.
I put in this code and compiled it.
'---------------
#org 0x800008
lock
msgbox 0x8800027 0x6 '"Hmm. Where am I?"
closeonkeypress
applymovement 0x1 0x880003A
waitmovement 0x0
setvar 0x7000 0x2
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 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
After that I added your code that you gave me to a new offset and compiled it.
#dynamic 0x800044

#org @start
compare 0x7000 0x2
if 0x1 goto @end
setvar 0x7000 0x1
release
end

#org @end
release
end
Save, test, nothing.
Male
Seen April 4th, 2016
Posted April 3rd, 2016
351 posts
15.6 Years
So I started by placing the script on the map and filling out the variables and made the offset. Then I added the person event on the map that will be part of the script and filled out the unknown.
I put in this code and compiled it.
'---------------
#org 0x800008
lock
msgbox 0x8800027 0x6 '"Hmm. Where am I?"
closeonkeypress
applymovement 0x1 0x880003A
waitmovement 0x0
setvar 0x7000 0x2
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 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
After that I added your code that you gave me to a new offset and compiled it.
#dynamic 0x800044

#org @start
compare 0x7000 0x2
if 0x1 goto @end
setvar 0x7000 0x1
release
end

#org @end
release
end
Save, test, nothing.

Hmm,maybe can you send me an ips file in a pm and I can take a look at it?
I laugh looking at this.

But sometimes I want to come back to it...