• 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.
  • 9
    Posts
    16
    Years
    • Seen Mar 4, 2011
    how do you add legendary battle scripts so that the pokemon disappears after you catch or deteat it.
    It may be here somewhere already but it is to hard to find if it is.
    Please help me i am in the middle of a new rom.
     

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    I have a little problem now.
    What do I have to do to make the script continue after the trainerbattle?

    Code:
    trainerbattle 0 0x0002 $before $after
    message $noo
    $noo 1 = [there is some txt..]
    boxset 6
    Do I have to write the message $beaten?

    If not, what exactly do I have to do to make the script continue?
    Here the full one, everything works but after the battle the script ends and you can walk freely around:
    Spoiler:
     
  • 131
    Posts
    17
    Years
    • Seen Jun 16, 2014
    Spoiler:


    Try like this... I haven't looked over your whole script as I assume you've got the rest right..
     

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    i figured it out about 30 seconds before I read your answer xD (read a tutorial)

    thx anyway for reading at least the first part of the script and answering ;)

    edit: there's one problem left.
    before the fight there is the message "let's do it".
    allright
    then the fight starts and the message says:
    Team Aqua Steve and from here on there are weird signs like óÀé
    and after the line theese signs continue and begin at the same line again and overwrite Team Aqua Steve

    Aftter 2 lines the battle starts, after you have beaten him the new messages does exactly the same.
    and after the weird signs the normal message "WHAT?" appears.

    Is it a mistake in the script or is it because of the change in Trainer Edit ?
     
    Last edited:

    destinedjagold

    I do not exist.
  • 8,593
    Posts
    17
    Years
    • Seen May 26, 2024
    try this then... I don't if it'll work though... :\
    Code:
    org $begin
    lock
    faceplayer
    checkflag 0x235
    if b_true goto $done
    message $poke
    $poke 1 = Looks like this Spearow belongs\nto a trainer. It's wearing a \lnecklace.\pWell, now it's ours!
    boxset 6
    applymovement 0xFF $move
    pausemove 0x0
    message $no
    $no 1 = Hey, let this Spearow be!\nIt would be larceny to take it.
    boxset 6
    applymovement 0x02 $move2
    applymovement 0x03 $move2
    pause 0x30
    applymovement 0x02 $move3
    applymovement 0x03 $move3
    pausemove 0x0
    message $child
    $child 1 = Oh, look what we have here!\nA little child trying to\lforbid us something.\pWe are two grown-ups, you are\nalone. So what do you want\lto do?
    boxset 6
    applymovement 0x05 $move4
    pausemove 0x0
    message $help
    $help 1 = Now we are two childs.\nReady for a fight?
    boxset 6
    applymovement 0x02 $move5
    applymovement 0x03 $move5
    pausemove 0x0
    message $oh
    $oh 1 = WHAT?\nWhen did she appear?\lAllright then, we will show you\lwhat it is like to fight against\lgrown-ups!
    boxset 6
    applymovement 0x03 $move6
    pausemove 0x0
    trainerbattle 1 0x002 $before $after $then
    release
    end
    
    #org $then
    message $noo
    $noo 1 = C'mon, let's go.\nThis is so embarassing...
    boxset 6
    applymovement 0x02 $move7
    applymovement 0x03 $move8
    pausemove 0x0
    #raw 0x53 0x02 0x00
    #raw 0x53 0x03 0x00
    setflag 0x235
    applymovement 0x05 $move9
    pausemove 0x0
    message $hi
    $hi 1 = Hello, my name is ?.\nIt was really brave to stop\lthis people, but you shouldn't\ldo this alone.\pHowever, nice to meet you.
    boxset 6
    #raw 0xCA
    message $ring
    $ring 1 = Rrrrrrrrrrrrrrrrrrrring.
    boxset 6
    #raw 0xCB
    message $telephone
    $telephone 1 = Damn...can't this wait\na little?\lOkay I'll be here on time..\pI'm sorry, I have to go now.\nBut I'm sure we'll meet again.
    boxset 6
    applymovement 0x05 $move10
    pausemove 0x0
    #raw 0x53 0x05 0x00
    setflag 0x236
    applymovement 0x04 $move11
    pause 0x30
    applymovement 0x04 $move12
    pausemove 0x0
    #raw 0x53 0x04 0x00
    setflag 0x237
    release
    end
    
    #org $move
    #raw 0x10 0x13 0x13 0xFE
    
    #org $move2
    #raw 0x63 0xFE
    
    #org $move3
    #raw 0x02 0xFE
    
    #org $move4
    #raw 0x12 0x12 0x12 0x10 0x14 0x12 0x12 0x12 0xFE
    
    #org $move5
    #raw 0x55 0xFE
    
    #org $move6
    #raw 0x02 0xFE
    
    #org $move7
    #raw 0x10 0x10 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE
    
    #org $move8
    #raw 0x10 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE
    
    #org $move9
    #raw 0x12 0x12 0x12 0xFE
    
    #org $move10
    #raw 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x10 0x10 0x13 0x13 0xFE
    
    #org $move11
    #raw 0x63 0xFE
    
    #org $move12
    #raw 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE
    
    #org $done
    release
    end
    
    #org $before
    $before 1 = Let's do it!
    
    #org $after 
    $after 1 = WHAT?
     

    Megiddo-san

    Barium - Summer '12 Return?
  • 1,308
    Posts
    16
    Years
    Can someone tell me what is wrong with the script I posted earlier and/or this one?

    #ORG $begin
    checkflag 0x205
    if b_true goto $battle
    checkflag 0x209
    if b_true goto $done
    release
    end

    #ORG $done
    release
    end

    #ORG $battle
    playsound 0x13B
    nop
    applymovement 0x01 $rivwalk
    applymovment 0x03 $compan
    pausemove 0
    applymovement 0xFF $hr
    pausemove 0
    trainerbattle 1 0x147 $before $after $further
    fadesound 0x117
    nop
    setflag 0x209
    release
    end

    #ORG $rivwalk
    #RAW 0x12
    #RAW 0x12
    #RAW 0x12
    #RAW 0x10
    #RAW 0xFE

    #ORG $compan
    #RAW 0x10
    #RAW 0x12
    #RAW 0x12
    #RAW 0x12
    #RAW 0xFE

    #ORG $hr
    #RAW 0x01
    #RAW 0x62
    #RAW 0xFE

    #ORG $before
    $before 1 = Before we leave I want to kick\nyour butt.

    #ORG $after
    $after 1 = Wha?!

    #ORG $further
    message $your
    boxset 6
    applymovement 0x01 $again
    applymovement 0x03 $again2
    pausemove 0
    setflag 0x250
    release
    end

    #ORG $your
    $your 1 = You're better than I thought...\p\v\h01.\p\v\h01.I'll win next time.

    #ORG $again
    #RAW 0x12
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x13
    #RAW 0x10
    #RAW 0xFE

    #ORG $again2
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x12
    #RAW 0x10
    #RAW 0xFE This one does nothing when the player steps on the tile.
     

    Megiddo-san

    Barium - Summer '12 Return?
  • 1,308
    Posts
    16
    Years
    lol. Thanks. Since it doesn't happen 1st it's not the main problem, but that would have been another, or does it affect everything? This isn't the 1st time I forgot a letter in applymovement.
     

    destinedjagold

    I do not exist.
  • 8,593
    Posts
    17
    Years
    • Seen May 26, 2024
    what's wrong with the script anyways?
    in my case, if ever my 'applymovement' lacks a letter or has been mispelled, the script hangs when it's about to read the applymovement error... :\
     

    destinedjagold

    I do not exist.
  • 8,593
    Posts
    17
    Years
    • Seen May 26, 2024
    well, I don't know if this will work but try this...
    Code:
    #ORG $begin
    checkflag 0x205
    if b_true goto $battle
    checkflag 0x209
    if b_true goto $done
    release
    end
    
    #ORG $done
    release
    end
    
    #ORG $battle
    playsound 0x13B
    nop
    nop
    applymovement 0x01 $rivwalk
    applymovement 0x03 $compan
    pausemove 0
    applymovement 0xFF $hr
    pausemove 0
    trainerbattle 1 0x147 $before $after $further
    release
    end
    
    #ORG $rivwalk
    #RAW 0x12
    #RAW 0x12
    #RAW 0x12
    #RAW 0x10
    #RAW 0xFE
    
    #ORG $compan
    #RAW 0x10
    #RAW 0x12
    #RAW 0x12
    #RAW 0x12
    #RAW 0xFE
    
    #ORG $hr
    #RAW 0x01
    #RAW 0x62
    #RAW 0xFE
    
    #ORG $before
    $before 1 = Before we leave I want to kick\nyour butt.
    
    #ORG $after
    $after 1 = Wha?!
    
    #ORG $further
    fadesound 0x117
    nop
    nop
    setflag 0x209
    message $your
    boxset 6
    applymovement 0x01 $again
    applymovement 0x03 $again2
    pausemove 0
    setflag 0x250
    release
    end
    
    #ORG $your
    $your 1 = You're better than I thought...\p\v\h01.\p\v\h01.I'll win next time.
    
    #ORG $again
    #RAW 0x12
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x13
    #RAW 0x10
    #RAW 0xFE
    
    #ORG $again2
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x12
    #RAW 0x10
    #RAW 0xFE
    I'm no expert in using raws, however... I don't even understand how to use raws...
     
  • 356
    Posts
    16
    Years
    Kind of gave up rom hacking a few months ago because it all got too confusing and messy and there's very little help available to newbies. Plus nothing ever worked smoothly, I was always getting errors or something going wrong before I could even test scripts.

    Well, I'm going to give it another go. But problem is, I've been reading a PokeScript tutorial, and I re-installed PokeScript, and 'PkmAdv' and I started giving it a go again.

    As usual, I'm having problems right from the word 'go'.

    After saving a practice script in the correct file type, having chosen 'all files' from the drop-down menu and then clicked save, I was instructed to right-click the file and click 'compile script'. When I did this, I was greeted unexpectedly with an Open With window. This wasn't what I was told I should see. But, in a vain attempt to get it to work I tried selecting it to open with PokeScript. This obviously didn't work, and I got a Run-time error in my face.

    Could anyone help? I don't know if this is a common problem but any tips or suggestions would be great. Thanks. Oh, please bear in mind, that I'm a complete newbie at this, so computer slang and terms would brobably not be understood.
     
  • 131
    Posts
    17
    Years
    • Seen Jun 16, 2014
    What kind of window opens.. it should be a log.. If you're desperate, there's a tutorial on youtube...
     
  • 356
    Posts
    16
    Years
    What kind of window opens.. it should be a log.. If you're desperate, there's a tutorial on youtube...

    EDIT: Its ok, never mind. I've fixed it by downloading PokeScript from another source, so it compiles just fine now. :) The one I got the first one from must have had some missing files...

    I'll have a search for it thanks. :) Though I'm pretty sure I followed all instructions exactly... I'll still check it out. EDIT: Had a look, there was nothing they were doing that I wasn't, and vice versa, so I guess its something else...

    It's the kind of window you get when you click 'Open with', gives you a list of programs to select from to open the file with. Except I get this when I click 'Compile script' which apparently, yes, should bring up the log. Hold on... I'll try making another.

    Made it .rbc file, as the tutorial instructs...
    Selected file type as 'all files'...
    No mention on what to do with 'encoding'... I'll try all kinds...

    Nope. Nothing worked.

    Is there any particular directory scripts should be saved to, or does it not matter?

    It's starting to come back to me a little... I think I remember it working before but its been so long since I last tried this kind of thing I can't remember what I did to get it to work.
     
    Last edited:

    Megiddo-san

    Barium - Summer '12 Return?
  • 1,308
    Posts
    16
    Years
    It didn't work. I think I'll ask Baro how he did his rival scripts.

    Edit: I had to do the stupidest thing to get it to work. It turns out that another script that I had on the same tile was interfering. I am now having two other problems with it. 1.the #org $your message happens twice 2.you can step on the tile again and it will play the rival music and do the ! mark above the player's head. Here it is

    #ORG $begin
    checkflag 0x209
    if b_true goto $done
    checkflag 0x205
    if b_true goto $battle
    release
    end

    #ORG $done
    release
    end

    #ORG $battle
    playsound 0x13B
    nop
    nop
    applymovement 0x01 $rivwalk
    applymovement 0x03 $compan
    pausemove 0
    applymovement 0xFF $hr
    pausemove 0
    trainerbattle 1 0x147 $before $after $further
    release
    end

    #ORG $rivwalk
    #RAW 0x12
    #RAW 0x12
    #RAW 0x12
    #RAW 0x10
    #RAW 0xFE

    #ORG $compan
    #RAW 0x10
    #RAW 0x12
    #RAW 0x12
    #RAW 0x12
    #RAW 0xFE

    #ORG $hr
    #RAW 0x01
    #RAW 0x62
    #RAW 0xFE

    #ORG $before
    $before 1 = Before we leave I want to kick\nyour butt.

    #ORG $after
    $after 1 = Wha?!

    #ORG $further
    message $your
    boxset 6
    applymovement 0x01 $again
    applymovement 0x03 $again2
    pausemove 0
    #raw 0x53
    #raw 0x01
    #raw 0x00
    #raw 0x53
    #raw 0x03
    #raw ox00
    setflag 0x250
    fadesound 0x117
    nop
    nop
    setflag 0x209
    release
    end

    #ORG $your
    $your 1 = You're better than I thought...\p\v\h01.\p\v\h01.I'll win next time.

    #ORG $again
    #RAW 0x12
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x13
    #RAW 0x10
    #RAW 0xFE

    #ORG $again2
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x10
    #RAW 0x12
    #RAW 0x10
    #RAW 0xFE

    Everything else works great.
     
    Last edited:

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    I'm really pissed off -.-'

    Everytime I try to compile my script, there is an error.
    run-time error 457
    this key is already associated with an element of this collection.

    this is the script
    Spoiler:

    the log displays the error when reaching the applymovement 0x0C $13(or at least somewhere at this point).

    pls help, it's important!
     
  • 26
    Posts
    16
    Years
    • Seen Oct 22, 2013
    Okay, this isn't much of a question as it is a request.

    I've been trying to learn scripting but I just can't get it right. All of my scripts don't work, and this whole ScriptED VS Pokescript thing is making my head spin.

    I use Diamondcutter to apply my scripts to my game, so judging by the format, I think I need ScriptED formatted scripts.

    A simple request, all I need is one easily editable script that attatches to a person or object that when you walk up to it and talk to it, it activates a one-time-only wild pokemon battle with a pokemon of choice at a level of choice. Kind of like Articuno, Zapdos, Moltres, Lugia, and Ho-Oh in Fire Red (which is the version I'm hacking).

    I would GREATLY appreciate anyone who helps me out. I've been at this for months and I'm getting more and more discouraged by the week...
     
  • 131
    Posts
    17
    Years
    • Seen Jun 16, 2014
    I'm really pissed off -.-'

    Everytime I try to compile my script, there is an error.
    run-time error 457
    this key is already associated with an element of this collection.

    this is the script
    Spoiler:

    the log displays the error when reaching the applymovement 0x0C $13(or at least somewhere at this point).

    pls help, it's important!

    There.. You had too many commands in one applymovement...(I've fixed your script)
     
    Status
    Not open for further replies.
    Back
    Top