View Single Post
  #703    
Old June 29th, 2010 (5:47 AM).
xxerox9009's Avatar
xxerox9009 xxerox9009 is offline
     
    Join Date: Jan 2010
    Location: Behind you.
    Gender: Male
    Nature: Relaxed
    Posts: 11
    Quote:
    Originally Posted by inferno7453 View Post
    It's working now, it was that I had the wrong offset. Here's the script anyway:
    #dyn 0x583901
    #org @start
    lock
    faceplayer
    msgbox @text ' Hey, you, want some POKéMON?
    callstd MSG_OBTAIN
    release
    end
    #org @text
    = Hey, you, want some POKéMON?
    #dyn 0x583901
    #org @start
    lock
    checkflag 0x2345
    if 0x1 jump :end
    setflag FR_POKEMON
    countpokemon
    compare LASTRESULT 6
    if == jump @noroom
    addpokemon SNEASEL 5 = 5 NONE 0 0 0
    setflag 0x2345
    storepokemon 0 SNEASEL
    message @get-msg
    fanfare 0x101
    showmsg
    waitfanfare
    waitbutton
    :end
    release
    end
    #org @noroom
    msgbox @noroom-msg
    callstd MSG_NOCLOSE
    release
    end
    #org @noroom-msg
    = You don't have enough room in your party.
    #org @get-msg
    = You got a \v\h02!

    But another question:
    How do I make it compile all of the script into 1 offset and not a bunch of them(or at least have a way to do that) ?:
    @start <-> 0x6B0D97 (0xC bytes)
    @text <-> 0x6B0DA3 (0x1D bytes)
    @start <-> 0x6B0DC0 (0x3C bytes)
    -> :end <-> 0x6B0DFA
    @noroom <-> 0x6B0DFC (0xA bytes)
    @noroom-msg <-> 0x6B0E06 (0x2A bytes)
    @get-msg <-> 0x6B0E30 (0xE bytes)

    Pick the @start. The first one always holds all the scripts that come after it. The @text offset could be used in things like Advance Text.