• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Archive] Script help thread

Status
Not open for further replies.
So. Does anyone have any ideas on how to force the seagallop to go wherever you want it to with "special 0x17B"? I'd like it to NOT go to Vermillion or those seven islands.
I read the romhacking newsletter issue two, and it still confused the dickens out of me, so if anyone could help me out, I would be quite grateful.

Well, the Seagallop will always go in the same predefined places.
To get custom places, you should edit the special itself.
Which is ASM.

For some reason, this script wont compile. It keeps saying,Run time error 9. Subscript out of range.

What about trying XSE? I've fixed and recoded your script for you.
I've also changed flags 0x230 and 0x230 to 0x1001 and 0x1002 respectively so they're safer.
I haven't tested it, but it will compile just fine.

Spoiler:
 
Last edited:
Suppose I want to make the player fish, but in a script. Not like using an old rod or anything. Just the fishing animation or whatever it's called.
How do I do that? I forgot how.

Thank you.
 
Well, there is nothing wrong in it, Only this:
setflag 0x230
setflag 0x231
warp 0x6 0x0 0xFF
#raw 0x07 0x00 0x0E 0x00
end

You should add an end.

How do you compile it?
Do you: Right click on the script( saved as.rbc), and press compile. You click Assign and search for your rom. Then you press Look(flashlight looking), and copy an offset, and press Assign.
Then File>Burn.

Is that what you do?

Yea, I'm not a noob, ive been scripting for half a year. end doesnt help either.
 
how do you make a pokeball disappear after you take the item or pokemon that it was?
heres my script sofar
Code:
#Dynamic 0x800000000

#org @start
lock
checkflag 0x200
if b_true goto @done
Message @cyn
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
release
end

#org @cyn
= So you choose the fire-mouse\nPokèmon Cyndaquil?

#org @yes
givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
setflag 0x860
setflag 0x200
Message @rename
boxset 6
Message @likes
boxset 6
release
end

#org @rename
= Here in Team Magma, you are not\nallowed to give Pokèmon cozy\lnicknames. It makes them seem less\ldangerous.

#org @likes
= This Pokèmon really seems to like\nyou!

#org @no
Message @neg
boxset 6
release
end

#org @neg
= No, Well maybe you will like\nanother of the Pokèmon.

#org @done
Message @one
boxset 6
release
end

#org @one
= No, you only get one Pokèmon from\nus.
also how would you get the rename working using xse?
 
A hidesprite command would work for hiding the pokeball.
hidepsprite 0x(Person event no)
I believe the rename command is #raw 0x68, but I'm not sure..

Nope its #raw 0x53 to disapear and #raw 0x55 to reapear example #raw 0x53 0x02 0x00
 
ok, i need help wit this script
Spoiler:

The first yes pointer works fine but when I press no, the song doesnt change back to the default one but acts like as if the first no pointer was just release and end.
 
ok, i need help wit this script
Spoiler:

The first yes pointer works fine but when I press no, the song doesnt change back to the default one but acts like as if the first no pointer was just release and end.

"Programmers start counting at 0. The rest of the world starts counting at 1."

When comparing the result of a yes/no message, you can either get 0x0 or 0x1, where 0x0 is the "NO" answer and 0x1 is the "YES" one.
Except that, when there are only 2 type of choices (like in your case), it doesn't make a lot of sense checking the answer two times. If it's yes, it can't be no and vice-versa.
For more details, see the fixed and optimized script below:

Spoiler:



I got the disappearing part to work bu thow would you get the rename to work?

You would just need to call a script like this:
Code:
#org @rename
fadescreen 0x1
special 0x9E
waitstate
return
 
Need help

I'm not sure if this goes in this thread, but I am very new to scripting, and just need general help. Such as, best program, how to do it, etc.? I want to make my own Pokemon hack, and I have map editing down, but scripting is something I am unfamiliar with. Any help would be nice :)
 
I'm not sure if this goes in this thread, but I am very new to scripting, and just need general help. Such as, best program, how to do it, etc.? I want to make my own Pokemon hack, and I have map editing down, but scripting is something I am unfamiliar with. Any help would be nice :)

I would suggest you XSE, you can find it in the Toolbox.
Regarding general scripting, the best advice I can give you is: decompile, decompile and decompile. See how scripts in the original game work, and then try to make your own.
You may take a quick look at the tutorials as well, but always try yourself first. Well, by using XSE I'm sure you'll appreciate the integrated Command Help.
 
I would suggest you XSE, you can find it in the Toolbox.
Regarding general scripting, the best advice I can give you is: decompile, decompile and decompile. See how scripts in the original game work, and then try to make your own.
You may take a quick look at the tutorials as well, but always try yourself first. Well, by using XSE I'm sure you'll appreciate the integrated Command Help.

Alright, so, what all should I download besides XSE, which I just now got? And thanks for replying :)
 
Alright, so, what all should I download besides XSE, which I just now got? And thanks for replying :)

Considering you're used to mapping, XSE will be more than enough. After all, you'll need AM just to place your own scripts. All the rest will be done through XSE.
To decompile scripts, goto Settings -> Choose Script Editor. A new window will appear, letting you choose the script editor.
After choosing, a message will popup, asking you if the script editor is going to use ":" or " " (space) as offset separator.
Since you're using XSE you can just choose whatever you like, since both modes are fully supported.
 
Alright, so, what all should I download besides XSE, which I just now got? And thanks for replying :)
Well for that answer you'd best ask in the "Simple Questions Thread"
But You would also find Unlz to be helpful. It's in HackMew's thread ^^
Also PET, APE, I really can't think of anything...Oh, yeah. You WILL need a Hex editor!
 
Status
Not open for further replies.
Back
Top