- 8
- Posts
- 13
- 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?
Use XSE and you will be able to do anything =)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?
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.
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:'---------------
#org 0x801289
lock
faceplayer
checkflag 0x514
if 0x1 goto 0x88012AF
checkflag 0x510
if 0x1 goto 0x88012C1
applymovement 0x1 0x880132D
waitmovement 0x0
special 0x157
setflag 0x510
release
end
'---------------
#org 0x8012AF
trainerbattle 0x1 0x147 0x0 0x880132F 0x880140B 0x88012CB
msgbox 0x88012F1 0x6 '"MISTY: Hey! What are you doing \nw..."
release
end
'---------------
#org 0x8012C1
msgbox 0x88012F1 0x6 '"MISTY: Hey! What are you doing \nw..."
release
end
'---------------
#org 0x8012CB
msgbox 0x880144A 0x6 '"You see, my sisters and I run \nth..."
giveitem 0x106 0x1 0x0
msgbox 0x8801546 0x6 '"Anyways, my sisters are not very \..."
fadescreen 0x0
hidesprite 0x2
setflag 0x512
release
end
'---------
' Strings
'---------
#org 0x80132F
= MISTY: ... \n... \pSo you were using my bike to \nflee from a group of attacking \pSpearow? \nIt's all right, I understand. \p... \n... \pBy the way, since you're a \nTrainer just like me, what do \pyou say to a battle right now?
#org 0x80140B
= Perhaps I should have brought \nalong some Pokemon from home...
#org 0x8012F1
= MISTY: Hey! What are you doing \nwith my bike! Give it back!
#org 0x80144A
= You see, my sisters and I run \nthe Pokemon Gym in Cerulean City. \pWe specialize in the Water-type, \nso I'm here right now trying to \pfish up some new Pokemon. \n...But this Old Rod can't seem to \pcatch anything good. Perhaps you \nwould like to have it?
#org 0x801546
= Anyways, my sisters are not very \nresponsible, so I need to head \pback in case there are any new \nchallengers. See you later!
'-----------
' Movements
'-----------
#org 0x80132D
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
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:
#org start
setvar 0x4001 0x0
jump 0x801289
#org 0x801289
compare 0x4001 0x0
if == jump compare1
compare 0x4001 0x1...
etc.
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)
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?
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?
#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!
You're misusing the "goto" function, and trying to run a string as a script. Fixed version: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:#dynamic 0x8002A8
#org @start
lock
faceplayer
msgbox @question 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @no 0x2
release
end
#org @question
= Do you like the new ship?
#org @no
= Oh. You don't like the new ship?\nDon't worry. Everybody's opinion\lis different.
#org @yes
= Ok! Cool!