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

x Necromorph x

Super Saiyan 4
295
Posts
13
Years
What you would want to do, is set a script before you enter the map, say, if your variable is 7000, you would put a script setvar 7000 0x1, which would stop the level script from happening. Somewhere else, you could add setvar 7000 0x0, which would make the level script happen next time you enter the map.

Thanks for the help, I got it working!

Also how do I give the player a Pokedex? With a giveitem script? If so where do I get the item numbers?
 
Last edited:
80
Posts
14
Years
So here's is my script:
Spoiler:
It works but when the player sprite is moving, the mother keeps to talk and don't wait for the end of all movements.

And this part of the script:
Spoiler:
I would like to repeat it until the player chose his Pokémon. So, how can I do that ?
 
Last edited:

x Necromorph x

Super Saiyan 4
295
Posts
13
Years
For the first question, I'm pretty sure for the "waitmovement" command you put the Id number after it, not 0x0. So if you want the textbox to wait to appear until the player is done moving just do this:
waitmovement 0xFF (players ID)

As for the second question, do you mean like if you say "No" it goes back to picking the pokemon?
 

Samike360

Lover of May
397
Posts
15
Years
Thanks for the help, I got it working!

Also how do I give the player a Pokedex? With a giveitem script? If so where do I get the item numbers?

You actually need to set a flag, its one of those special flags, but I'm too lazy to look it up right now :P

Look at Diegoisawesome's scripting tutorial in the tutorials section, or the help guide in XSE, under the flag section they have the special flags and under the item section they have the item numbers.
 

Ven

Tyrian
124
Posts
14
Years
  • Seen Mar 19, 2011
Spoiler:

The script works fine, but it won't let the player go at the end.
It's also a level script.
 

Samike360

Lover of May
397
Posts
15
Years
Spoiler:

The script works fine, but it won't let the player go at the end.
It's also a level script.

Did you make sure to set the flag on the header page to 4033 and did you make sure to set rawword or whatever to 0?
 
80
Posts
14
Years
For the first question, I'm pretty sure for the "waitmovement" command you put the Id number after it, not 0x0. So if you want the textbox to wait to appear until the player is done moving just do this:
waitmovement 0xFF (players ID)

As for the second question, do you mean like if you say "No" it goes back to picking the pokemon?

For the first question, it works thanks.
Now for the second, I mean if I say "No" everytime it goes back to ask if I want the first pokemon, ect.
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
So here's is my script:
Spoiler:
It works but when the player sprite is moving, the mother keeps to talk and don't wait for the end of all movements.

And this part of the script:
Spoiler:
I would like to repeat it until the player chose his Pokémon. So, how can I do that ?
For your second question, I believe you can just insert goto @take at the end and it'll go back to the beginning (change in bold). If that freezes, just change it to goto @take2, and have that section look like this:
Spoiler:

You could also just set up a return command, but you'd have to tweak the dialogue a bit.

My own question. Is there a command to show a trainer sprite, so like showpokepic but for a trainer's battlesprite instead?
 
80
Posts
14
Years
For your second question, I believe you can just insert goto @take at the end and it'll go back to the beginning (change in bold). If that freezes, just change it to goto @take2, and have that section look like this:
Spoiler:

You could also just set up a return command, but you'd have to tweak the dialogue a bit.
The goto @take command works perfectly, thanks.

My own question. Is there a command to show a trainer sprite, so like showpokepic but for a trainer's battlesprite instead?
For this one, I don't have a clue.

Can someone tell me the flag for the National Dex?
Thanks.
I don't know too, I will do some search to find this.

EDIT: For Fire Red/Leaf Green, this is the command: special 0x16F
For Emerald , the command is: special 0x1F3

I don't find for Ruby/Sapphire but I search.
 
Last edited:

Bolens

Soul Hacker
359
Posts
14
Years
  • Age 30
  • PA
  • Seen Aug 22, 2016
In my script, after I do a trainer battle I have a msgbox after it. When in game, the script runs fine up till the trainer part. You can battle the trainer, then after the battle nothing happens. If you leave the map and come back in, the script continues where it left off, and it completes itself. Any help?
 

vietazn654

A sound soul dwells within me
371
Posts
14
Years
In my script, after I do a trainer battle I have a msgbox after it. When in game, the script runs fine up till the trainer part. You can battle the trainer, then after the battle nothing happens. If you leave the map and come back in, the script continues where it left off, and it completes itself. Any help?
Could you show the script? That would help...
 

Bolens

Soul Hacker
359
Posts
14
Years
  • Age 30
  • PA
  • Seen Aug 22, 2016
Could you show the script? That would help...

Yeah, kinda forgot to show it. Well here it is:

Code:
#org 0x87415F4
'-----------------------------------
lock
checkflag 0x255
if true jump 0x874169D ' Flag is set
msgbox 0x874172F ' Whoa... look what is...
callstd MSG_LOCK ' Built-in lock command
applymovement PLAYER 0x874178B ' say_!! run_left run_...
applymovement 0x1 0x8741791 ' walk_left walk_left ...
applymovement 0x4 0x8741794 ' walk_left walk_left ...
msgbox 0x8741798 ' Grunt: Come here lit...
callstd MSG_LOCK ' Built-in lock command
applymovement PLAYER 0x8741801 ' run_left run_left ru...
applymovement 0x1 0x8741805 ' look_right end
msgbox 0x8741807 ' Hey you, stop hurtin...
callstd MSG_LOCK ' Built-in lock command
trainerbattle 0x0 0x15F 0x0 0x874169F 0x87416B3
msgbox 0x87416C3 ' You haven't seen the...
callstd MSG_LOCK ' Built-in lock command
applymovement 0x1 0x87418CF ' run_up run_up run_up...
disappear 0x1
setflag 0x255
applymovement 0x4 0x87418DA ' walk_right walk_righ...
msgbox 0x87418DD ' It looks like this P...
callstd MSG_LOCK ' Built-in lock command
disappear 0x4
setflag 0x256
countpokemon
compare LASTRESULT 0x6
if == jump 0x87416ED ' Equal To
addpokemon PIDGEY 5 NONE 0x0 0x0 0x0
storepokemon 0x0 PIDGEY
message 0x8741721 ' You got a \v\h02!
fanfare 0x101
showmsg
waitfanfare
waitbutton
release
end

#org 0x874169D
'-----------------------------------
release
end

#org 0x87416ED
'-----------------------------------
msgbox 0x87416F7 ' You don't have enoug...
callstd MSG_NOCLOSE ' Non-closing message
release
     ' Release commands close any open messages
end


#org 0x874172F
= Whoa... look what is going on!\nThat man is trying to hurt that\lPokemon. I must go and help!

#org 0x8741798
= Grunt: Come here little Pokemon,\nI'm not going to hurt you. The\lboss wants you to be happy. Come\lhere...

#org 0x8741807
= Hey you, stop hurting that\nPokemon!\lGrunt: Well what do we have here,\la little runt and his Pokemon. My\lboss told me to get a Pokemon, so\lI'm going to get one. There is\lnothing you can do to stop me!

#org 0x874169F
= I will crush you!!!

#org 0x87416B3
= You crushed me[.]

#org 0x87416C3
= You haven't seen the last of me!

#org 0x87418DD
= It looks like this Pokemon wants\nto come with you. Well, I did save\lit, so welcome aboard.

#org 0x8741721
= You got a \v\h02!

#org 0x87416F7
= You don't have enough room in your party.

#org 0x874178B
M say_!! run_left run_left run_left run_left end

#org 0x8741791
M walk_left walk_left end

#org 0x8741794
M walk_left walk_left look_right end

#org 0x8741801
M run_left run_left run_left end

#org 0x8741805
M look_right end

#org 0x87418CF
M run_up run_up run_up run_up run_up run_left run_left run_left run_left run_left end

#org 0x87418DA
M walk_right walk_right end
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Yeah, kinda forgot to show it. Well here it is:
Spoiler:
Changes in bold. You have to use trainerbattle 0x1 instead of trainerbattle 0x0 if you want the script to continue after the battle. Then you need to add the pointer for the rest of the script, like so:
trainerbattle 0x1 0x??? 0x0 @before @after @later
I'm going to shamelessly bump my own question. Is there any sort of showtrainerpic command, like showpokepic but to show a trainer battle sprite?
 
Last edited:

Bolens

Soul Hacker
359
Posts
14
Years
  • Age 30
  • PA
  • Seen Aug 22, 2016
This script doesn't apply the movements when it is stepped on. The msgbox works fine, but the movements never work. Any help?

Code:
#org 0x8741938
'-----------------------------------
lock
checkflag 0x254
if true jump 0x8741953 ' Flag is set
msgbox 0x8741955 ' I didn't get my Poke...
callstd MSG_LOCK ' Built-in lock command
applymovement PLAYER 0x874196E ' say_x walk_right end
release
end

#org 0x8741953
'-----------------------------------
release
end


#org 0x8741955
= I didn't get my Pokemon!

#org 0x874196E
M say_x walk_right end
 

Chad -

 
687
Posts
14
Years
  • Seen Aug 27, 2012
Bolens, you need a pause (I'm not sure but maybe pausemovement or something) after your applymovement command. You are using PKSV, right?

EDIT: It is pauseevent 0x0. Just put it after the applymovement.
 

Bolens

Soul Hacker
359
Posts
14
Years
  • Age 30
  • PA
  • Seen Aug 22, 2016
Bolens, you need a pause (I'm not sure but maybe pausemovement or something) after your applymovement command. You are using PKSV, right?

EDIT: It is pauseevent 0x0. Just put it after the applymovement.

Thanks man, it works now.
 
Status
Not open for further replies.
Back
Top