• 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] Game/Script bug

  • 19
    Posts
    9
    Years
    • Seen Aug 28, 2014
    Hey everyone. I'm having a bit of trouble trying to write a script where If you have over 10000 poke dollars you battle someone that you talk to and he takes it from you after you win the battle. I implemented the script into the rom and the script runs fine. The npc will battle you if you have over 10000$ and take it when you win.

    The problem is that the player changes over to the npc or your character will be left there and you will be able to walk around still just without an avatar. There's also another bug where your character will go off center.

    Here's an example of what I mean:

    https://imgur.com/Q2ozPnZ

    As you can see he's not center with the screen like it should be. I'm not sure if It's a game error, a corrupted rom, or it's a problem with my script.

    Here's my script:

    Code:
    #dynamic 0x80123B
    
    #org @start
    lock
    faceplayer
    checkflag 0x1208
    if 0x1 goto @done
    checkmoney 0x2710 0x00
    compare LASTRESULT 0x0
    if 0x4 goto @battle
    msgbox @1 0x6
    release
    end
    
    #org @battle
    msgbox @3 0x6
    trainerbattle 0x1 0x014 0x0 @before @after @later
    release
    end
    
    #org @before
    = Give me your money! HAHAHA
    
    #org @after
    = I'm such a fool!
    
    #org @later
    msgbox @4 0x6
    fanfare 0x13E
    msgbox @5 0x4
    closeonkeypress
    waitfanfare
    msgbox @6 0x6
    paymoney 0x2710 0x00
    setflag 0x1208
    release
    end
    
    #org @done
    msgbox @7 0x6
    release
    end
    
    #org @7
    = Thanks for the money nerd! HAHAHA!
    
    #org @1
    = Greed isn't good at all.
    
    #org @3
    = It was a lie! HA! Greed is the\nbest!
    
    #org @4
    = I'm taking something before I leave!
    
    #org @5
    = \v\h01 lost 10000$...
    
    #org @6
    = Give me that! Cya!
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
  • 1,691
    Posts
    14
    Years
    This is a common bug that occurs when you have an NPC's movement type on a map set to 'Look Down'. Change it to 'No Movement' and everything should work fine.

    Also, you shouldn't be using flags as high as 0x1200 in FireRed. Try starting at 0x200 as the flags in that area are certified to be safe.
     
  • 19
    Posts
    9
    Years
    • Seen Aug 28, 2014
    This is a common bug that occurs when you have an NPC's movement type on a map set to 'Look Down'. Change it to 'No Movement' and everything should work fine.

    Also, you shouldn't be using flags as high as 0x1200 in FireRed. Try starting at 0x200 as the flags in that area are certified to be safe.

    Thanks! It works fine now.

    Huh. I use flags around 1200 without problem. I tried using flag 208 and my script didnt work for some reason.
     
    Back
    Top