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

[Other] Script Help

N7

  • 8
    Posts
    9
    Years
    • Seen Aug 17, 2014
    Hey all, new member here so not sure if this is in the right place.

    Anyways, down to business. I made a script for my starting town where Oak stops you from going outside (yeah, shocker) and takes you back to his lab. While testing it, everything ran perfectly, except at the end. Once the script reached it's end, it began to spit out random characters like the picture attached. It also never stops, just keeps on going and going forever. Here is my code:

    Also, @parttwo doesn't start until you enter Oak's lab. Rather than writing two scripts, I added a check at the beginning so once he takes you into his lab the script starts again and then goes to the second half.

    Code:
    #dynamic 0x80E48F
    
    #org @check
    checkflag 0x1301
    if 0x00 goto @start
    if 0x01 goto @parttwo
    
    #org @start
    msgbox @hey 0x6
    applymovement 0xFF @omg
    waitmovement 0x0
    clearflag 0x1300
    applymovement 3 @oakup
    waitmovement 0x0
    msgbox @wait 0x6
    applymovement 3 @lab
    applymovement 0xFF @lab
    waitmovement 0x0
    setflag 0x1301
    warp 0x4 0x3 0x0 0x06 0x0C
    release
    end
    
    #org @parttwo
    applymovement 6 @walk
    applymovement 0xFF @walk
    waitmovement 0x0
    applymovement 6 @facedown
    waitmovement 0x0
    msgbox @now 0x6
    msgbox @will 0x5
    compare LASTRESULT 1
    if b_true goto @yes
    compare LASTRESULT 0
    if b_true goto @no
    
    #org @no
    msgbox @hmm 0x6
    msgbox @will 0x5
    compare LASTRESULT 1
    if b_true goto @yes
    compare LASTRESULT 0
    if b_true goto @no
    
    #org @yes
    msgbox @splendid 0x6
    setvar 0x6015 0x0001
    end
    
    #org @hey
    = ???: Hey, \v\h01!
    
    #org @omg
    #raw 0x62 0x04 0xFE
    
    #org @oakup
    #raw 0x11 0x11 0x11 0x11 0x11 0xFE
    
    #org @wait
    = PROF OAK: Wait!\nIt's not safe to enter that cave\lwithout a Pokémon!\pI know, come with me!
    
    #org @lab
    #raw 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x13 0x13 0x13 0x13 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x12 0x11 0xFE
    
    #org @walk
    #raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
    
    #org @facedown
    #raw 0x04 0xFE
    
    #org @splendid
    = Splendid! Now, as I mentioned\nbefore, Fuji's research center is\lin WISTERA CITY, just north of\lGLACIOUS FALLS. You can't miss it!\pIn order to make your way there,\nyou'll need a Pokémon to protect\lyourself for crossing through MT.\lTAUPE.\pGo ahead, pick one!
    
    #org @hmm
    = ...\p...\pI'm a very patient man \v\h01.\pI can stand here all day if that's\nwhat it'll take.
    
    #org @will
    = Will you go to WISTERIA CITY in my\nplace \v\h01?
    
    #org @now
    = Sorry if I alarmed you back there!\nSo \v\h01, you're probably\lwondering why I brought you here.\pAn old friend of mine, Dr. Fuji\nbelieves that he has discovered a\lnew species of Pokémon!\pAs much as I would like to go and\ncheck it out for myself, I'm way\lbehind on my research as it is, and\lmy lab isn't even set up yet.

    Can anyone help me fix this? I literally have no idea what is causing it as everything else works fine.
     

    N7

  • 8
    Posts
    9
    Years
    • Seen Aug 17, 2014
    If you're talking about before the person numbers in the movement lines, I've tried changing that but it does nothing. Also, what do I need to "update?" Could you be more specific please?
     

    iv0

  • 145
    Posts
    10
    Years
    • Seen Sep 1, 2023
    Codes without end in last line cause bugs.
    And I never seen any movement without #raw.
    Can you send your compiled code? Never seen arguments calling results without 0x like compare LASTRESULT 0 for me it's wrong.
    And something much important I had forgotten @parttwo script will never start, you have to put the code inside the oak lab (and of course, it's is a level script you can edit in Header).
     

    N7

  • 8
    Posts
    9
    Years
    • Seen Aug 17, 2014
    It starts fine. I already put it in the lab. Also, I've tried it on a fresh FR rom and it does the same thing.

    Code:
    '---------------
    #org 0x80E48F
    checkflag 0x1301
    if 0x0 goto 0x880E49F
    if 0x1 goto 0x880E4E5
    '---------------
    #org 0x80E49F
    msgbox 0x880E55E MSG_NORMAL '"???: Hey, [player]!"
    applymovement MOVE_PLAYER 0x880E56E
    waitmovement 0x0
    clearflag 0x1300
    applymovement 0x3 0x880E572
    waitmovement 0x0
    msgbox 0x880E579 MSG_NORMAL '"PROF. OAK: Wait! It's not safe to ..."
    applymovement 0x3 0x880E5D3
    applymovement MOVE_PLAYER 0x880E5D3
    waitmovement 0x0
    setflag 0x1301
    warp 0x4 0x3 0x0 0x6 0xC
    release
    end
    
    '---------------
    #org 0x80E4E5
    applymovement 0x6 0x880E5F0
    applymovement MOVE_PLAYER 0x880E5F0
    waitmovement 0x0
    applymovement 0x6 0x880E5F9
    waitmovement 0x0
    msgbox 0x880E787 MSG_NORMAL '"Sorry if I alarmed you back there!..."
    msgbox 0x880E758 MSG_YESNO '"Will you go to WISTERIA CITY in my..."
    compare LASTRESULT 0x1
    if 0x1 goto 0x880E54E
    compare LASTRESULT 0x0
    if 0x1 goto 0x880E527
    '---------------
    #org 0x80E54E
    msgbox 0x880E5FC MSG_NORMAL '"Splendid! Now, as I mentioned\nbef..."
    setvar 0x6015 0x1
    release
    end
    
    '---------------
    #org 0x80E527
    msgbox 0x880E6FF MSG_NORMAL '"...\p...\pI'm a very patient man [..."
    msgbox 0x880E758 MSG_YESNO '"Will you go to WISTERIA CITY in my..."
    compare LASTRESULT 0x1
    if 0x1 goto 0x880E54E
    compare LASTRESULT 0x0
    if 0x1 goto 0x880E527
    
    '---------
    ' Strings
    '---------
    #org 0x80E55E
    = ???: Hey, [player]!
    
    #org 0x80E579
    = PROF. OAK: Wait! It's not safe to enter that\ncave without a POKÉMON!\pI know, follow me!
    
    #org 0x80E787
    = Sorry if I alarmed you back there!\nSo [player], you're probably\lwondering why I brought you here.\pAn old friend of mine, Dr. Fuji\nbelieves that he has discovered a\lnew species of Pokémon!\pAs much as I would like to go and\ncheck it out for myself, I'm way\lbehind on my research as it is, and\lmy lab isn't even set up yet.
    
    #org 0x80E758
    = Will you go to WISTERIA CITY in my\nplace [player]?
    
    #org 0x80E5FC
    = Splendid! Now, as I mentioned\nbefore, Fuji's research center is\lin WISTERA CITY, just north of\lGLACIOUS FALLS. You can't miss it!\pIn order to make your way there,\nyou'll need a Pokémon to protect\lyourself for crossing through MT.\lTAUPE.\pGo ahead, pick one!
    
    #org 0x80E6FF
    = ...\p...\pI'm a very patient man [player].\pI can stand here all day if that's\nwhat it'll take.
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x80E56E
    #raw 0x62 'Exclamation Mark (!)
    #raw 0x4 'Face Down (Faster)
    #raw 0xFE 'End of Movements
    
    #org 0x80E572
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80E5D3
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80E5F0
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80E5F9
    #raw 0x4 'Face Down (Faster)
    #raw 0xFE 'End of Movements
     
    Last edited:

    N7

  • 8
    Posts
    9
    Years
    • Seen Aug 17, 2014
    I fixed this, thanks to tajaros scripting tutorial. Thanks to all who helped. :D
     
    Back
    Top