Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Thread Tools
Old July 14th, 2017 (2:24 PM). Edited 4 Weeks Ago by Avara.
Avara Avara is offline
Author Of Tales
    Join Date: Dec 2011
    Location: Avlar
    Gender: Female
    Nature: Adamant
    Posts: 623
    XSE Scripting Tutorial for 2017
    Before anyone says it - I'm well aware that scripting tutorials have been around for ages. I would like to first and foremost like to thank tajaros and diegoisawesome plus those who inspired them way back when for their amazing tutorials which taught me the foundations of scripting. My tutorial aims to go over some points of theirs, make it as easy as possible for new members to learn, collect everything script-related on one page, and share some tips and tricks I picked up on my own that I wish someone had put in a tutorial when I was starting out!

    This thread is a work in progress and might look a little dishevelled or incomplete as of right now, but I'm committed to finishing it quickly.

    Scripting is, in my humble opinion, THE most important thing to learn in manipulating Pokemon games. It's what you use to create your dialog, your events, your quests, to make stuff happen, to literally make your game. You can create a perfectly good hack using default sprites and tiles in your ROM if you script it well. If you're new to ROM hacking, learn scripting first. Fancy tiles, custom sprites and all that stuff can come later.

    The first thing you should do, if you haven't already, is download a copy of HackMew's XSE 1.1.1, Lu-ho's AdvanceMap 1.92 and a ROM of your choice. At this point in time this tutorial is for FireRed[FR] and Emerald[EM] only as these two seem to be the most popular ROMs of choice nowadays. If you find any terminology confusing or want very in-depth explanations of commands, I recommend DavidJCobb & Spherical Ice's extensive documentation on XSE commands here.

    Table Of Contents

    Part #1: The Basics
    Part #2: The Core
    Quick Links
    *to be expanded upon*

    Reply With Quote

    Relevant Advertising!

    Old July 15th, 2017 (4:41 AM). Edited July 15th, 2017 by Avara.
    Avara Avara is offline
    Author Of Tales
      Join Date: Dec 2011
      Location: Avlar
      Gender: Female
      Nature: Adamant
      Posts: 623
      Part #1: The Basics

      Pointers & Script Layout

      XSE uses dynamic offsets - meaning it automatically searches for free space from a given beginning offset. For the sake of this tutorial, we'll use #dynamic 0x800000, although it can technically be any free offset. 0x800000 and upwards is generally the safest, as from that point onwards there is a lot of free space to use.

      Thus, below should be the first line of your script. This means that every script you compile from now on will automatically compile to the first free offset it finds after 0x800000.

      Originally Posted by Avara View Post
      #dynamic 0x800000

      Now, onto the second line of your script. A pointer is just a label for a section of your script, prefixed with @. It can be any mixture of letters or numbers as long as it doesn't contain any spaces or special characters. For example, we can have @MyScript1 but not @My Script 1. We'll call our first pointer @main for the sake of the tutorial, so now we've got this:

      Originally Posted by Avara View Post
      #dynamic 0x800000

      #org @main

      The #org part notes that this is the start of a new script section labelled pointer @main. There are lots of different ways of "closing" the script which I will cover later in the tutorial, but for now I'll just show you the most basic way of finishing it: end. That's it. You can put whatever you want between your pointer and your "finishing statement", like this:

      Originally Posted by Avara View Post
      #dynamic 0x800000

      #org @main
      {your script contents}

      Above is your basic layout. This tells the game to compile the script labelled @main to free space anywhere above 0x800000.


      Reply With Quote
      Old July 15th, 2017 (4:43 AM). Edited 4 Weeks Ago by Avara.
      Avara Avara is offline
      Author Of Tales
        Join Date: Dec 2011
        Location: Avlar
        Gender: Female
        Nature: Adamant
        Posts: 623
        Simple Text Scripts

        Let's start with a basic NPC - we want to make someone face us and say hi, or in scripting terms, display a string of text. We do this with a msgbox.

        The msgbox command is set up like this:
        Originally Posted by Avara View Post
        msgbox @pointer 0x[number of msgbox type]
        There are various msgbox types which we'll go through one at a time. Here's the most common, 0x6:

        #dynamic 0x800000

        #org @main
        msgbox @greeting 0x6

        #org @greeting
        = Hi!

        So, we have quite a few new additions here.
        lock prevents the player from moving. Alternatively, lockall stops all NPCs on the map from moving. Should come directly after your #org @main but before your msgbox.
        faceplayer is fairly self explanitory too; it just makes the NPC face the PC before talking.
        release lets the player move again. If you used lockall instead, you'll have to use releaseall. After release or releaseall, finish with end.
        #org @greeting is a pointer to our text string, "= Hi!". I'll go into more detail on text info later, but the "=" basically tells XSE it's the start of a string, or line of text.

        That script will make someone face you and say "Hi!". Alternatively, there is a shorter way of scripting NPCs: msgbox 0x2.

        #dynamic 0x800000

        #org @main
        msgbox @greeting 0x2

        #org @greeting
        = Hi!

        Using the above version, msgbox 0x2, means you don't need the lock, faceplayer or release commands, whereas msgbox 0x6 does. Both scripts do exactly the same thing.

        msgbox 0x3 is used in the original games for signposts; it displays the sign textbox when used on an actual signpost tile. Like 0x2, you don't need the lock, faceplayer or release commands.
        Originally Posted by Avara View Post
        #dynamic 0x800000

        #org @main
        msgbox @sign 0x3

        #org @sign
        = Signpost
        msgbox 0x4 is a normal textbox just like 0x6, in that you need the lock, faceplayer and release commands surrounding it. The difference here is that the textbox will stay open, meaning we require a new command to make it go away, closeonkeypress.
        Originally Posted by Avara View Post
        #dynamic 0x800000

        #org @main
        msgbox @greeting 0x4

        #org @greeting
        = Hi!
        From here on in for a bunch of things, you are going to need to refer to the following:


        Reply With Quote
        Old July 15th, 2017 (4:45 AM). Edited 4 Weeks Ago by Avara.
        Avara Avara is offline
        Author Of Tales
          Join Date: Dec 2011
          Location: Avlar
          Gender: Female
          Nature: Adamant
          Posts: 623
          FireRed & Emerald Item ID Numbers
          0001 = Master Ball
          0002 = Ultra Ball
          0003 = Great Ball
          0004 = Poke Ball
          0005 = Safari Ball
          0006 = Net Ball
          0007 = Dive Ball
          0008 = Nest Ball
          0009 = Repeat Ball
          000A = Timer Ball
          000B = Luxury Ball
          000C = Premier Ball

          000D = Potion
          000E = Antidote
          000F = Burn Heal
          0010 = Ice Heal
          0011 = Awakening
          0012 = Parlyz Heal
          0013 = Full Restore
          0014 = Max Potion
          0015 = Hyper Potion
          0016 = Super Potion
          0017 = Full Heal
          0018 = Revive
          0019 = Max Revive
          001A = Fresh Water
          001B = Soda Pop
          001C = Lemonade
          001D = MooMoo Milk
          001E = Energy Powder
          001F = Energy Root
          0020 = Heal Powder
          0021 = Revival Herb
          0022 = Ether
          0023 = Max Ether
          0024 = Elixer
          0025 = Max Elixer
          0026 = Lava Cookie

          0027 = Blue Flute
          0028 = Yellow Flute
          0029 = Red Flute
          002A = Black Flute
          002B = White Flute
          002C = Berry Juice
          002D = Sacred Ash
          002E = Shoal Salt
          002F = Shoal Shell
          0030 = Red Shard
          0031 = Blue Shard
          0032 = Yellow Shard
          0033 = Green Shard

          003F = HP Up
          0040 = Protein
          0041 = Iron
          0042 = Carbos
          0043 = Calcium
          0044 = Rare Candy
          0045 = PP Up
          0046 = Zinc
          0047 = PP Max

          0049 = Guard Spec
          004A = Dire Hit
          004B = X Attack
          004C = X Defend
          004D = X Speed
          004E = X Accuracy
          004F = X Special

          0050 = Poke Doll
          0051 = Fluffy Tail
          0053 = Super Repel
          0054 = Max Repel
          0055 = Escape Rope
          0056 = Repel

          005D = Sun Stone
          005E = Moon Stone
          005F = Fire Stone
          0060 = Thunder Stone
          0061 = Water Stone
          0062 = Leaf Stone

          0067 = Tiny Mushroom
          0068 = Big Mushroom
          006A = Pearl
          006B = Big Pearl
          006C = Stardust
          006D = Star Piece
          006E = Nugget
          006F = Heart Scale

          0079 = Orange Mail
          007A = Harbor Mail
          007B = Glitter Mail
          007C = Mech Mail
          007D = Wood Mail
          007E = Wave Mail
          007F = Bead Mail
          0080 = Shadow Mail
          0081 = Tropic Mail
          0082 = Dream Mail
          0083 = Fab Mail
          0084 = Retro Mail

          0085 = Cheri Berry
          0086 = Chesto Berry
          0087 = Pecha Berry
          0088 = Rawst Berry
          0089 = Aspear Berry
          008A = Leppa Berry
          008B = Oran Berry
          008C = Persim Berry
          008D = Lum Berry
          008E = Sitrus Berry
          008F = Figy Berry
          0090 = Wiki Berry
          0091 = Mago Berry
          0092 = Aguav Berry
          0093 = Iapapa Berry
          0094 = Razz Berry
          0095 = Bluk Berry
          0096 = Nanab Berry
          0097 = Wepear Berry
          0098 = Pinap Berry
          0099 = Pomeg Berry
          009A = Kelpsy Berry
          009B = Qualot Berry
          009C = Hondew Berry
          009D = Grepa Berry
          009E = Tamato Berry
          009F = Cornn Berry
          00A0 = Magost Berry
          00A1 = Rabuta Berry
          00A2 = Nomel Berry
          00A3 = Spelon Berry
          00A4 = Pamtre Berry
          00A5 = Watmel Berry
          00A6 = Durin Berry
          00A7 = Belue Berry
          00A8 = Liechi Berry
          00A9 = Ganlon Berry
          00AA = Salac Berry
          00AB = Petaya Berry
          00AC = Apicot Berry
          00AD = Lansat Berry
          00AE = Starf Berry
          00AF = Enigma Berry

          00B3 = Bright Powder
          00B4 = White Herb
          00B5 = Macho Brace
          00B6 = Exp Share
          00B7 = Quick Claw
          00B8 = Soothe Bell
          00B9 = Mental Herb
          00BA = Choice Band
          00BB = King's Rock
          00BC = Silver Powder
          00BD = Amulet Coin
          00BE = Cleanse Tag
          00BF = Soul Dew
          00C0 = Deep Sea Tooth
          00C1 = Deep Sea Scale
          00C2 = Smoke Ball
          00C3 = Everstone
          00C4 = Focus Band
          00C5 = Lucky Egg
          00C6 = Scope Lens
          00C7 = Metal Coat
          00C8 = Leftovers
          00C9 = Dragon Scale
          00CA = Light Ball
          00CB = Soft Sand
          00CC = Hard Stone
          00CD = Miracle Seed
          00CE = Black Glasses
          00CF = Black Belt
          00D0 = Magnet
          00D1 = Mystic Water
          00D2 = Sharp Beak
          00D3 = Poison Barb
          00D4 = Nevermelt Ice
          00D5 = Spell Tag
          00D6 = Twisted Spoon
          00D7 = Charcoal
          00D8 = Dragon Fang
          00D9 = Silk Scarf

          00DA = Up-Grade
          00DB = Shell Bell
          00DC = Sea Incense
          00DD = Lax Incense
          00DE = Lucky Punch
          00DF = Metal Powder
          00E0 = Thick Club
          00E1 = Stick
          00FE = Red Scarf
          00FF = Blue Scarf
          0100 = Pink Scarf
          0101 = Green Scarf
          0102 = Yellow Scarf

          0103 = Mach Bike
          0104 = Coin Case
          0105 = ItemFinder
          0106 = Old Rod
          0107 = Good Rod
          0108 = Super Rod
          0109 = S.S. Ticket
          010A = Contest Pass
          010C = Wailmer Pail
          010D = Devon's Goods
          010E = Soot Sack
          010F = Basement Key
          0110 = Acro Bike
          0111 = PokeBlock Case
          0112 = Letter
          0113 = Eon Ticket
          0114 = Red Orb
          0115 = Blue Orb
          0116 = Scanner
          0117 = Go-Goggles
          0118 = Meteorite
          0119 = Rm.1 Key
          011A = Rm.2 Key
          011B = Rm.4 Key
          011C = Rm.6 Key
          011D = Storage Key
          011E = Root Fossil
          011F = Claw Fossil
          0120 = Devon Scope

          0121 = TM01 (Focus Punch)
          0122 = TM02 (Dragon Claw)
          0123 = TM03 (Water Pulse)
          0124 = TM04 (Calm Mind)
          0125 = TM05 (Roar)
          0126 = TM06 (Toxic)
          0127 = TM07 (Hail)
          0128 = TM08 (Bulk Up)
          0129 = TM09 (Bullet Seed)
          012A = TM10 (Hidden Power)
          012B = TM11 (Sunny Day)
          012C = TM12 (Taunt)
          012D = TM13 (Ice Beam)
          012E = TM14 (Blizzard)
          012F = TM15 (Hyper Beam)
          0130 = TM16 (Light Screen)
          0131 = TM17 (Protect)
          0132 = TM18 (Rain Dance)
          0133 = TM19 (Giga Drain)
          0134 = TM20 (Safeguard)
          0135 = TM21 (Frustration)
          0136 = TM22 (Solar Beam)
          0137 = TM23 (Iron Tail)
          0138 = TM24 (Thunderbolt)
          0139 = TM25 (Thunder)
          013A = TM26 (Earthquake)
          013B = TM27 (Return)
          013C = TM28 (Dig)
          013D = TM29 (Psychic)
          013E = TM30 (Shadow Ball)
          013F = TM31 (Brick Break)
          0140 = TM32 (Double Team)
          0141 = TM33 (Reflect)
          0142 = TM34 (Shock Wave)
          0143 = TM35 (Flamethrower)
          0144 = TM36 (Sludge Bomb)
          0145 = TM37 (Sandstorm)
          0146 = TM38 (Fire Blast)
          0147 = TM39 (Rock Tomb)
          0148 = TM40 (Aerial Ace)
          0149 = TM41 (Torment)
          014A = TM42 (Facade)
          014B = TM43 (Secret Power)
          014C = TM44 (Rest)
          014D = TM45 (Attract)
          014E = TM46 (Thief)
          014F = TM47 (Steel Wing)
          0150 = TM48 (Skill Swap)
          0151 = TM49 (Snatch)
          0152 = TM50 (Overheat)
          0153 = HM01 (Cut)
          0154 = HM02 (Fly)
          0155 = HM03 (Surf)
          0156 = HM04 (Strength)
          0157 = HM05 (Flash)
          0158 = HM06 (Rock Smash)
          0159 = HM07 (Waterfall)
          015A = HM08 (Dive)

          015D = Oak's Parcel
          015E = PokeFlute
          015F = Secret Key
          0160 = Bike Voucher
          0161 = Gold Teeth
          0162 = Old Amber
          0163 = Card Key
          0164 = Lift Key
          0165 = Dome Fossil
          0166 = Helix Fossil
          0167 = Silph Scope
          0168 = Bicycle
          0169 = Town Map
          016A = VS Seeker
          016B = Fame Checker
          016C = TM Case
          016D = Berry Pouch
          016E = Teachy TV
          016F = Tri-Pass
          0170 = Rainbow Pass
          0171 = Tea
          0172 = Mystery Ticket
          0173 = Aurora Ticket
          0174 = Powder Jar
          0175 = Ruby
          0176 = Sapphire

          [Emerald Only]
          0177 = Magma Emblem
          0178 = Old Sea Map

          FireRed & Emerald Pokemon ID Numbers
          0001 = BULBASAUR
          0002 = IVYSAUR
          0003 = VENUSAUR
          0004 = CHARMANDER
          0005 = CHARMELEON
          0006 = CHARIZARD
          0007 = SQUIRTLE
          0008 = WARTORTLE
          0009 = BLASTOISE
          000A = CATERPIE
          000B = METAPOD
          000C = BUTTERFREE
          000D = WEEDLE
          000E = KAKUNA
          000F = BEEDRILL
          0010 = PIDGEY
          0011 = PIDGEOTTO
          0012 = PIDGEOT
          0013 = RATTATA
          0014 = RATICATE
          0015 = SPEAROW
          0016 = FEAROW
          0017 = EKANS
          0018 = ARBOK
          0019 = PIKACHU
          001A = RAICHU
          001B = SANDSHREW
          001C = SANDSLASH
          001D = NIDORAN Female
          001E = NIDORINA
          001F = NIDOQUEEN
          0020 = NIDORAN Male
          0021 = NIDORINO
          0022 = NIDOKING
          0023 = CLEFAIRY
          0024 = CLEFABLE
          0025 = VULPIX
          0026 = NINETALES
          0027 = JIGGLYPUFF
          0028 = WIGGLYTUFF
          0029 = ZUBAT
          002A = GOLBAT
          002B = ODDISH
          002C = GLOOM
          002D = VILEPLUME
          002E = PARAS
          002F = PARASECT
          0030 = VENONAT
          0031 = VENOMOTH
          0032 = DIGLETT
          0033 = DUGTRIO
          0034 = MEOWTH
          0035 = PERSIAN
          0036 = PSYDUCK
          0037 = GOLDUCK
          0038 = MANKEY
          0039 = PRIMEAPE
          003A = GROWLITHE
          003B = ARCANINE
          003C = POLIWAG
          003D = POLIWHIRL
          003E = POLIWRATH
          003F = ABRA
          0040 = KADABRA
          0041 = ALAKAZAM
          0042 = MACHOP
          0043 = MACHOKE
          0044 = MACHAMP
          0045 = BELLSPROUT
          0046 = WEEPINBELL
          0047 = VICTREEBEL
          0048 = TENTACOOL
          0049 = TENTACRUEL
          004A = GEODUDE
          004B = GRAVELER
          004C = GOLEM
          004D = PONYTA
          004E = RAPIDASH
          004F = SLOWPOKE
          0050 = SLOWBRO
          0051 = MAGNEMITE
          0052 = MAGNETON
          0053 = FARFETCH'D
          0054 = DODUO
          0055 = DODRIO
          0056 = SEEL
          0057 = DEWGONG
          0058 = GRIMER
          0059 = MUK
          005A = SHELLDER
          005B = CLOYSTER
          005C = GASTLY
          005D = HAUNTER
          005E = GENGAR
          005F = ONIX
          0060 = DROWZEE
          0061 = HYPNO
          0062 = KRABBY
          0063 = KINGLER
          0064 = VOLTORB
          0065 = ELECTRODE
          0066 = EXEGGCUTE
          0067 = EXEGGUTOR
          0068 = CUBONE
          0069 = MAROWAK
          006A = HITMONLEE
          006B = HITMONCHAN
          006C = LICKITUNG
          006D = KOFFING
          006E = WEEZING
          006F = RHYHORN
          0070 = RHYDON
          0071 = CHANSEY
          0072 = TANGELA
          0073 = KANGASKHAN
          0074 = HORSEA
          0075 = SEADRA
          0076 = GOLDEEN
          0077 = SEAKING
          0078 = STARYU
          0079 = STARMIE
          007A = MR.MIME
          007B = SCYTHER
          007C = JYNX
          007D = ELECTABUZZ
          007E = MAGMAR
          007F = PINSIR
          0080 = TAUROS
          0081 = MAGIKARP
          0082 = GYARADOS
          0083 = LAPRAS
          0084 = DITTO
          0085 = EEVEE
          0086 = VAPOREON
          0087 = JOLTEON
          0088 = FLAREON
          0089 = PORYGON
          008A = OMANYTE
          008B = OMASTAR
          008C = KABUTO
          008D = KABUTOPS
          008E = AERODACTYL
          008F = SNORLAX
          0090 = ARTICUNO
          0091 = ZAPDOS
          0092 = MOLTRES
          0093 = DRATINI
          0094 = DRAGONAIR
          0095 = DRAGONITE
          0096 = MEWTWO
          0097 = MEW

          0098 = CHIKORITA
          0099 = BAYLEEF
          009A = MEGANIUM
          009B = CYNDAQUIL
          009C = QUILAVA
          009D = TYPHLOSION
          009E = TOTODILE
          009F = CROCONAW
          00A0 = FERALIGATR
          00A1 = SENTRET
          00A2 = FURRET
          00A3 = HOOTHOOT
          00A4 = NOCTOWL
          00A5 = LEDYBA
          00A6 = LEDIAN
          00A7 = SPINARAK
          00A8 = ARIADOS
          00A9 = CROBAT
          00AA = CHINCHOU
          00AB = LANTURN
          00AC = PICHU
          00AD = CLEFFA
          00AE = IGGLYBUFF
          00AF = TOGEPI
          00B0 = TOGETIC
          00B1 = NATU
          00B2 = XATU
          00B3 = MAREEP
          00B4 = FLAAFFY
          00B5 = AMPHAROS
          00B6 = BELLOSSOM
          00B7 = MARILL
          00B8 = AZUMARILL
          00B9 = SUDOWOODO
          00BA = POLITOED
          00BB = HOPPIP
          00BC = SKIPLOOM
          00BD = JUMPLUFF
          00BE = AIPOM
          00BF = SUNKERN
          00C0 = SUNFLORA
          00C1 = YANMA
          00C2 = WOOPER
          00C3 = QUAGSIRE
          00C4 = ESPEON
          00C5 = UMBREON
          00C6 = MURKROW
          00C7 = SLOWKING
          00C8 = MISDREAVUS
          00C9 = UNOWN
          00CA = WOBBUFFET
          00CB = GIRAFARIG
          00CC = PINECO
          00CD = FORRETRESS
          00CE = DUNSPARCE
          00CF = GLIGAR
          00D0 = STEELIX
          00D1 = SNUBBULL
          00D2 = GRANBULL
          00D3 = QWILFISH
          00D4 = SCIZOR
          00D5 = SHUCKLE
          00D6 = HERACROSS
          00D7 = SNEASEL
          00D8 = TEDDIURSA
          00D9 = URSARING
          00DA = SLUGMA
          00DB = MAGCARGO
          00DC = SWINUB
          00DD = PILOSWINE
          00DE = CORSOLA
          00DF = REMORAID
          00E0 = OCTILLERY
          00E1 = DELIBIRD
          00E2 = MANTINE
          00E3 = SKARMORY
          00E4 = HOUNDOUR
          00E5 = HOUNDOOM
          00E6 = KINGDRA
          00E7 = PHANPY
          00E8 = DONPHAN
          00E9 = PORYGON
          00EA = STANTLER
          00EB = SMEARGLE
          00EC = TYROGUE
          00ED = HITMONTOP
          00EE = SMOOCHUM
          00EF = ELEKID
          00F0 = MAGBY
          00F1 = MILTANK
          00F2 = BLISSEY
          00F3 = RAIKOU
          00F4 = ENTEI
          00F5 = SUICUNE
          00F6 = LARVITAR
          00F7 = PUPITAR
          00F8 = TYRANITAR
          00F9 = LUGIA
          00FA = HO-OH
          00FB = CELEBI

          0115 = TREECKO
          0116 = GROVYLE
          0117 = SCEPTILE
          0118 = TORCHIC
          0119 = COMBUSKEN
          011A = BLAZIKEN
          011B = MUDKIP
          011C = MARSHTOMP
          011D = SWAMPERT
          011E = POOCHYENA
          011F = MIGHTYENA
          0120 = ZIGZAGOON
          0121 = LINOONE
          0122 = WURMPLE
          0123 = SILCOON
          0124 = BEAUTIFLY
          0125 = CASCOON
          0126 = DUSTOX
          0127 = LOTAD
          0128 = LOMBRE
          0129 = LUDICOLO
          012A = SEEDOT
          012B = NUZLEAF
          012C = SHIFTRY
          012D = NINCADA
          012E = NINJASK
          012F = SHEDINJA
          0130 = TAILLOW
          0131 = SWELLOW
          0132 = SHROOMISH
          0133 = BRELOOM
          0134 = SPINDA
          0135 = WINGULL
          0136 = PELIPPER
          0137 = SURSKIT
          0138 = MASQUERAIN
          0139 = WAILMER
          013A = WAILORD
          013B = SKITTY
          013C = DELCATTY
          013D = KECLEON
          013E = BALTOY
          013F = CLAYDOL
          0140 = NOSEPASS
          0141 = TORKOAL
          0142 = SABLEYE
          0143 = BARBOACH
          0144 = WHISCASH
          0145 = LUVDISC
          0146 = CORPHISH
          0147 = CRAWDAUNT
          0148 = FEEBAS
          0149 = MILOTIC
          014A = CARVANHA
          014B = SHARPEDO
          014C = TRAPINCH
          014D = VIBRAVA
          014E = FLYGON
          014F = MAKUHITA
          0150 = HARIYAMA
          0151 = ELECTRIKE
          0152 = MANECTRIC
          0153 = NUMEL
          0154 = CAMERUPT
          0155 = SPHEAL
          0156 = SEALEO
          0157 = WALREIN
          0158 = CACNEA
          0159 = CACTURNE
          015A = SNORUNT
          015B = GLALIE
          015C = LUNATONE
          015D = SOLROCK
          015E = AZURILL
          015F = SPOINK
          0160 = GRUMPIG
          0161 = PLUSLE
          0162 = MINUN
          0163 = MAWILE
          0164 = MEDITITE
          0165 = MEDICHAM
          0166 = SWABLU
          0167 = ALTARIA
          0168 = WYNAUT
          0169 = DUSKULL
          016A = DUSCLOPS
          016B = ROSELIA
          016C = SLAKOTH
          016D = VIGOROTH
          016E = SLAKING
          016F = GULPIN
          0170 = SWALOT
          0171 = TROPIUS
          0172 = WHISMUR
          0173 = LOUDRED
          0174 = EXPLOUD
          0175 = CLAMPERL
          0176 = HUNTAIL
          0177 = GOREBYSS
          0178 = ABSOL
          0179 = SHUPPET
          017A = BANETTE
          017B = SEVIPER
          017C = ZANGOOSE
          017D = RELICANTH
          017E = ARON
          017F = LAIRON
          0180 = AGGRON
          0181 = CASTFORM
          0182 = VOLBEAT
          0183 = ILLUMISE
          0184 = LILEEP
          0185 = CRADILY
          0186 = ANORITH
          0187 = ARMALDO
          0188 = RALTS
          0189 = KIRLIA
          018A = GARDEVOIR
          018B = BAGON
          018C = SHELGON
          018D = SALAMENCE
          018E = BELDUM
          018F = METANG
          0190 = METAGROSS
          0191 = REGIROCK
          0192 = REGICE
          0193 = REGISTEEL
          0194 = KYOGRE
          0195 = GROUDON
          0196 = RAYQUAZA
          0197 = LATIAS
          0198 = LATIOS
          0199 = JIRACHI
          019A = DEOXYS
          019B = CHIMECHO

          FireRed & Emerald Attack ID Numbers
          001 Pound
          002 Karate Chop
          003 DoubleSlap
          004 Comet Punch
          005 Mega Punch
          006 Pay Day
          007 Fire Punch
          008 Ice Punch
          009 ThunderPunch
          00A Scratch
          00B ViceGrip
          00C Guillotine
          00D Razor Wind
          00E Swords Dance
          00F Cut
          010 Gust
          011 Wing Attack
          012 Whirlwind
          013 Fly
          014 Bind
          015 Slam
          016 Vine Whip
          017 Stomp
          018 Double Kick
          019 Mega Kick
          01A Jump Kick
          01B Rolling Kick
          01C Sand-Attack
          01D Headbutt
          01E Horn Attack
          01F Fury Attack
          020 Horn Drill
          021 Tackle
          022 Body Slam
          023 Wrap
          024 Take Down
          025 Thrash
          026 Double-Edge
          027 Tail Whip
          028 Poison Sting
          029 Twineedle
          02A Pin Missile
          02B Leer
          02C Bite
          02D Growl
          02E Roar
          02F Sing
          030 Supersonic
          031 SonicBoom
          032 Disable
          033 Acid
          034 Ember
          035 Flamethrower
          036 Mist
          037 Water Gun
          038 Hydro Pump
          039 Surf
          03A Ice Beam
          03B Blizzard
          03C Psybeam
          03D BubbleBeam
          03E Aurora Beam
          03F Hyper Beam
          040 Peck
          041 Drill Peck
          042 Submission
          043 Low Kick
          044 Counter
          045 Seismic Toss
          046 Strength
          047 Absorb
          048 Mega Drain
          049 Leech Seed
          04A Growth
          04B Razor Leaf
          04C SolarBeam
          04D PoisonPowder
          04E Stun Spore
          04F Sleep Powder
          050 Petal Dance
          051 String Shot
          052 Dragon Rage
          053 Fire Spin
          054 ThunderShock
          055 Thunderbolt
          056 Thunder Wave
          057 Thunder
          058 Rock Throw
          059 Earthquake
          05A Fissure
          05B Dig
          05C Toxic
          05D Confusion
          05E Psychic
          05F Hypnosis
          060 Meditate
          061 Agility
          062 Quick Attack
          063 Rage
          064 Teleport
          065 Night Shade
          066 Mimic
          067 Screech
          068 Double Team
          069 Recover
          06A Harden
          06B Minimize
          06C SmokeScreen
          06D Confuse Ray
          06E Withdraw
          06F Defense Curl
          070 Barrier
          071 Light Screen
          072 Haze
          073 Reflect
          074 Focus Energy
          075 Bide
          076 Metronome
          077 Mirror Move
          078 Selfdestruct
          079 Egg Bomb
          07A Lick
          07B Smog
          07C Sludge
          07D Bone Club
          07E Fire Blast
          07F Waterfall
          080 Clamp
          081 Swift
          082 Skull Bash
          083 Spike Cannon
          084 Constrict
          085 Amnesia
          086 Kinesis
          087 Softboiled
          088 Hi Jump Kick
          089 Glare
          08A Dream Eater
          08B Poison Gas
          08C Barrage
          08D Leech Life
          08E Lovely Kiss
          08F Sky Attack
          090 Transform
          091 Bubble
          092 Dizzy Punch
          093 Spore
          094 Flash
          095 Psywave
          096 Splash
          097 Acid Armor
          098 Crabhammer
          099 Explosion
          09A Fury Swipes
          09B Bonemerang
          09C Rest
          09D Rock Slide
          09E Hyper Fang
          09F Sharpen
          0A0 Conversion
          0A1 Tri Attack
          0A2 Super Fang
          0A3 Slash
          0A4 Substitute
          0A5 Struggle
          0A6 Sketch
          0A7 Triple Kick
          0A8 Thief
          0A9 Spider Web
          0AA Mind Reader
          0AB Nightmare
          0AC Flame Wheel
          0AD Snore
          0AE Curse
          0AF Flail
          0B0 Conversion 2
          0B1 Aeroblast
          0B2 Cotton Spore
          0B3 Reversal
          0B4 Spite
          0B5 Powder Snow
          0B6 Protect
          0B7 Mach Punch
          0B8 Scary Face
          0B9 Faint Attack
          0BA Sweet Kiss
          0BB Belly Drum
          0BC Sludge Bomb
          0BD Mud-Slap
          0BE Octazooka
          0BF Spikes
          0C0 Zap Cannon
          0C1 Foresight
          0C2 Destiny Bond
          0C3 Perish Song
          0C4 Icy Wind
          0C5 Detect
          0C6 Bone Rush
          0C7 Lock-On
          0C8 Outrage
          0C9 Sandstorm
          0CA Giga Drain
          0CB Endure
          0CC Charm
          0CD Rollout
          0CE False Swipe
          0CF Swagger
          0D0 Milk Drink
          0D1 Spark
          0D2 Fury Cutter
          0D3 Steel Wing
          0D4 Mean Look
          0D5 Attract
          0D6 Sleep Talk
          0D7 Heal Bell
          0D8 Return
          0D9 Present
          0DA Frustration
          0DB Safeguard
          0DC Pain Split
          0DD Sacred Fire
          0DE Magnitude
          0DF DynamicPunch
          0E0 Megahorn
          0E1 DragonBreath
          0E2 Baton Pass
          0E3 Encore
          0E4 Pursuit
          0E5 Rapid Spin
          0E6 Sweet Scent
          0E7 Iron Tail
          0E8 Metal Claw
          0E9 Vital Throw
          0EA Morning Sun
          0EB Synthesis
          0EC Moonlight
          0ED Hidden Power
          0EE Cross Chop
          0EF Twister
          0F0 Rain Dance
          0F1 Sunny Day
          0F2 Crunch
          0F3 Mirror Coat
          0F4 Psych Up
          0F5 ExtremeSpeed
          0F6 AncientPower
          0F7 Shadow Ball
          0F8 Future Sight
          0F9 Rock Smash
          0FA Whirlpool
          0FB Beat Up
          0FC Fake Out
          0FD Uproar
          0FE Stockpile
          0FF Spit Up
          100 Swallow
          101 Heat Wave
          102 Hail
          103 Torment
          104 Flatter
          105 Will-O-Wisp
          106 Memento
          107 Facade
          108 Focus Punch
          109 SmellingSalt
          10A Follow Me
          10B Nature Power
          10C Charge
          10D Taunt
          10E Helping Hand
          10F Trick
          110 Role Play
          111 Wish
          112 Assist
          113 Ingrain
          114 Superpower
          115 Magic Coat
          116 Recycle
          117 Revenge
          118 Brick Break
          119 Yawn
          11A Knock Off
          11B Endeavor
          11C Eruption
          11D Skill Swap
          11E Imprison
          11F Refresh
          120 Grudge
          121 Snatch
          122 Secret Power
          123 Dive
          124 Arm Thrust
          125 Camouflage
          126 Tail Glow
          127 Luster Purge
          128 Mist Ball
          129 FeatherDance
          12A Teeter Dance
          12B Blaze Kick
          12C Mud Sport
          12D Ice Ball
          12E Needle Arm
          12F Slack Off
          130 Hyper Voice
          131 Poison Fang
          132 Crush Claw
          133 Blast Burn
          134 Hydro Cannon
          135 Meteor Mash
          136 Astonish
          137 Weather Ball
          138 Aromatherapy
          139 Fake Tears
          13A Air Cutter
          13B Overheat
          13C Odor Sleuth
          13D Rock Tomb
          13E Silver Wind
          13F Metal Sound
          140 GrassWhistle
          141 Tickle
          142 Cosmic Power
          143 Water Spout
          144 Signal Beam
          145 Shadow Punch
          146 Extrasensory
          147 Sky Uppercut
          148 Sand Tomb
          149 Sheer Cold
          14A Muddy Water
          14B Bullet Seed
          14C Aerial Ace
          14D Icicle Spear
          14E Iron Defense
          14F Block
          150 Howl
          151 Dragon Claw
          152 Frenzy Plant
          153 Bulk Up
          154 Bounce
          155 Mud Shot
          156 Poison Tail
          157 Covet
          158 Volt Tackle
          159 Magical Leaf
          15A Water Sport
          15B Calm Mind
          15C Leaf Blade
          15D Dragon Dance
          15E Rock Blast
          15F Shock Wave
          160 Water Pulse
          161 Doom Desire

          FireRed Multichoice ID Numbers
          [00] - Yes
          [01] - Eevee
          Quit looking.
          [02] - Normal
          [03] - Hall of Fame
          [04] - Eggs
          [05] - Victories
          [06] - Hall of Fame
          [07] - Hall of Fame
          [08] - Eggs
          [09] - Hall of Fame
          [0A] - Exit
          [0B] - Exit
          [0C] - Exit
          [0D] - Bicycle $1,000,000
          No Thanks
          [0E] - Abra 180 coins
          Clefairy 500 coins
          Dratini 2,800 coins
          Scyther 5,500 coins
          Porygon 9,999 coins
          No Thanks
          [0F] - SLP
          [10] - Yes
          [11] - Single battle
          Double battle
          Multi battle
          [12] - Yes
          [13] - Make a Challenge
          [14] - Rooftop
          [15] - Helix Fossil
          [16] - Dome Fossil
          [17] - Old Amber
          [18] - Helix Fossil
          Old Amber
          [19] - Dome Fossil
          Old Amber
          [1A] - Fresh Water $200
          Soda Pop $300
          Lemonade $350
          [1B] - 50 coins $1,000
          500 coins $10,000
          [1C] - Excellent
          Not So Bad
          [1D] - Right
          [1E] - TM13 4,000 coins
          TM23 3,500 coins
          TM24 4,000 coins
          TM30 4,500 coins
          TM35 4,000 coins
          No Thanks
          [1F] - 5F
          [20] - Fresh Water
          [21] - Soda Pop
          [22] - Fresh Water
          Soda Pop
          [23] - Lemonade
          [24] - Fresh Water
          [25] - Soda Pop
          [26] - Fresh Water
          Soda Pop
          [27] - Trade Center
          [28] - Game Link Cable
          [29] - Smoke Ball 800 coins
          Miracle Seed 1,000 coins
          Charcoal 1,000 coins
          Mystic water 1,000 coins
          Yellow flute 1,600 coins
          No Thanks
          [2A] - B1F
          [2B] - Linked game play
          Direct Corner
          Union Room
          [2C] - Two Island
          Three Island
          [2D] - One Island
          Three Island
          [2E] - One Island
          Two Island
          [2F] - Trade Center
          Berry Crush
          [30] - Nada
          [31] - Pokemon Jump
          Dodrio Berry-Picking
          [32] - Trade Center
          [33] - 2 Tinymushrooms
          1 Big Mushroom
          [34] - Trade Center
          Berry Crush
          [35] - Trade Center
          [36] - Sevii Islands
          Navel Rock
          [37] - Sevii Islands
          Birth Island
          [38] - Sevii Islands
          Navel Rock
          Birth Island
          [39] - One Island
          Two Island
          Three Island
          [3A] - Vermilion
          Two Island
          Three Island
          [3B] - Vermilion
          One Island
          Three Island
          [3C] - Vermilion
          One Island
          Two Island
          [3D] - Vermilion
          [3E] - Blank
          [3F] - Join Group
          Become Leader
          [40] - Single


          Reply With Quote
          Old July 15th, 2017 (4:48 AM). Edited 4 Weeks Ago by Avara.
          Avara Avara is offline
          Author Of Tales
            Join Date: Dec 2011
            Location: Avlar
            Gender: Female
            Nature: Adamant
            Posts: 623
            Additional Text Info

            As I mentioned before, the "=" before your desired script's text lets the program know you want the text that follows it to be displayed. Of course, there's a limit to how long the text can be - to ensure you're never wrong, use the Text Adjuster.

            The \n allows the text to go to a new line when it gets too long.
            After the initial use of \n, \l is used for each new line after that. As an example:
            Originally Posted by Avara View Post
            #dynamic 0x800000

            #org @main
            msgbox @greeting 0x6

            #org @greeting
            = Hi! My name is Adam.\nWhat's your name? [.]\l[.][player]?
            The [.] adds a little suspension point "..." in the actual text.
            [player] will show up as the player's name in-game. Similarly, [rival] displays the rival's name.
            That text string, first with \n and then \l to break up the lines, will look like this:
            Originally Posted by Avara View Post
            My name is Adam.
            What's your name? ...
            ... [player's name]?
            We can display more than just the player or rival's name similarly, using buffer commands. These let you show the name of a Pokemon, item, attack or number.

            Now that we've got that handy list of hex IDs, we can move onto our first set of commands that use them. Let's start with the easiest; bufferfirstpokemon, set up like this:
            Originally Posted by Avara View Post
            bufferfirstpokemon 0x[buffer number]
            The [buffer number] part is where you choose the buffer number to assign the first Pokemon in your party's name to - for [buffer1] set this to 0x0, for [buffer2] set this to 0x1, etc. The [buffer1] part is what you'll be using in your text to display the PC's first Pokemon's name like so:
            Originally Posted by Avara View Post
            #dynamic 0x800000

            #org @main
            bufferfirstpokemon 0x0
            msgbox @npctext 0x6

            #org @npctext
            = Wow, your [buffer1] is so cool!
            The bufferfirstpokemon part has to come before your msgbox that uses it, otherwise the game won't know which name to display in your text and you'll get a nasty glitch. It's the same for all buffer commands, including the next one, bufferpokemon:
            Originally Posted by Avara View Post
            bufferpokemon 0x[buffer number] 0x[Pokemon ID]
            Like before, you need to assign the Pokemon's name to a buffer number. Using that list of hex IDs from earlier, you can then choose a Pokemon's name to display. Let's pick Venusaur for example, or the Pokemon ID number 3. Here's an example combining bufferfirstpokemon and bufferpokemon, assigning them to buffer numbers 1 and 2 respectively.
            Originally Posted by Avara View Post
            #dynamic 0x800000

            #org @main
            bufferfirstpokemon 0x0
            bufferpokemon 0x1 0x3
            msgbox @npctext 0x6

            #org @npctext
            = Your [buffer1] is so cool, but\nmy [buffer2] is tougher!
            In-game, this will show up as "Your [first party member] is so cool, but my Venusaur is tougher!" in FR, or EM "Your [first party member] is so cool, but my Sceptile is tougher!" (I assume).

            The bufferitem and bufferattack commands are almost identical to bufferpokemon, set up like this:
            Originally Posted by Avara View Post
            bufferitem 0x[buffer number] 0x[Item ID]
            Originally Posted by Avara View Post
            bufferattack 0x[buffer number] 0x[Attack ID]
            All you have to do is choose your buffer number as before, and an item ID. For the sake of the tutorial, let's use item ID #1 - a Master Ball in both FR and EM.
            Originally Posted by Avara View Post
            #dynamic 0x800000

            #org @main
            bufferitem 0x0 0x1
            msgbox @npctext 0x2

            #org @npctext
            = I wish I had a [buffer1].
            ... Or an attack ID. For the sake of the tutorial, let's use item ID #1 - Pound.
            Originally Posted by Avara View Post
            #dynamic 0x800000

            #org @main
            bufferattack 0x0 0x1
            msgbox @npctext 0x2

            #org @npctext
            = The only attack my Pokemon\nknows is [buffer1].
            If you're using the "stdattacks.rbh" file as demonstrated below, you can substitute the attack ID for how it's defined there, so for the same attack, Pound (0x1) can simply be "ATK_POUND".
            Originally Posted by Avara View Post
            #dynamic 0x800000
            #include stdattacks.rbh

            #org @main
            bufferattack 0x0 ATK_POUND

            The buffernumber command isn't as straightforward. It actually shows the numerical value of a variable. We'll go into more detail on variables later, but let's use 0x8000 and its value is 100 for example purposes.
            Originally Posted by Avara View Post
            buffernumber 0x[buffer number] 0x[Variable containing desired number]
            With buffernumber we choose the number of the buffer to display, and then the variable we want the value of to get our desired number. In this case, we've assumed var 8000 contains our desired number, 100.
            Originally Posted by Avara View Post
            #dynamic 0x800000

            #org @main
            buffernumber 0x00 0x8000
            msgbox @npctext 0x2

            #org @npctext
            = My Charizard grew to level [buffer1]!

            Adding color to your text is a nice way of differentiating characters and making item or place names stand out.
            Originally Posted by Avara View Post
            #dynamic 0x800000
            #org @main
            msgbox @npctext 0x6


            #org @npctext
            = [blue_fr]What I wouldn't give for a cup\nof [green_fr]Coffee[blue_fr] from Clifftop Café[.]

            #org @npctext
            = [blue_em]What I wouldn't give for a cup\nof [green_em]Coffee[blue_em] from Clifftop Café[.]
            Fire Red Colors:
            White - [white_fr]
            Black - [black_fr]
            Gray - [grey_fr]
            Red - [red_fr]
            Orange - [orange_fr]
            Green - [green_fr]
            Light Green - [lightgreen_fr]
            Blue - [blue_fr]
            Light Blue - [lightblue_fr]
            Light Blue 2 - [lightblue2_fr]
            Cyan - [cyan_fr]
            Light Blue 3 - [lightblue3_fr]
            Navy Blue - [navyblue_fr]
            Dark Navy Blue - [darknavyblue_fr]

            Emerald Colors:
            White - [white_em]
            Dark Gray - [darkgrey_em]
            Gray - [grey_em]
            Red - [red_em]
            Orange - [orange_em]
            Green - [green_em]
            Light Green - [lightgreen_em]
            Blue - [blue_em]
            Light Blue - [lightblue_em]
            White 4 - [white4_em]
            Lime Green- [limegreen_em]
            Aqua - [aqua_em]
            Navy - [navy_em]


            Reply With Quote
            Old July 15th, 2017 (4:50 AM). Edited 4 Weeks Ago by Avara.
            Avara Avara is offline
            Author Of Tales
              Join Date: Dec 2011
              Location: Avlar
              Gender: Female
              Nature: Adamant
              Posts: 623
              Conditional Text Scripts

              Let's start the next section with something nice and simple, shall we? Throwback to our msgbox command. This time we'll be looking at msgbox 0x5, or in other words, making a script where the player can answer "Yes" or "No".

              #dynamic 0x800000

              #org @main
              msgbox @yesno 0x5
              compare 0x800D 0x1
              if 0x1 goto @YesOrg
              msgbox @no 0x6

              #org @YesOrg
              msgbox @yes 0x6

              #org @yesno
              = Yes or no?

              #org @yes
              = You said yes.

              #org @no
              = You said no.

              The goto command is exactly as it sounds; it literally tells the script to go to another pointer.
              compare 0x800D, or compare LASTRESULT gets the result of the player's choice - in msgbox 0x5's case, 0x0 for 0 "No" or 0x1 for 1 "Yes".
              Notice that when the player chooses "Yes", it doesn't go straight to the msgbox command which displays the text. This needs to be contained in its own script section, hence why I named the pointer "@YesOrg" for convenience. If you accidentally send your "Yes" pointer to the pointer for the text string(@yes) instead of the script section it's contained in (@YesOrg), bugs will follow.
              If the LASTRESULT, or 0x800D is not 0x1 for "Yes" it will not goto @YesOrg, it just continues the script, meaning it displays the text string for @no and closes.

              goto works just as well - the example below will give you the exact same results as the script above.

              #dynamic 0x800000

              #org @main
              msgbox @yesno 0x5
              compare 0x800D 0x1
              if 0x1 goto @YesOrg
              goto @NoOrg

              #org @NoOrg
              msgbox @no 0x6

              #org @YesOrg
              msgbox @yes 0x6

              #org @yesno
              = Yes or no?

              #org @yes
              = You said yes.

              #org @no
              = You said no.


              Let's go back to our basic NPC scripts for a moment. Every city needs filler NPCs, and they can get boring if they just say the same thing over and over again. In comes our next handy command, random. All it does is generate a random number within the range you set and then goes to the appropriate pointer, like this:

              Originally Posted by Avara View Post
              random 0x[number of options you want]
              compare 0x800D 0x0
              if 0x1 goto @option1
              Let's say you wanted a NPC to say three different things depending on the random number generated. You'd need a script like this:

              #dynamic 0x800000

              #org @main
              random 0x03
              compare 0x800D 0x0
              if 0x1 goto @option1
              compare 0x800D 0x1
              if 0x1 goto @option2
              compare 0x800D 0x2
              if 0x1 goto @option3

              #org @option1
              msgbox @option1msg 0x6

              #org @option2
              msgbox @option2msg 0x6

              #org @option3
              msgbox @option3msg 0x6

              #org @option1msg
              = Message one text.

              #org @option2msg
              = Message two text.

              #org @option3msg
              = Message three text.


              Now we've covered random, we can move onto multichoice. For those of you who don't know what a multichoice box is, here's an example.

              The layout for the multichoice command is as follows:

              Originally Posted by Avara View Post
              preparemsg @pointer
              multichoice 0x[X Co-ordinate of Box] 0x[Y Co-ordinate of Box] 0x[Multichoice ID]* 0x1

              *Refer to multichoice IDs provided.
              preparemsg prepares a text string to display and waitmsg is self explanitory, it just makes sure the full text is displayed before opening the multichoice box.
              The 0x1 at the end means the player can't press B to exit the multichoice box. If it's 0x0 it can be cancelled with B - 0x1 is just my personal preference as it forces the player to pick a choice. Here's an example script from the above screenshot of a FireRed ROM, with "Yes", "No" and "Info" as options:

              preparemsg @pointer
              multichoice 0xE 0x0 0x10 0x1
              copyvar 0x8000 LASTRESULT
              compare 0x8000 0x0
              if 0x1 goto @yes
              compare 0x8000 0x1
              if 0x1 goto @no
              compare 0x8000 0x2
              if 0x1 goto @info

              #org @yes
              msgbox @yesmsg 0x6

              #org @no
              msgbox @nomsg 0x6

              #org @info
              msgbox @infomsg 0x6

              The copyvar command here copies the result stored in LASTRESULT to var number 8000 so it can be compared to the result of the player's choice. More on vars later. Depending on the player's choice, you can make the script goto a different @pointer.


              Another minor conditional script could be one based on the player's gender.


              Reply With Quote
              Old July 15th, 2017 (5:02 AM). Edited 4 Weeks Ago by Avara.
              Avara Avara is offline
              Author Of Tales
                Join Date: Dec 2011
                Location: Avlar
                Gender: Female
                Nature: Adamant
                Posts: 623
                Flags & Variables

                Think of a flag as an on or off switch - it can be either 1 "ON" or 0 "OFF". Think of a variable as a better version of a flag - it can't just be 0x0 or 0x1 "on or off"- but holds any value between 0x0 and 0xFF. Both are crucial for creating your gameplay events, but we'll focus on flags for now:
                Originally Posted by Avara View Post
                setflag 0x[Flag Number]
                Originally Posted by Avara View Post
                clearflag 0x[Flag Number]

                Here is a list of "special" flags for each game - these have different in-game functions when set, or "ON":

                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

                0x860 - Activates Pokemon Menu
                0x861 - Activates Pokedex Menu
                0x862 - Activates Pokenav Menu
                0x867 - Activates First Badge
                0x868 - Activates Second Badge
                0x869 - Activates Third Badge
                0x86A - Activates Fourth Badge
                0x86B - Activates Fifth Badge
                0x86C - Activates Sixth Badge
                0x86D - Activates Seventh Badge
                0x86E - Activates Eighth Badge
                0x8C0 - Activates Running Shoes

                karatekid552 and DavidJCobb did an excellent job of referencing every flag and variable in the FireRed ROM and what they do. If you hack FR, this documentation will be invaluable to you. Emerald hackers will find this list of flags useful. (Emerald hackers, if you guys have a variable list, please give me a shout so I can link it here!)


                Reply With Quote
                Old July 15th, 2017 (5:11 AM). Edited 4 Weeks Ago by Avara.
                Avara Avara is offline
                Author Of Tales
                  Join Date: Dec 2011
                  Location: Avlar
                  Gender: Female
                  Nature: Adamant
                  Posts: 623
                  Part #2: The Core
                  Give, Take & Check For Items

                  Before you think about the multitude of free items you can give your players, you should always make sure they can actually take the item first!
                  Originally Posted by Avara View Post
                  checkitemroom 0x[Item ID] 0x[Quantity]
                  compare LASTRESULT 0x0
                  if 0x1 goto @pointer
                  This neat little command checks if you have enough room in your bag for the amount of the desired item. If your bag is full, the last line sends you to @pointer.
                  Not using this command prior to giving items can cause the player to "lose" them if they've got no space in their bag to take it. Now, onto actually giving the items! There are two ways of doing it:
                  Originally Posted by Avara View Post
                  giveitem 0x[Item ID] 0x[Quantity] 0x0
                  Nice and simple, and this way you even get a little message box automatically generated to notify the player that they've received the item. There is another way of giving the player an item "silently", meaning no pop-up notification.
                  Originally Posted by Avara View Post
                  additem 0x[Item ID] 0x[Quantity]
                  This version is useful for if you want to add your own custom string, for example:
                  Originally Posted by Avara View Post
                  additem 0x1 0x1
                  fanfare 0x101
                  msgbox @item 0x4

                  #org @item
                  = [black_fr][player] received a [green_fr]Master\nBall[black_fr] from Atenza!

                  Checking for items is easy with the checkitem command, set up like this:
                  Originally Posted by Avara View Post
                  checkitem 0x[Item ID] 0x[Quantity]
                  Let's see an example and check if the player has one Master Ball.
                  Originally Posted by Avara View Post
                  checkitem 0x1 0x1
                  compare LASTRESULT 0x1
                  if 0x4 goto @got
                  I used if 0x4 instead of 0x1 because this time, we're checking not that we have exactly one Master Ball - we're checking that we have more than one before we go to our pointer @Has.
                  Originally Posted by Avara View Post
                  0x0 = Lower Than
                  0x1 = Equal To
                  0x2 = Greater Than
                  0x3 = Lower Than or Equal To
                  0x4 = Greater Than or Equal To

                  To remove an item from the player's bag, all we need is this:
                  Originally Posted by Avara View Post
                  removeitem 0x[Item ID] 0x[Quantity]
                  Remember that if you're using the header file "#include stditems.rbh" you can substitute the item ID for its name in the #define in any of these cases, e.g. if you want to take the player's Master Ball you could have:
                  Originally Posted by Avara View Post
                  removeitem ITEM_MASTERBALL 0x1

                  Reply With Quote
                  Old July 15th, 2017 (5:40 AM). Edited 4 Weeks Ago by Avara.
                  Avara Avara is offline
                  Author Of Tales
                    Join Date: Dec 2011
                    Location: Avlar
                    Gender: Female
                    Nature: Adamant
                    Posts: 623
                    Sounds, Fanfares & Music

                    It's kind of hard to describe what a fanfare is - in not so many words it's a short tune, for example, the healing jingle in Pokémon Centers. To use one in your script, use these lines:
                    Originally Posted by Avara View Post
                    fanfare 0x[Fanfare's Hex ID]
                    All you have to do is choose the ID number of the fanfare you want from this list and put it after the 0x. waitfanfare means the script will wait for the sound to finish playing before continuing.


                    For sounds, the layout is almost identical to fanfares:
                    Originally Posted by Avara View Post
                    sound 0x[Sound's Hex ID]
                    That's literally it. If you want to make the script wait for the sound to finish before continuing, you can add waitsound if you want to.


                    If you'd like to play music through your script, this is also nice and simple:
                    Originally Posted by Avara View Post
                    playsong 0x[Song's Hex ID] 0x0
                    Similarly to the others, use the ID of your desired music after playsong 0x, only you need that 0x0 at the end! There are a variety of ways to revert or change the music. Entering a battle after using the playsong command will also change the music back to default, so if you want to continue your music for the remainder of your script, you'll need another playsong straight after the battle.
                    Originally Posted by Avara View Post
                    playsong 0x[Song's Hex ID] 0x0
                    fadesong 0x[Song's Hex ID]
                    fadesong, as the name suggests, fades your song into another nicely so it doesn't just abruptly cut to the next music.
                    Originally Posted by Avara View Post
                    playsong 0x[Song's Hex ID] 0x0
                    fadeout 0x[Fade Speed]
                    pause 0x1
                    fadein 0x[Fade Speed]
                    fadeout fades the song that was playing to silence. pause 0x1 does what it says on the tin, it's just a small pause which lasts for approximately half a second. fadein fades the song that was playing back in from silence.


                    Reply With Quote
                    Old July 15th, 2017 (6:07 AM).
                    Avara Avara is offline
                    Author Of Tales
                      Join Date: Dec 2011
                      Location: Avlar
                      Gender: Female
                      Nature: Adamant
                      Posts: 623
                      FireRed Songs & Fanfares
                      0105 Healing (RS)
                      0106 Level Up
                      0107 Evolution Start
                      0108 Evolution/Safari
                      0109 Battle 1
                      010A Battle 2
                      010B Unknown/Not listed in Sappy
                      010C Fanfare 1
                      010D Fanfare 2
                      010E You Fail It!
                      010F You Fail It Again!
                      0110 Follow Me
                      0111 Game Corner
                      0112 Evil Lurks
                      0113 Gym
                      0114 Jigglypuff's Song
                      0115 Introduction
                      0116 Pokemon Theme
                      0117 Cinnabar Island
                      0118 Lavender Town
                      0119 Healing
                      011A Bicycle
                      011B Encounter 1
                      011C Encounter 2
                      011D Encounter 3
                      011E You're In The Hall of Fame!
                      011F Viridian Forest
                      0120 Mount Moon
                      0121 Abandoned Place
                      0122 End Credits
                      0123 Route Theme 1
                      0124 Route Theme 2/Intro
                      0125 Route Theme 3
                      0126 Route Theme 4
                      0127 Indigo Plateau
                      0128 Battle 3
                      0129 Battle 4
                      012A Battle 5
                      012B Battle 6
                      012C Pallet Town
                      012D Oak's Lab
                      012E Oak's Theme
                      012F Pokemon Center
                      0130 SS Anne
                      0131 Surf's Up
                      0132 Pokemon Tower
                      0133 Silph Co.
                      0134 Cerulean City
                      0135 Celadon City
                      0136 Victory 1
                      0137 Victory 2
                      0138 Victory 3
                      0139 Vermillion City
                      013A Viridian City and Pewter City
                      013B Gary's Theme
                      013C Gary's Theme (bis)
                      013D Fanfare 3
                      013E Fanfare 4
                      013F You caught a Pokemon!
                      0140 Trainer Card Photo
                      0141 Gamefreak
                      0142 Victory 2 (bis)
                      0143 Intro Message 1
                      0144 Intro Message 2
                      0145 Intro Message 3
                      0146 Game Corner (+1)
                      0147 Game Corner (+2)
                      0148 Net Corner
                      0149 Mystery Connection
                      014A Game Corner (+3)
                      014B Mount Ember
                      014C Follow Me (alt)
                      014D Water Labyrinth
                      014E Tanoby Ruins
                      014F Islands 1-3
                      0150 Islands 4-5
                      0151 Islands 6-7(AKA Violet City Theme from GSC)
                      0152 PokeFlute
                      0153 Battle - Deoxys
                      0154 Battle 5 (+1)
                      0155 Battle 5 (+2)
                      0156 Encounter 4
                      0157 Deoxys Encounter
                      0158 Trainer Tower
                      0159 Pallet Town (fame mix)
                      015A Teachy TV

                      FireRed Sound List ~ found by tajaros
                      0x0 - Blank Noise (Stops BGM, not other S.E.)
                      0x1 - Use Item
                      0x2 - Log onto PC
                      0x3 - Turn off PC
                      0x4 - Turn on PC
                      0x5 - Click Noise
                      0x6 - Open Menu
                      0x7 - Wall Bump
                      0x8 - Door Open
                      0x9 - Exit Room
                      0xA - Jump
                      0xB - Bike Bell
                      0xC - Loud Crash (Like dropping of a heavy object)
                      0xD - Loud Crash (Higher pitch, and with echo)
                      0xE - Loud Crash (3 in rapid sucession, with long echo)
                      0xF - Low Pitch Pokeball Open
                      0x10 - Pokeball Close
                      0x11 - Flee S.E.
                      0x12 - PokeCenter Door Open
                      0x13 - Strange Noise (Like Water at the beginning, then like electricity)
                      0x14 - Low Pitch crash
                      0x15 - Super high pitch beep
                      0x16 - Error / False sound
                      0x17 - PokeCenter Pokeball Load up (Pokeballs being placed onto the heal machine.)
                      0x18 - PokeCasino Reel Stop
                      0x19 - Insert Coin into Machine
                      0x1A - Buzz (False/fail at Casino)
                      0x1B - EXP gauge
                      0x1C - Hop (Like on an Acro Bike)
                      0x1D - Lock / Break small rock?
                      0x1E - Unlock
                      0x1F - Strange Sound (Like a dor being locked, but different...)
                      0x20 - Strange Sound (A singular version of the previous sound)
                      0x21 - Crash sound (With echo)
                      0x22 - Singular Metal attack Sound (Like when using steel wing, but singular)
                      0x23 - Ice Break
                      0x24 - Ice Crack
                      0x25 - Falling
                      0x26 - Strange Sound (Super Low Pitch Ice Break?)
                      0x27 - Warp Away
                      0x28 - Warp Return
                      0x29 - Electricity?
                      0x2A - Turn Winch (Like in Winona's Gym)
                      0x2B - Truck Driving (Loop)
                      0x2C - Truck Stoping
                      0x2D - Truck Brake
                      0x2E - Truck Open
                      0x2F - Airplane Turbines
                      0x30 - Save
                      0x31 - Pokeball Bounce (Like in a trade)
                      0x32 - Pokeball Bounce (Quieter)
                      0x33 - Pokeball Bounce (Even Quieter)
                      0x34 - Pokeball Bounce (Even Quieter Still)
                      0x35 - Pokeball Open (Like in a trade)
                      0x36 - Throw Pokeball
                      0x37 - Musical Decoration Pad (Low C)
                      0x38 - Musical Decoration Pad (D)
                      0x39 - Musical Decoration Pad (E)
                      0x3A - Musical Decoration Pad (F#)
                      0x3B - Musical Decoration Pad (G)
                      0x3C - Musical Decoration Pad (A)
                      0x3D - Musical Decoration Pad (B)
                      0x3E - Musical Decoration Pad (High C)
                      0x3F - Mud Ball Smash
                      0x40 - Wodden Board
                      0x41 - Get Money
                      0x42 - P.A. (Like when an elevator is done, or end of Safari Zone)
                      0x43 - Water Baloon Pop (Low)
                      0x44 - Water Baloon Pop (Med)
                      0x45 - Water Baloon Pop (High)
                      0x46 - Wodden Smash
                      0x47 - Wooden Break
                      0x48 - Poison Afliction
                      0x49 - Conveyor Belt
                      0x4A - Conveyor Belt 2 (Loop)
                      0x4B - Conveyor Belt 2 (end)
                      0x4C - Loud Noise (Like a low conveyor belt 2) (Loop)
                      0x4D - Loud Noise (End)
                      0x4E - Light noise (Like a High conveyor belt 2) (Loop)
                      0x4F - Light Noise (End)
                      0x50 - Strange Noise (Like sonething being absorbed into a dark void. Sound goes from high to low)
                      0x51 - Strange Noise (Like an extension of hte previous sound. Sound goes from Low to Super Low)
                      0x52 - Buzz (Like a Circular Saw)
                      0x53 - Low Health Alert (Loop) (Can Not Be Turned Off Without Map Refresh)
                      0x54 - Level Up Ding
                      0x55 - Low Grumbling (Like a Diesel Engine) (Loop)
                      0x56 - Low Grumbling (End)
                      0x57 - Swipe Sound (Loop)
                      0x58 - Sell Item
                      0x59 - Low Ding (Like a really low "Low C" note)
                      0x5A - High Pitch Swipe
                      0x5B - High Pitch Swipe (Reverse)
                      0x5C - Smack
                      0x5D - Small Noise (Like a person kicking dirt)
                      0x5E - VS Seeker?
                      0x5F - Light Jingle
                      0x60 - Explosion
                      0x61 - Explosion (After Effect / Cont)
                      0x62 - STRONG Wind (Or Crowd Screaming? My PC to slow to tell...)
                      0x63 - Low Slamming sound (Like someone setting down a heavy box.)
                      0x64 - Red / Blue Orb
                      0x65 - Computer Chatter (One High Pitch Blip)
                      0x66 - Computer Chatter (2 Blips, pattern: MedHi-High)
                      0x67 - Computer Chatter (High Pitch PC on?)
                      0x68 - Computer Chatter (High Pitch PC off?)
                      0x69 - Computer Chatter (PC Scanning)
                      0x6A - Glass Breaking?
                      0x6B - Light Shuffle sound (Like feet sliding across the floor)
                      0x6C - High Pitch Quiet Blip
                      0x6D - Small Sound (Like a twig snaping)
                      0x6E - Strange Sound (Like low pitch Ice Shimmering, or Use of Flute)
                      0x6F - Loud Bang (Like a gun shot, but different)
                      0x70 - Lout Buzz
                      0x71 - Metal Sheen (Like on steel wing, but a little longer)
                      0x72 - Curse Attack
                      0x73 - Baton Pass Attack (Like a swipeing / falling sound)
                      0x74 - Low Crash
                      0x75 - Bubble Attack (Launch)
                      0x76 - Substitute attack?
                      0x77 - Watyer Gun Attack (Launch)
                      0x78 - Rain Dance Attack
                      0x79 - Slash Attack
                      0x7A - Gust Attack?
                      0x7B - Very Strange Sound (Like a downward Spiral?)
                      0x7C - Rock Smash Attack? (In Battle or not? I Can't tell)
                      0x7D - Powerful Wind (Loop)
                      0x7E - Powerful Wind (End)
                      0x7F - Pound Attack?
                      0x80 - Throwing Sound (Like Bait in the Safari Zone)
                      0x81 - Deep Slashing noise
                      0x82 - Ice Ball Attack
                      0x83 - Loud Swipe?
                      0x84 - Deep Bang (Like someone hit something hard with a big log...)
                      0x85 - Beam Attack Charge Sound. (Like Solar Beam's Charging sound)
                      0x86 - Deep Bang (Similar to 0x84)
                      0x87 - Bubbling Noise
                      0x88 - Throwing noise (Slightly Higher Pitch)
                      0x89 - VERY DEEP Throwing sound
                      0x8A - Deep Explosion like sound
                      0x8B - Deep Wave-like sound
                      0x8C - Strange Sound (A Smack Noise, tehn a Short Deep Explosion-ish sound)
                      0x8D - Deep Bubbling
                      0x8E - Deep Crash (Like a super deep opening pokeball)
                      0x8F - Deep Fire
                      0x90 - Deep Smack
                      0x91 - Low Whirling
                      0x92 - High Pitch Powerful Wind (Loop)
                      0x93 - High Pitch Powerful Wind (End)
                      0x94 - High Pitch Shuffling
                      0x95 - Loud Noise (No Explaination)
                      0x96 - Wing Flapping (Singular)
                      0x97 - Wing Flapping (Decending Octaves, High To Low)
                      0x98 - Kicking Sand?
                      0x99 - High Pitch Whips Sound
                      0x9A - Strange Sound (No Explaination)
                      0x9B - Whirling Upwards (Short....)
                      0x9C - Super Strong Wind Burst
                      0x9D - MEGA ULTRA Strong wind burst. (I think....)
                      0x9E - MEGA ULTRA Strong wind burst. (Pitch Goes up, then down, more like actual wind...)
                      0x9F - Small Noise (Like a twig breaking)
                      0xA0 - Splash Attack Flopping sound (Singular)
                      0xA1 - Sandpaper-ish?
                      0xA2 - Small Noise (No Explaination)
                      0xA3 - Stretching noise?
                      0xA4 - Speeding up fan? (Pitch raises, that is all)
                      0xA5 - Sing Attack
                      0xA6 - Perish Song Attack
                      0xA7 - Ice? (Souns like when a pokemon gets frozen...)
                      0xA8 - Noise (No Explaination)
                      0xA9 - Little Sound (No explaination...)
                      0xAA - Loud Sound (No Explaination)
                      0xAB - Explosion-ish Sound
                      0xAC - Recover Attack
                      0xAD - Absorb Smack (The sound before the absorbtion)
                      0xAE - Metal Sound?
                      0xAF - Aurora Beam (Small)
                      0xB0 - Aurora Beam (Main)
                      0xB1 - Confusion
                      0xB2 - Drum?
                      0xB3 - Amnesia "?" Appear
                      0xB4 - Egg Crack?
                      0xB5 - Amnesia (Deeper ? Sound)
                      0xB6 - Loud Hover Sound (Decending)
                      0xB7 - Loud Hover Sound (Acending)
                      0xB8 - Strange Sound (Sounds like a speed up, then an upward whirling noise)
                      0xB9 - Smack (With Echo)
                      0xBA - Wooshing noise
                      0xBB - Frustration "Angry" Symbols
                      0xBC - Small Metallic "Bling" sound
                      0xBD - Whispering noise
                      0xBE - Rest Attack
                      0xBF - Shattering Ice
                      0xC0 - Deep Watery noise
                      0xC1 - Strange Noise (No Explanation)
                      0xC2 - Solar Beam (Launch)
                      0xC3 - Sunny Day Attack
                      0xC4 - Strange Noise (Sounds like a small absorption, but not from any absorb attacks...)
                      0xC5 - Strange Noise (Previous sound, in reverse)
                      0xC6 - Small Noise (No Explanation)
                      0xC7 - Swift Attack (Singular - higher pitch)
                      0xC8 - Swift Attack (Singular - Longer)
                      0xC9 - Swift Attack (Singular - Lower Pitch)
                      0xCA - Odor Sleuth Attack
                      0xCB - Small Noise (Like a twig Snapping... again)
                      0xCC - Strange noise (Like... Ding, Dong... Ding, Dong....)
                      0xCD - Frustration "Angry" Symbols
                      0xCE - Noise (Descending Sound)
                      0xCF - Loud Crash (Very Deep)

                      Reply With Quote
                      Old 4 Weeks Ago (10:09 AM).
                      Avara Avara is offline
                      Author Of Tales
                        Join Date: Dec 2011
                        Location: Avlar
                        Gender: Female
                        Nature: Adamant
                        Posts: 623
                        How To Compile Your Script

                        To insert your script into your hack, or compile it, is nice and simple. First you want to open your ROM in AdvanceMap 1.92, and decide where you want your script to be run from:
                        • A Person Event/NPC Green "P"
                        • A Signpost/Red "S" tile
                        • A Trigger/Green "S" tile
                        • A Level Script/The Map Header

                        In this example, we're going to assign a script to a NPC. Assemble your script, then hit this button:

                        You should end up with a screen like this:

                        All you have to do is copy that offset beside @start, or your beginning pointer, and paste it in the person event's "Script Offset" Box, shown here:

                        For level scripts that are not triggered in the overworld, but from entering the map, you want to put your script here, outlined in red:


                        Reply With Quote
                        Old 4 Weeks Ago (10:52 AM).
                        ghoulslash's Avatar
                        ghoulslash ghoulslash is offline
                          Join Date: Mar 2016
                          Gender: Male
                          Posts: 51
                          This is certainly ambitious but definitely much needed! Let me know if you'd like any help with things

                          I would suggest you cover preprocessing directives like #define and #include. Header files are really useful, especially when sharing scripts with other people in a project, or just your own sanity's sake so you don't have to try and remember the ID of an arbitrary pokemon or item every time you make a script.

                          It might also be useful to go more in depth on some commands that aren't well documented such as spriteface, spritebehave, or if there are any differences between warp and warp1, for example.

                          A level script tutorial would also be very helpful since most are somewhat older as well.

                          I know this is a lot to dump on you at once, but it would make this tutorial the most complete I've seen yet!
                          Reply With Quote
                          Old 4 Weeks Ago (6:08 AM). Edited 4 Weeks Ago by Avara.
                          Avara Avara is offline
                          Author Of Tales
                            Join Date: Dec 2011
                            Location: Avlar
                            Gender: Female
                            Nature: Adamant
                            Posts: 623
                            Originally Posted by ghoulslash View Post
                            This is certainly ambitious but definitely much needed! Let me know if you'd like any help with things

                            I would suggest you cover preprocessing directives like #define and #include. Header files are really useful, especially when sharing scripts with other people in a project, or just your own sanity's sake so you don't have to try and remember the ID of an arbitrary pokemon or item every time you make a script.

                            It might also be useful to go more in depth on some commands that aren't well documented such as spriteface, spritebehave, or if there are any differences between warp and warp1, for example.

                            A level script tutorial would also be very helpful since most are somewhat older as well.

                            I know this is a lot to dump on you at once, but it would make this tutorial the most complete I've seen yet!
                            Thanks a lot! Yeah someone had suggested header files to me before, i'll definitely include some of those once I get around to making ones we don't already have! Less-documented commands and level scripting are going to be included too - my first aim is covering what we already have in other scripting tutorials like diego's and tajaros's, then when all that's done I'll move onto the extra stuff, just to make sure nothing is missed =)

                            Reply With Quote
                            Old 4 Weeks Ago (10:14 AM). Edited 4 Weeks Ago by Avara.
                            Avara Avara is offline
                            Author Of Tales
                              Join Date: Dec 2011
                              Location: Avlar
                              Gender: Female
                              Nature: Adamant
                              Posts: 623
                              Recap: Combining Commands

                              Experienced scripters can skip this section, but when I was starting out one of the things I was unsure of was the order to place commands in. Obviously, it's sequential, but there is a basic format to follow to make it easier on yourself.

                              As mentioned earlier, we know this is the most basic of script layouts - but what if you want to make a "big" script that does a lot of things? Here's an example I can show you combining everything we've learned so far, and two new commands called givepokemon and countpokemon:

                              #dynamic 0x800000

                              #org @start
                              checkflag 0x240
                              if 0x1 goto @Done
                              msgbox @question 0x5
                              compare LASTRESULT 0x1
                              if 0x1 goto @Yes
                              msgbox @saidnomsg 0x6

                              #org @Yes
                              compare 0x800D 0x6
                              if 0x1 goto @Full
                              msgbox @take 0x6
                              givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
                              fanfare 0x101
                              msgbox @receive 0x4
                              msgbox @nick 0x5
                              compare LASTRESULT 0x1
                              if 0x1 call @YesToNick
                              msgbox @Donemsg 0x6
                              setflag 0x240

                              #org @YesToNick
                              setvar 0x8004 0x0
                              call 0x81A74EB

                              #org @Full
                              msgbox @Fullmsg 0x6

                              #org @Done
                              msgbox @Donemsg 0x6

                              #org @question
                              = Do you like grass-types?

                              #org @saidnomsg
                              = Too bad[.]

                              #org @Fullmsg
                              = Your party is full.

                              #org @Donemsg
                              = Bye!

                              #org @take
                              = You can have one of mine!

                              #org @receive
                              = [black_fr][player] received a Pokémon!

                              #org @nick
                              = [black_fr]Give it a nickname?

                              This script is for a NPC who gives the player a Bulbasaur - if they answer "Yes" to the question and have room for it in their party. It only happens once, afterwards the NPC says something generic. Let's break it all down:
                              Originally Posted by Avara View Post
                              #dynamic 0x800000

                              #org @start
                              checkflag 0x240
                              if 0x1 goto @Done
                              First section checks if flag 0x240 is set, and if it is, go to the pointer @done.
                              Originally Posted by Avara View Post
                              msgbox @question 0x5
                              compare LASTRESULT 0x1
                              if 0x1 goto @Yes
                              msgbox @saidnomsg 0x6
                              Next section asks the player a question. If they answer "Yes", or the result is 1, the script goes to pointer @Yes. If they said "No", they just say a line of text and the script ends there. By the way, LASTRESULT can be substituted for 0x800D, which is a bit harder to remember!
                              Originally Posted by Avara View Post
                              #org @Yes
                              compare 0x800D 0x6
                              if 0x1 goto @Full
                              This is the beginning of the @Yes pointer. countpokemon is fairly self explanitory, it counts how many party members you have.
                              compare 0x800D 0x6 compares the result of countpokemon to 6, and if it is 6, the script goes to the pointer @Full.
                              Originally Posted by Avara View Post
                              givepokemon 0x[Pokemon Hex ID] 0x[Level in Hex] 0x[Held Item ID] 0x0 0x0 0x0
                              That is how the givepokemon command is set up - in our script, it's a level 5 Bulbasaur not holding any items, so we've got this:
                              Originally Posted by Avara View Post
                              msgbox @take 0x6
                              givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
                              Alternatively, if you're using "#include stdpoke.rbh" you could have this to make it easier on yourself:
                              Originally Posted by Avara View Post
                              givepokemon PKMN_BULBASAUR 0x5 0x0 0x0 0x0 0x0
                              The next part is music related which we'll cover in more detail later.
                              Originally Posted by Avara View Post
                              fanfare 0x101
                              msgbox @receive 0x4
                              All this section does is play the little level-up jingle and display a message notifying that the player's received a Pokémon.
                              We've used msgbox 0x4 here, followed by waitfanfare then closeonkeypress, which prevents the message from being closed until the jingle has finished playing, similarly to how the pop-up message for finding items on the ground is.
                              Originally Posted by Avara View Post
                              msgbox @nick 0x5
                              compare LASTRESULT 0x1
                              if 0x1 call @YesToNick
                              msgbox @Donemsg 0x6
                              Fairly straightforward repeat - this part asks the player if they want to give their new party member a nickname. The difference here is that instead of goto we've used call instead. call will jump to a pointer, and then back to the original script with return.
                              Originally Posted by Avara View Post
                              #org @YesToNick
                              setvar 0x8004 0x0
                              call 0x81A74EB
                              In our nickname pointer that we've momentarily jumped to, we call 0x81A74EB - this will jump to the nicknaming screen in FireRed*.
                              return takes us back to our original script when the nicknaming screen is exited.
                              *If you're hacking Emerald, 0x2723DD for nicknaming instead of 0x81A74EB. Those are just pointers containing specials, which we'll cover much later!
                              Originally Posted by Avara View Post
                              msgbox @Donemsg 0x6
                              setflag 0x240
                              setflag 0x240 goes at the end, to set the flag number 240 and stop you from receiving infinite Bulbasaurs =P

                              Reply With Quote
                              Old 4 Weeks Ago (7:29 AM).
                              Avara Avara is offline
                              Author Of Tales
                                Join Date: Dec 2011
                                Location: Avlar
                                Gender: Female
                                Nature: Adamant
                                Posts: 623
                                Pokemon Header File
                                #define PKMN_MISSINGNO 0x0
                                #define PKMN_BULBASAUR 0x1
                                #define PKMN_IVYSAUR 0x2
                                #define PKMN_VENUSAUR 0x3
                                #define PKMN_CHARMANDER 0x4
                                #define PKMN_CHARMELEON 0x5
                                #define PKMN_CHARIZARD 0x6
                                #define PKMN_SQUIRTLE 0x7
                                #define PKMN_WARTORTLE 0x8
                                #define PKMN_BLASTOISE 0x9
                                #define PKMN_CATERPIE 0xA
                                #define PKMN_METAPOD 0xB
                                #define PKMN_BUTTERFREE 0xC
                                #define PKMN_WEEDLE 0xD
                                #define PKMN_KAKUNA 0xE
                                #define PKMN_BEEDRILL 0xF
                                #define PKMN_PIDGEY 0x10
                                #define PKMN_PIDGEOTTO 0x11
                                #define PKMN_PIDGEOT 0x12
                                #define PKMN_RATTATA 0x13
                                #define PKMN_RATICATE 0x14
                                #define PKMN_SPEAROW 0x15
                                #define PKMN_FEAROW 0x16
                                #define PKMN_EKANS 0x17
                                #define PKMN_ARBOK 0x18
                                #define PKMN_PIKACHU 0x19
                                #define PKMN_RAICHU 0x1A
                                #define PKMN_SANDSHREW 0x1B
                                #define PKMN_SANDSLASH 0x1C
                                #define PKMN_NIDORANF 0x1D
                                #define PKMN_NIDORINA 0x1E
                                #define PKMN_NIDOQUEEN 0x1F
                                #define PKMN_NIDORANM 0x20
                                #define PKMN_NIDORINO 0x21
                                #define PKMN_NIDOKING 0x22
                                #define PKMN_CLEFAIRY 0x23
                                #define PKMN_CLEFABLE 0x24
                                #define PKMN_VULPIX 0x25
                                #define PKMN_NINETALES 0x26
                                #define PKMN_JIGGLYPUFF 0x27
                                #define PKMN_WIGGLYTUFF 0x28
                                #define PKMN_ZUBAT 0x29
                                #define PKMN_GOLBAT 0x2A
                                #define PKMN_ODDISH 0x2B
                                #define PKMN_GLOOM 0x2C
                                #define PKMN_VILEPLUME 0x2D
                                #define PKMN_PARAS 0x2E
                                #define PKMN_PARASECT 0x2F
                                #define PKMN_VENONAT 0x30
                                #define PKMN_VENOMOTH 0x31
                                #define PKMN_DIGLETT 0x32
                                #define PKMN_DUGTRIO 0x33
                                #define PKMN_MEOWTH 0x34
                                #define PKMN_PERSIAN 0x35
                                #define PKMN_PSYDUCK 0x36
                                #define PKMN_GOLDUCK 0x37
                                #define PKMN_MANKEY 0x38
                                #define PKMN_PRIMEAPE 0x39
                                #define PKMN_GROWLITHE 0x3A
                                #define PKMN_ARCANINE 0x3B
                                #define PKMN_POLIWAG 0x3C
                                #define PKMN_POLIWHIRL 0x3D
                                #define PKMN_POLIWRATH 0x3E
                                #define PKMN_ABRA 0x3F
                                #define PKMN_KADABRA 0x40
                                #define PKMN_ALAKAZAM 0x41
                                #define PKMN_MACHOP 0x42
                                #define PKMN_MACHOKE 0x43
                                #define PKMN_MACHAMP 0x44
                                #define PKMN_BELLSPROUT 0x45
                                #define PKMN_WEEPINBELL 0x46
                                #define PKMN_VICTREEBEL 0x47
                                #define PKMN_TENTACOOL 0x48
                                #define PKMN_TENTACRUEL 0x49
                                #define PKMN_GEODUDE 0x4A
                                #define PKMN_GRAVELER 0x4B
                                #define PKMN_GOLEM 0x4C
                                #define PKMN_PONYTA 0x4D
                                #define PKMN_RAPIDASH 0x4E
                                #define PKMN_SLOWPOKE 0x4F
                                #define PKMN_SLOWBRO 0x50
                                #define PKMN_MAGNEMITE 0x51
                                #define PKMN_MAGNETON 0x52
                                #define PKMN_FARFETCHED 0x53
                                #define PKMN_DODUO 0x54
                                #define PKMN_DODRIO 0x55
                                #define PKMN_SEEL 0x56
                                #define PKMN_DEWGONG 0x57
                                #define PKMN_GRIMER 0x58
                                #define PKMN_MUK 0x59
                                #define PKMN_SHELLDER 0x5A
                                #define PKMN_CLOYSTER 0x5B
                                #define PKMN_GASTLY 0x5C
                                #define PKMN_HAUNTER 0x5D
                                #define PKMN_GENGAR 0x5E
                                #define PKMN_ONIX 0x5F
                                #define PKMN_DROWZEE 0x60
                                #define PKMN_HYPNO 0x61
                                #define PKMN_KRABBY 0x62
                                #define PKMN_KINGLER 0x63
                                #define PKMN_VOLTORB 0x64
                                #define PKMN_ELECTRODE 0x65
                                #define PKMN_EXEGGCUTE 0x66
                                #define PKMN_EXEGGUTOR 0x67
                                #define PKMN_CUBONE 0x68
                                #define PKMN_MAROWAK 0x69
                                #define PKMN_HITMONLEE 0x6A
                                #define PKMN_HITMONCHAN 0x6B
                                #define PKMN_LICKITUNG 0x6C
                                #define PKMN_KOFFING 0x6D
                                #define PKMN_WEEZING 0x6E
                                #define PKMN_RHYHORN 0x6F
                                #define PKMN_RHYDON 0x70
                                #define PKMN_CHANSEY 0x71
                                #define PKMN_TANGELA 0x72
                                #define PKMN_KANGASKHAN 0x73
                                #define PKMN_HORSEA 0x74
                                #define PKMN_SEADRA 0x75
                                #define PKMN_GOLDEEN 0x76
                                #define PKMN_SEAKING 0x77
                                #define PKMN_STARYU 0x78
                                #define PKMN_STARMIE 0x79
                                #define PKMN_MRMIME 0x7A
                                #define PKMN_SCYTHER 0x7B
                                #define PKMN_JYNX 0x7C
                                #define PKMN_ELECTABUZZ 0x7D
                                #define PKMN_MAGMAR 0x7E
                                #define PKMN_PINSIR 0x7F
                                #define PKMN_TAUROS 0x80
                                #define PKMN_MAGIKARP 0x81
                                #define PKMN_GYARADOS 0x82
                                #define PKMN_LAPRAS 0x83
                                #define PKMN_DITTO 0x84
                                #define PKMN_EEVEE 0x85
                                #define PKMN_VAPOREON 0x86
                                #define PKMN_JOLTEON 0x87
                                #define PKMN_FLAREON 0x88
                                #define PKMN_PORYGON 0x89
                                #define PKMN_OMANYTE 0x8A
                                #define PKMN_OMASTAR 0x8B
                                #define PKMN_KABUTO 0x8C
                                #define PKMN_KABUTOPS 0x8D
                                #define PKMN_AERODACTYL 0x8E
                                #define PKMN_SNORLAX 0x8F
                                #define PKMN_ARTICUNO 0x90
                                #define PKMN_ZAPDOS 0x91
                                #define PKMN_MOLTRES 0x92
                                #define PKMN_DRATINI 0x93
                                #define PKMN_DRAGONAIR 0x94
                                #define PKMN_DRAGONITE 0x95
                                #define PKMN_MEWTWO 0x96
                                #define PKMN_MEW 0x97
                                #define PKMN_CHIKORITA 0x98
                                #define PKMN_BAYLEEF 0x99
                                #define PKMN_MEGANIUM 0x9A
                                #define PKMN_CYNDAQUIL 0x9B
                                #define PKMN_QUILAVA 0x9C
                                #define PKMN_TYPHLOSION 0x9D
                                #define PKMN_TOTODILE 0x9E
                                #define PKMN_CROCONAW 0x9F
                                #define PKMN_FERALIGATR 0xA0
                                #define PKMN_SENTRET 0xA1
                                #define PKMN_FURRET 0xA2
                                #define PKMN_HOOTHOOT 0xA3
                                #define PKMN_NOCTOWL 0xA4
                                #define PKMN_LEDYBA 0xA5
                                #define PKMN_LEDIAN 0xA6
                                #define PKMN_SPINARAK 0xA7
                                #define PKMN_ARIADOS 0xA8
                                #define PKMN_CROBAT 0xA9
                                #define PKMN_CHINCHOU 0xAA
                                #define PKMN_LANTURN 0xAB
                                #define PKMN_PICHU 0xAC
                                #define PKMN_CLEFFA 0xAD
                                #define PKMN_IGGLYBUFF 0xAE
                                #define PKMN_TOGEPI 0xAF
                                #define PKMN_TOGETIC 0xB0
                                #define PKMN_NATU 0xB1
                                #define PKMN_XATU 0xB2
                                #define PKMN_MAREEP 0xB3
                                #define PKMN_FLAAFFY 0xB4
                                #define PKMN_AMPHAROS 0xB5
                                #define PKMN_BELLOSSOM 0xB6
                                #define PKMN_MARILL 0xB7
                                #define PKMN_AZUMARILL 0xB8
                                #define PKMN_SUDOWOODO 0xB9
                                #define PKMN_POLITOED 0xBA
                                #define PKMN_HOPPIP 0xBB
                                #define PKMN_SKIPLOOM 0xBC
                                #define PKMN_JUMPLUFF 0xBD
                                #define PKMN_AIPOM 0xBE
                                #define PKMN_SUNKERN 0xBF
                                #define PKMN_SUNFLORA 0xC0
                                #define PKMN_YANMA 0xC1
                                #define PKMN_WOOPER 0xC2
                                #define PKMN_QUAGSIRE 0xC3
                                #define PKMN_ESPEON 0xC4
                                #define PKMN_UMBREON 0xC5
                                #define PKMN_MURKROW 0xC6
                                #define PKMN_SLOWKING 0xC7
                                #define PKMN_MISDREAVUS 0xC8
                                #define PKMN_UNOWN 0xC9
                                #define PKMN_WOBBUFFET 0xCA
                                #define PKMN_GIRAFARIG 0xCB
                                #define PKMN_PINECO 0xCC
                                #define PKMN_FORRETRESS 0xCD
                                #define PKMN_DUNSPARCE 0xCE
                                #define PKMN_GLIGAR 0xCF
                                #define PKMN_STEELIX 0xD0
                                #define PKMN_SNUBBULL 0xD1
                                #define PKMN_GRANBULL 0xD2
                                #define PKMN_QWILFISH 0xD3
                                #define PKMN_SCIZOR 0xD4
                                #define PKMN_SHUCKLE 0xD5
                                #define PKMN_HERACROSS 0xD6
                                #define PKMN_SNEASEL 0xD7
                                #define PKMN_TEDDIURSA 0xD8
                                #define PKMN_URSARING 0xD9
                                #define PKMN_SLUGMA 0xDA
                                #define PKMN_MAGCARGO 0xDB
                                #define PKMN_SWINUB 0xDC
                                #define PKMN_PILOSWINE 0xDD
                                #define PKMN_CORSOLA 0xDE
                                #define PKMN_REMORAID 0xDF
                                #define PKMN_OCTILLERY 0xE0
                                #define PKMN_DELIBIRD 0xE1
                                #define PKMN_MANTINE 0xE2
                                #define PKMN_SKARMORY 0xE3
                                #define PKMN_HOUNDOUR 0xE4
                                #define PKMN_HOUNDOOM 0xE5
                                #define PKMN_KINGDRA 0xE6
                                #define PKMN_PHANPY 0xE7
                                #define PKMN_DONPHAN 0xE8
                                #define PKMN_PORYGON2 0xE9
                                #define PKMN_STANTLER 0xEA
                                #define PKMN_SMEARGLE 0xEB
                                #define PKMN_TYROGUE 0xEC
                                #define PKMN_HITMONTOP 0xED
                                #define PKMN_SMOOCHUM 0xEE
                                #define PKMN_ELEKID 0xEF
                                #define PKMN_MAGBY 0xF0
                                #define PKMN_MILTANK 0xF1
                                #define PKMN_BLISSEY 0xF2
                                #define PKMN_RAIKOU 0xF3
                                #define PKMN_ENTEI 0xF4
                                #define PKMN_SUICUNE 0xF5
                                #define PKMN_LARVITAR 0xF6
                                #define PKMN_PUPITAR 0xF7
                                #define PKMN_TYRANITAR 0xF8
                                #define PKMN_LUGIA 0xF9
                                #define PKMN_HOOH 0xFA
                                #define PKMN_CELEBI 0xFB

                                #define PKMN_TREECKO 0x115
                                #define PKMN_GROVYLE 0x116
                                #define PKMN_SCEPTILE 0x117
                                #define PKMN_TORCHIC 0x118
                                #define PKMN_COMBUSKEN 0x119
                                #define PKMN_BLAZIKEN 0x11A
                                #define PKMN_MUDKIP 0x11B
                                #define PKMN_MARSHTOMP 0x11C
                                #define PKMN_SWAMPERT 0x11D
                                #define PKMN_POOCHYENA 0x11E
                                #define PKMN_MIGHTYENA 0x11F
                                #define PKMN_ZIGZAGOON 0x120
                                #define PKMN_LINOONE 0x121
                                #define PKMN_WURMPLE 0x122
                                #define PKMN_SILCOON 0x123
                                #define PKMN_BEAUTIFLY 0x124
                                #define PKMN_CASCOON 0x125
                                #define PKMN_DUSTOX 0x126
                                #define PKMN_LOTAD 0x127
                                #define PKMN_LOMBRE 0x128
                                #define PKMN_LUDICOLO 0x129
                                #define PKMN_SEEDOT 0x12A
                                #define PKMN_NUZLEAF 0x12B
                                #define PKMN_SHIFTRY 0x12C
                                #define PKMN_NINCADA 0x12D
                                #define PKMN_NINJASK 0x12E
                                #define PKMN_SHEDINJA 0x12F
                                #define PKMN_TAILLOW 0x130
                                #define PKMN_SWELLOW 0x131
                                #define PKMN_SHROOMISH 0x132
                                #define PKMN_BRELOOM 0x133
                                #define PKMN_SPINDA 0x134
                                #define PKMN_WINGULL 0x135
                                #define PKMN_PELIPPER 0x136
                                #define PKMN_SURSKIT 0x137
                                #define PKMN_MASQUERAIN 0x138
                                #define PKMN_WAILMER 0x139
                                #define PKMN_WAILORD 0x13A
                                #define PKMN_SKITTY 0x13B
                                #define PKMN_DELCATTY 0x13C
                                #define PKMN_KECLEON 0x13D
                                #define PKMN_BALTOY 0x13E
                                #define PKMN_CLAYDOL 0x13F
                                #define PKMN_NOSEPASS 0x140
                                #define PKMN_TORKOAL 0x141
                                #define PKMN_SABLEYE 0x142
                                #define PKMN_BARBOACH 0x143
                                #define PKMN_WHISCASH 0x144
                                #define PKMN_LUVDISC 0x145
                                #define PKMN_CORPHISH 0x146
                                #define PKMN_CRAWDAUNT 0x147
                                #define PKMN_FEEBAS 0x148
                                #define PKMN_MILOTIC 0x149
                                #define PKMN_CARVANHA 0x14A
                                #define PKMN_SHARPEDO 0x14B
                                #define PKMN_TRAPINCH 0x14C
                                #define PKMN_VIBRAVA 0x14D
                                #define PKMN_FLYGON 0x14E
                                #define PKMN_MAKUHITA 0x14F
                                #define PKMN_HARIYAMA 0x150
                                #define PKMN_ELECTRIKE 0x151
                                #define PKMN_MANECTRIC 0x152
                                #define PKMN_NUMEL 0x153
                                #define PKMN_CAMERUPT 0x154
                                #define PKMN_SPHEAL 0x155
                                #define PKMN_SEALEO 0x156
                                #define PKMN_WALREIN 0x157
                                #define PKMN_CACNEA 0x158
                                #define PKMN_CACTURNE 0x159
                                #define PKMN_SNORUNT 0x15A
                                #define PKMN_GLALIE 0x15B
                                #define PKMN_LUNATONE 0x15C
                                #define PKMN_SOLROCK 0x15D
                                #define PKMN_AZURILL 0x15E
                                #define PKMN_SPOINK 0x15F
                                #define PKMN_GRUMPIG 0x160
                                #define PKMN_PLUSLE 0x161
                                #define PKMN_MINUN 0x162
                                #define PKMN_MAWILE 0x163
                                #define PKMN_MEDITITE 0x164
                                #define PKMN_MEDICHAM 0x165
                                #define PKMN_SWABLU 0x166
                                #define PKMN_ALTARIA 0x167
                                #define PKMN_WYNAUT 0x168
                                #define PKMN_DUSKULL 0x169
                                #define PKMN_DUSCLOPS 0x16A
                                #define PKMN_ROSELIA 0x16B
                                #define PKMN_SLAKOTH 0x16C
                                #define PKMN_VIGOROTH 0x16D
                                #define PKMN_SLAKING 0x16E
                                #define PKMN_GULPIN 0x16F
                                #define PKMN_SWALOT 0x170
                                #define PKMN_TROPIUS 0x171
                                #define PKMN_WHISMUR 0x172
                                #define PKMN_LOUDRED 0x173
                                #define PKMN_EXPLOUD 0x174
                                #define PKMN_CLAMPERL 0x175
                                #define PKMN_HUNTAIL 0x176
                                #define PKMN_GOREBYSS 0x177
                                #define PKMN_ABSOL 0x178
                                #define PKMN_SHUPPET 0x179
                                #define PKMN_BANETTE 0x17A
                                #define PKMN_SEVIPER 0x17B
                                #define PKMN_ZANGOOSE 0x17C
                                #define PKMN_RELICANTH 0x17D
                                #define PKMN_ARON 0x17E
                                #define PKMN_LAIRON 0x17F
                                #define PKMN_AGGRON 0x180
                                #define PKMN_CASTFORM 0x181
                                #define PKMN_VOLBEAT 0x182
                                #define PKMN_ILLUMISE 0x183
                                #define PKMN_LILEEP 0x184
                                #define PKMN_CRADILY 0x185
                                #define PKMN_ANORITH 0x186
                                #define PKMN_ARMALDO 0x187
                                #define PKMN_RALTS 0x188
                                #define PKMN_KIRLIA 0x189
                                #define PKMN_GARDEVOIR 0x18A
                                #define PKMN_BAGON 0x18B
                                #define PKMN_SHELGON 0x18C
                                #define PKMN_SALAMENCE 0x18D
                                #define PKMN_BELDUM 0x18E
                                #define PKMN_METANG 0x18F
                                #define PKMN_METAGROSS 0x190
                                #define PKMN_REGIROCK 0x191
                                #define PKMN_REGICE 0x192
                                #define PKMN_REGISTEEL 0x193
                                #define PKMN_KYOGRE 0x194
                                #define PKMN_GROUDON 0x195
                                #define PKMN_RAYQUAZA 0x196
                                #define PKMN_LATIAS 0x197
                                #define PKMN_LATIOS 0x198
                                #define PKMN_JIRACHI 0x199
                                #define PKMN_DEOXYS 0x19A
                                #define PKMN_CHIMECHO 0x19B

                                Items Header File
                                #define ITEM_NONE 0x0
                                #define ITEM_MASTERBALL 0x1
                                #define ITEM_ULTRABALL 0x2
                                #define ITEM_GREATBALL 0x3
                                #define ITEM_POKEBALL 0x4
                                #define ITEM_SAFARIBALL 0x5
                                #define ITEM_NETBALL 0x6
                                #define ITEM_DIVEBALL 0x7
                                #define ITEM_NESTBALL 0x8
                                #define ITEM_REPEATBALL 0x9
                                #define ITEM_TIMERBALL 0xA
                                #define ITEM_LUXURYBALL 0xB
                                #define ITEM_PREMIERBALL 0xC
                                #define ITEM_POTION 0xD
                                #define ITEM_ANTIDOTE 0xE
                                #define ITEM_BURNHEAL 0xF
                                #define ITEM_ICEHEAL 0x10
                                #define ITEM_AWAKENING 0x11
                                #define ITEM_PARLYZHEAL 0x12
                                #define ITEM_FULLRESTORE 0x13
                                #define ITEM_MAXPOTION 0x14
                                #define ITEM_HYPERPOTION 0x15
                                #define ITEM_SUPERPOTION 0x16
                                #define ITEM_FULLHEAL 0x17
                                #define ITEM_REVIVE 0x18
                                #define ITEM_MAXREVIVE 0x19
                                #define ITEM_FRESHWATER 0x1A
                                #define ITEM_SODAPOP 0x1B
                                #define ITEM_LEMONADE 0x1C
                                #define ITEM_MOOMOOMILK 0x1D
                                #define ITEM_ENERGYPOWDER 0x1E
                                #define ITEM_ENERGYROOT 0x1F
                                #define ITEM_HEALPOWDER 0x20
                                #define ITEM_REVIVALHERB 0x21
                                #define ITEM_ETHER 0x22
                                #define ITEM_MAXETHER 0x23
                                #define ITEM_ELIXIR 0x24
                                #define ITEM_MAXELIXIR 0x25
                                #define ITEM_LAVACOOKIE 0x26
                                #define ITEM_BLUEFLUTE 0x27
                                #define ITEM_YELLOWFLUTE 0x28
                                #define ITEM_REDFLUTE 0x29
                                #define ITEM_BLACKFLUTE 0x2A
                                #define ITEM_WHITEFLUTE 0x2B
                                #define ITEM_BERRYJUICE 0x2C
                                #define ITEM_SACREDASH 0x2D
                                #define ITEM_SHOALSALT 0x2E
                                #define ITEM_SHOALSHELL 0x2F
                                #define ITEM_REDSHARD 0x30
                                #define ITEM_BLUESHARD 0x31
                                #define ITEM_YELLOWSHARD 0x32
                                #define ITEM_GREENSHARD 0x33

                                #define ITEM_HPUP 0x3F
                                #define ITEM_PROTEIN 0x40
                                #define ITEM_IRON 0x41
                                #define ITEM_CARBOS 0x42
                                #define ITEM_CALCIUM 0x43
                                #define ITEM_RARECANDY 0x44
                                #define ITEM_PPUP 0x45
                                #define ITEM_ZINC 0x46
                                #define ITEM_PPMAX 0x47

                                #define ITEM_GUARDSPEC 0x49
                                #define ITEM_DIREHIT 0x4A
                                #define ITEM_XATTACK 0x4B
                                #define ITEM_XDEFEND 0x4C
                                #define ITEM_XSPEED 0x4D
                                #define ITEM_XACCURACY 0x4E
                                #define ITEM_XSPECIAL 0x4F
                                #define ITEM_POKEDOLL 0x50
                                #define ITEM_FLUFFYTAIL 0x51

                                #define ITEM_SUPERREPEL 0x53
                                #define ITEM_MAXREPEL 0x54
                                #define ITEM_ESCAPEROPE 0x55
                                #define ITEM_REPEL 0x56

                                #define ITEM_SUNSTONE 0x5D
                                #define ITEM_MOONSTONE 0x5E
                                #define ITEM_FIRESTONE 0x5F
                                #define ITEM_THUNDERSTONE 0x60
                                #define ITEM_WATERSTONE 0x61
                                #define ITEM_LEAFSTONE 0x62

                                #define ITEM_TINYMUSHROOM 0x67
                                #define ITEM_BIGMUSHROOM 0x68

                                #define ITEM_PEARL 0x6A
                                #define ITEM_BIGPEARL 0x6B
                                #define ITEM_STARDUST 0x6C
                                #define ITEM_STARPIECE 0x6D
                                #define ITEM_NUGGET 0x6E
                                #define ITEM_HEARTSCALE 0x6F

                                #define ITEM_ORANGEMAIL 0x79
                                #define ITEM_HARBORMAIL 0x7A
                                #define ITEM_GLITTERMAIL 0x7B
                                #define ITEM_MECHMAIL 0x7C
                                #define ITEM_WOODMAIL 0x7D
                                #define ITEM_WAVEMAIL 0x7E
                                #define ITEM_BEADMAIL 0x7F
                                #define ITEM_SHADOWMAIL 0x80
                                #define ITEM_TROPICMAIL 0x81
                                #define ITEM_DREAMMAIL 0x82
                                #define ITEM_FABMAIL 0x83
                                #define ITEM_RETROMAIL 0x84
                                #define ITEM_CHERIBERRY 0x85
                                #define ITEM_CHESTOBERRY 0x86
                                #define ITEM_PECHABERRY 0x87
                                #define ITEM_RAWSTBERRY 0x88
                                #define ITEM_ASPEARBERRY 0x89
                                #define ITEM_LEPPABERRY 0x8A
                                #define ITEM_ORANBERRY 0x8B
                                #define ITEM_PERSIMBERRY 0x8C
                                #define ITEM_LUMBERRY 0x8D
                                #define ITEM_SITRUSBERRY 0x8E
                                #define ITEM_FIGYBERRY 0x8F
                                #define ITEM_WIKIBERRY 0x90
                                #define ITEM_MAGOBERRY 0x91
                                #define ITEM_AGUAVBERRY 0x92
                                #define ITEM_IAPAPABERRY 0x93
                                #define ITEM_RAZZBERRY 0x94
                                #define ITEM_BLUKBERRY 0x95
                                #define ITEM_NANABBERRY 0x96
                                #define ITEM_WEPEARBERRY 0x97
                                #define ITEM_PINAPBERRY 0x98
                                #define ITEM_POMEGBERRY 0x99
                                #define ITEM_KELPSYBERRY 0x9A
                                #define ITEM_QUALOTBERRY 0x9B
                                #define ITEM_HONDEWBERRY 0x9C
                                #define ITEM_GREPABERRY 0x9D
                                #define ITEM_TAMATOBERRY 0x9E
                                #define ITEM_CORNNBERRY 0x9F
                                #define ITEM_MAGOSTBERRY 0xA0
                                #define ITEM_RABUTABERRY 0xA1
                                #define ITEM_NOMELBERRY 0xA2
                                #define ITEM_SPELONBERRY 0xA3
                                #define ITEM_PAMTREBERRY 0xA4
                                #define ITEM_WATMELBERRY 0xA5
                                #define ITEM_DURINBERRY 0xA6
                                #define ITEM_BELUEBERRY 0xA7
                                #define ITEM_LIECHIBERRY 0xA8
                                #define ITEM_GANLONBERRY 0xA9
                                #define ITEM_SALACBERRY 0xAA
                                #define ITEM_PETAYABERRY 0xAB
                                #define ITEM_APICOTBERRY 0xAC
                                #define ITEM_LANSATBERRY 0xAD
                                #define ITEM_STARFBERRY 0xAE
                                #define ITEM_ENIGMABERRY 0xAF

                                #define ITEM_BRIGHTPOWDER 0xB3
                                #define ITEM_WHITEHERB 0xB4
                                #define ITEM_MACHOBRACE 0xB5
                                #define ITEM_EXPSHARE 0xB6
                                #define ITEM_QUICKCLAW 0xB7
                                #define ITEM_SOOTHEBELL 0xB8
                                #define ITEM_MENTALHERB 0xB9
                                #define ITEM_CHOICEBAND 0xBA
                                #define ITEM_KINGSROCK 0xBB
                                #define ITEM_SILVERPOWDER 0xBC
                                #define ITEM_AMULETCOIN 0xBD
                                #define ITEM_CLEANSETAG 0xBE
                                #define ITEM_SOULDEW 0xBF
                                #define ITEM_DEEPSEATOOTH 0xC0
                                #define ITEM_DEEPSEASCALE 0xC1
                                #define ITEM_SMOKEBALL 0xC2
                                #define ITEM_EVERSTONE 0xC3
                                #define ITEM_FOCUSBAND 0xC4
                                #define ITEM_LUCKYEGG 0xC5
                                #define ITEM_SCOPELENS 0xC6
                                #define ITEM_METALCOAT 0xC7
                                #define ITEM_LEFTOVERS 0xC8
                                #define ITEM_DRAGONSCALE 0xC9
                                #define ITEM_LIGHTBALL 0xCA
                                #define ITEM_SOFTSAND 0xCB
                                #define ITEM_HARDSTONE 0xCC
                                #define ITEM_MIRACLESEED 0xCD
                                #define ITEM_BLACKGLASSES 0xCE
                                #define ITEM_BLACKBELT 0xCF
                                #define ITEM_MAGNET 0xD0
                                #define ITEM_MYSTICWATER 0xD1
                                #define ITEM_SHARPBEAK 0xD2
                                #define ITEM_POISONBARB 0xD3
                                #define ITEM_NEVERMELTICE 0xD4
                                #define ITEM_SPELLTAG 0xD5
                                #define ITEM_TWISTEDSPOON 0xD6
                                #define ITEM_CHARCOAL 0xD7
                                #define ITEM_DRAGONFANG 0xD8
                                #define ITEM_SILKSCARF 0xD9
                                #define ITEM_UPGRADE 0xDA
                                #define ITEM_SHELLBELL 0xDB
                                #define ITEM_SEAINCENSE 0xDC
                                #define ITEM_LAXINCENSE 0xDD
                                #define ITEM_LUCKYPUNCH 0xDE
                                #define ITEM_METALPOWDER 0xDF
                                #define ITEM_THICKCLUB 0xE0
                                #define ITEM_STICK 0xE1

                                #define ITEM_REDSCARF 0xFE
                                #define ITEM_BLUESCARF 0xFF
                                #define ITEM_PINKSCARF 0x100
                                #define ITEM_GREENSCARF 0x101
                                #define ITEM_YELLOWSCARF 0x102
                                #define ITEM_MACHBIKE 0x103
                                #define ITEM_COINCASE 0x104
                                #define ITEM_ITEMFINDER 0x105
                                #define ITEM_OLDROD 0x106
                                #define ITEM_GOODROD 0x107
                                #define ITEM_SUPERROD 0x108
                                #define ITEM_SSTICKET 0x109
                                #define ITEM_CONTESTPASS 0x10A

                                #define ITEM_WAILMERPAIL 0x10C
                                #define ITEM_DEVONGOODS 0x10D
                                #define ITEM_SOOTSACK 0x10E
                                #define ITEM_BASEMENTKEY 0x10F
                                #define ITEM_ACROBIKE 0x110
                                #define ITEM_POKEBLOCKCASE 0x111
                                #define ITEM_LETTER 0x112
                                #define ITEM_EONTICKET 0x113
                                #define ITEM_REDORB 0x114
                                #define ITEM_BLUEORB 0x115
                                #define ITEM_SCANNER 0x116
                                #define ITEM_GOGOGGLES 0x117
                                #define ITEM_METEORITE 0x118
                                #define ITEM_RM1KEY 0x119
                                #define ITEM_RM2KEY 0x11A
                                #define ITEM_RM4KEY 0x11B
                                #define ITEM_RM6KEY 0x11C
                                #define ITEM_STORAGEKEY 0x11D
                                #define ITEM_ROOTFOSSIL 0x11E
                                #define ITEM_CLAWFOSSIL 0x11F
                                #define ITEM_DEVONSCOPE 0x120
                                #define ITEM_TM01 0x121
                                #define ITEM_TM02 0x122
                                #define ITEM_TM03 0x123
                                #define ITEM_TM04 0x124
                                #define ITEM_TM05 0x125
                                #define ITEM_TM06 0x126
                                #define ITEM_TM07 0x127
                                #define ITEM_TM08 0x128
                                #define ITEM_TM09 0x129
                                #define ITEM_TM10 0x12A
                                #define ITEM_TM11 0x12B
                                #define ITEM_TM12 0x12C
                                #define ITEM_TM13 0x12D
                                #define ITEM_TM14 0x12E
                                #define ITEM_TM15 0x12F
                                #define ITEM_TM16 0x130
                                #define ITEM_TM17 0x131
                                #define ITEM_TM18 0x132
                                #define ITEM_TM19 0x133
                                #define ITEM_TM20 0x134
                                #define ITEM_TM21 0x135
                                #define ITEM_TM22 0x136
                                #define ITEM_TM23 0x137
                                #define ITEM_TM24 0x138
                                #define ITEM_TM25 0x139
                                #define ITEM_TM26 0x13A
                                #define ITEM_TM27 0x13B
                                #define ITEM_TM28 0x13C
                                #define ITEM_TM29 0x13D
                                #define ITEM_TM30 0x13E
                                #define ITEM_TM31 0x13F
                                #define ITEM_TM32 0x140
                                #define ITEM_TM33 0x141
                                #define ITEM_TM34 0x142
                                #define ITEM_TM35 0x143
                                #define ITEM_TM36 0x144
                                #define ITEM_TM37 0x145
                                #define ITEM_TM38 0x146
                                #define ITEM_TM39 0x147
                                #define ITEM_TM40 0x148
                                #define ITEM_TM41 0x149
                                #define ITEM_TM42 0x14A
                                #define ITEM_TM43 0x14B
                                #define ITEM_TM44 0x14C
                                #define ITEM_TM45 0x14D
                                #define ITEM_TM46 0x14E
                                #define ITEM_TM47 0x14F
                                #define ITEM_TM48 0x150
                                #define ITEM_TM49 0x151
                                #define ITEM_TM50 0x152
                                #define ITEM_HM01 0x153
                                #define ITEM_HM02 0x154
                                #define ITEM_HM03 0x155
                                #define ITEM_HM04 0x156
                                #define ITEM_HM05 0x157
                                #define ITEM_HM06 0x158
                                #define ITEM_HM07 0x159
                                #define ITEM_HM08 0x15A

                                #define ITEM_OAKSPARCEL 0x15D
                                #define ITEM_POKEFLUTE 0x15E
                                #define ITEM_SECRETKEY 0x15F
                                #define ITEM_BIKEVOUCHER 0x160
                                #define ITEM_GOLDTEETH 0x161
                                #define ITEM_OLDAMBER 0x162
                                #define ITEM_CARDKEY 0x163
                                #define ITEM_LIFTKEY 0x164
                                #define ITEM_HELIXFOSSIL 0x165
                                #define ITEM_DOMEFOSSIL 0x166
                                #define ITEM_SILPHSCOPE 0x167
                                #define ITEM_BICYCLE 0x168
                                #define ITEM_TOWNMAP 0x169
                                #define ITEM_VSSEEKER 0x16A
                                #define ITEM_FAMECHECKER 0x16B
                                #define ITEM_TMCASE 0x16C
                                #define ITEM_BERRYPOUCH 0x16D
                                #define ITEM_TEACHYTV 0x16E
                                #define ITEM_TRIPASS 0x16F
                                #define ITEM_RAINBOWPASS 0x170
                                #define ITEM_TEA 0x171
                                #define ITEM_MYSTICTICKET 0x172
                                #define ITEM_AURORATICKET 0x173
                                #define ITEM_POWDERJAR 0x174
                                #define ITEM_RUBY 0x175
                                #define ITEM_SAPPHIRE 0x176
                                #define ITEM_MAGMAEMBLEM 0x177
                                #define ITEM_OLDSEAMAP 0x178

                                #define DEC_SMALLDESK 0x1
                                #define DEC_POKEMONDESK 0x2
                                #define DEC_HEAVYDESK 0x3
                                #define DEC_RAGGEDDESK 0x4
                                #define DEC_COMFORTDESK 0x5
                                #define DEC_PRETTYDESK 0x6
                                #define DEC_BRICKDESK 0x7
                                #define DEC_CAMPDESK 0x8
                                #define DEC_HARDDESK 0x9
                                #define DEC_SMALLCHAIR 0xA
                                #define DEC_POKEMONCHAIR 0xB
                                #define DEC_HEAVYCHAIR 0xC
                                #define DEC_PRETTYCHAIR 0xD
                                #define DEC_COMFORTCHAIR 0xE
                                #define DEC_RAGGEDCHAIR 0xF
                                #define DEC_BRICKCHAIR 0x10
                                #define DEC_CAMPCHAIR 0x11
                                #define DEC_HARDCHAIR 0x12
                                #define DEC_REDPLANT 0x13
                                #define DEC_TROPICALPLANT 0x14
                                #define DEC_PRETTYFLOWERS 0x15
                                #define DEC_COLORFULPLANT 0x16
                                #define DEC_BIGPLANT 0x17
                                #define DEC_GORGEOUSPLANT 0x18
                                #define DEC_REDBRICK 0x19
                                #define DEC_YELLOWBRICK 0x1A
                                #define DEC_REDBALLOON 0x1B
                                #define DEC_BLUEBALLOON 0x1C
                                #define DEC_YELLOWBALLOON 0x1D
                                #define DEC_REDTENT 0x1F
                                #define DEC_BLUETENT 0x20
                                #define DEC_SOLIDBOARD 0x21
                                #define DEC_SLIDE 0x22
                                #define DEC_FENCELENGTH 0x23
                                #define DEC_FENCEWIDTH 0x24
                                #define DEC_TIRE 0x25
                                #define DEC_STAND 0x26
                                #define DEC_MUDBALL 0x27
                                #define DEC_BREAKABLEDOOR 0x28
                                #define DEC_SANDORNAMENT 0x29
                                #define DEC_SILVERSHIELD 0x2A
                                #define DEC_GOLDSHIELD 0x2B
                                #define DEC_GLASSORNAMENT 0x2C
                                #define DEC_ROUNDTV 0x2E
                                #define DEC_CUTETV 0x2F
                                #define DEC_GLITTERMAT 0x30
                                #define DEC_JUMPMAT 0x31
                                #define DEC_SPINMAT 0x32
                                #define DEC_CLOWNOTEMAT 0x33
                                #define DEC_DNOTEMAT 0x34
                                #define DEC_ENOTEMAT 0x35
                                #define DEC_FNOTEMAT 0x36
                                #define DEC_GNOTEMAT 0x37
                                #define DEC_ANOTEMAT 0x38
                                #define DEC_BNOTEMAT 0x39
                                #define DEC_CHIGHNOTEMAT 0x3A
                                #define DEC_SURFMAT 0x3B
                                #define DEC_THUNDERMAT 0x3C
                                #define DEC_FIREBLASTMAT 0x3D
                                #define DEC_POWDERSNOWMAT 0x3E
                                #define DEC_ATTRACTMAT 0x3F
                                #define DEC_FISSUREMAT 0x40
                                #define DEC_SPIKESMAT 0x41
                                #define DEC_BALLPOSTER 0x42
                                #define DEC_GREENPOSTER 0x43
                                #define DEC_REDPOSTER 0x44
                                #define DEC_BLUEPOSTER 0x45
                                #define DEC_CUTEPOSTER 0x46
                                #define DEC_PIKAPOSTER 0x47
                                #define DEC_LONGPOSTER 0x48
                                #define DEC_SEAPOSTER 0x49
                                #define DEC_SKYPOSTER 0x4A
                                #define DEC_KISSPOSTER 0x4B
                                #define DEC_PICHUDOLL 0x4C
                                #define DEC_PIKACHUDOLL 0x4D
                                #define DEC_MARILLDOLL 0x4E
                                #define DEC_TOGEPIDOLL 0x4F
                                #define DEC_CYNDAQUILDOLL 0x50
                                #define DEC_CHIKORITADOLL 0x51
                                #define DEC_TOTODILEDOLL 0x52
                                #define DEC_JIGGLYPUFFDOLL 0x53
                                #define DEC_MEOWTHDOLL 0x54
                                #define DEC_CLEFAIRYDOLL 0x55
                                #define DEC_DITTODOLL 0x56
                                #define DEC_SMOOCHUMDOLL 0x57
                                #define DEC_TREECKODOLL 0x58
                                #define DEC_TORCHICDOLL 0x59
                                #define DEC_MUDKIPDOLL 0x5A
                                #define DEC_DUSKULLDOLL 0x5B
                                #define DEC_WYNAUTDOLL 0x5C
                                #define DEC_BALTOYDOLL 0x5D
                                #define DEC_KECLEONDOLL 0x5E
                                #define DEC_AZURILLDOLL 0x5F
                                #define DEC_SKITTYDOLL 0x60
                                #define DEC_SWABLUDOLL 0x61
                                #define DEC_GULPINDOLL 0x62
                                #define DEC_LOTADDOLL 0x63
                                #define DEC_SEEDOTDOLL 0x64
                                #define DEC_PIKACUSHION 0x65
                                #define DEC_ROUNDCUSHION 0x66
                                #define DEC_KISSCUSHION 0x67
                                #define DEC_ZIGZAGCUSHION 0x68
                                #define DEC_SPINCUSHION 0x69
                                #define DEC_DIAMONDCUSHION 0x6A
                                #define DEC_BALLCUSHION 0x6B
                                #define DEC_GRASSCUSHION 0x6C
                                #define DEC_FIRECUSHION 0x6D
                                #define DEC_WATERCUSHION 0x6E
                                #define DEC_SNORLAXDOL 0x6F
                                #define DEC_RHYDONDOLL 0x70
                                #define DEC_LAPRASDOLL 0x71
                                #define DEC_VENUSAURDOLL 0x72
                                #define DEC_CHARIZARDDOLL 0x73
                                #define DEC_BLASTOISEDOLL 0x74
                                #define DEC_WAILMERDOLL 0x75
                                #define DEC_REGIROCKDOLL 0x76
                                #define DEC_REGICEDOLL 0x77
                                #define DEC_REGISTEELDOLL 0x78

                                Attacks Header File

                                FR Applymovements Header File

                                FR Fanfares Header File

                                EM Applymovements Header File

                                EM Fanfares Header File

                                Reply With Quote
                                Quick Reply

                                Sponsored Links
                                Thread Tools

                                Posting Rules
                                You may not post new threads
                                You may not post replies
                                You may not post attachments
                                You may not edit your posts

                                BB code is On
                                Smilies are On
                                [IMG] code is On
                                HTML code is Off

                                Forum Jump

                                All times are GMT -8. The time now is 8:37 PM.