• 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.
Hi i'm new to this forum and i'm new to hacking roms.
I have a problem with my script.

this is what i made:
Spoiler:
and it looks this when i compile it:
Spoiler:
P.S. i wrote it in PKSV - UI
 
Hi, it seems you had compiled similar "tries" of this script, but inserted it to the same offset. That's why some parts of the script overwrote and made the ";setbyte 0x11" for example. To avoid this, use dynamic offsets all the time you rewrite your script.
 
Last edited:
Trying to make a script for Fire Red, what am I doing wrong?
It freezes the game, no matter if I had set the flag before or not

Spoiler:

Once you added the script tile and inputted the script.
Change the var number to 4050 and unknown to 0300
 
Hi i'm new to this forum and i'm new to hacking roms.
I have a problem with my script.

this is what i made:
Spoiler:

and it looks this when i compile it:
Spoiler:

P.S. i wrote it in PKSV - UI
There are spaces between the names of some of your pointers. Either bunch the words together or use an underscore (garywalk or gary_walk for example). If you're going to use movement in a script, use releaseall and lockall instead of release and lock. All of the jumps are unnecessary, there is no eich00 message, and for the pokemon1 message, make sure you entered Eevee into the buffer (storepokemon 0x0 0x85) or it'll mess everything up.
 
Hi i'm new to this forum and i'm new to hacking roms.
I have a problem with my script.

this is what i made:
Spoiler:

and it looks this when i compile it:
Spoiler:

P.S. i wrote it in PKSV - UI

This part of your script is the one that goes wrong.

#org @gary
[S-HIGHLIGHT]hidepokepic[/S-HIGHLIGHT]
message @eich00
callstd MSG_NORMAL
hidepokepic
applymovement 0x8 @gary walk
pauseevent 0x0
jump @ash

I think the highlighted area is your problem. The offset before already done "hidepokepic" then jumps to another "hidepokepic" perhaps you meant "showpokepic" ?
 
This part of your script is the one that goes wrong.

#org @gary
[S-HIGHLIGHT]hidepokepic[/S-HIGHLIGHT]
message @eich00
callstd MSG_NORMAL
hidepokepic
applymovement 0x8 @gary walk
pauseevent 0x0
jump @ash

I think the highlighted area is your problem. The offset before already done "hidepokepic" then jumps to another "hidepokepic" perhaps you meant "showpokepic" ?

The "hidepokepic" in the offset before is for if you don't press yes.
 
I have been doing an Emerald hack, and am having trouble making an NPC disappear. Currently, it walks away, and then the second I move one step it reappears right where it was before. Here is my script:

#dyn 0x740000
#org @start
lock
faceplayer
checkflag 0x203
if 0x1 call @end
checkflag 0x206
if 0x1 jump :end2
msgbox 0x8746785 ' Not until you have a...
callstd MSG_LOCK ' Built-in lock command
:end2
release
end

#org @end
msgbox @text
callstd MSG_NORMAL
applymovement 0x2 @move
pauseevent 0x0
fadedefault
disappear 0x2
setflag 0x206
return

#org 0x8746785
= Not until you have a Pok\emon.

#org @text
= Alright, see ya.

#org @move
M walk_right_vslow walk_right_vslow walk_right_vslow walk_up_vslow walk_up_vslow walk_up_vslow walk_up_vslow walk_up_vslow end

Please let me know if you know what I can do! Thanks :)
 
I have been doing an Emerald hack, and am having trouble making an NPC disappear. Currently, it walks away, and then the second I move one step it reappears right where it was before. Here is my script:

#dyn 0x740000
#org @start
lock
faceplayer
checkflag 0x203
if 0x1 call @end
checkflag 0x206
if 0x1 jump :end2
msgbox 0x8746785 ' Not until you have a...
callstd MSG_LOCK ' Built-in lock command
:end2
release
end

#org @end
msgbox @text
callstd MSG_NORMAL
applymovement 0x2 @move
pauseevent 0x0
fadedefault
disappear 0x2
setflag 0x206
return

#org 0x8746785
= Not until you have a Pok\emon.

#org @text
= Alright, see ya.

#org @move
M walk_right_vslow walk_right_vslow walk_right_vslow walk_up_vslow walk_up_vslow walk_up_vslow walk_up_vslow walk_up_vslow end

Please let me know if you know what I can do! Thanks :)

You need to put the flag you set (0x206) into the Person ID box in Advance Map.
 
Really simple noob question:
I am trying to hack FireRed using AdvanceMap and PKSV and some other tools. Say, I want to change Mom's text. I click "Open Script" in AdvanceMap, I change the text in PKSV - then what? How to make it appear like that in the game?
 
Really simple noob question:
I am trying to hack FireRed using AdvanceMap and PKSV and some other tools. Say, I want to change Mom's text. I click "Open Script" in AdvanceMap, I change the text in PKSV - then what? How to make it appear like that in the game?

You need to click the compile button in PKSV. Remember to give the text new offset(s) if it is longer that the old one by using FSF or dynamic compiling.
 
Do checkflags work with level scripting?

Everytime i've tried it ended up not working..

You can use compare, setvar, addvar, subvar,.. instead of checkflag.
example: using 0x5016 var instead of flag 0x200
setflag 0x200 = setvar 0x5016 0x1
checkflag 0x200 = compare 0x5016 0x1 (if 0x1 goto @....., etc... it works the same)

(checkflags doesn't work for me, too :) )
 
I have a question about trading pokemon:
The script which I don't understand is marked as red color.
Anyway, Thanks for your hard work, and lots of people will give up hacking without your help:)

Spoiler:
 
Last edited by a moderator:
I have a question about trading pokemon:
The script which I don't understand is marked as red color.
Anyway, Thanks for your hard work, and lots of people will give up hacking without your help:)

There's quite a lot of stuff going on in a trade script but I'll do my best to explain the things you've pointed out. I'll be explain the script in an in-game chronological order, following goto and call commands rather than from top to bottom like it is presented right now. Otherwise some variables won't make sense and it will be far more difficult to explain :P

Spoiler:


Hopefully that helps explain what each part of the script does. Its a complicated script, but it can be deciphered if you keep track of the variables and their values :P
 
So i'm working on a 9 starter script for Emerald, allowing you to choose between 3 different set of starters, depending on an answer to a question.
So far, the multichoice script has been done (see pic below). Now, i only need to find where those starters are, so i can complete my script.
That's where i need help, since i haven't found them yet (maybe i'm not searching seriously enough). I need to know where they are and how to change them.
Also, please let me know if i need more than scripting alone to finish it.
 
So i'm working on a 9 starter script for Emerald, allowing you to choose between 3 different set of starters, depending on an answer to a question.
So far, the multichoice script has been done (see pic below). Now, i only need to find where those starters are, so i can complete my script.
That's where i need help, since i haven't found them yet (maybe i'm not searching seriously enough). I need to know where they are and how to change them.
Also, please let me know if i need more than scripting alone to finish it.

You need to put after the multichoice givepokemon 0xblah 0xblah 0x0 0x0 0x0 0x0

The first "0xblah" is for the pokemon, you can find a list of them in diegoisawesome's scripting tutorial found here

The second 0xblah" is for the level.

Remember that xse uses hex!

Good luck!

My problem:

So, I have no idea why this isn't working.

Everything's working besides the setmaptile, anything I should know to change?

Here's my script:
Spoiler:


Ps: Took out what the messages said
 
Last edited:
Hey- I have a question. Cleartrainerflag is used when you want to re-battle trainers. Right? If you will use cleartrainerflag, will you combine it with the trainer script or you will put it on different script?
 
Hey- I have a question. Cleartrainerflag is used when you want to re-battle trainers. Right? If you will use cleartrainerflag, will you combine it with the trainer script or you will put it on different script?

This is a VERY common misconception. Trainer flags are inverted. If the flag is set, the trainer can battle. If the flag is clear, the trainer cannot battle. So, you need to use settrainerflag to enable a trainer to battle. (Think of it like getting SET for battle each time. And after, you are in the CLEAR.:P) Now, you would put it in any script you want to make the trainer able to battle again. If you always want the trainer to battle you, put it at the end of the battle script to cause the trainer to reset after each battle. If you want the trainer to be able to battle again after a certain event, put the settrainerflag in the script for that event.

There are not many restrictions on scripting. Just do it the way you want it to happen. Be creative.
 
You need to put after the multichoice givepokemon 0xblah 0xblah 0x0 0x0 0x0 0x0

The first "0xblah" is for the pokemon, you can find a list of them in diegoisawesome's scripting tutorial.

The second 0xblah" is for the level.

Remember that xse uses hex!

Good luck!

Thank you, thetripplenine. I will consider your solution. However, i would rather like to make the starter change happen when the prof. tells you to choose a pokemon in his bag (like on the pics) , instead of directly giving you the pokemon.
 
Last edited:
Status
Not open for further replies.
Back
Top