• 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.

thethethethe's Scripting Tutorial

Da GaMeFrEaK

Farmer/Swordsman
18
Posts
16
Years
  • Just out of randomness, I plan on hacking the very first script in FR (You know, At the very beginning, right after you hit "New game"). The problem is, I don't know if there is any possible way I can do this. Is there?
     
    Last edited:

    rockeymon

    Real life Silver Shirubaa
    229
    Posts
    16
    Years
  • I just created a test script to see if I was making it right and was wondering what I was doing wrong (it tells me all all of the commands dont exist)
    Here is a list of how i insert it.
    1.) I create the script according to what the tutorial said to do
    2.) I open up pokewitch/script
    3.) I click on the files tab and click on Encode
    4.) I Click on My file Named Mom Script.RBC
    5.) I open it and get all of the command errors
    Heres the script
    #org $strat
    lock
    faceplayer
    Message $1
    boxset 6
    release
    end

    #org $11
    $1 1 =hi.\nMom: Hey\v\h01!\ How are you doing?\p\v\h01\ : I am doing fine
     

    SiegHart

    Guardian of Time
    168
    Posts
    14
    Years
  • hmm so i have a question, the part in the tutorial about applymovement commands has images that dont work...
    Okay, I'm also going to ask you to compile the script, assign it to an event and not a person, and test it in the rom. Then look at this spoiler.
    Spoiler:
    Didn't work, did it? Froze on the spot. You're going to need to change this...



    to this....



    Try it now. Worked perfectly, didn't it?

    what is it we are supposed to do to make it work?

    ... nvm that last part
    instead i need help with this
    Spoiler:


    im trying to set it so as soon as i walk outside the house it activates, the little girl then says the #org $1, then performs #org $move, and then she asks #org $2..
    i set it as a script offset for the girl and it works except for the fact that it only works if i walk up to her and ask about it, but i want it to activate as soon as i step outside.. any help?

    Spoiler:


    I made a video of what happens currently ^

    ooo one last edit xD, i solved it, diegoisawesome i guess had permission to repost this tutorial and the pics that were missing worked on his post, now i just gotta continue building off of it =D
     
    Last edited:

    Pokemon Team Mars' Revenge

    I LIEK ESPLOSHINS!
    41
    Posts
    14
    Years
    • Seen Sep 4, 2010
    OK, I ran into some major glitches with this code. It's supposed to have a lady walk up to you and give you a evee. Here it is.
    #org $start
    checkflag 0x828
    if b_true goto $done
    message $1
    boxset 5
    compare LASTRESULT 0x1
    if b_true goto $take
    message $2
    boxset 6
    release
    end

    #org $take
    givepokemon 133 5 0
    fanfare 0x13E
    message $3
    boxset 4
    waitfanfare
    #raw 0x68
    setflag 0x828
    message $4
    boxset 5
    compare LASTRESULT 0x1
    if b_true gosub $name
    message $5
    boxset 6
    release
    end

    #org $name
    call 0x1A74EB
    return

    #org $done
    message $6
    boxset 6
    release
    end

    #org $1
    $1 1 =\v\h01!\nYou can't go out! Here!
    #org $2

    $2 1 =\c\h01\h02You received a Evee!

    #org $3
    $4 1 =\c\h01\h02Would you like to rename Evee?

    #org $5
    $5 1 =Take Care of Evee.

    #org $6
    $6 1 =I hope you're taking good care of\nEvee.
     

    Donpatch

    and Smeargle
    2
    Posts
    14
    Years
  • broken script

    Hi thethethethe.
    im having trouble with my script.

    #org $firstpokemon
    checkflag 0x0x828
    if 0x01 goto $end
    lock
    faceplayer
    applymovement 0xFF $look
    $look 1 ; #binary 0x04 0xFE
    applymovement 0x01 $walk
    $walk 1 ; #binary 0x01 0x62 0x13 0x11 0x11 0xFE
    pausemove 0x0000
    message $give
    boxset 6
    givepokemon 133 10 0xD9
    setflag 0x82F
    message $table
    boxset 6
    applymovement 1 $run
    $run 1 ;#binary 0x10 0x10 0x12 0xFE
    pausemove 0x0000
    setflag 0x828
    release
    end

    #org $end
    release
    end

    #org $message1
    $give 1 =Ah \v\h01, your up.\pPROF.OAK is in HAJO TOWN\ngiving POKEDEX's to new\ltrainers now.\pHere's your shoes and\nYOUR POKEMON.

    #org $message2
    $table 1 =\V\H03 has already\pgone.pYou should catch up.

    /CENTER]

    when i step on the panel the game freezes can you help?​
     

    Orlando

    PUDDING!!!
    13
    Posts
    15
    Years
  • Hey thethethethe, on the part where you are talking about applymovement scripts, at the end you said, "Okay, I'm also going to ask you to compile the script, assign it to an event and not a person, and test it in the rom. Then look at this spoiler." All of my applymovements have always froze on those event scripts. I open the spoiler and all it says is: "Didn't work, did it? Froze on the spot. You're going to need to change this...



    to this....



    Try it now. Worked perfectly, didn't it?"

    That's all it really says. It doesn't show any pictures of anything. Any ideas?
     

    Pokepal17

    More cowbell~
    1,519
    Posts
    15
    Years
  • Hey thethethethe, on the part where you are talking about applymovement scripts, at the end you said, "Okay, I'm also going to ask you to compile the script, assign it to an event and not a person, and test it in the rom. Then look at this spoiler." All of my applymovements have always froze on those event scripts. I open the spoiler and all it says is: "Didn't work, did it? Froze on the spot. You're going to need to change this...



    to this....



    Try it now. Worked perfectly, didn't it?"

    That's all it really says. It doesn't show any pictures of anything. Any ideas?

    Change the unknown values of the script tile to 03 and chnage the var number to 4050.
     

    Xee

    1
    Posts
    14
    Years
    • Seen Dec 4, 2009
    #org $start
    checkflag 0x828
    if b_true goto $done
    message $1
    boxset 5
    compare LASTRESULT 0x1
    if b_true goto $take
    message $2
    boxset 6
    release
    end
    #org $take
    givepokemon 64 10 0
    fanfare 0x13E
    message $3
    boxset 4
    waitfanfare
    #raw 0x68
    setflag 0x828
    message $4
    boxset 5
    compare LASTRESULT 0x1
    if b_true gosub $rename
    message $5
    boxset 6
    release
    end
    #org $rename
    call 0x1A74EB
    return
    #org $done
    message $6
    boxset 6
    release
    end
    #org $1
    $1 1 =Ahh! You've discovered me!\nI am the famous\l'Mysterious Pokemon Distributer.'\lIt is my duty to distribute\lPokemon to trainers from all over\lthe world! Come find me in each\lmajor town and i will give you a\lunique Pokemon! Would you like\lyour first pokemon?
    #org $2
    $2 1 =No? Never mind, i'll be here when\nyou change your mind!
    #org $3
    $3 1 =\c\h01\h02 \v\h01 Received Kadabra!
    #org $4
    $4 1 =\c\h01\h02 Would you like to rename Kadabra?
    #org $5
    $5 1 =Remember, seek me in every major\ntown for a new Pokemon!
    #org $6
    $6 1 =I hope you're taking good care of\nKadabra!

    Hmm, when i try to compile to a Pokemon FireRed Hack, i get this message:
    Initialized.
    #ORG
    -> 0x0
    CHECKFLAG
    -> 0x828
    IF
    Unknown value in IF (Value must be integer)

    Why, and what do i need to fix?

    I pretty much copied exactly from THETHETHETHE's examples!
     

    Jemzx

    Guardian Trainer
    44
    Posts
    14
    Years
    • Seen Nov 20, 2010
    hey thethethethe, awesome tutorial! it works good for me...
     
    2
    Posts
    14
    Years
  • hi i have the same problem

    Hi dude, i made this for the ASM Script:
    First, script:
    Code:
    #org $start
    callasm 0x71B7A0
    #raw 0x00
    wildbattle 0x82 0x1E 0x0
    special 0x138
    pause 0x101
    callasm 0x71B7A0
    end

    And in the Hex Editor (I use HexWorkShop)
    ...
    So...what's going on =S When i talk to the guy or the pokemon that has to battle, the
    game freezes...[/QUOTE]
     
    3
    Posts
    13
    Years
    • Seen Jun 11, 2010
    Can somebody please help me? I made a script box and I put a script like this in it...

    #org $start
    jingle
    hidesprite 8
    setflag 0x108
    setvar 0x4036 0x0001
    release
    end

    But, eveytime I step on it, It doesn't do anything!!! What can I do to make this work?! Is the script itself wrong?!
     
    2
    Posts
    13
    Years
    • Seen Dec 5, 2010
    IF
    Unknown value in IF (Value must be integer)

    I get this error when i copy the pokemon give script, (fire red rom)
    Whats wrong?

    IF
    Unknown value in IF (Value must be integer)

    I get this error message at the Pokemon Give script on Fire red,
    Can someone please help me?
     
    Last edited:

    humanguy2000

    NSMBW hacker
    112
    Posts
    14
    Years
  • This tutorial really helps me!
    ...But I have a quick question about the wildbattle command. What would I do to make the Pokémon shiny and have the Deoxys battle theme? I de-compiled the Deoxys script and there wasn't a wildbattle command. Just a special.
    Anyway, this is going to help me a lot if I get stuck in scripting!
     

    Shiny Quagsire

    I'm Still Alive, Elsewhere
    697
    Posts
    14
    Years
  • This tutorial really helps me!
    ...But I have a quick question about the wildbattle command. What would I do to make the Pokémon shiny and have the Deoxys battle theme? I de-compiled the Deoxys script and there wasn't a wildbattle command. Just a special.
    Anyway, this is going to help me a lot if I get stuck in scripting!

    Get your hands on a program like shinyzer (See hackmew's tools) and call the asm offset provided by the program.
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • This tutorial really helps me!
    ...But I have a quick question about the wildbattle command. What would I do to make the Pokémon shiny and have the Deoxys battle theme? I de-compiled the Deoxys script and there wasn't a wildbattle command. Just a special.
    Anyway, this is going to help me a lot if I get stuck in scripting!

    As for the music, the Deoxys battle theme is assigned to Deoxys itself, not the script. There's an ASM routine written by Mastermind_X somewhere on the internet (I need to google it again myself, I'll VM you if I can find it) that can change battle music.
     

    humanguy2000

    NSMBW hacker
    112
    Posts
    14
    Years
  • Ok. That should help me with the music change.
    I used a code on my emulator to catch Rayquaza in ruby, but it had normal music. Doesn't really matter. Thanks for the help.
    Um...
    humanguy2000 said:
    This tutorial really helps me!
    This tutorial really helps me!
     
    26
    Posts
    14
    Years
    • Seen Nov 6, 2016
    i hope i help :)

    Hi thethethethe.
    im having trouble with my script.

    #org $firstpokemon
    checkflag 0x0x828
    if 0x01 goto $end
    lock
    faceplayer
    applymovement 0xFF $look
    $look 1 ; #binary 0x04 0xFE
    applymovement 0x01 $walk
    $walk 1 ; #binary 0x01 0x62 0x13 0x11 0x11 0xFE
    pausemove 0x0000
    message $give
    boxset 6
    givepokemon 133 10 0xD9
    setflag 0x82F
    message $table
    boxset 6
    applymovement 1 $run
    $run 1 ;#binary 0x10 0x10 0x12 0xFE
    pausemove 0x0000
    setflag 0x828
    release
    end

    #org $end
    release
    end

    #org $message1
    $give 1 =Ah \v\h01, your up.\pPROF.OAK is in HAJO TOWN\ngiving POKEDEX's to new\ltrainers now.\pHere's your shoes and\nYOUR POKEMON.

    #org $message2
    $table 1 =\V\H03 has already\pgone.pYou should catch up.

    /CENTER]

    when i step on the panel the game freezes can you help?​



    type 4050 to var number

    and 0003 at unknown

    help me with this, pls!

    how can i hidesprite at other map?
    well say,the script is under pallet town, and when i talk to the guy at pallet, it should hide the sprite at viridian without talking. instant hide... i hope you help me!​
     
    Last edited:
    Back
    Top