Conversation Between BCTElite and Joexv
1 to 9 of 9
  1. Joexv
    March 28th, 2016 3:42 PM
    Joexv
    Im glad you got it working! For level scripts you should take a look at this tutorial: http://www.pokecommunity.com/showthread.php?t=191500
  2. Joexv
    March 28th, 2016 3:35 PM
    Joexv
    You could also try lockall, but i cant remember if that didn't work in Fire Red or Emerald..
  3. BCTElite
    March 28th, 2016 3:33 PM
    BCTElite
    Okay, with a little bit of jiggery pokery I fixed it. Again thank you so much for your help in this!!!

    Basically, I had to change the Giveitem2 to simply Give Item and move some of the set flags around. This doesn't stop him from wondering around after giving you a pokemon, but it does stop him from giving you another. I also changed the last byte on the multibox to 0x1. This stops you from pressing b to cancel out of the option, something you do not want when picking a starter pokemon.
    Spoiler:
    #dynamic 0x800000

    '---------------
    #org @start
    lock
    faceplayer
    checkflag 0x900
    if 0x1 goto @snippet1
    multichoice 0x0 0x0 0x11 0x1
    compare LASTRESULT 0x0
    if 0x1 goto @snippet2
    compare LASTRESULT 0x1
    if 0x1 goto @snippet3
    compare LASTRESULT 0x2
    if 0x1 goto @snippet4
    release
    end

    '---------------
    #org @snippet1
    msgbox @string1 MSG_NORMAL '"Enjoy your pokemon!"
    release
    end

    '---------------
    #org @snippet2
    call @snippet5
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
    goto @snippet6

    '---------------
    #org @snippet3
    call @snippet5
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    goto @snippet6

    '---------------
    #org @snippet4
    call @snippet5
    givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
    goto @snippet6

    '---------------
    #org @snippet5
    countpokemon
    compare LASTRESULT 0x6
    if 0x1 goto @snippet7
    return

    '---------------
    #org @snippet6
    bufferpartypokemon 0x0 0x0
    fanfare 0x13E
    msgbox @string2 MSG_KEEPOPEN '"[black_fr]You received a [buffer1]..."
    waitfanfare
    closeonkeypress
    msgbox @string3 MSG_YESNO '"[black_fr]Would you like to give a..."
    compare LASTRESULT 0x1
    if 0x1 call @snippet8
    msgbox @string4 MSG_NORMAL '"Please take care of\n[buffer1]."
    msgbox @string5 MSG_NORMAL '"Here's a Pokedex and Five\npokebal..."
    setflag 0x828
    setflag 0x829
    special 0x181
    setvar 0x407C 0x1
    special 0x16F
    setflag 0x10A
    setflag 0x900
    giveitem 0x4 0x5 0x0
    release
    end

    '---------------
    #org @snippet7
    msgbox @string6 MSG_NORMAL '"Oh looks like you don't have\nenou..."
    release
    end

    '---------------
    #org @snippet8
    fadescreen 0x1
    special 0x9E
    waitstate
    return


    '---------
    ' Strings
    '---------
    #org @string1
    = Enjoy your pokemon!

    #org @string2
    = [black_fr]You received a [buffer1]!

    #org @string3
    = [black_fr]Would you like to give a\nnickname to [buffer1]?

    #org @string4
    = Please take care of\n[buffer1].

    #org @string5
    = Here's a Pokedex and Five\npokeballs. I hope you use them\lwisely!

    #org @string6
    = Oh looks like you don't have\nenough room.


    Now I just need to know how I can make the person walk over to you as soon as you go downstairs, talk to you with this script, then move away from you. God I wish I understood scripting better.

    Anyway, thank you so much for all of your help, I wouldn't have done this without you!
  4. Joexv
    March 28th, 2016 3:32 PM
    Joexv
    Ok, so idk why but its unlocking the NPC in a few places. Put a lock command at the beginning of the Nickname script, another the waitfanfare after the obtainPokemon messagebox. Then remove special 0x181.
  5. BCTElite
    March 28th, 2016 3:14 PM
    BCTElite
    Okay, the buffer pokemon thing fixed it, thanks for that. The same goes for the tool, not sure why I didn't think for looking for a tool earlier.
    As for the pokeballs, I still can't get it to work. For some reason it just will not give them to me.
    Also, with the message for giving the pokeballs and pokedex, it still appears twice and as it does the sprite goes back to moving and looks away from the player. I'm not sure why it's doing that, maybe you know?
  6. Joexv
    March 28th, 2016 3:00 PM
    Joexv
    OK for the multichoice use Locksmitharmy's editor.
    For the ?????? in the text change bufferpokemon 0x0 0x0 bufferpartypokemon 0x0 0x0 sorry about that.
    and for the pokeballs change giveitem2 to
    Giveitem 0x4 0x5 0x0 - if this hides the sprite change the last option to 0x1
  7. BCTElite
    March 28th, 2016 2:46 PM
    BCTElite
    I just copied your script in to try it, and I had a few problems. The first one is with the box itself, it comes up with the multichoice and its a load of battle types (admitedly this is what I threw in there when I first made it, so it's my fault not yours) but is there a way to make this custom, or show the pokemon's names?
    The next thing is that when I click on and recieve a pokemon, it says something like You received a ??????????! You still get given the pokemon, but that just seems a little odd.
    Then it comes up with the Here's a pokedex + five pokeballs message twice, but doesn't gice you any pokeballs. Again this may be something I did wrong in the beginning script.

    apart from this it works great, the pokemon that you are given is the one from the list that corresponds to the option picked (kinda) and you can only do it once. So those bits are fixed.
  8. Joexv
    March 28th, 2016 2:09 PM
    Joexv
    Hmm Im not very good at explaining things. XD
    Heres a fixed script I threw together based on the script you provided.
    Spoiler:
    #dynamic 0x800000
    #org @start
    lock
    Faceplayer
    checkflag 0x### ---To Not repeat
    if 0x1 goto @completed
    Multichoice 0x0 0X0 0X40 0x0
    Compare 0x800D 0x0
    if 0x1 goto @Bulbasuar
    compare 0x800D 0x1
    if 0x1 goto @Squirtle
    compare 0x800D 0x2
    if 0x1 goto @Charmander
    compare 0x800D 0x3
    if 0x1 goto @Cancel
    release
    end

    #org @Bulbasuar
    call @CountPokemon
    givepokemon 0x1 0x10 0x0 0x0 0x0 0x0
    goto @CombinedScript

    #org @Squirtle
    call @CountPokemon
    givepokemon 0x4 0x10 0x0 0x0 0x0 0x0
    goto @CombinedScript

    #org @Charmander
    call @CountPokemon
    givepokemon 0x7 0x10 0x0 0x0 0x0 0x0
    goto @CombinedScript

    #org @CountPokemon
    Countpokemon
    compare LASTRESULT 0x6
    if 0x1 goto @NoRoom
    return

    #org @NoRoom
    msgbox @talk2 0x6
    release
    end

    #org @CombinedScript
    bufferpokemon 0x0 0x0
    fanfare 0x13E
    Msgbox @ObtainPokemon MSG_KEEPOPEN
    waitFanfare
    closeonkeypress
    msgbox @Name? MSG_YESNO
    compare LASTRESULT 0x1
    If 0x1 call @NickName
    msgbox @TakeCare MSG_NORMAL
    msgbox @Giveitems 0x6
    giveitem2 0x4 0x5 0x101
    setflag 0x828
    setflag 0x829
    special 0x181
    setvar 0x407C 0x1
    special 0x16F
    setflag 0x10A
    setflag 0x### - Same flag from earlier
    release
    end

    #org @GiveItems
    = Here's a Pokedex and Five\npokeballs. I hope you use them\lwisely!

    #org @talk2
    = Oh looks like you don't have\nenough room.

    #org @NickName
    fadescreen 0x1
    special 0x9E
    waitstate
    return

    #org @completed
    msgbox @talk 0x6
    release
    end

    #org @ObtainPokemon
    = [Black_fr]You received a [buffer1]!

    #org @Name?
    = [Black_fr]Would you like to give a\nnickname to [buffer1]?

    #org @TakeCare
    = Please take care of\n[buffer1].

    #org @talk
    = I can say something afterwards!


    As you can see it's quite a bit smaller. This is because instead of repeating the same lines of code seperately for Bulbasuar, Charmander and Squirtle I merged them all into one and simply had the 3 options goto the combined script.

    The buffer that you can see in the message boxes is set by bufferpokemon 0x0 0x0, which buffers the first pokemon of your party into buffer 1.(its a 0 because with hex 0 is technically 1). The script wasn't giving you the items because your script never pointed to the @Take you had labeled. It is probably a better idea for this sorta thing to just give them alongside the Pokemon in the script as I did.

    What I meant for the checkflag was that, even though you had set a flag in the script it would still load as it never checked to see if the flag was already set. That is the addition to the beginning.

    As for the multichoice if it still gives you the error for only picking bulbasuar then replace it with this:
    Spoiler:
    Multichoice 0x0 0X0 0X40 0x0
    Compare 0x800D 0x1
    if 0x1 goto @Bulbasuar
    compare 0x800D 0x2
    if 0x1 goto @Squirtle
    compare 0x800D 0x3
    if 0x1 goto @Charmander
    compare 0x800D 0x4
    if 0x1 goto @Cancel


    You shouldn't have an issue, but its always good to have a backup option in case you do.
  9. BCTElite
    March 28th, 2016 1:08 PM
    BCTElite
    Hi there, Thank you so much for your reply on my scripting problem, however I don't really understand the second part of the reply?
    You can definitely simplify it and clean it up some. It's very hard to read and understand some parts as it is right now.
    No need to have a separate text for each pokemon, you can simply bufferpokemon 0x0
    and then in the text instead of the pokemon's name put [buffer1].

    You should also put a checkflag in the begining so you can't repeatedly get each one.

    Off the top of my head, I can't think of why its only going to option1. You should try checking 0x800D directly instead of copying it to 0x8000.

    Another thing to note. You should but the lock/faceplayer in the start script not separately in each option. That'll save you space and clean things up a tad. And your flags are way to high. Safe flags to use are between 0x200-0x2FF iirc, someone correct me if im wrong here.
    I have no idea how to script, and honestly I don't think ill get it fast. Is there any way of dumbing this all down?