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

Pikmin_7890

Elite Water Master, Demyx
  • 5
    Posts
    15
    Years
    Thank you! It worked. Although, I haven't tested yet since i have tons of other editting to do. Thanxs again.

    Oh, Can you help me with a different problem? I can only get one person with a "Give item" or "Give pokemon" script to actually give you the item or pokemon. Like I made Ho-oh give you a max revive and Clefairy give you a masterball, but when I tested it, the first one I went to was the only one with an item. Here's Clefairy's script:

    #org $Sillyquestion
    lock
    faceplayer
    checkflag 0x200
    If B_TRUE goto $Done
    message $Freepo
    $Freepo 1 = Do you want a pokeball I found?
    boxset 5
    compare LASTRESUILT B_TRUE
    if B_False goto $Nothanks1
    message $Hereitis
    $Hereitis 1 = Here ya go!
    Boxset 6
    giveitem 0x1 0x1
    setflag 0x200
    release
    end

    #org $Nothanks1
    lock
    faceplayer
    message $Nothanks
    $Nothanks 1 = Whatever.
    boxset 6
    release
    end

    #org $Done
    lock
    faceplayer
    message $Noneleft
    $Noneleft 1 = Use it wisely young padawan.
    release
    end

    They also never say the part of the script in red. Thank you.
     
    Last edited:

    Cy-Chan

    GSC Hacker
  • 152
    Posts
    19
    Years
    Hi. I've been working on the following script, but it won't work properly.

    #org start
    lock
    faceplayer
    checkflag 0x184
    if b_true goto $squirt
    checkflag 0x195
    if b_true goto $bulb
    checkflag 0x206
    if b_true goto $charm

    #org $squirt
    trainerbattle 1 0x001 $before $after $later

    #org $bulb
    trainerbattle 1 0x002 $before $after $later

    #org $charm
    trainerbattle 1 0x003 $before $after $later

    #org $later
    message $beaten
    boxset 6
    applymovement 0x08 $move
    #raw 0x53 0x0F 0x80
    release
    end

    #org $move
    #raw 0x11

    #org $before
    $before 1 = \v\h06: Hey \v\h01! Have you\ncaught any more POKéMON yet?

    #org $after
    $after 1 = \v\h06: Not bad...

    #org $beaten
    $beaten 1 = \v\h06: You have a badge? I'm\nimpressed.\pAlthough, I already have two badges.\nRight now, I'm just taking a detour\pMT. MOON to catch a CLEFAIRY.\nAnyways, smell ya later.

    First problem is at the checkflags. I swear I found the right values for deciding which Pokémon you took at the beginning, but perhaps not.

    Also, when it reaches the pausemove 0, it freezes.

    Can anyone help?
     
  • 248
    Posts
    16
    Years
    • Seen Nov 22, 2014
    Thank you! It worked. Although, I haven't tested yet since i have tons of other editting to do. Thanxs again.

    Oh, Can you help me with a different problem? I can only get one person with a "Give item" or "Give pokemon" script to actually give you the item or pokemon. Like I made Ho-oh give you a max revive and Clefairy give you a masterball, but when I tested it, the first one I went to was the only one with an item. Here's Clefairy's script:

    #org $Sillyquestion
    lock
    faceplayer
    checkflag 0x200
    If B_TRUE goto $Done
    message $Freepo
    $Freepo 1 = Do you want a pokeball I found?
    boxset 5
    compare LASTRESUILT B_TRUE
    if B_False goto $Nothanks1
    message $Hereitis
    $Hereitis 1 = Here ya go!
    Boxset 6
    giveitem 0x1 0x1
    setflag 0x200
    release
    end

    #org $Nothanks1
    lock
    faceplayer
    message $Nothanks
    $Nothanks 1 = Whatever.
    boxset 6
    release
    end

    #org $Done
    lock
    faceplayer
    message $Noneleft
    $Noneleft 1 = Use it wisely young padawan.
    release
    end

    They also never say the part of the script in red. Thank you.

    You don't receive an item? Its the correct command. :\
    Add boxset 6 after message $noneleft

    Hi. I've been working on the following script, but it won't work properly.

    #org start
    lock
    faceplayer
    checkflag 0x184
    if b_true goto $squirt
    checkflag 0x195
    if b_true goto $bulb
    checkflag 0x206
    if b_true goto $charm

    #org $squirt
    trainerbattle 1 0x001 $before $after $later

    #org $bulb
    trainerbattle 1 0x002 $before $after $later

    #org $charm
    trainerbattle 1 0x003 $before $after $later

    #org $later
    message $beaten
    boxset 6
    applymovement 0x08 $move
    #raw 0x53 0x0F 0x80
    release
    end

    #org $move
    #raw 0x11

    #org $before
    $before 1 = \v\h06: Hey \v\h01! Have you\ncaught any more POKéMON yet?

    #org $after
    $after 1 = \v\h06: Not bad...

    #org $beaten
    $beaten 1 = \v\h06: You have a badge? I'm\nimpressed.\pAlthough, I already have two badges.\nRight now, I'm just taking a detour\pMT. MOON to catch a CLEFAIRY.\nAnyways, smell ya later.

    First problem is at the checkflags. I swear I found the right values for deciding which Pokémon you took at the beginning, but perhaps not.

    Also, when it reaches the pausemove 0, it freezes.

    Can anyone help?

    Hmmm.. try some things...

    1. Flags.. change the first flags (184 and 196) to maybe (201 and 202) because 184 and 196 may be used by the game..

    2. I don't see a pausemove.. or did you remove it already?

    3. try adding end to each part of the script (except messages and movements)

    4. add 0xFE to the movement
     

    linkandzelda

    Ex-rom hacker turned indie game developer
  • 777
    Posts
    17
    Years
    hi.
    can anybody explain the commands used in the trainer tower in fire red? or any other way to make a battle continue after you lose?

    thanks in advance
    link
     

    Cy-Chan

    GSC Hacker
  • 152
    Posts
    19
    Years
    Awesome stuff.

    I completely forgot about the movement thing, thanks. That bit works now.

    For the flags though, I'm trying to use the ones already used by the game. I decompiled the starter script and the S.S. Anne Rival battle script, and found those values. Are they wrong?
     
  • 248
    Posts
    16
    Years
    • Seen Nov 22, 2014
    Well, if you know what you're doing about the flags, then use them. But... the ones that determine your rival's pokemon aren't flags.. they're variables.. I listed them somewhere here (3 pages before, I think).. Search for them

    EDIT: actually on page 49 >.<

    Anyway.. its variable 0x4031
     
    Last edited:
  • 480
    Posts
    16
    Years
    Hey guys, i have a problem here.
    in this script, the person turns around instead of looking up.
    It also skips move3.

    Code:
    #org $start
    lock
    faceplayer
    checkflag 0x29F
    if b_true goto $done
    message $hey
    boxset 6
    applymovement 0xFF $hey2
    pausemove 0x0
    special 0x113
    applymovement 0x7F $camera
    pausemove 0x10
    special 0x114
    special 0x113
    applymovement 0x7F $camera2
    pausemove 0x0
    special 0x114
    applymovement 0xFF $move
    pausemove 0
    applymovement 0x02 $move2
    pausemove 0
    applymovement 0xFF $move3
    pausemove 0
    message $psyduck
    boxset 4
    #raw 0x68
    fadescreen 0x1
    fanfare 0x100
    special 0x0
    waitfanfare
    fadescreen 0x0
    message $psy
    boxset 6
    givepokemon 79 10 0
    fanfare 0x13E
    message $received
    boxset 4
    waitfanfare
    #raw 0x68
    message $Would
    boxset 5
    compare LASTRESULT 0x1
    if b_true gosub $name
    fadescreen 0x01
    #raw 0x53
    #raw 0x00
    #raw 0x00
    #raw 0x53
    #raw 0x00
    #raw 0x00
    #raw 0x53
    #raw 0x00
    #raw 0x00
    #raw 0x53
    #raw 0x00
    #raw 0x53
    #raw 0x00
    #raw 0x00
    fadescreen 0x00
    setflag 0x29F
    release
    end
    
    #org $done
    release
    end
    
    #org $hey
    $hey 1 = \v\h01: Hey, what's going on\nover there?
    
    #org $hey2
    #raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
    
    #org $camera
    #raw 0x11 0x11 0x11 0x11 0x11 0xFE
    
    #org $camera2
    #raw 0x10 0x10 0x10 0x10 0x10 0xFE
    
    #org $move
    #raw 0x11 0x11 0xFE
    
    #org $move2
    #raw 0x62 0x12 0x01 0xFE
    
    #org $move3
    #raw 0x11 0x11 0xFE
    
    #org $psyduck
    $psyduck 1 = \v\h01: This Psyduck appears to\nbe afraid of the water. Maybe\lI should help it.
    
    #org $psy
    $psy 1 = Psyduck: Psy psy psy?\n\v\h01: You want to join my team?
    
    #org $received
    $received 1 = You received a Psyduck.
    
    #org $would
    $would 1 = Would you like to rename Psyduck?
    
    #org $name
    call 0x1A74EB
    return
     

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    I'm not sure to know the problem, but there are a few things I could tell you.
    first of all: what's the purpose of thos #raw 0x53? It's hidesprite, and you use #raw 0x53 0x00 0x00 threetimes, so you let the person with number 0 vanish 3 times
    and the next one isn't even used right, it's #raw 0x53 0x00 O.o
    and then again, #raw 0x53 0x00 0x00, you let person 0 vanish again (do you hate this person so much? xD)

    and if you use a mark like ! or ?, make an extra movement.
    better write
    #raw 0x2F 0x15 0x00 (sound for mark)
    applymovement 0x02 $move2
    pause 0x1E
    pause 0x30 (these two commands will make the appearence of the mark perfect ^^)
    applymovement 0x02 $move22
    pausemove 0x0

    #org $move2
    $move2 1 ; #binary 0x62 0xFE

    #org $move22
    $move22 1 ; #binary 0x12 0x01 0xFE


    it could be that that's the problem ;)
     

    dudez

    ...
  • 17
    Posts
    16
    Years
    • Seen Apr 29, 2011
    problem with sign script every other script works fine but my sign script just wont. when i read it in the game it comest with square kind of textbox in upper right corner where reads:

    sevii islands
    navel rock
    exit

    here is the script
    Spoiler:
     

    dudez

    ...
  • 17
    Posts
    16
    Years
    • Seen Apr 29, 2011
    Uh..shouldn't it be "boxset"?
    Signs are Boxset 4 I think

    Oh thanks my mistake :D but i need it to be in boxset 6 so i dont change that

    E:still doesen't work i tried even that boxset 4 but still same stuff comes
     
    Last edited:
  • 248
    Posts
    16
    Years
    • Seen Nov 22, 2014
    @dudez Try to check your signpost again.. Maybe you got the offsets mixed up. There's nothing wrong with the script now.
     

    dudez

    ...
  • 17
    Posts
    16
    Years
    • Seen Apr 29, 2011
    oh well now im frustrated my rom crashed so i dont need to worry that i think it is something in the rom cause it doesent work even in the backup need to start again with new rom
     

    craig4545d

    pokemon hacker [!]
  • 8
    Posts
    16
    Years
    • Seen Jul 22, 2008
    what's wrong with this script it wont work
    [S-HIGHLIGHT]#org $start
    lock
    faceplayer
    message $10
    givepokemon 1 5 0
    give item = 5x#DEFINE_POKEBALL
    release
    end
    message $10
    here is your starter pack
    DISSAPEAR SPRITE
    release
    message $11
    data
    end
    message $11
    bye[/S-HIGHLIGHT]

    this is what i wanted to happen he gives you you the pokemon then item,says bye
    then the sprite you are talking to dissapears can someone fix it plz
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
  • 1,069
    Posts
    16
    Years
    what's wrong with this script it wont work
    #org $start
    lock
    faceplayer
    message $10
    givepokemon 1 5 0
    give item = 5x#DEFINE_POKEBALL
    release
    end
    message $10
    here is your starter pack
    DISSAPEAR SPRITE
    release
    message $11
    data
    end
    message $11
    bye


    this is what i wanted to happen he gives you you the pokemon then item,says bye
    then the sprite you are talking to dissapears can someone fix it plz
    Here it is, but fixed.
    Spoiler:


    I hope that should work. It's for FR. You can change the text all you want, but when you think that it's going to go off the screen, add a /n for new lines, or /p for a whole new paragraph.

    Diego
     

    ~CyberKitsune09~

    Proud Tails fan!
  • 185
    Posts
    16
    Years
    Hi all,

    I'm trying to write a level script for oak's lab, and use advancemap 1.92 to put it in.
    Here is the script now:
    Code:
    #dynamic 0x8000000
    #org @start
    lockall
    applymovement 0xFF @walkup
    waitmovement 0
    setflag 0x203
    setvar 0x8001 0x2
    releaseall
    end
    #org @walkup
    #binary 0x0D 0x0D 0x0D 0x0D 0x0D 0x0D 0x0D 0xFE

    (I'm using XSE btw,)
    The level script type is 02, flag is 8001 and value is 0001, everything works when I set that var earlier in the game, but after the script finishes, I get this:
    [Archive] Script help thread


    Any Help?

    ~cpuDuDe08~
     
  • 683
    Posts
    18
    Years
    #dynamic 0x26E4C3

    #org @start
    trainerbattle 0 0x001 @before @after
    message @beaten
    boxset 0x6
    release
    end

    #org @before
    = Aren't bugs great?

    #org @after
    = Nooo! My bugs!

    #org @beaten
    = How could you squash my\npoor bugs?

    I am trying to make a trainer battle but I really have no clue how to. Can someone help me please? 3=
     

    Megiddo-san

    Barium - Summer '12 Return?
  • 1,308
    Posts
    16
    Years
    To fix that error, go to the grayed out script offset in a hex editor. You should see something like 018001008008 for var 8001 and val 1. If there is FFFF after the 08, change it to 0000.
     

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    I am trying to make a trainer battle but I really have no clue how to. Can someone help me please? 3=
    no problem ;)

    To make it work properly, trainerbattle should be written like this:

    trainerbattle 0x1 0x00 0x00 @before @after @later
    0x1 if you want to make the script continue after the battle, somethin like applymovement or fadescreen with hidesprite.

    0x0 if you just want to make a normal one, than you don't need the pointer for @later since there is no later ^^. But you seem to know that, since you made a normal one.
    it should work if you write it like this:
    Code:
    #dynamic 0x26E4C3
    
    #org @start
    trainerbattle 0x0 0x01 0x00 @before @after
    message @beaten
    boxset 0x6
    release
    end
    
    #org @before
    = Aren't bugs great?
    
    #org @after
    = Nooo! My bugs!
    
    #org @beaten
    = How could you squash my\npoor bugs?
     
    Status
    Not open for further replies.
    Back
    Top