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

PKSV scripting Tutorial/Script Thread

Full Metal

C(++) Developer.
810
Posts
16
Years
  • @dragon456 - Well, for starters you have redundant lockall dealies. ( why release, then immediately lock ? ) and secondly, you're missing your :end label specifier, and a setflag statement from what I can see.
    @markis - um.... what?
     

    Roboto-kun

    is an Ace Trainer.
    10
    Posts
    13
    Years
    • Seen Nov 30, 2012
    You must compile them. Even if I compiled it here and gave you the codes it would differ depending on the ROM and the scripting program has to actually implant the scripts themselves. I suggest looking at someone compiling a script on youtube, it's not an easy matter to explain in words (people often get confused).

    Just click the compile button. Omg. It's so easy. o.o

    Hi, i'm new here. I have 3 questions. First, wtf that FR_BADGE_1 and RS_BADGE_1. And others like what? What whey do and how to use with examples? Second, can you tell more about MSG_FIND MSG_NORMAL and others? What whey do and how to use? With examples. And third, how to make person event follow player script? Like in pkmn yellow. Looking forward to your answer.

    Hi, i'm new here. I have 3 questions. First, wtf that FR_BADGE_1 and RS_BADGE_1. And others like what? What whey do and how to use with examples? Second, can you tell more about MSG_FIND MSG_NORMAL and others? What whey do and how to use? With examples. And third, how to make person event follow player script? Like in pkmn yellow. Looking forward to your answer.

    Answers:
    1. FR_BADGE_1 is a command that gives you the 1st badge. FR_BADGE_2 is the second and so on. RS_BADGE_1 will erase your badge. How to use FR_BADGE_1:

    #dyn 0x740000
    $org @main
    lock
    faceplayer
    setflag FR_BADGE_1
    release
    end

    That's about it.

    2. MSG_NORMAL is a normal message. MSG_NORMAL is a message like "Player found the rare candy!". MSG_NOCLOSE is a non-closing message, much like MSG_NORMAL. However, the only difference between the two is MSG_NOCLOSE doesn't close even when the next command appears. To close it, use closemsg. MSG_OBTAIN are messages like "Player obtained item!". MSG_YESNO are used for yes and no messages. I think there're more, but figure them out by yourself. ;D

    How to use MSG_NORMAL:
    #dyn 0x740000
    #org @start
    lock
    faceplayer
    message @talk
    callstd MSG_NORMAL
    release
    end

    #org @talk
    = Hello.

    How to use MSG_NOCLOSE:
    #dyn 0x740000
    #org @start
    lock
    faceplayer
    message @talk
    callstd MSG_NOCLOSE
    release - BTW, a command like release can also close MSG_NOCLOSE
    end

    #org @talk
    = Hello.

    How to use MSG_FIND/OBTAIN:
    #dyn 0x740000
    #org @start
    lock
    faceplayer
    copyvar 0x8000 POTION (or something like that)
    callstd MSG_FIND < MSG_OBTAIN is used like that as well.
    release
    end

    How to use MSG_YESNO:
    #dyn 0x740000
    #org @start
    lock
    faceplayer
    message @talk
    callstd MSG_YESNO
    compare LASTRESULT YES
    if == jump @yes
    compare LASTRESULT NO
    if == jump @no
    release
    end

    #org @talk
    = Are you a girl?

    #org @yes
    = Oh! Ok.

    #org @no
    = Oh...

    3. It is quite impossible to make a Pokemon follow you. I've seen videos, however, you cannot tell if they're real.

    Hope I helped you!

    Multiple choice function?
     
    Last edited:
    2
    Posts
    12
    Years
    • Seen Jun 4, 2011
    I want to learn to make a script, where the pokedex is givin to me, maybe with a message attached.
     
    6
    Posts
    12
    Years
    • Seen Nov 11, 2012
    Hey buddy, thanks for this tutorial, its really helped me. I don't know if I missed it, but do you have a section which includes how to make a sprite dissapear?

    In my hack I have someone guarding the exit out of the first town, and I want them to move out the way once I recieve my pokemon.

    Would I use flags, person ID's or something alike?
    If you can help me I would be so grateful, thanks.
     

    Full Metal

    C(++) Developer.
    810
    Posts
    16
    Years
  • ^ I believe there is an 'in depth advance map tutorial'
    search 'map tutorial'
    I believe it's by the author of NSE, but my memory is rusty at best.
    But the idea of it is, you take the person ID of an OW on advance-map, and that is a flag. When you set the flag, that person vanishes. When you clear the flag, they reappear. Pretty convenient feature. (:
    Alternately, if you just want to hide them temporarily I believe there is a 'hidesprite 0xZZ' command, that hides the OW with the ID of 0xZZ. Like I said, this is based off the top of my head, and my memory is about as good as a gold-fish's. X)
     

    ahsome

    Scripter Legend
    15
    Posts
    12
    Years
  • Thx man, your tutorial is like one of the only ones :(
    You are great, and this tutorial made me want to do PKSV and no other (but the compile that automatically finds free space kept me on going lol :D)
    Just wanna know, can you make a YouTube of this? cause i really needed this scripting for my hack (Pokemon Operation Blackstrike btw)
    Unless you wanna help my hack? That will be good too :D :D
     

    ahsome

    Scripter Legend
    15
    Posts
    12
    Years
  • sure i dont mind :P
    btw, do you know how to hack ruby?
    because i want to make it that, you know the place where the truck is?
    when you get out, you go outside your house right?
    well, i wanted to make a truck an aeroplane (wacky idea, but hey :P) but i keep teleporting to the original spot all the time grrr
    when i looked at the warp in the truck it leads nowhere WHY???
    it says this
    WARP
    warp no:127
    map bank:127
    map:127
    thats from advance map
    PLS HELP ME< I KNOW IT MUST BE SCRIPT SO HELP ME PLSPSLSPSLSPLS :'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(
     

    ahsome

    Scripter Legend
    15
    Posts
    12
    Years
  • Then can hou PM me how to change it to a different spot pls. I really need this to work. Il add you to the people who help section :D
    BTW, how you make a scipt that if you go somwhere, some guy comes from nowhere and talkee to you? (i think its a green box script, not sure)
     

    Full Metal

    C(++) Developer.
    810
    Posts
    16
    Years
  • ^ TBH I think you should give up for now. Learn how to script, then continue. At this rate you're never going to get far. You need to learn how to stand on your own two feet.
    The level script can be found via A-MAP and decompiled w/ PKSV.
     
    8
    Posts
    12
    Years
    • Seen Aug 29, 2011
    How can I create a pokemon battle script? The script generator doesn't work for me it just freezes my fire red when I click A on the sprite with the generated pokemon script and it doesnt work for S/R/E eather some help would be appreciated
     
    8
    Posts
    12
    Years
    • Seen Aug 29, 2011
    wow it worked for my firered and leafgreen! Thanks but the script generators wild battle script still doesn't work for R/S/E
     
    7
    Posts
    13
    Years
    • Seen Feb 2, 2013
    Can someone help?

    can someone here help me? iv looked all around and i cant figure out whats wrong in it. everytime its activated the game just freezes instead of continuing on with the script. <spoiler> #dyn 0x740000
    #org @start
    checkflag 0x0856
    if true jump @end
    lock
    msgbox @class
    callstd MSG_NORMAL
    msgbox @quizyesno
    callstd MSG_YESNO
    if 0x1 jump @quizquestion
    jump @decline


    #org @class
    = \v\h01! Where do you think you're going? \nClass isn't over yet. \pIf you can answer my question \nI will let you go early, but you must be back \p in time for graduation!

    #org @quizyesno
    = Do you want to take her quiz?
    #org @quizquestion
    msgbox @quiz
    callstd MSG_YESNO
    if 0x1 jump @correct
    jump @wrong
    #org @quiz
    = Does the status effect POISON damage \nyour POKEMON's health?

    #org @correct
    callstd MSG_NORMAL
    msgbox @yay
    setflag 0x0856
    release
    end
    #org @wrong
    = I guess someone didn't study their notes\nvery well.
    applymovement PLAYER @left
    #org @left
    M walk_left end
    #org @decline
    msgbox @sit
    callstd MSG_NORMAL
    release
    end
    #org @sit
    = Well then sit back down and wait for class to end.
    #org @end
    end
    #org @yay
    = Alright, fine. Just be back soon </spoiler>
     

    slowbro42

    The World's Worst Hacker
    6
    Posts
    13
    Years
  • i input a give-pokemon script and placed the script offset correctly but when i test the game the person doesn't appear on the map unless i walk around a bit. and when i finally talk to him he reads the text that some other person on the map would say. what's wrong? I have delted the person many times and tried new givepokemon scripts but the same thing happens. please help.
     
    Back
    Top