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

[Archive] Script help thread

Status
Not open for further replies.

+Sneasel™

It's a meeee, itman!
1,032
Posts
17
Years
  • Code:
    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $momwalk
    pausemove 0
    message $momtalk
    boxset 6
    setflag 0x200
    release
    end
    
    #ORG $done
    release
    end
    
    #ORG $momwalk
    $momwalk 1 ; #binary 0x62 0x11 0x13 0x13 0x13 0x13 0x4A 0xFE
    
    #ORG $momtalk
    $momtalk 1 = Oh! Hello honey!\nThe proffesor called a bit ago...\phe said to meet him at his lab.

    Is there anything wrong with this script? I compiled it to Fire Red and it froze...

    Go to the properties of your script (click it and look to the right)

    Look for:

    Unknown 00 00
    Var numbers 00 00

    Make them:

    Unknown 00 03
    Var numbers 52 40
     
    28
    Posts
    16
    Years
    • Seen Dec 7, 2009
    I'm using this Script in Emerald - Littleroot town.

    #org $Wildbatt
    lock
    faceplayer
    cry 409
    message $truck
    $truck 1 = This person seems to have\nmany Jirachi with him...\pOh no! It's the........\n........\pJirachi Making Robot!
    boxset 6
    wildbattle 409 70 0
    release
    end

    When I press A on the person, the person locks all other people except the playing char. Then, sometimes if I talk to another NPC the game hangs.

    Doesn't initiate a wildbatle.
     
    Last edited:

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    the cry command is wrong...
    that may be it... May I ask what PKMN is number 409?
     
    28
    Posts
    16
    Years
    • Seen Dec 7, 2009
    Okay, I'm using this example script now:

    #org $battle
    lock
    faceplayer
    message $roar
    boxset 6
    wildbattle 1 5 0
    release
    end

    #org $roar
    $roar 1 = Bulba!

    But somehow, it skips the 'wildbattle' command and goes right to release, end.

    HEY, anyone gonna help!?
     
    Last edited:

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    I asked what PKMN was 409...
    anyways, try this code...
    Code:
    wildbattle 0x01 5 1
    wildbattle --> the command...
    0x01 --> hex value of Bulbasaur... you coud just simply put 1 there, btw...
    5 --> level...
    1 --> battle mode...

    In my hackbook, there's no 0 in the battle mode... :\
     
    28
    Posts
    16
    Years
    • Seen Dec 7, 2009
    409 is Jirachi.

    0 is grass, my friend.

    Doesn't work. It does the message then halts.
     
    Last edited:

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Seen Apr 7, 2014
    AngelSL-
    #org $battle
    message $roar
    boxset 6
    wildbattle 1 5 0
    fadescreen 0
    #raw 53
    #raw <ppl nr>
    #raw 00
    setflag 0x200
    release
    end

    #org $roar
    $roar 1 = Bulba!


    That should probably work(help by kristian)

    ~C3LEBI
     
    131
    Posts
    17
    Years
    • Seen Jun 16, 2014
    I wonder...

    As there's a error when I do this script, I guess I have done something wrong... The setflag won't work and som boxes come up when I finish it... The battle, movement and the text does work though.. What's wrong ?

    #org $begin
    checkflag 0x203
    if B_true goto $gone
    applymovement 0X07 $gruntwalk
    trainerbattle 1 0x059 $before $after $further
    release
    end

    #org $before
    $before 1 = Hand over you Pokemon!
    release
    end

    #org $further
    message $beaten
    boxset 6
    applymovement 0x07 $getaway
    setflag 0x203
    release
    end

    #org $gone
    release
    end

    #org $gruntwalk
    $gruntwalk 1 ; #binary 0x10 0x10 0x10 0x10 0xFE

    #org $after
    $after 1 = Huh?

    #org $beaten
    $beaten 1 = I knew your POKEMON was\nstrong!\pAnyway, I'm out of here.

    #org $getaway
    $getaway 1 ; #binary 0x13 0x10 0x10 0x12 0x10 0x10 0x10 0x10 0x13 0x60 0xFE

    EDIT: The setflag worked after all, It's the boxes that bothers me....
     
    Last edited:

    mistersmeargle

    is a scatman.
    229
    Posts
    16
    Years
    • Seen Oct 26, 2017
    You probably shouldn't change the #orgs for a trainer battle, they should be $1 $2 and $3 as far as I kow.
    It's also possible they're existing #orgs.
     

    Piplup-Trainer

    This is my custom user title.
    228
    Posts
    16
    Years
  • You probably shouldn't change the #orgs for a trainer battle, they should be $1 $2 and $3 as far as I kow.
    It's also possible they're existing #orgs.

    If you are right with the #orgs for the trainer battles - then I know what's the problem of my trainer test script :

    #org $battletrainer
    trainerbattle 1 0x253 $challenge $defeated
    message $afterdefead
    boxset 6
    release
    end

    #org $challenge
    $challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

    #org $defeated
    $defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

    #org $afterdefead
    $afterdefead 1 = One day I will beat you!

    The game freezes after the battle. And there is no Trainer Encounter Music (the music when the trainer see you, come to you and challenge you).
     
    131
    Posts
    17
    Years
    • Seen Jun 16, 2014
    no, I don't think that's the problem... Btw, Piplup-trainer.... You shouldn't write message beneath the Trainerbattle, try like this:

    trainerbattle 1 0x253 $challenge $defeat $afterdefead

    Or maybe it's the orgs... But I don't think so... Anyway... I used the fadescreencommand, and it worked...
     
    Last edited:

    Piplup-Trainer

    This is my custom user title.
    228
    Posts
    16
    Years
  • no, I don't think that's the problem... Btw, Piplup-trainer.... You shouldn't write message beneath the Trainerbattle, try like this:

    trainerbattle 1 0x253 $challenge $defeat $afterdefead

    Or maybe it's the orgs... But I don't think so... Anyway... I used the fadescreencommand, and it worked...

    Okay.
    This time the game doesn't freeze after the battle.
    But if I talk to him after the Battle then a pink-violet color appears --> the game freeze.
    Where must I put the fadescreen-command and how it looks like?
     

    Piplup-Trainer

    This is my custom user title.
    228
    Posts
    16
    Years
  • #org $battletrainer
    trainerbattle 1 0x253 $challenge $defeated
    fadescreen <-------------------------------------------
    message $afterdefead
    boxset 6
    release
    end

    #org $challenge
    $challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

    #org $defeated
    $defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

    #org $afterdefead
    $afterdefead 1 = One day I will beat you!

    The game freezes when I ask the guy after the battle (this time without the pink color).
    Can it be that fadescreen is a command for FireRed?
    If yes, then it wouldn't help me very much because I use a Ruby Rom to hack.
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    try this one then...
    Code:
    #org $battletrainer
    lock
    faceplayer
    trainerbattle 1 0x253 $challenge $defeated $then
    release
    end
    
    #org $then
    message $afterdefead
    boxset 6
    fadescreen 0
    release
    end
    
    #org $challenge
    $challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!
    
    #org $defeated
    $defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?
    
    #org $afterdefead
    $afterdefead 1 = One day I will beat you!
     

    Piplup-Trainer

    This is my custom user title.
    228
    Posts
    16
    Years
  • Now the music works when he sees me.
    But there is still the next problem :
    After he goes to you, the game freezes.
    And the pink-violet background cames back '^^

    EDIT :
    But when I go to him and press A, then the battle starts.
    After the battle he says "One day I will defeat you!".
    Then the "!" appears over him again and then comes the weird background.
     
    Last edited:
    131
    Posts
    17
    Years
    • Seen Jun 16, 2014
    If this is what you want... (requires that the flag isn't taken) You can also take a different flag

    #org $battletrainer
    checkflag 0x222
    if B_true goto $afterdefead
    trainerbattle 1 0x253 $challenge $defeated
    setflag 0x222
    release
    end

    #org $afterdefead
    lock
    faceplayer
    message $afterdefeat
    release
    end

    #org $challenge
    $challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

    #org $defeated
    $defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

    #org $aferdefeat
    $afterdefeat 1 = One day I will beat you!
     

    Piplup-Trainer

    This is my custom user title.
    228
    Posts
    16
    Years
  • If this is what you want... (requires that the flag isn't taken) You can also take a different flag

    #org $battletrainer
    checkflag 0x222
    if B_true goto $afterdefead
    trainerbattle 1 0x253 $challenge $defeated
    setflag 0x222
    release
    end

    #org $afterdefead
    lock
    faceplayer
    message $afterdefeat
    release
    end

    #org $challenge
    $challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

    #org $defeated
    $defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

    #org $aferdefeat
    $afterdefeat 1 = One day I will beat you!

    But how can I see the flag in AdvanceMap (or anywhere else)?
     
    Status
    Not open for further replies.
    Back
    Top