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

[Script] FIRE RED - NPC won't repeat the trading item script after the first time

  • 13
    Posts
    4
    Years
    • Seen Jan 22, 2024
    I made a script so an NPC will receive a HeartScale and give me a SunStone in return. It worked for the first time, but after I bring a second Heart Scale it will act as if I didn't have it.

    Here's the script:

    #dynamic 0x3B5955

    #org @start
    lock
    faceplayer
    msgbox @1 0x6
    compare 0x800D 0x1
    if 0x1 goto @check
    msgbox @2 0x6
    release
    end

    #org @check
    checkitem 0x6F 0x1
    compare 0x800D 0x1
    if 0x4 goto @got
    msgbox @2 0x6
    release
    end

    #org @got
    removeitem 0x6F 0x1
    giveitem 0x5D 0x1 0x0
    msgbox @3 0x6
    release
    end

    #org @1
    = I'm a TREASURE HUNTER!\pI'm looking for a HEART SCALE.\pIf you have a HEART SCALE, would\nyou exchange it for a SUN STONE?

    #org @2
    = Oh. That's too bad.
    #org @3
    = Thanks man!

    ------------------------------------------------------------

    What am I missing here?
     
  • 3
    Posts
    338
    Days
    • Seen Nov 30, 2023
    That seems like it should work. What does it say on the 2nd time "Oh. that's too bad." or nothing at all?

    [edit]
    Try changing the operator to 0x1
    if 0x4 goto @got
    if 0x1 goto @got
     
    Last edited:
    Back
    Top