• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

PKSV Extra Scripting Tutorials

6
Posts
10
Years
  • Age 27
  • Seen Nov 19, 2017
This is what it should be:

#dyn 0x740001
#org 0x81565C
'-----------------------------------
lockall
checkflag 0x253
if true jump 0x87405A ' Flag is set
if false jump 0x87409E
setflag 0x251
waitbutton
releaseall
end

#org 0x87405A
message 0x87402A ' I'm sorry, th-\pOh r...
showmsg
waitbutton
fadescreen FADEOUT_WHITE
closemsg
disappear 0x3
setflag 0x251
fadescreen FADEIN_WHITE
releaseall
end

#org 0x87409E
message 0x87409B
showmsg
waitbutton
release
end

#org 0x87409B
= I'm sorry, it is too dangerous up ahead\pwithout a POKe\MON, maybe you could borrow one?

#org 0x87402A
= Recent POK\eMON attacks mean that it \is now too dangerous for people to travel alone[.]
 

manadhon

RTX-008L
119
Posts
10
Years
Well, I took a look at your script, and rewrote it:

Code:
#dyn 0x740000
#org @main
checkflag 0x253
if == jump @1
jump @2

#org @1
lock
faceplayer
message @3
callstd MSG_NORMAL
fadescreen FADEOUT_BLACK
disappear 0x3
fadescreen FADEIN_BLACK
setflag 0x251
release
end 

#org @2
lock
faceplayer
message @4
callstd MSG_NORMAL
release
end

#org @3
= You may proceed.

#org @4 
= I'm sorry, but it's too dangerous\nup ahead without a Pok\emon. Maybe\lyou could borrow one?

You don't need to use if twice, and lockall and releaseall should only be used when movement is involved (although it does not have a major effect on the script). Showmsg and waitbutton are also unnecessary, unless it's a level script (or something elaborate), so use callstd. Modify the script to your needs, and feel free to ask if you have any further questions/problems.
 
6
Posts
10
Years
  • Age 27
  • Seen Nov 19, 2017
Thank you so much! I am new to PKSV so I make stupid mistakes...

I'm making a road blocked script and thanks to manadhon I have made half of it, but now I need to make the person script. Can anyone help? This is the first script that manahdon made:
#org 0x8740000
'-----------------------------------
#raw 0xFF
checkflag 0x253
if true jump 0x874000F ' Flag is set
jump 0x8740024

#org 0x874000F
'-----------------------------------
lock
faceplayer
message 0x874002F ' You may proceed.
callstd MSG_LOCK ' Built-in lock command
fadescreen FADEOUT_BLACK
disappear 0x3
fadescreen FADEIN_BLACK
setflag 0x251
release
end

#org 0x8740024
'-----------------------------------
lock
faceplayer
message 0x8740040 ' I'm sorry, but it's ...
callstd MSG_LOCK ' Built-in lock command
release
end


#org 0x874002F
= You may proceed.

#org 0x8740040
= I'm sorry, but it's too dangerous\nup ahead without a Pok\emon. Maybe\lyou could borrow one?






Can someone please help?
 
Last edited:
6
Posts
10
Years
  • Age 27
  • Seen Nov 19, 2017
This is what my script should be:

#dyn 0x740002

#org @start
lock
faceplayer
msgbox @text ' ????: So, Whatdaya say? /pWant this rare POK\eMON or not?
callstd MSG_YESNO
if true jump @givetorchic
if false jump @no
end

#org @givetorchic
checkflag 0x250
if 0x1 jump :end
setflag FR_POKEMON
addpokemon TORCHIC 0x5 NONE 0 0 0
setflag 0x250
storepokemon 0 TORCHIC
message @get-msg
fanfare 0x101
showmsg
waitfanfare
waitbutton
message @yes
:end
release
end


#org @no
message @no
release
end

#org @noroom-msg
= You don't have enough room in your party.

#org @get-msg
= You got a \v\h02!

#org @speech
= ????: So, Whatdaya say? /pWant this rare POK\eMON or not?

#org @yes
= ????: I picked this POK\eMON up in /pHOENN[.] Don't worry I didn't /nsteal it[.]/p Maybe I'll see you around[.]

#org @no
= ????: Hmph[.] /pYou do know you're missing out /non the opportunity of a lifetime?

But when I open it on advance map it looks like this:
#org 0x8740002
'-----------------------------------
checkflag 0x250
if true jump 0x874003B ' Flag is set
setflag FR_POKEMON
countpokemon
compare LASTRESULT 0x6
if == jump 0x874003D ' Equal To
addpokemon TORCHIC 5 NONE 0x0 0x0 0x0
setflag 0x250
storepokemon 0x0 TORCHIC
message 0x8740071 ' You got a \v\h02!
fanfare 0x101
showmsg
waitfanfare
waitbutton
release
end

#org 0x874003B
'-----------------------------------
release
end

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


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

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

What is wrong?
Please help...
 

manadhon

RTX-008L
119
Posts
10
Years
Manadhon to the rescue again.

Rewritten and tested:
Code:
#dyn 0x740002
#org @main
lock
faceplayer
checkflag FR_POKEMON
if == jump @End
message @Text 
callstd MSG_YESNO
compare LASTRESULT YES
if == jump @Give_Torchic
jump @No

#org @No
message @Nope
callstd MSG_NORMAL
release
end 

#org @Give_Torchic
countpokemon
compare LASTRESULT 0x6
if < call @Give
message @Room
callstd MSG_NORMAL
release
end

#org @Give
addpokemon TORCHIC 5 NONE 0 0 0
fanfare 0x101
message @Get_Msg
callstd MSG_NOCLOSE
waitfanfare
closemsg
message @Nikname
callstd MSG_YESNO
compare LASTRESULT YES
if == call @Yes
setflag FR_POKEMON
release
end

#org @End
message @Around
callstd MSG_NORMAL
release
end

#org @Yes
fadescreen FADEOUT_BLACK
special NAME_POKEMON
waitspecial
setflag FR_POKEMON
return

#org @Text
= ????: Hey, kid! I got this\nrare Pok\emon, and, well,\ldo you want it?

#org @Nope
= ????: Hmph...\pI hope you know you're missing\nout on the chance of a lifetime.

#org @Room
= ????: What, you don't even have\nroom? Come back when you do.

#org @Around
= ????: I got that in Hoenn,\nso don't worry about me stealing\lit or anything. Maybe I'll see\lyou around.

#org @Get_Msg
= \v\h01 recieved a Torchic!

#org @Nikname
= Would you like to give\nTorchic a nickname?

To start off, make sure your checkflag is at the beginning of the script. Instead of using if twice, use compare LASTRESULT for yes (or no) and jump for the opposite. Don't use :end unless you have a message prepared. Otherwise, jump to another offset (like myself).
The storepokemon command is unnecessary, since you're only using one Pokemon. The showmsg and waitbutton are unnecessary as well, just use callstd. Lastly, there was no pointer to noroom-msg.

Modify the script to your needs, and feel free to ask if you have any further questions and/or problems.
 
6
Posts
10
Years
  • Age 27
  • Seen Nov 19, 2017
A PKSV Extra Scripting Tutorial

I'm making a new script where you have to pay 10 pokedollars to get a pokemon but when I compile it a message comes up saying extra characters on line ignoring. What am I doing wrong?
 
Last edited:
8
Posts
10
Years
  • Age 53
  • Seen Aug 30, 2017
I copied the script that dragon456 used but when i ran it i found my self not at victory road but at silph co. dose any one know what went wrong?
 

manadhon

RTX-008L
119
Posts
10
Years
I'm going to address both of you:

Graphicsturtle123: Send me the script, and I'll help you

Superluke: use Advance Map for map values. If that doesn't help, contact me.
 
6
Posts
10
Years
  • Age 27
  • Seen Nov 19, 2017
#dyn 0x740004
#org @main
lock
faceplayer
checkflag FR_POKEMON
if == jump @End
showmoney 0x0 0x0
message @Text
callstd MSG_YESNO
compare LASTRESULT YES
if == jump @Check Money
jump @No

#org @No
message @Nope
callstd MSG_NORMAL
release
end

#org @Check Money
checkmoney 0x10 0x0 0x0
compare LASTRESULT 0x1
if == jump @Give_Oshawott
jump @nomoney

#org @Give_Oshawott
countpokemon
compare LASTRESULT 0x6
if < call @Give
message @Room
callstd MSG_NORMAL
release
end

#org @nomoney
message @notenoughmoney
release
end

#org @Give
addpokemon MAGIKARP 5 NONE 0 0 0
fanfare 0x101
message @Get_Msg
callstd MSG_NOCLOSE
waitfanfare
closemsg
message @Nikname
callstd MSG_YESNO
compare LASTRESULT YES
if == call @Yes
setflag FR_POKEMON
paymoney 10 0
updatemoney 0 0 0
hidemoney 0 0
release
end

#org @End
message @Around
callstd MSG_NORMAL
release
end

#org @Yes
fadescreen FADEOUT_BLACK
special NAME_POKEMON
waitspecial
setflag FR_POKEMON
return

#org @Text
= ????: Hey, kid! I got this\nrare Pok\emon, and, well,\ldo you want it?

#org @Nope
= ????: Hmph...\pI hope you know you're missing\nout on the chance of a lifetime.

#org @Room
= ????: What, you don't even have\nroom? Come back when you do.

#org @Around
= ????: What are you saying? /p It's not an OSHAWOTT? /n Well it is what it is, and you/ponly paid $10 for it - what do you expect?

#org @Get_Msg
= \v\h01 recieved an OSHAWOTT!

#org @Nikname
= Would you like to give\nOshawott a nickname?

#org @notenoughmoney
= ????: You have some cheek, /pcoming here and then not buying my /nthings[.]
This is it.....................
 

ContestTrainer

YamiiVance
7
Posts
12
Years
Hey I made this script for the normal pokedex but everytime I make my character go get it, they obtain it but then the game just freezes its very upsetting, could you Please show me what I'm doing wrong. Thank you!

#dyn 0x740000
#org @start
'-----------------------------------
message 0x87402DB ' You've stolen a Poke...
callstd MSG_LOCK ' Built-in lock command
special 0x829
release
end


#org 0x87402DB
= You've stolen a Pokedex!
 

Terff

the unimportant
53
Posts
10
Years
So I've been working on scripting Leaf green and I can't find the offset for the champion battle, I want to edit his text but I just can't find the offset anywhere.
 

Sniper

ふゆかい
1,412
Posts
10
Years
So I've been working on scripting Leaf green and I can't find the offset for the champion battle, I want to edit his text but I just can't find the offset anywhere.

I don't know if this helps. Go to advance map, go the the place where the champion is, click the champion, copy the offset or open offset.
 

RuFF

Hope you're having a RuFF day!
365
Posts
11
Years
can you give us a list of commands in pksv and how do i use reappear and disappear
because when i used the disappear it reappears and when i used reappear it wont appear
 

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
can you give us a list of commands in pksv and how do i use reappear and disappear
because when i used the disappear it reappears and when i used reappear it wont appear

I don't know too much about the "reappear" command, but I can help you with "disappear."

When you want a sprite on the map to disappear after a certain event, like being talked to, you need to know the Person Event Number. You can find this by going on Advancemap, clicking the events tab and clicking the person event in question. If you look to the right you'll see a list of information. The Person Event Number should be displayed underneath the "delete event" button.

Once you have that, you need to write the script. For the disappearing part, I usually go with this:

Fadescreen FADEOUT_BLACK
disappear 0x(Person Event Number)
fadescreed FADEIN_BLACK


I do this because it looks better in game, but the fade screens aren't too important. The next thing you need to do is make the event stay gone once it disappears. For that, you'll need to set a flag.

setflag 0x###

That number can be anything, just remember to write it down because that number can't be used for any other flag. After you've set the flag, just click on the Person Event you want to disappear and find the Person ID. It should be close to the "open script" button. Set the person ID to the number of the flag you set and BOOM! Your person should stay gone after the script ends.

I'm sorry I can't help you with reappearing, but my guess is that it would use the same concepts at disappear.
 

RuFF

Hope you're having a RuFF day!
365
Posts
11
Years
I don't know too much about the "reappear" command, but I can help you with "disappear."

When you want a sprite on the map to disappear after a certain event, like being talked to, you need to know the Person Event Number. You can find this by going on Advancemap, clicking the events tab and clicking the person event in question. If you look to the right you'll see a list of information. The Person Event Number should be displayed underneath the "delete event" button.

Once you have that, you need to write the script. For the disappearing part, I usually go with this:

Fadescreen FADEOUT_BLACK
disappear 0x(Person Event Number)
fadescreed FADEIN_BLACK


I do this because it looks better in game, but the fade screens aren't too important. The next thing you need to do is make the event stay gone once it disappears. For that, you'll need to set a flag.

setflag 0x###

That number can be anything, just remember to write it down because that number can't be used for any other flag. After you've set the flag, just click on the Person Event you want to disappear and find the Person ID. It should be close to the "open script" button. Set the person ID to the number of the flag you set and BOOM! Your person should stay gone after the script ends.

I'm sorry I can't help you with reappearing, but my guess is that it would use the same concepts at disappear.

Thanks. This will help. I manage to know how to use the reappear
 
25
Posts
9
Years
  • Age 34
  • Seen Jul 26, 2015
Hey I'm currently making a rom hack of fire red and I've followed all your instructions on making a person give you the national dex and I can't get them to do anything but tell me they're gonna give me the dex... They never give it to me though. Please email me [email protected]. I really need to have national dex for my rom hack since I have so many pokes that won't evolve
Thanks!
Ps
Please messege me back I need you bad bro I've googled this for like two wks now and no luck until I ran upon your page... But still haven't fully got it down
 
25
Posts
9
Years
  • Age 34
  • Seen Jul 26, 2015
Well, that's easy as well.

Just use this code:

Code:
[FONT="Courier New"]special FR_NATIONAL_DEX[/FONT]

You can use that after your message saying that you'll upgrade his/her Pokedex. Example:

Code:
#dyn 0x740000
#org @main
lock
faceplayer
message @upgradepokedex
callstd MSG_NORMAL
special FR_NATIONAL_DEX
release
end

#org @upgradepokedex
= I'll upgrade your Pokedex for you.



Can you please elaborate. Is this a script generator thing? If so. Which steps do I take to get this done? Been trying for weeks
 
18
Posts
5
Years
  • Age 36
  • Seen Sep 4, 2019
I need help with a yes no give pokemon script i just need a basic one ive watched tutorials on it but im not figuring out how to insert a basic yes no into a give pokemon im using firered

this is my script so far i got it to give me a pokemon when i say yes but my letter bot glitches out, but if i click no it freezes i really need help


#dyn 0x740000
#org @start
lock
faceplayer
msgbox @start
callstd MSG_YESNO
compare LASTRESULT YES
if == jump @give
jump @no

#dyn 0x740001
#org @give
checkflag 0x01fe
if 0x1 jump :end
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
addpokemon BULBASAUR 5 NONE 0 0 0
setflag 0x01fe
storepokemon 0 BULBASAUR
message @get-msg
fanfare 0x101
showmsg
waitfanfare
waitbutton
:end
release
end

#org @noroom
msgbox @noroom-msg
callstd MSG_NOCLOSE
release
end

#org @start
= Would you like to have my pokemon?/nI'm not the greatest trainer!

#org @noroom-msg
= You don't have enough room in your party.

#org @get-msg
= You got a \v\h02!
 
Last edited:
Back
Top