• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Advanced Scripting Tutorial

Status
Not open for further replies.

zak

xpert trainer
244
Posts
19
Years
  • ....

    im aslo getting the over flow promblem guys, all the folders and stuf are in the same directory and its all good , this is my script
    #org 0x782800
    #raw 0x5C
    trainerbattle 0x00 0x1A 0x782900 0x783000 0x7831000
    end

    #org 0x782900
    = Bring it on!

    #org 0x783000
    = I lost...

    #org 0x7831000
    = We already battled!

    but for some reason it aint workin getin message sayin overflow any1?
     

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Are you both using DiamondCutter ?
    Maybe you need to try ScriptED.. or that new PokéScript tool ;)
     

    Blaziken626

    Pokemon Black Shadow
    208
    Posts
    17
    Years
    • Seen Aug 25, 2015
    YES!! I finally got the Hello World script to work! But now here's my new problem. I tried to do a give Pokemon script, and it didn't work. I thought something might be wrong with the script, so I'll show it.

    #org 0x700000
    message 0x700100
    boxset 0x02
    givepokemon 0x78 0x5 0x3
    end
    #org 0x700100
    = Hello World!

    Is there anything wrong with it? I sure hope so, because I can't think of a different possibility for it not working.

    EDIT: I figured out the problem, and it was a careless mistake! I forgot to put the space between end and the words in the script! Now he does say Hello world, but he doesn't give me the Pokemon. What's wrong with it?

    EDIT...Again: I figured out that I did get the Pokemon. It's just that it didn't say anything like, "(Player) received a Staryu!". By the way, how do you make that 'receive Pokemon' music happen when I get the Pokemon, and how can you make a script happen while you are receiving the Pokemon? And one last thing...the number of the Pokemon said 78, but Staryu's number isn't 78.
     
    Last edited:

    Tentachu

    Movie Making Expert
    272
    Posts
    20
    Years
  • And one last thing...the number of the Pokemon said 78, but Staryu's number isn't 78.

    That's Staryu's hex number. Hex numbers are different. They go like this:

    01
    02
    03
    04
    05
    06
    07
    08
    09
    0A
    0B
    0C
    0D
    0E
    0F
    10

    So the hex numbers of Pokémon would be a lot less than its real number.
     

    Blaziken626

    Pokemon Black Shadow
    208
    Posts
    17
    Years
    • Seen Aug 25, 2015
    Thanks, Tentachu.

    Now I'm testing out Applymovement and I have this script:

    Code:
    #org 0x900000
    applymovement 0xFF 0x900100
    pause 0x10
    end
    
    #org 0x800100
    #raw 0x5
    #raw 0x7
    #raw 0x4
    #raw 0xFE
    end

    It's not working. Is something wrong with it?
     
    6,355
    Posts
    18
    Years
    • Seen Apr 16, 2020
    Thanks, Tentachu.

    Now I'm testing out Applymovement and I have this script:

    Code:
    #org 0x900000
    applymovement 0xFF 0x900100
    pause 0x10
    end
    
    #org 0x[B]800100[/B]
    #raw 0x5
    #raw 0x7
    #raw 0x4
    #raw 0xFE
    end

    It's not working. Is something wrong with it?


    It's not right. You should put "900100" not "800100".
     

    zak

    xpert trainer
    244
    Posts
    19
    Years
  • hmmmmm

    hi i worked out what was wrong with the geodude script, i made the name to long and had a space in it so i just renamed it and it worked, now a new problem lol, im making a boat script,
    #org 0x834000
    warp 0x36 0x1 0x0
    end
    thats the script but its not workin , when i talk to the person with the script it just gives me a black screen , anyone know why?
     
    6,355
    Posts
    18
    Years
    • Seen Apr 16, 2020
    hi i worked out what was wrong with the geodude script, i made the name to long and had a space in it so i just renamed it and it worked, now a new problem lol, im making a boat script,
    #org 0x834000
    warp 0x36 0x1 0x0
    end
    thats the script but its not workin , when i talk to the person with the script it just gives me a black screen , anyone know why?

    Because maybe there's not a bank map like that in your ROM.
    The numbers must be in hexadecimal.
     

    zak

    xpert trainer
    244
    Posts
    19
    Years
  • ........

    there is a map bank like that in my rom , its a ruby rom , i inserted the bank myself, and um......... how do i find out the numbers in hexdecimal , sorry to ask so many questions i only know like 2 scripts :(
     

    Blaziken626

    Pokemon Black Shadow
    208
    Posts
    17
    Years
    • Seen Aug 25, 2015
    It's not right. You should put "900100" not "800100".

    *Smacks forehead* Duh! I can't believe I didn't notice that! Anyway, thanks!

    EDIT: Actually, there's another problem with the script I think. Because whenever I step in that spot when walking up, I walk up. When I step when walking down, I move to the right. And when I step when walking to the left, I walk down. But I'm supposed to walk up, then right, then down.

    EDIT AGAIN: Nevermind, I realized you have to put the same script in each place you want the sprite to move. Buuuut, I doesn't work twice in a row. It works the first time, but not the time after that. But when I step in that spot again after that, it works.

    EDIT AGAAIN: Just a quick question. Could someone please tell me where I can find the hex numbers for all the Pokemon? It would really help, but it's not really necessary.
     
    Last edited:
    6,355
    Posts
    18
    Years
    • Seen Apr 16, 2020
    Here.
    Thanks to Tetsuya-san for writing it down.
    Code:
    0100 = BULBASAUR
    0200 = IVYSAUR
    0300 = VENESAUR
    0400 = CHARMANDER
    0500 = CHARMELEON
    0600 = CHARIZARD
    0700 = SQUIRTLE
    0800 = WARTORTLE
    0900 = BLASTOISE
    0A00 = CATERPIE
    0B00 = METAPOD
    0C00 = BUTTERFREE
    0D00 = WEEDLE
    0E00 = KAKUNA
    0F00 = BEEDRILL
    1000 = PIDGEY
    1100 = PIDGEOTTO
    1200 = PIDGEOT
    1300 = RATTATA
    1400 = RATICATE
    1500 = SPEAROW
    1600 = FEAROW
    1700 = EKANS
    1800 = ARBOK
    1900 = PIKACHU
    1A00 = RAICHU
    1B00 = SANDSHREW
    1C00 = SANDSLASH
    1D00 = NIDORAN (FEMALE)
    1E00 = NIDORINA
    1F00 = NIDOQUEEN
    2000 = NIDORAN (MALE)
    2100 = NIDORINO
    2200 = NIDOKING
    2300 = CLEFAIRY
    2400 = CLEFABLE
    2500 = VULPIX
    2600 = NINETALES
    2700 = JIGGLYPUFF
    2800 = WIGGLYTUFF
    2900 = ZUBAT
    2A00 = GOLBAT
    2B00 = ODDISH
    2C00 = GLOOM
    2D00 = VILEPLUME
    2E00 = PARAS
    2F00 = PARASECT
    3000 = VENONAT
    3100 = VENOMOTH
    3200 = DIGLETT
    3300 = DUGTRIO
    3400 = MEOWTH
    3500 = PERSIAN
    3600 = PSYDUCK
    3700 = GOLDUCK
    3800 = MANKEY
    3900 = PRIMEAPE
    3A00 = GROWLITHE
    3B00 = ARCANINE
    3C00 = POLIWAG
    3D00 = POLIWHIRL
    3E00 = POLIWRATH
    3F00 = ABRA
    4000 = KADABRA
    4100 = ALAKAZAM
    4200 = MACHOP
    4300= MACHOKE
    4400 = MACHAMP
    4500 = BELLSPROUT
    4600 = WEEPINBELL
    4700 = VICTREEBELL
    4800 = TENTACOOL
    4900 = TENTACRUEL
    4A00 = GEODUDE
    4B00 = GRAVELER
    4C00 = GOLEM
    4D00 = PONYTA
    4E00 = RAPIDASH
    4F00 = SLOWPOKE
    5000 = SLOWBRO
    5100 = MAGNEMITE
    5200 = MAGNETON
    5300 = FARFETCH'D
    5400 = DODUO
    5500 = DODRIO
    5600 = SEEL
    5700 = DEWGONG
    5800 = GRIMER
    5900 = MUK
    5A00 = SHELLDER
    5B00 = CLOYSTER
    5C00 = GASTLY
    5D00 = HAUNTER
    5E00 = GENGAR
    5F00 = ONIX
    6000 = DROWZEE
    6100 = HYPNO
    6200 = KRABBY
    6300 = KINGLER
    6400 = VOLTORB
    6500 = ELECTRODE
    6600 = EXEGGCUTE
    6700 = EXEGGUTOR
    6800 = CUBONE
    6900 = MAROWAK
    6A00 = HITMONLEEE
    6B00 = HITMONCHAN
    6C00 = LICKITUNG
    6D00 = KOFFING
    6E00 = WEEZING
    6F00 = RHYHORN
    7000 = RHYDON
    7100 = CHANSEY
    7200 = TANGELA
    7300 = KANGASKHAN
    7400 = HORSEA
    7500 = SEADRA
    7600 = GOLDEEN
    7700 = SEAKING
    7800 = STARYU
    7900 = STARMIE
    7A00 = MR. MIME
    7B00 = SCYTHER
    7C00 = JYNX
    7D00 = ELECTABUZZ
    7E00 = MAGMAR
    7F00 = PINSIR
    8000 = TAUROS
    8100 = MAGIKARP
    8200 = GYARADOS
    8300 = LAPRAS
    8400 = DITTO
    8500 = EEVEE
    8600 = VAPOREON
    8700 = JOLTEON
    8800 = FLAREON
    8900 = PORYGON
    8A00 = OMANYTE
    8B00 = OMASTAR
    8C00 = KABUTO
    8D00 = KABUTOPS
    8E00 = AERODACTYL
    8F00 = SNORLAX
    9000 = ARTICUNO
    9100 = ZAPDOS
    9200 = MOLTRES
    9300 = DRATINI
    9400 = DRAGONAIR
    9500 = DRAGONITE
    9600 = MEWTWO
    9700 = MEW
    9800 = CHIKORITA
    9900 = BAYLEEF
    9A00 = MEGANIUM
    9B00 = CYNDAQUIL
    9C00 = QUILAVA
    9D00 = TYPLOSION
    9E00 = TOTODILE
    9F00 = CROCONAW
    A000 = FERALIGATR
    A100 = SENTRET
    A200 = FURRET
    A300 = HOOTHOOT
    A400 = NOCTOWL
    A500 = LEDYBA
    A600 = LEDIAN
    A700 = SPINARAK
    A800 = ARIADOS
    A900 = CROBAT
    AA00 = CHINCHOU
    AB00 = LANTURN
    AC00 = PICHU
    AD00 = CLEFFA
    AE00 = IGGLYBUFF
    AF00 = TOGEPI
    B000 = TOGETIC
    B100 = NATU
    B200 = XATU
    B300 = MAREEP
    B400 = FLAAFFY
    B500 = AMPHAROS
    B600 = BELLOSSOM
    B700 = MARRILL
    B800 = AZUMARILL
    B900 = SUDOWOODO
    BA00 = POLITOED
    BB00 = HOPPIP
    BC00 = SKI PLOOM
    BD00 = JUMPLUFF
    BE00 = AIPOM
    BF00 = SUNKERN
    C000 = SUNFLORA
    C100 = YANMA
    C200 = WOOPER
    C300 = QUAGSIRE
    C400 = ESPEON
    C500 = UMBREON
    C600 = MURKROW
    C700 = SLOWKING
    C800 = MISDREAVUS
    C900 = UNOWN
    CA00 = WOBBUFFET
    CB00 = GIRAFARIG
    CC00 = PINECO
    CD00 = FORRETRESS
    CE00 = DUNSPARCE
    CF00 = GLIGAR
    D000 = STEELIX
    D100 = SNUBBULL
    D200 = GRANBULL
    D300 = QWILFISH
    D400 = SCIZOR
    D500 = SHUCKLE
    D600 = HERACROSS
    D700 = SNEASEL
    D800 = TEDDIURSA
    D900 = URSARING
    DA00 = SLUGMA
    DB00 = MAGCARGO
    DC00 = SWINUB
    DD00 = PILOSWINE
    DE00 = CORSOLA
    DF00 = REMORAID
    E000 = OCTILLERY
    E100 = DELIBIRD
    E200 = MANTINE
    E300 = SKARMORY
    E400 = HOUNDOUR
    E500 = DOUNDOOM
    E600 = KINGDRA
    E700 = PHANPY
    E800 = DONPHAN
    E900 = PORYGON2
    EA00 = STANTLER
    EB00 = SMEARGLE
    EC00 = TYROGUE
    ED00 = HITMONTOP
    EE00 = SMOOCHUM
    EF00 = ELEKID
    F000 = MAGBY
    F100 = MILTANK
    F200 = BLISSEY
    F300 = RAIKOU
    F400 = ENTEI
    F500 = SUICINE
    F600 = LARVITAR
    F700 = PUPITAR
    F800 = TYRANITAR
    F900 = LUGIA
    FA00 = HO-OH
    FB00 = CELEBI
    1501 = TREECKO
    1601 = GROVYLE
    1701 = SCEPTILE
    1801 = TORCHIC
    1901 = COMBUSKEN
    1A01 = BLAZIKEN
    1B01 = MUDKIP
    1C01 = MARSHTOMP
    1D01 = SWAMPERT
    1E01 = POOCHYENA
    1F01 = MIGHTYENA
    2001 = ZIGZAGOON
    2101 = LINOONE
    2201 = WURMPLE
    2301 = SILCOON
    2401 = BEAUTIFLY
    2501 = CASCOON
    2601 = DUSTOX
    2701 = LOTAD
    2801 = LOMBRE
    2901 = LUDICOLO
    2A01 = SEEDOT
    2B01 = NUZLEAF
    2C01 = SHIFTRY
    2D01 = NINCADA
    2E01 = NINJASK
    2F01 = SHEDINJA
    3001 = TAILLOW
    3101 = SWELLOW
    3201 = SHROOMISH
    3301 = BRELOOM
    3401 = SPINDA
    3501 = WINGULL
    3601 = PELIPPER
    3701 = SURSKIT
    3801 = MASQUERAIN
    3901 = WAILMER
    3A01 = WAILORD
    3B01 = SKITTY
    3C01 = DELCATTY
    3D01 = KECLEON
    3E01 = BALTOY
    3F01 = CLAYDOL
    4001 = NOSEPASS
    4101 = TORKOAL
    4201 = SABLEYE
    4301 = BARBOACH
    4401 = WHISCASH
    4501 = LUVDISC
    4601 = CORPHISH
    4701 = CRAWDAUNT
    4801 = FEEBAS
    4901 = MILOTIC
    4A01 = CARVANHA
    4B01 = SHARPEDO
    4C01 = TRAPINCH
    4D01 = VIBRAVA
    4E01 = FLYGON
    4F01 = MAKUHITA
    5001 = HARIYAMA
    5101 = ELECTRIKE
    5201 = MANECTRIC
    5301 = NUMEL
    5401 = CAMERUPT
    5501 = SPHEAL
    5601 = SEALEO
    5701 = WALREIN
    5801 = CACNEA
    5901 = CACTURNE
    5A01 = SNORUNT
    5B01 = GLALIE
    5C01 = LUNATONE
    5D01 = SOLROCK
    5E01 = AZURILL
    5F01 = SPOINK
    6001 = GRUMPIG
    6101 = PLUSLE
    6201 = MINUN
    6301 = MAWILE
    6401 = MEDITITE
    6501 = MEDICHAM
    6601 = SWABLU
    6701 = ALTARIA
    6801 = WYNAUT
    6901 = DUSKULL
    6A01 = DUSCLOPS
    6B01 = ROSELIA
    6C01 = SLAKOTH
    6D01 = VIGOROTH
    6E01 = SLAKING
    6F01 = GULPIN
    7001 = SWALOT
    7101 = TROPIUS
    7201 = WHISMUR
    7301 = LOUDRED
    7401 = EXPLOUD
    7501 = CLAMPERL
    7601 = HUNTAIL
    7701 = GOREBYSS
    7801 = ABSOL
    7901 = SHUPPET
    7A01 = BANNETE
    7B01 = SEVIPER
    7C01 = ZANGOOSE
    7D01 = RELICANTH
    7E01 = ARON
    7F01 = LAIRON
    8001 = AGGRON
    8101 = CASTFORM
    8201 = VOLBEAT
    8301 = ILLUMISE
    8401 = LILEEP
    8501 = CRADILY
    8601 = ANORITH
    8701 = ARMALDO
    8801 = RALTS
    8901 = KIRLIA
    8A01 = GARDEVOIR
    8B01 = BAGON
    8C01 = SHELGON
    8D01 = SALAMENCE
    8E01 = BELDUM
    8F01 = METANG
    9001 = METAGROSS
    9101 = REGI ROCK
    9201 = REGICE
    9301 = REGI STEEL
    9401 = KYOGRE
    9501 = GROUDON
    9601 = RAYQUAZA
    9701 = LATIAS
    9801 = LATIOS
    9901 = JIRACHI
    9A01 = DEOXYS
    9B01 = CHIMECHO
     

    Blaziken626

    Pokemon Black Shadow
    208
    Posts
    17
    Years
    • Seen Aug 25, 2015
    Cool! Thanks a bunch! But...I have another problem with a script. Here it is:

    Code:
    #org 0x900000
    trainerbattle 0x00 0xD9 0x900100 0x900200
    end
    
    #org 0x900100
    = Bring it on!
    
    #org 0x900200
    = I lost...

    Whenever I use DiamondCutter for this script it says, "Run-time error '6': Overflow". And sorry if I've been asking too many questions. I'm new to this whole scripting thing.
     
    Last edited:
    im aslo getting the over flow promblem guys, all the folders and stuf are in the same directory and its all good , this is my script
    #org 0x782800
    #raw 0x5C
    trainerbattle 0x00 0x1A 0x782900 0x783000 0x7831000
    end

    #org 0x782900
    = Bring it on!

    #org 0x783000
    = I lost...

    #org 0x7831000
    = We already battled!

    but for some reason it aint workin getin message sayin overflow any1?

    You put too many numbers for script offsets. Try this one:
    Code:
    #org 0x782800
    #raw 0x5C
    trainerbattle 0x00 0x1A 0x829000 0x830000 0x831000
    end
    
    #org 0x829000
    = Bring it on!
    
    #org 0x830000
    = I lost...
    
    #org 0x831000
    = We already battled!
    Not tested but it should work.
     
    Last edited:

    Blaziken626

    Pokemon Black Shadow
    208
    Posts
    17
    Years
    • Seen Aug 25, 2015
    Actually I don't think DiamondCutter is working at all with any trainerbattle scripts. I tried the richboy script that came with EliteMap, and that didn't even work. Oh, and I have another question. Is there a program that lets you search for scripts in the game by using offsets?

    You put too many numbers for script offsets. Try this one:
    Code:
    #org 0x782800
    #raw 0x5C
    trainerbattle 0x00 0x1A 0x829000 0x830000 0x831000
    end
    
    #org 0x829000
    = Bring it on!
    
    #org 0x830000
    = I lost...
    
    #org 0x831000
    = We already battled!
    Not tested but it should work.

    And also, I'm basically having the same problem as zak, and I tried that script you gave him and it didn't work.
     

    zak

    xpert trainer
    244
    Posts
    19
    Years
  • ........

    Actually I don't think DiamondCutter is working at all with any trainerbattle scripts. I tried the richboy script that came with EliteMap, and that didn't even work. Oh, and I have another question. Is there a program that lets you search for scripts in the game by using offsets?



    And also, I'm basically having the same problem as zak, and I tried that script you gave him and it didn't work.

    Yea my trainer battles just giv me the olverflow message 6 wen i try to insert them with diamond cutter, .......
     

    Blaziken626

    Pokemon Black Shadow
    208
    Posts
    17
    Years
    • Seen Aug 25, 2015
    Can someone explain where to put flags into a message script? I can't figure out how to get it to work.
     

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Not meaning to spam you guys but I've posted an alternative scripting program of my own design in the toolbox. Because it's a complete rewrite it shouldn't have the same bugs that scripted used to have and should be much easier to use.

    Please, give it a shot using the script you're having difficulty with and give me feedback!

    And you shouldn't need to put that raw statement before the trainerbattle command either.
     
    4
    Posts
    17
    Years
    • Seen Feb 25, 2010
    Hey, this tutorial is amazing. I've done a few simple ones but I'm trying to make a script where you get a super rod. I've done it successfully but it keeps giving super rods if I talk to him again.

    I read the setflags part and I was trying to make it work but where ever I put the flag codes it didn't work. Can anyone suggest or tell me where I should place the flag tags in this:

    Code:
    #org 0x800700
    lock
    faceplayer
    message 0x800800
    boxset 0x5
    compare LASTRESULT 0x1
    if 0x1 goto 0x800900
    message 0x801000
    boxset 0x6
    release
    end
    
    #org 0x800900
    message 0x801100
    boxset 0x6
    giveitem 0x108 0x1
    release
    end
    
    #org 0x800800
    = I was hired by a scientist to catch\nsome water pokemon from here.\pWould you like to help?
    
    #org 0x801000
    = You sure? Well come back any time.
    
    #org 0x801100
    = Great. Here, take this fishing\nrod and start catching.

    I'm just not sure where to place them so I can get the super rod and when I talk to the fisherman it doesn't give me another one.
     

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Hey, this tutorial is amazing. I've done a few simple ones but I'm trying to make a script where you get a super rod. I've done it successfully but it keeps giving super rods if I talk to him again.

    I read the setflags part and I was trying to make it work but where ever I put the flag codes it didn't work. Can anyone suggest or tell me where I should place the flag tags in this:

    Code:
    #org 0x800700
    lock
    faceplayer
    [B]checkflag 0x100 ' Your flag here
    compare LASTRESULT 0x1
    if 0x1 goto 0x802000[/B]
    message 0x800800
    boxset 0x5
    compare LASTRESULT 0x1
    if 0x1 goto 0x800900
    message 0x801000
    boxset 0x6
    release
    end
    
    #org 0x800900
    message 0x801100
    boxset 0x6
    giveitem 0x108 0x1
    [B]setflag 0x100 ' Your flaghere[/B]
    release
    end
    
    [B]#org 0x802000
    message 0x802100
    boxset 0x1
    end[/B]
    
    #org 0x800800
    = I was hired by a scientist to catch\nsome water pokemon from here.\pWould you like to help?
    
    #org 0x801000
    = You sure? Well come back any time.
    
    #org 0x801100
    = Great. Here, take this fishing\nrod and start catching.
    
    [B]#org 0x02100
    = So, caught anything yet?[/B]

    I'm just not sure where to place them so I can get the super rod and when I talk to the fisherman it doesn't give me another one.



    Ha. I think I can feild this one (yaay I makey a post!)

    The bits in bold are the bits I added
     
    4
    Posts
    17
    Years
    • Seen Feb 25, 2010
    EDIT: I got everything to work doing what you suggested Irish Witch, and everything worked except when I talk to the person again no text comes up. It still makes the noise when I press A but no text comes up.

    EDIT EDIT: haha. Okay thanks for your help Irish Witch, I changed the boxset you had from 0x1 to 0x6 and it works fine now. Thank you!! :)
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top