• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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

  • 3
    Posts
    5
    Years
    • Seen Jun 7, 2020
    Hi. I am trying to learn how to script. I am pretty new at this (like a week in) and I have been working on getting this to work for like 2 days now and am running into a wall. I am trying to put together a talking script with an assistant at the Professors lab with 3 options in Emerald but I am running into trouble with the script I have written so far. I am using PKSUVI to generate simple scripts than building them out in XSE, while I am still learning.

    What I want the assistant to say "the professor is waiting for you", if you have not already.

    Once you have talked to the professor, I want the assistant to say "here let me upgrade your pokedex to the national dex".

    After its been upgraded, I want the assistant to say "its already been upgraded".


    When I compile my script, is works but with a hiccup. When I compile my script, the compiler adds 3 lines to it which cause the hiccup. Now after he says "let me upgrade your pokedex", the compiler adds a line saying "the professor is waiting for you". Does anyone see a problem in my code to explain why it adds lines 14-16 (in bold) to the script. Compiling the script changes nothing else but adding these lines. And every time i remove them and re-compile it, i will open the script back up and those three lines have been added back in.

    My code is below. Thanks for the help.

    -bbro43

    '-----------------------

    #org 0x1F9F84

    lock

    faceplayer

    checkflag 0x861

    if 0x0 goto 0x81F9FB1

    checkflag 0x203

    if 0x1 goto 0x81F9FA7

    msgbox 0x81FA4E2 '"I see the Professor gave you a\nPok..."

    setflag 0x203

    callstd 0x6

    special 0x1F3

    fanfare 0xF

    warp5 0xA6 0x1F 0x8 0x409 0x26C

    msgbox 0x81FA6CE '"The Professor is waiting for you."

    callstd 0x4

    release

    end

    '-----------------------

    #org 0x1F9FB1

    msgbox 0x81FA6CE '"The Professor is waiting for you."

    callstd 0x4

    release

    end

    '-----------------------

    #org 0x1F9FA7

    msgbox 0x81FA641 '"You POKéDEX was already upgraded."

    callstd 0x4

    release

    end

    '---------

    ' Strings

    '---------

    #org 0x1FA4E2

    = I see the Professor gave you a\nPokémon for you adventure.\lThese Pokémon are originally from\lthe Johto Region.\lHowever, our environment\lchanged their typing.\lAll set. you Pokédex was upgraded to\lthe National Dex.

    #org 0x1FA6CE

    = The Professor is waiting for you.

    #org 0x1FA641

    = You POKéDEX was already upgraded.
     
    There are slightly much easier and better ways to do this, but I will go with yours. Just compile this script in XSE:
    Code:
    #dynamic 0x(FSF Offset)
    
    #org @start
    lock
    faceplayer
    checkflag 0x861
    if 0x1 goto @done
    msgbox @msg1 0x2
    waitmsg
    release
    end
    
    #org @done
    checkflag 0x203
    if 0x1 goto @done2
    msgbox @msg2 0x2
    waitmsg
    
    { WHAT EVER YOU
      WANT HERE }
    
    setflag 0x203 
    release
    end
    
    #org @done2
    msgbox @msg3 0x2
    end
    
    #org @msg1
    = The Professor is waiting for you.
    
    #org @msg2
    = { WHAT EVER YOU WANT HERE }
    
    #org @msg3
    = I already upgraded your POKéDEX.
    Where "{ }" indicate what YOU want to add in the script.
     
    I would love to learn how to do it better. How would you do it to make it easier?
     
    I am new, but if its easier I am willing to take the time and learn it. Is their a good video tutorial or thread tutorial that you recommend?
     
    I am new, but if its easier I am willing to take the time and learn it. Is their a good video tutorial or thread tutorial that you recommend?

    Well... no. There are ways in which you yourself can make it simpler. It really isn't a thing for which a tutorial should be made. These are, well, included in the "Tips and Tricks" section, maybe. And there are MANY ways in which it can be made simpler.
    No stress. You will learn them as you progress.
     
    Back
    Top