The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Members List
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices


zova zova is offline

Beginning Trainer

Visitor Messages

Showing Visitor Messages 1 to 7 of 7
  1. Magic
    June 15th, 2012 03:22 AM
    Magic
    #org @Talk
    = Congratulations! You earned a Bulbasaur!

    Goes before the Givepokemon command.

    Then:

    #org @Talk2
    = [PLAYER] received a Bulbasaur!

    Goes between the fanfare and waitfanfare

  2. Magic
    June 14th, 2012 02:31 PM
    Magic
    Sure!

    Spoiler:
    msgbox @Talk1 0x6
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0 [

    First number is the species number, in hex. Bulbsaur is easy as it is #1, so 0x1 is used. Pikachu is #25, so we would use 0x19. Second number is the level (also in hex), 3rd number is the hold item it comes with - you can find the values for items and Pokémon here.

    fanfare 0x13E
    msgbox @Talk2 0x4
    waitfanfare
    closeonkeypress

    fanfare plays a tune, the values of which can be found in the 'header' section of Advance-Map. Msgbox number 0x4 means that the box stays open until closeonkeypress happens, and the player presses A. waitfanfare just means that the box can only be closed after the jingle plays fully.

    setflag 0x828
    msgbox @Talk3 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name

    setflag 0x828 is the Pokémon Menu flag (as that is needed to view your Pokémon). Msgbox number 0x5 gives a Yes/No choice box.

    compare LASTRESULT 0x1 is a way of saying "Did the player say yes?", if they did then the script gosubs to @name, which calls the Pokémon naming routine call 0x1A74EB. Which automatically comes back with the return command. If the player answers no then the script just continues.

    msgbox @Talk4 0x6
    applymovement 0x[PERSON_EVENT_NUM] @Move
    waitmovement 0x0
    hidesprite 0x[PERSON_EVENT_NUM]
    setflag 0x[PERSON_ID]

    applymovement is used if you want a person event to walk around, turn around, or show [!] [?][:D] emote things. All you need is the event number and a pointer to which movements you want. waitmovement 0x0 then means the script will not continue until the movement is completed. hidesprite makes the sprite disappear and the flag is to make the disappearance permanent.

    This is how you organise movements:

    #org @Move
    #raw 0x11 0x11 0x11 0x11 0xFE

    In this example 0x11 happens 4 times, 0x11 means 'Move up 1'. Always remember to include '0xFE' to the end as that signifies the end of the movement.

    You can find a list of movements here.


    Hope that helped!

  3. Magic
    June 14th, 2012 03:45 AM
    Magic
    So you would have this, basically:

    Spoiler:
    ...
    msgbox @Talk1 0x6
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @Talk2 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox @Talk3 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    msgbox @Talk4 0x6
    applymovement 0x[PERSON_EVENT_NUM] @Move
    waitmovement 0x0
    hidesprite 0x[PERSON_EVENT_NUM]
    setflag 0x[PERSON_ID]
    release
    end

    #org @name
    call 0x1A74EB
    return

    #org @Talk
    = Congratulations! You earned a Bulbasaur!

    #org @Talk2
    = [PLAYER] received a Bulbasaur!

    #org @Talk3
    = Would you like to give a nickname to Bulbasaur?

    #org @Talk4
    = Take good care of it, bye for now.

    #org @Move
    #raw 0x11 0x11 0x11 0x11 0xFE


    Person Event Number and Person ID can both be found in A-Map, when you click on the event.

    If this is for your first Pokémon it's a good idea to use the flag 0x828 - that way you also activate the Pokémon menu as well and kill two birds with one stone!

  4. Magic
    June 13th, 2012 11:31 AM
    Magic
    Flags are areas of the ROM which store yes/no kind of information - they are either set, or clear.

    In scripting you use the commands: setflag 0xFLAG, clearflag 0xFLAG and checkflag 0xFLAG (where flag is a unique number, normally 400-1000).

    Some flags have special properties when set, and activate menus, badges, etc.

    Quote:
    Originally Posted by FireRed flags
    0x820 – Activates First Badge
    0x821 - Activates Second Badge
    0x822 - Activates Third Badge
    0x823 - Activates Fourth Badge
    0x824 - Activates Fifth Badge
    0x825 - Activates Sixth Badge
    0x826 - Activates Seventh Badge
    0x827 - Activates Eighth Badge
    0x828 - Activates Pokemon Menu
    0x829 - Activates Pokedex Menu
    0x82F - Activates Running Shoes
    (For Emerald, Ruby/Sapphire flags see here)

    For simplicity imagine that 'setflag' changes the value from 0 -> 1. 'clearflag' changes the value from 1 -> 0.

    Here is a script to demonstrate flag use in changing what happens:
    Spoiler:
    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    checkflag 0x500
    if 0x1 goto @FlagIsSet

    msgbox @Talk1 0x6
    setflag 0x500
    release
    end

    #org @FlagIsSet
    msgbox @Talk2 0x6
    clearflag 0x500
    release
    end

    #org @Talk1
    = Let's set the flag!

    #org @Talk2
    = The flag is set, let's clear it!


    The line under 'checkflag 0x500' is important, it means that when 0x500 is set (value = 1) then the script shoulg to to @FlagIsSet rather than carry on. This script should therefore alternate between the two messages every time you talk to the person event.

    I hope that made flags clearer!

  5. Magic
    June 13th, 2012 02:37 AM
    Magic
    Ah that's a problem that crops up a lot, the issue is that 'hidesprite' is only temporary, to make it permanent you need to also set a flag, somewhere in the script (there might be one already), then you use that as the event's "Person ID" in Advancemap.

    Script:

    ...
    hidesprite 0x
    setflag 0x800
    ...

    Person ID: 800

  6. enigmα.
    June 12th, 2012 09:49 PM
    enigmα.
    Hello Zova, congrats on SwiftSign the mentor. Now ask your mentor bout the tiles prob.

  7. Magic
    June 12th, 2012 03:26 PM
    Magic
    Hi Nova! I see you need a hand with scripting, hopefully I can help! Unfortunately I don't use skype, however I am often on VMs/PMs quite often here (GMT timezone).

    How much do you know about scripting so far? I can link you to some tutorials to get you started or help you with specific things if you've tried them and gotten stuck

About Me

  • About zova
    Gender
    Male ♂

Statistics

Total Posts
Activity by Forum
Visitor Messages
Blog
General Information
  • Last Activity: July 9th, 2012 11:40 PM
  • Join Date: June 11th, 2012
  • Referrals: 0

All times are UTC -8. The time now is 11:01 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.