• 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.
8
Posts
12
Years
  • Seen Aug 29, 2011
Does anyone know how I can create a wild pokemon battle script with pksv? The one in the script generator doesnt work. So how can I make it manually?
 
3
Posts
12
Years
  • Seen Aug 15, 2011
Please help.
Program - PKSV (i know i should use xse..)

basically the script moves around a map and its all fine, but there is a small bit at the end where only one of four sprites follows its applymovement command?
can anyone help please :)

here is the script.
Spoiler:
 
Last edited by a moderator:

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
I made a trainerbattle script, and it works fine...

...but if I get into a wild battle, and the sprite of the trainer battle is on the screen, when the encounter ends I control the trainer sprite while the hero just stays stuck in the grass. Why is this happening?

Thanks.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I made a trainerbattle script, and it works fine...

...but if I get into a wild battle, and the sprite of the trainer battle is on the screen, when the encounter ends I control the trainer sprite while the hero just stays stuck in the grass. Why is this happening?

Thanks.

That OW's movement type has probably been set to 'look down'. Change it to 'no movement' in Advance Map and everything should be fine.
 
7
Posts
13
Years
  • Seen Sep 4, 2011
This is the script I need help with. It is working fine, but only if I talk to Misty. I want Misty to see me when I run past her, and come to me to trigger the event. How do i do that?

Spoiler:
 

hinkage

Everyone currently in an argument with this member
383
Posts
13
Years
  • Age 28
  • Seen Apr 15, 2024
This is the script I need help with. It is working fine, but only if I talk to Misty. I want Misty to see me when I run past her, and come to me to trigger the event. How do i do that?

Spoiler:

You need to create scriptboxes that set vars, then jump to the offset where the script you wrote is located.

In that script you must compare which var has been set, to use the correct movement data.

So it might look something like this for the first scriptbox:

Spoiler:


If you want, you can even make the "!" appear over her head to make it more realistic.

If you ever need help, you can also always check out how Gamefreak did it. That's usually a big help for me, because you know the script works. (Except with paymoney, which shows up differently in PKSV than how it should)
 
Last edited:
7
Posts
13
Years
  • Seen Sep 4, 2011
You need to create scriptboxes that set vars, then jump to the offset where the script you wrote is located.

In that script you must compare which var has been set, to use the correct movement data.

So it might look something like this for the first scriptbox:

Spoiler:


If you want, you can even make the "!" appear over her head to make it more realistic.

Wait...Im confused...How do i do that? (im a beginner)
 

hinkage

Everyone currently in an argument with this member
383
Posts
13
Years
  • Age 28
  • Seen Apr 15, 2024
Wait...Im confused...How do i do that? (im a beginner)

Spoiler:


Hope that helps. It's hard to get any simpler, and there are tutorials for scripting, too.
 
Last edited:
1
Posts
12
Years
  • Seen Jul 21, 2011
I have three questions about XSE:

1. Is there a command that allows us to remove a Pok?mon from the player's party?
2. Is there a "delay" command that produces a small delay between one command and the next?
3. Is there a msgbox type that displays a message box while the player is doing other actions (such as moving) and the message box doesn't go away until the moving command(s) or whatever have finished?
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I have three questions about XSE:

1. Is there a command that allows us to remove a Pok?mon from the player's party?

No, but you can use insert the ASM code written by HackMew with a Hex Editor and use the callasm command. Here's a tutorial for writing the script:

http://www.pokecommunity.com/showthread.php?t=210016

2. Is there a "delay" command that produces a small delay between one command and the next?

The command pause can cause a delay for any amount of time (just put any number from 0x1 to 0xff after it).

3. Is there a msgbox type that displays a message box while the player is doing other actions (such as moving) and the message box doesn't go away until the moving command(s) or whatever have finished?

Use msg_keepopen. When everything is completed that you want to be completed (after all the waitmovement commands in the script) just insert the command closeonkeypress - the message box should stay open in between.
 

Articuno23

Sub-Zero
16
Posts
12
Years
  • Seen May 31, 2012
I have used var number 4050 again and again without any problems however i keep the value 0000 every time. I would like to know if for a green script tile with var # and values 4050 and 0001 to activate would you have to setvar 0x4050 0001 in a previous script?
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I have used var number 4050 again and again without any problems however i keep the value 0000 every time. I would like to know if for a green script tile with var # and values 4050 and 0001 to activate would you have to setvar 0x4050 0001 in a previous script?

Yes, you need to have set the variable to what you specify in the 'Var value' box for the script to activate. If you haven't done that, you'll step over the tile as if there was nothing there.

This is quite useful as it avoids a number of lines in the script that check for a flag in order to skip it.
 

Articuno23

Sub-Zero
16
Posts
12
Years
  • Seen May 31, 2012
Also, i have a large applymovement script where the sprites are hidden and then appear using showsprite, show this makes it look like they get out of a boat. However some sprites stay hidden when they are meant to appear and some aren't hidden at the start when they are meant to. I have used var 4050 0000 for all of this script and put it in each sprites ID and put unknown 0003 but it still doesn't work. 3 sprites work how i want them and 3 don't. Is this because there is not enough space in the var number and if so how do i get more space. Thanks.

Spoiler:



This script pauses at the part when gary is meant to get out of the boat. (Showsprite 48) Also the girl with the spheal , (spheal) doesn't appear when i use showsprite. NEED HELP!! Thanks alot in advance.
 
Last edited:
52
Posts
12
Years
please help

#org $script
checkflag 0x1201
if 0x01 goto $done
message $stop
$stop 1 = Stop!\nYou can't go without a\pPokémon!
boxset 6
applymovement 2 $move
$move 1 ; #binary 0x61 0x11 0x11 0x11 0x11 0x11 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x11 0x4A 0xFE
pausemove 0x0000
message $pokemon
$pokemon 1 = I will help you with your \nadventure. I will give you \pthis Pokémon!
boxset 6
givepokemon 131 5 0x8B
message $lapras
$lapras 1 = \v\h01 recieved a\nLapras! I will also give you\pthis!
boxset 6
setflag 0x1201
special 0x16F
message $pokedex
$pokedex 1 = \v\h01 recieved a\n Pokédex! Now you can go on your\pown pokemon adventure!
applymovement 2 $moveback
$moveback 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0x60 0xFE
release
end

#org $done
release
done

this is my script but it gives me an error and i don't know what is wrong!
Please help!
 

borisjo

Scripter (XSE, pokescript)
9
Posts
13
Years
  • Seen May 16, 2016
#org $script
checkflag 0x1201
if 0x01 goto $done
message $stop
$stop 1 = Stop!\nYou can't go without a\pPokémon!
boxset 6
applymovement 2 $move
$move 1 ; #binary 0x61 0x11 0x11 0x11 0x11 0x11 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x11 0x4A 0xFE
pausemove 0x0000
message $pokemon
$pokemon 1 = I will help you with your \nadventure. I will give you \pthis Pokémon!
boxset 6
givepokemon 131 5 0x8B
message $lapras
$lapras 1 = \v\h01 recieved a\nLapras! I will also give you\pthis!
boxset 6
setflag 0x1201
special 0x16F
message $pokedex
$pokedex 1 = \v\h01 recieved a\n Pokédex! Now you can go on your\pown pokemon adventure!
applymovement 2 $moveback
$moveback 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0x60 0xFE
release
end

#org $done
release
done

this is my script but it gives me an error and i don't know what is wrong!
Please help!

1st. You forgot the pausemove at $moveback.
2nd. It can also give problems if you use to many movements, try use a maximum of 9 on each line and you will get something like this:
applymovement 2 $move
$move 1 ; #binary 0x61 0x11 0x11 0x11 0x11 0x11 0x13 0x13
applymovement 2 $move2
$move2 1 ; #binary 0x13 0x11 0x11 0x11 0x11 0x11 0x4A 0xFE
pausemove 0

It's been a long time since I scripted with Pokéscript but I think this should work!
 
52
Posts
12
Years
1st. You forgot the pausemove at $moveback.
2nd. It can also give problems if you use to many movements, try use a maximum of 9 on each line and you will get something like this:
applymovement 2 $move
$move 1 ; #binary 0x61 0x11 0x11 0x11 0x11 0x11 0x13 0x13
applymovement 2 $move2
$move2 1 ; #binary 0x13 0x11 0x11 0x11 0x11 0x11 0x4A 0xFE
pausemove 0

It's been a long time since I scripted with Pokéscript but I think this should work!

I changed things as you said, but the person that has to move doesn't move.. can you please show me what i need to change in advance map because even with tons of tutorials i can't find out how it works..
 
275
Posts
13
Years
  • Seen Oct 9, 2019
I am having trouble with a yes/no XSE script. It keeps saying I'm missing #define. And when i use #define, It ends out like too many parameters.
Script:
Spoiler:
You're misusing the "goto" function, and trying to run a string as a script. Fixed version:

Spoiler:
 
4
Posts
12
Years
  • Seen May 22, 2013
I have a question regarding the battle music that is played in Pokémon Fire Red. I've made a script about a rival battle and it works fine. But the problem is that I want to change the music that is played during the battle. For example: play the Champion Battle Song (a-map: 012B battle 6) instead of the normal trainer battle song.
Here is my script in case I have to change something in there.

#dyn 0x740000
#org @start

lockall
faceplayer
setvar 0x4001 0x3
movesprite 0xA 0x19 0x21
jump @main

#org @main
textcolor BLUE
playsound 0x0 0x11D
reappear 0xA
msgbox @talk
callstd MSG_NOCLOSE
closemsg
applymovement 0xA @walk
pauseevent 0x0
message @question
callstd MSG_YESNO
compare LASTRESULT YES
if == call @pushedyes
compare LASTRESULT NO
if == call @pushedno
trainerbattle 0x9 0x2 0x0 @win @lose
msgbox @speak
callstd MSG_NOCLOSE
closemsg
pause 0xA
playsound 0x0 0x112
compare 0x4001 0x0
if == call @move1
compare 0x4001 0x1
if == call @move2
compare 0x4001 0x2
if == call @move1
compare 0x4001 0x3
if == call @move2
fadedefault
disappear 0xA
setvar 0x401D 0x1
releaseall
end

#org @pushedyes
message @yes
callstd MSG_NORMAL
return

#org @pushedno
message @no
callstd MSG_NORMAL
return

#org @move1
applymovement 0xA @away1
pauseevent 0x0
return

#org @move2
applymovement 0xA @away2
pauseevent 0x0
return

#org @talk
= Stop right there!

#org @question
= Your name is \v\h01,\nam I right?

#org @yes
= Then prepare to fight!

#org @no
= Either way, \nprepare to battle

#org @win
= Lucky you.

#org @lose
= Ha, I knew it.

#org @speak
= I'm going to report this.

#org @walk
M walk_down walk_down walk_down walk_down walk_down end

#org @away1
M walk_right walk_down walk_down walk_down walk_down walk_down walk_down walk_down end

#org @away2
M walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down end


Please point me to the right topic if I posted wrong.
Thanks in advance,
Valor
 
Status
Not open for further replies.
Back
Top