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

[Other✓] Yes/No Script not working

  • 60
    Posts
    9
    Years
    Hey guys, here with another script error. So down below is my script. What's supposed to happen is the player can talk to this lady who needs wood mail, and if they say no she insults the player. If the player says yes, she is in disbelief and the players bag should open up so they can trade the wood mail for a moon stone. After the trade, she thanks the player, and talking to her again will tell her why she needed the wood mail. Now the problem is, whenever the player talks to her, it gets to the yes/no menu. But when you pick yes, it answers it like you pressed no. So it acts like yes & no both equal no. I'm not sure why it does this, but I'm also not too confident on trading scripts. Thanks once again everyone.

    #dynamic 0x809C0C

    #org @start
    faceplayer
    checkflag 0x1220
    if 0x1 goto @done
    msgbox @talk1 0x5
    compare 0x4001 0x1
    if 0x1 goto @trade
    msgbox @talk3 0x6
    release
    end

    #org @done
    faceplayer
    msgbox @talk2 0x6
    release
    end

    #org @trade
    msgbox @talk4 0x6
    checkitem 0x7D 0x1
    fanfare 0x13E
    msgbox @talk5 0x6
    setflag 0x1220
    msgbox @talk6 0x6
    release
    end

    #org @talk1
    = Woman: You child, I'm in desperate need\nof Wood Mail.\pI am willing to trade you my Moon\nStone for it.\pSound good?

    #org @talk2
    = Woman: Thank you so much, I can\nfinally write to my husband.

    #org @talk3
    = Hmph! Insolent brat.

    #org @talk4
    = Really?! Don't lie now, show me it.

    #org @talk5
    = You exchanged the Wood Mail for a Moon Stone!

    #org @talk6
    = Thank you benevolent child!
     
    Last edited:
    Hey guys, here with another script error. So down below is my script. What's supposed to happen is the player can talk to this lady who needs wood mail, and if they say no she insults the player. If the player says yes, she is in disbelief and the players bag should open up so they can trade the wood mail for a moon stone. After the trade, she thanks the player, and talking to her again will tell her why she needed the wood mail. Now the problem is, whenever the player talks to her, it gets to the yes/no menu. But when you pick yes, it answers it like you pressed no. So it acts like yes & no both equal no. I'm not sure why it does this, but I'm also not too confident on trading scripts. Thanks once again everyone.

    #dynamic 0x809C0C

    #org @start
    faceplayer
    checkflag 0x1220
    if 0x1 goto @done
    msgbox @talk1 0x5
    compare 0x4001 0x1
    if 0x1 goto @trade
    msgbox @talk3 0x6
    release
    end

    #org @done
    faceplayer
    msgbox @talk2 0x6
    release
    end

    #org @trade
    msgbox @talk4 0x6
    checkitem 0x7D 0x1
    fanfare 0x13E
    msgbox @talk5 0x6
    setflag 0x1220
    msgbox @talk6 0x6
    release
    end

    #org @talk1
    = Woman: You child, I'm in desperate need\nof Wood Mail.\pI am willing to trade you my Moon\nStone for it.\pSound good?

    #org @talk2
    = Woman: Thank you so much, I can\nfinally write to my husband.

    #org @talk3
    = Hmph! Insolent brat.

    #org @talk4
    = Really?! Don't lie now, show me it.

    #org @talk5
    = You exchanged the Wood Mail for a Moon Stone!

    #org @talk6
    = Thank you benevolent child!
    You used 'compare 0x4001 0x1' instead of compare 0x800D 0x1. Var. 0x800D stores the last thing interacted with, more or less.
     
    Alright, all of the text and giving the moon stone works. But there is still a problem. With my current script, the player doesn't have to give up wood mail. They can just walk up to the npc, get the moon stone and leave. Their bag doesn't even show up. So everything works except for the player giving the npc the wood mail. My new script is below.

    '---------------
    #org 0x80A2AA
    faceplayer
    checkflag 0x1220
    if 0x1 goto 0x880A2D2
    msgbox 0x880A304 0x5 '"Woman: You child, I'm in desperate..."
    compare 0x800D 0x1
    if 0x1 goto 0x880A2DE
    msgbox 0x880A3B7 0x6 '"Hmph! Insolent brat."
    release
    end

    '---------------
    #org 0x80A2D2
    faceplayer
    msgbox 0x880A378 0x6 '"Woman: Thank you so much, I can\nf..."
    release
    end

    '---------------
    #org 0x80A2DE
    msgbox 0x880A3CE 0x6 '"Really?! Thank you benevolent chil..."
    checkitem 0x7D 0x1
    fanfare 0x13E
    faceplayer
    giveitem 0x5E 0x1 0x0
    setflag 0x1220
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x80A304
    = Woman: You child, I'm in desperate need\nof Wood Mail.\pI am willing to trade you my Moon\nStone for it.\pSound good?

    #org 0x80A3B7
    = Hmph! Insolent brat.

    #org 0x80A378
    = Woman: Thank you so much, I can\nfinally write to my husband.

    #org 0x80A3CE
    = Really?! Thank you benevolent child!
     
    Hey I did some sleuthing and I found the answer to my problem. I'm going to leave my final script below in case anyone else has this same problem I've had. The following script does a trade, wood mail for a moon stone, and after the trade it cannot be done again. Thanks everyone.

    '---------------
    #org 0x80A9E3
    faceplayer
    checkflag 0x1220
    if 0x1 goto 0x880AA43
    msgbox 0x880A8B8 0x5 '"Woman: I'm in need of Wood Mail, I..."
    compare 0x800D 0x1
    if 0x1 goto 0x880A881
    msgbox 0x880A902 0x6 '"Hmph! Insolent child, come back wh..."
    release
    end

    '---------------
    #org 0x80AA43
    faceplayer
    msgbox 0x880A940 0x6 '"Woman: Thank you, I can write to m..."
    release
    end

    '---------------
    #org 0x80A881
    checkitem 0x7D 0x1
    compare 0x800D 0x1
    if 0x4 goto 0x880A89C
    msgbox 0x880A902 0x6 '"Hmph! Insolent child, come back wh..."
    release
    end

    '---------------
    #org 0x80A89C
    removeitem 0x7D 0x1
    giveitem 0x5E 0x1 0x0
    msgbox 0x880A940 0x6 '"Woman: Thank you, I can write to m..."
    setflag 0x1220

    '---------
    ' Strings
    '---------
    #org 0x80A8B8
    = Woman: I'm in need of Wood Mail, I will\ngive you my Moon Stone for one.

    #org 0x80A902
    = Hmph! Insolent child, come back when you\nhave my Wood Mail.

    #org 0x80A940
    = Woman: Thank you, I can write to my\nhusband once more.
     
    Back
    Top