• 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.
49
Posts
14
Years
  • Seen Sep 10, 2011
#Dynamic 0xoffset

#org @start
checkflag 0x829
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @1
= I can't go in there\pwithout my pokedex

#org @move
#raw 0x10
#raw 0xfe

Try this and when you you used the green script
Put 0003 on unknown
and 4050 0n var number


lol... Ok, so I did just that and my whole hack is frozen... Anything from Oaks intro, where he lets you name yourself and your rival, and after is frozen.. HELP!! haha

Ok, maybe a little more detail. I used a patch that wipes all the events and such from the rom so you have a clear rom to work with.(besides map, warps, and it seems to keep special commands and flags already used in the game like the poke menu. Don't remember where I got it, if you have a link to it, I could use it again) Maybe I need a set Pokedex flag for the checkflag to work with the game at all? I figured it would just tell me I can't pass untill I write the setflag in, then I can. Will the game crash without a setflag, with a checkflag looking for it in play?

example: Checkflag 0x200
(there is no setflag 0x200 in the game at all)
load game and it crashes!

or

Checkflag 0x200
(setflag 0x200 IS wrote to rom)
load game and it works.

or does it matter? Will it check for a flag not existing in the game yet and crash?
 

Epicness

Hacker Newbia
24
Posts
13
Years
  • Age 28
  • Seen Dec 19, 2010
What I can see wrong with that script, is that after the question, at #org $get, you do not require a second lock, because it should carry on from the first. not sure if that will fix your problem, but still

I tried it...and it went a little more smoothly, but still got jarble. It was like opening a rar file without WINRAR language >.>
 
49
Posts
14
Years
  • Seen Sep 10, 2011
Ok I managed to fix the freezing by redoin what I did. (luckily not much, trying to get farther :P)

Ok, how bout this? How would I go about writing a script that wont let me walk to the first route from Pallet town unless I have The pokemon menu and pokedex? I also need to know whatever I need to know about adding to the sidebar in A-Map (such as variable number or unkown) I kinda know how the var number works, kinda like a flag right? Use once and set it according to what I need done?

I read through quite a few tuts and couldn't find out how these scripts work according to the A-Map sidebar, and anytime I try using them, my game freezes. I've also looked at the original games for a better understanding and thats how I started to get the var numbers, but still not quite there. I'm a quick learner, but some of this is wacky, lol.

Oh also, if I decompile, would that allow me to edit the script with no problem? (without glitching like when editing compiled scripts? Or wasting memory?) Or should I #remove Offsets each time I need to rewrite a script?

Thanks in advance guys, I appreciate it. :)
 

Epicness

Hacker Newbia
24
Posts
13
Years
  • Age 28
  • Seen Dec 19, 2010
I think it's the ROM base I'm using (Project glowing gold)...I tried on another ROM (ruby) and it worked fine >.>


It might be my flag...argghh so confused...
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
Now that I have the correct thread I htink.

This is related to an earlier problem of mine.
I got my previous problem fixed. (Thank you cocostyles!)

I am now making a script that stops me, Makes a person appear from hidden then walk out of the lab, Talk to me, Give me an Item, then re-enter the lab and disappear.

So far all this script does is freeze the rom unless I remove the check/set flag lines then it does nothing.

EDIT: This is for R/S

Code:
Spoiler:
glgl
 

Zeffy

g'day
6,402
Posts
15
Years
  • Age 27
  • Seen Feb 7, 2024
This is related to an earlier problem of mine.
I got my previous problem fixed. (Thank you cocostyles!)

I am now making a script that stops me, Makes a person appear from hidden then walk out of the lab, Talk to me, Give me an Item, then re-enter the lab and disappear.

So far all this script does is freeze the rom unless I remove the check/set flag lines then it does nothing.

EDIT: This is for R/S

Code:
Spoiler:
glgl
Its not fully fixed yet, but it should work. If it doesn't ask me again. :P
Don't forget to put 0003 in unknown and 4050 in Var Number. *nod*
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
Oh my, Zeff you've forgotten a little. I'll just add a few things.

@Drithlan:
Code:
'---------------
#dynamic 0x800000

#org @main
checkflag 0x1000
if 0x1 goto @flagged
msgbox @line1 0x4
showsprite 0x7
movesprite 0x7 0x3 0x1
applymovement MOVE_PLAYER @Left
applymovement 0x7 @move2
waitmovement 0x0
msgbox @line2 0x4
copyvar 0x8000 0x4023
compare 0x8000 0x0
if 0x1 goto @light
compare 0x8000 0x1
if 0x1 goto @fire
compare 0x8000 0x2
if 0x1 goto @water
release
end


#org @fire
giveitem 0xD7 0x1 MSG_OBTAIN
msgbox @1 MSG_FACE
applymovement 0x7 @move3
hidesprite 0x7
setflag 0x1000
release
end

#org @light
giveitem 0xD0 0x1 MSG_OBTAIN
msgbox @2 MSG_FACE
applymovement 0x7 @move3
hidesprite 0x7
setflag 0x1000
release
end

#org @water
giveitem 0xD1 0x1 MSG_OBTAIN
msgbox @3 MSG_FACE
applymovement 0x7 @move3
 hidesprite 0x7
setflag 0x1000
release
end

#org @line1
= Wait!

#org @line2
= PROF. BIRCH wants you to have this.

#org @1
= Enjoy!

#org @2
= Good luck!

#org @3
= It worked!


#org @Left
#raw 0x66
#raw 0xFE

#org @move2
#raw 0x08
#raw 0x0B
#raw 0x0B 
#raw 0xFE

#org @move3
#raw 0x0A
#raw 0x0A
#raw 0x09
#raw 0xFE

#org @flagged
release
end
Use msgbox @pointer 0x4. You don't need closeonkeypress. It's just a waste of space, but it can be used for some cases. #raw 0xFE is needed at the end of movements.
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
Thank you Binary and Zeffy. Neither of your scripts worked but I was able to work it out with your scripts. There is now 1 small problem left. What makes the Player turn around? I want to make 1 script for 2 Squares
######
#####
####

# = Lab
# = Lab Door
# = Sign outside
# = Script Squares
# = Flowers

If I can make the player do a 180* turn then there will be no problem. So far everything I've tried has not worked. Also when attempting to compile with XSE it messes up @move34 and changes the script there to something completely different. Though it was kinda funny one of the times, it is still annoying.

Here is my completed Script:
Spoiler:
glglglgl <===== How Do I stop these?
 

Zeffy

g'day
6,402
Posts
15
Years
  • Age 27
  • Seen Feb 7, 2024
Thank you Binary and Zeffy. Neither of your scripts worked but I was able to work it out with your scripts. There is now 1 small problem left. What makes the Player turn around? I want to make 1 script for 2 Squares
######
#####
####

# = Lab
# = Lab Door
# = Sign outside
# = Script Squares
# = Flowers

If I can make the player do a 180* turn then there will be no problem. So far everything I've tried has not worked. Also when attempting to compile with XSE it messes up @move34 and changes the script there to something completely different. Though it was kinda funny one of the times, it is still annoying.

Here is my completed Script:
Spoiler:
glglglgl <===== How Do I stop these?
#raw 0x00 = Face Down
#raw 0x01 = Face Up
#raw 0x02 = Face Left
#raw 0x03 = Face Right

A combination of those commands would soothe you. If I wanted a 180degree spin if the OW is facing North I would put;

#raw 0x03
#raw 0x00
#raw 0xFE

It maybe slow, but its the only way I know. ;_;
 
9
Posts
13
Years
  • Age 30
  • Seen Nov 16, 2010
hello, so i'm kinda new to the whole custom pokemon game scene and a problem just arose for me.
Whenever i compile a script into my game (fire red) the game will no longer start. I usually get a message saying "the rom image has crashed"
i've tried multiple emulators and all give me the same problem.
I'm using PKSV to script.
This problem seems to only be happening on Fire Red because when i started making a game on emerald the scripts would run just fine and not crash the game.
Any one have any ideas as to why this is happening?
thanks.
 

Chad -

 
687
Posts
14
Years
  • Seen Aug 27, 2012
hello, so i'm kinda new to the whole custom pokemon game scene and a problem just arose for me.
Whenever i compile a script into my game (fire red) the game will no longer start. I usually get a message saying "the rom image has crashed"
i've tried multiple emulators and all give me the same problem.
I'm using PKSV to script.
This problem seems to only be happening on Fire Red because when i started making a game on emerald the scripts would run just fine and not crash the game.
Any one have any ideas as to why this is happening?
thanks.

Maybe your FireRed ROM is damaged? Try downloading a clean FR ROM. I am not sure that is your problem. Maybe your script(s)? Can you post it here?

Chad -
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years

#raw 0x00 = Face Down
#raw 0x01 = Face Up
#raw 0x02 = Face Left
#raw 0x03 = Face Right

A combination of those commands would soothe you. If I wanted a 180degree spin if the OW is facing North I would put;

#raw 0x03
#raw 0x00
#raw 0xFE

It maybe slow, but its the only way I know. ;_;

That won't help in my situation I was hoping there was one for "Turn 180*" I just didn't want to write more script for this. Ah well. Back to work i guess....
gl <=== Still annoying!
 
49
Posts
14
Years
  • Seen Sep 10, 2011
hello, so i'm kinda new to the whole custom pokemon game scene and a problem just arose for me.
Whenever i compile a script into my game (fire red) the game will no longer start. I usually get a message saying "the rom image has crashed"
i've tried multiple emulators and all give me the same problem.
I'm using PKSV to script.
This problem seems to only be happening on Fire Red because when i started making a game on emerald the scripts would run just fine and not crash the game.
Any one have any ideas as to why this is happening?
thanks.


Use XSE instead of PKSV. I noticed that PKSV uses differant formulas. (or at least appeared to be, so I decided not to use it) And yeah, a new rom. Once one is damaged by scripting, its either hard to fix or impossible if you ask me. I've made a hack and it froze on me after a script and stayed that way so I restarted on a new one. Always back it up before adding a new script to be safe, and hopefully XSE will suit you better. I'm pretty new to all this too, so I hope this info helps.

Has anyone found a solution to my FR 'you can't leave pallet town untill you have pokedex and pokemenu' script? I'm stuck on it. :(
 
9
Posts
13
Years
  • Age 30
  • Seen Nov 16, 2010
thanks for the help so far guys.
im no longer getting the rom image crashed issue but now im getting one that says
"Undefined opcode - with no debug vector defined."

this is the script im trying to put in,

Spoiler:

i just started learning how to script this mind you so dont flame me if its horribly wrong ;)
 
49
Posts
14
Years
  • Seen Sep 10, 2011
Spoiler:

i just started learning how to script this mind you so dont flame me if its horribly wrong ;)

Yeah see, this script is way differant from XSE. Well, not WAY, but significantly differant.

Wait, You use PKSV right? I think you need to use $ instead of @ aren't you? As for the rest, I can see what MAY be the problem, but I use XSE so..

Well, I hope the $ is the problem since I'll just look like a sh**head for trying to help with something I know little about. Haha. Figure a little help is better than none. :)
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
Has anyone found a solution to my FR 'you can't leave pallet town untill you have pokedex and pokemenu' script? I'm stuck on it. :(

I just made this for you 1-Up. It checks for both Pokedex and Pokemon Menu when you step on the script tile and then forces you to turn around and walk down.

Spoiler:
 
49
Posts
14
Years
  • Seen Sep 10, 2011
I just made this for you 1-Up. It checks for both Pokedex and Pokemon Menu when you step on the script tile and then forces you to turn around and walk down.

Spoiler:

Ok thanks! But before I try it, do I need to set anything in the sidebar in A-Map to make it work?


Edit: Ok I tried it anyway, and it freexes on the tile I set it on. This is the script (or pretty effin close to it) that I wrote originally and couldn't get past this. I've seen tuts on all the scripting, but none on using them with A-map and getting them to work.

Ok, so I set it as a green tile right? Then what? I have a blank rom so no flags or variables are set except for the ones that the game saves automatically after using the Fire Red Hacked patch. (created by JPAN I believe) So far I have the pokemon menu flag set after receiving a Dratini, activated running shoes, and a message from mom set to the rom, thats it! lol. So I would like to go farther with this...
 
Last edited:

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
When you have the Script tile selected
Change:
Unknown: 0000 to 0003 [Not the Unknown: 00 00]
Var number: 0000 to a Var above 5000 (in hex) {I used 5150}
Script offset: $000000 to the scripts offset # {I used $8000A7}gl
 
49
Posts
14
Years
  • Seen Sep 10, 2011
When you have the Script tile selected
Change:
Unknown: 0000 to 0003 [Not the Unknown: 00 00]
Var number: 0000 to a Var above 5000 (in hex) {I used 5150}
Script offset: $000000 to the scripts offset # {I used $8000A7}gl

Ok, and when I set the Var number, what do I need to keep in mind? Like, can I use that var again? What exactly do these do? A link to a tut would be great, but otherwise this is confusing for me. Sorry for all the questions, haha, and thanks. :D

EDIT: Ok tried it out and its the closest I've got. The message shows up, but the movement won't work, So I'm able to pass as long as I read the message and keep walking forward. After the flags are checked it works fine also, so just my apply movement wont work.
 
Last edited:

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
Ok, and when I set the Var number, what do I need to keep in mind? Like, can I use that var again? What exactly do these do? A link to a tut would be great, but otherwise this is confusing for me. Sorry for all the questions, haha, and thanks. :D

EDIT: Ok tried it out and its the closest I've got. The message shows up, but the movement won't work, So I'm able to pass as long as I read the message and keep walking forward. After the flags are checked it works fine also, so just my apply movement wont work.
This is one of the TUTs I used.
http://www.pokecommunity.com/showthread.php?t=164276&highlight=MEGA-HUGE+XSE+Scripting+Tutorial+%28Updated%29

It was a BIG help.

As for the Movement check back here after 8:30PM PST.

EDIT: Post your Compiled Script and the inputs for the Script tile you made.
 
Status
Not open for further replies.
Back
Top