View Single Post
  #7322    
Old September 18th, 2012 (5:53 PM). Edited September 18th, 2012 by DoubleDare96.
DoubleDare96's Avatar
DoubleDare96 DoubleDare96 is offline
Pybro
     
    Join Date: Aug 2012
    Location: California, United States
    Gender: Male
    Nature: Adamant
    Posts: 6
    Quote:
    Originally Posted by passarbye View Post
    Hey guys, i'm having some issues with three different scripts.
    some help with them would be greatly appreciated.

    Game: Pokemon Fire Red BPRE
    Editor: XSE
    Script: trying to make a situation where you get to pick from 3 pokemon from people, rather than from items like oak's place.
    i also want them to recognize if you've picked a pokemon from one of the other people.

    Spoiler:

    SCRIPT #1

    #dynamic 0x801000

    #org @start
    lock
    faceplayer
    checkflag 0x1200
    if 0x1 goto @done
    checkflag 0x1201
    if 0x1 goto @picked
    checkflag 0x1202
    if 0x1 goto @picked
    msgbox @question 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givepokemon
    msgbox @nothanks 0x6
    release
    end

    #org @done
    msgbox @checkup 0x6
    release
    end

    #org @givepokemon
    msgbox @thanks 0x6
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recieved 0x6
    waitfanfare
    setflag 0x1200
    msgbox @thanks2 0x6
    release
    end

    #org @question
    = I can't take care of my Bulbasaur,\nwould you like to take it?
    #org @nothanks
    = I understand. Please come back if\nyou change your mind!
    #org @thanks
    = Oh good!
    #org @thanks2
    = Please take good care of\nBulbasaur!
    #org @recieved
    = \v\h01 recieved a BULBASAUR!
    #org @checkup
    = How is my old Bulbasaur doing?\nKeep treating him well!
    #org @picked
    = But you've already picked out a\npokemon from one of my sisters!\lYou can't have mine.



    SCRIPT #2


    #dynamic 0x800B00

    #org @start
    lock
    faceplayer
    checkflag 0x1200
    if 0x1 goto @picked
    checkflag 0x1201
    if 0x1 goto @done
    checkflag 0x1202
    if 0x1 goto @picked
    msgbox @question 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givepokemon
    msgbox @nothanks 0x6
    release
    end

    #org @done
    msgbox @checkup 0x6
    release
    end

    #org @givepokemon
    msgbox @thanks 0x6
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recieved 0x6
    waitfanfare
    setflag 0x1201
    msgbox @thanks2 0x6
    release
    end

    #org @question
    = Hi! Would you like to take care of\nmy Charmander?

    #org @nothanks
    = Oh, okay..

    #org @thanks
    = Thank you so much!

    #org @thanks2
    = Hope you like Charmander.

    #org @recieved
    = \v\h01 recieved a CHARMANDER!

    #org @checkup
    = How is Charmander doing?

    #org @picked
    = But you've already taken a pokemon\nfrom one of my sisters..


    SCRIPT #3

    #dynamic 0x802800

    #org @start
    lock
    faceplayer
    checkflag 0x1200
    if 0x1 goto @picked
    checkflag 0x1201
    if 0x1 goto @picked
    checkflag 0x1202
    if 0x1 goto @done
    msgbox @question 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givepokemon
    msgbox @nothanks 0x6
    release
    end

    #org @done
    msgbox @checkup 0x6
    release
    end

    #org @givepokemon
    msgbox @thanks 0x6
    givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recieved 0x6
    waitfanfare
    setflag 0x1202
    msgbox @thanks2 0x6
    release
    end

    #org @question
    = Hey! Can you take care of my\nSquirtle?

    #org @nothanks
    = Oh, fine. Come back later if you\nwant it.

    #org @thanks
    = Great!

    #org @thanks2
    = Stay safe!

    #org @recieved
    = \v\h01 recieved a SQUIRTLE!

    #org @checkup
    = How's my Squirtle doing?

    #org @picked
    = Don't take my pokemon! You already\ntook one from my sister!





    Screenshots in attachments!



    i can talk to all three of them, and all three will give me their pokemon (had to restart to test for each one). they will even talk to me after i take their pokemon, but the other two that didn't give me their pokemon will either just beep when i talk to them (no dialogue box), or crash the game.
    i've used the debug option in XSE before compiling, but no errors occur at debug.


    i am a total noob when it comes to scripting, so if i'm using something wrong, then please tell me.

    i'd like to know how to fix this so that one will give me a pokemon, but the other two won't after i take one.
    Try having all three of them use the same flag. The reason that it doesn't work is because you checkflag 0x1200 or whatever for each one and it goes straight to @done instead of checking @picked.