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

Hack Tutorials: Scripting

Status
Not open for further replies.

♠εx

Working on my hack, busy also.
299
Posts
16
Years
    • Seen Aug 15, 2008
    Pokescript:
    When decompiling a game and choosing an offset, it say's which mode.
    What do I put here?
     

    Fluddles

    Frustrated Trainer
    10
    Posts
    16
    Years
  • Hey everyone, I'm extremely new! :P I played through Ruby, then Sapphire, now I'm trying to script but I learn by example so I copied this one, but it won't work. I copied it after someone else posted it, and made a few changes... Here's the script.

    Spoiler:


    I wrote it in Notepad, and saved it under "All File Types" with the extension ".rbc" and then I hit right click on it, and then "Compile Script" but I got an error. It says Runtime Error '6' Overflow.

    Which isn't what I expected. I'm using PoketScript but I've also tried Diamond Cutter and I get similar problems. Can someone tell me where I'm going wrong?

    I'm actually doing all this more or less, just so I can get Charmander. I got the Gameshark codes to work once, but not any more.

    :P Thanks for all and any help!
     

    Luke128th

    These days shall pass...
    83
    Posts
    16
    Years
    • Age 32
    • Seen Jun 1, 2012
    Alright now...
    I'm testing one of the scripts you posted, Follump. Everytime I finish compiling it do I just get the last set of offset numbers? And if so then I must be doing something wrong because the screen goes red...

    Here is the script:
    #ORG $begin
    lock
    faceplayer
    checkflag 0x200
    if B_true goto $done
    message $aidtalk
    boxset 6
    giveitem 0xD
    setflag 0x200
    release
    end

    #org $done
    message $aidtalk2
    boxset 6
    release
    end

    #org $aidtalk
    $aidtalk 1 = Oh, hello \v\h01.\pHere, take this potion!

    #org $aidtalk2
    $aidtalk2 1 = Hello.
     
    1,104
    Posts
    16
    Years
  • Alright now...
    I'm testing one of the scripts you posted, Follump. Everytime I finish compiling it do I just get the last set of offset numbers? And if so then I must be doing something wrong because the screen goes red...

    Here is the script:

    Try adding a 1 to giveitem 0xD. So it will look like this
    giveitem 0xD 1
    Thats the only problem I can find with it.
     

    Luke128th

    These days shall pass...
    83
    Posts
    16
    Years
    • Age 32
    • Seen Jun 1, 2012
    Alright now I'm trying to create a Moltres battle, but I still don't know which offset to use! Which do I use?
    #org $StartWild
    lock
    faceplayer
    cry 146
    message $moltCry
    moltcry 1 = Gyaoo!
    boxset 6
    checkflag 0x808
    if 0x1 goto $WildBatt
    release
    end

    org $Wildbatt
    lock
    wildbattle 146 50 2
    release
    setflag 0x500
    fadescreen 0
    end
     
    9
    Posts
    16
    Years
  • Heres a script i use for a cable car on Emerald:
    Code:
    #ORG $ShowText
    Lock
    Faceplayer
    message $car
    $car 1 = This is the Cable Car!\lWant to go up?
    boxset 5
    compare LASTRESUILT B_TRUE
    if B_False goto $DontGo
    special 0x98
    warp 0x02 0x06 0x02
    goto $endme
    $DontGo
    message $ok
    $ok 1 = Okay. Bye Then!
    boxset 6
    $endme
    release
    end

    It works up to the Special 0x98, instead of the cable car animation its a blank screen and a bit of music, press A and the script carries on, how can i get this to work?!?
     
    64
    Posts
    16
    Years
    • Seen Aug 22, 2010
    Where i must type in 03,40 and 50?
    Spoiler:

    oh and here's my script:
    #ORG $begin
    lock
    checkflag 0x200
    applymovement 0x07 $aidwalk1
    pause 0x20
    message $aidtalk
    boxset 6
    release
    end

    #ORG $aidwalk1
    $aidwalk1 1 ; #binary 0x52 0x4A 0xFE

    #ORG $aidtalk
    $aidtalk 1 = Puh, \v\h01.\pdu hast mich erschrekt!
    My text is german, but thats equal ^^".
     

    Naoshi

    lawl
    72
    Posts
    18
    Years
    • Seen Aug 11, 2023
    For People Objects: You just only need to make the second Unknown 03. But I don't know if that's even needed.
     
    Last edited:

    Luke128th

    These days shall pass...
    83
    Posts
    16
    Years
    • Age 32
    • Seen Jun 1, 2012
    Also when I do make my moltres battle, the screen turns purple... Do I need to put in the movement numbers?
     
    47
    Posts
    16
    Years
  • Uh... I have another question... How do I assign scripts to someone? Like let's say I want to change someone's script all the way in the E4, and yet I have done no scripting proor to that, and I'm using Advance Map. How do I assign that certian script to a person far off from the beginning?
     

    Ooka

    [font=Maven Pro][color=#A75EE2]Cosmic[/color][/fon
    2,626
    Posts
    16
    Years
  • Just use the command call I guess, but then you would have to use the command return afterwards. Or maybe I'm just misunderstanding your question.
     
    1,104
    Posts
    16
    Years
  • Uh... I have another question... How do I assign scripts to someone? Like let's say I want to change someone's script all the way in the E4, and yet I have done no scripting proor to that, and I'm using Advance Map. How do I assign that certian script to a person far off from the beginning?

    Read the beginning of Irish Witch's tutorial. That should explain compiling and assigning scripts to people in Advance map.

    Just use the command call I guess, but then you would have to use the command return afterwards. Or maybe I'm just misunderstanding your question.

    I think you may have misunderstood(maybe I'm wrong)
     
    47
    Posts
    16
    Years
  • Read the beginning of Irish Witch's tutorial. That should explain compiling and assigning scripts to people in Advance map.

    Thanks for the help... Now anyways. Another question.

    How would I make a script similar to the one in Yellow with the Pikachu following you? (I mean through out all the game.) Unless it's; Fainted, or in the PC?
     
    Status
    Not open for further replies.
    Back
    Top