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

~CyberKitsune09~

Proud Tails fan!
185
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.

    TYVM! That worked like a Chram! (And it DIDN'T Put me back 2 days in scritpting Devolpment!)

    But 1 more Q, This is a tile reight inbetween the Bookcases That stops you from leaving oak and Makes the scientest give you a item... the Oak stopper works but after the scientest is done, the level script repeats making you walk through Oak (O.O) and puts you right above him, this ONLY happnes with the scientest...
    Here is the script:
    Code:
    #dynamic 0x8000000
    #org @start
    lock
    checkflag 0x203 
    if 0x1 goto @no
    release
    end
     
    #org @no
    checkflag 0x828
    if 0x1 goto @lab
    message @wait
    boxset 6
    applymovement 0xFF @btl
    waitmovement 0
    return
     
    #org @lab
    checkflag 0x204
    if 0x1 goto @done
    applymovement 0x1 @guy
    waitmovement 0
    message @gui
    boxset 6
    giveitem 13 1 0
    applymovement 0x1 @gyi
    waitmovement 0
    setflag 0x204
    release
    end
     
    #org @wait
    = Oak: Wait! Don't go out! Talk to\nme!
     
    #org @btl
    #binary 0x1E 0xFE
     
    #org @guy
    #binary 0x0F 0x0F 0x0F 0x01 0xFE
     
    #org @gui
    = Here take this for your quest,
     
    #org @gyi
    #binary 0x0E 0x0E 0x0E 0xFE
     
    #org @done
    release
    end

    Any Help?
    (And https://s255.photobucket.com/albums/hh126/cpuDuDe12/?action=view&current=Look2.flv is a Low-Quilaty Video that shows what goes wrong)
    ~cpuDuDe08~
     
    Last edited:
    2
    Posts
    15
    Years
  • item help

    this is what happens. i created a script to pick up an item in a pokeball, and it does. then, as soon as i move, the pokeball comes back. i set the pokemon id to the flag location, too. here is the script:
    #org $start
    lock
    checkflag 0x0201
    if b_true goto $done
    giveitem 20 1
    #raw 0x53
    #raw 0x06
    #raw 0x00
    setflag 0x0201
    release
    end

    #org $done
    release
    end

    how do i fix it?

    EDIT: Figured it out. had to add the hide sprite at the $done section or had to leave the map to let the new script take place, or both. sorry for posting.
     
    Last edited:
    248
    Posts
    16
    Years
    • Seen Nov 22, 2014
    TYVM! That worked like a Chram! (And it DIDN'T Put me back 2 days in scritpting Devolpment!)

    But 1 more Q, This is a tile reight inbetween the Bookcases That stops you from leaving oak and Makes the scientest give you a item... the Oak stopper works but after the scientest is done, the level script repeats making you walk through Oak (O.O) and puts you right above him, this ONLY happnes with the scientest...
    Here is the script:
    Code:
    #dynamic 0x8000000
    #org @start
    lock
    checkflag 0x203 
    if 0x1 goto @no
    release
    end
     
    #org @no
    checkflag 0x828
    if 0x1 goto @lab
    message @wait
    boxset 6
    applymovement 0xFF @btl
    waitmovement 0
    return
     
    #org @lab
    checkflag 0x204
    if 0x1 goto @done
    applymovement 0x1 @guy
    waitmovement 0
    message @gui
    boxset 6
    giveitem 13 1 0
    applymovement 0x1 @gyi
    waitmovement 0
    setflag 0x204
    release
    end
     
    #org @wait
    = Oak: Wait! Don't go out! Talk to\nme!
     
    #org @btl
    #binary 0x1E 0xFE
     
    #org @guy
    #binary 0x0F 0x0F 0x0F 0x01 0xFE
     
    #org @gui
    = Here take this for your quest,
     
    #org @gyi
    #binary 0x0E 0x0E 0x0E 0xFE
     
    #org @done
    release
    end

    Any Help?
    (And https://s255.photobucket.com/albums/hh126/cpuDuDe12/?action=view&current=Look2.flv is a Low-Quilaty Video that shows what goes wrong)
    ~cpuDuDe08~

    Interesting.. you mean to tell me that variable 0x8001 resets to 1 after the level script? :shocked:

    Have you used all variables from 0x7000 to 0x8000? If not, use those as, in theory, they're not used by the game...

    And thanks for telling us about variable 0x8001. I could use it. :badsmile:

    Oh, and @megiddo... XD you're getting real good with level scripts.
     

    dudez

    ...
    17
    Posts
    16
    Years
    • Seen Apr 29, 2011
    My pokescript gives error when i try compile script it shows up like this:

    Run-time error '457':

    this key is already associated with an element of this collection

    Other scripts work just fine
    Here's my script:

    Spoiler:
     

    dudez

    ...
    17
    Posts
    16
    Years
    • Seen Apr 29, 2011
    There's your problem. Change $2 to $3.
    Heh i always have these little problems i cant find XD thanks

    E:still wont work it goes to the rom but it gives strange letters to the textbox when i talk i try to comment twice more so i can put the pic of it
    i put script here again
    Spoiler:
     
    Last edited:

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    @dudez...
    try this then. :\
    Code:
    #org $Professor
    checkflag 0x204
    if_b true goto $last
    checkflag 0x202
    if b_true goto $gogetpokemon
    message $1
    boxset 6
    setflag 0x202
    release
    end
    
    #org $gogetpokemon
    checkflag 0x203
    if b_true goto $pokedex
    message $2
    boxset 6
    release
    end
    
    #org $pokedex
    message $3
    boxset 6
    applymovement 0x04 $move
    pausemove 0x0
    applymovement 0x10 $move2
    pausemove 0x0
    applymovement 0x04 $move3
    setflag 0x829
    fanfare 0x13E
    message $4
    boxset 4
    waitfanfare
    #raw 0x68
    setflag 0x204
    release
    end
    
    #org $last
    message $takecare
    boxset 6
    release
    end
    
    #org $move
    $move 1 ; #binary 0x12 0x11 0xFE
    
    #org $move2
    $move2 1 ; #binary 0x60 0xFE
    
    #org $move3
    $move3 1 ; #binary 0x10 0x13 0xFE
    
    #org $1
    $1 1 = Hi there \v\h01! You came here \nbecause you want your own \lpokemon? Sure, go an choose.
    
    #org $2
    $2 1 = Go and pick one
    
    #org $3
    $3 1 = So, you got pokemon now? \nGood, now i give you a pokedex \pits used to get data from \npokemon
    
    #org $takecare
    $takecare 1 = Take good care of that \npokemon!
    
    #org $4
    $4 1 = You got a \c\h01\h04Pokedex!
     

    dudez

    ...
    17
    Posts
    16
    Years
    • Seen Apr 29, 2011
    Sorry but still not working
    shows up like this
    [Archive] Script help thread

    [Archive] Script help thread
    What to do
    this is the last script i tried
    Spoiler:

    E:well im not even sure if that works on pokescript but thanks anyway destinejagold if i cant get the solution for that i need to make some of it a prof oaks script and some of it i just put in script tile may work that way gonna test that now
     
    Last edited:
    248
    Posts
    16
    Years
    • Seen Nov 22, 2014
    Uhh.. your last problem.. it's not the level script.. it's the script when you talk to Oak?
     
    683
    Posts
    18
    Years
  • Okay this one is really confusing me because now a script that worked perfectly in my last game before it crashed doesn't work in another. (Both Fire Red hacks)

    #dynamic 0x8003CB

    #org @start
    checkflag 0x232
    lock
    faceplayer
    checkflag 0x16F 0x1
    compare LASTRESULT 0x1
    if B_TRUE goto @pass
    message @nopass
    boxset 6
    setflag 0x232
    release
    end

    #org @pass
    message @passx
    boxset 6
    waitmovement 0x0
    applymovement 0x2 @movesprite1
    Waitmovement 0x0
    setflag 0x1041
    release
    end

    #org @nopass
    = Sorry, you can't go further!\nYou need the NATIONAL DEX.

    #org @passx
    = Is that...\pYou may go!

    #org @movesprite1
    #raw 0x00
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x03
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x60
    #raw 0xFE

    It doesn't realize that I do have a national dex and it won't move. What is wrong?

    Edit: Okay, now it realizes I have a national dex (I didn't even edit the script o.o) but now the person wont move. Help 3=
     

    GKS

    Retired Hacker
    1,320
    Posts
    16
    Years
    • Seen Dec 23, 2013
    So are we to assume that setflag 0x16F as already occured in an another event to make this event complete?

    Why is "checkflag 0x232" before lock and face player? Is that a mistake or did you do that on purpose?

    First of all, for movement, you only need to write "#raw" once per each applymovement and at the end finish it with 0xFE.

    Instead of waitmovement can't you use
    pausemove...
    or
    pause...

    I think I see more mistake, but I'm not an expert yet. ;)
    Try thethethethe scripting tutorial inthe tutorial section, it is really helpful, sorry if I could not help that much.
     
    683
    Posts
    18
    Years
  • So are we to assume that setflag 0x16F as already occured in an another event to make this event complete?

    Why is "checkflag 0x232" before lock and face player? Is that a mistake or did you do that on purpose?

    First of all, for movement, you only need to write "#raw" once per each applymovement and at the end finish it with 0xFE.

    Instead of waitmovement can't you use
    pausemove...
    or
    pause...

    I think I see more mistake, but I'm not an expert yet. ;)
    Try thethethethe scripting tutorial inthe tutorial section, it is really helpful, sorry if I could not help that much.

    Neither of those matter. You can put #raw as many times as you want. You can put checkflag anywhere you want as long as it is before a certain thing (according to certain people.)

    Also, you seemed to miss the fact where I said "It worked before on the exact same game"

    Edit: It works now. I forgot to change 0x2 to 0x1. D:
     
    Last edited:

    Teh Baro

    In my times...!
    521
    Posts
    18
    Years
  • Neither of those matter. You can put #raw as many times as you want. You can put checkflag anywhere you want as long as it is before a certain thing (according to certain people.)

    Also, you seemed to miss the fact where I said "It worked before on the exact same game"

    Edit: It works now. I forgot to change 0x2 to 0x1. D:
    Anyway, you realize that checkflag does nothing, right?
     
    145
    Posts
    16
    Years
    • Seen Sep 12, 2009
    Can someone help me? I've been trying to make a Wild battle Script that will let you battle a pokemon, then you can't battle them again. (Such as the Regi Scripts) I need this for Pokemon Ruby. Can anyone show me a script to make?
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • Can someone help me? I've been trying to make a Wild battle Script that will let you battle a pokemon, then you can't battle them again. (Such as the Regi Scripts) I need this for Pokemon Ruby. Can anyone show me a script to make?
    Wait, I know this is an indirect answer, but if you want to do this (and to learn how to research your own scripts), then find a place it is previously used.
    The example I'm thinking of: Go to advancemap and go to the top of SKY PILLAR. Then open the Rayquaza script in your favourite editor (mine?) and then check out some of the commands it is using.
    Then, providing you want a similar script, it's just a matter of changing the flag (try 0x201), changing the offset and changing the pokémon.
    Oh yeah, and adding text, which is also easy.


    If you solemnly swear you don't have the time and you're not just being lazy:
    Spoiler:
     
    Last edited:

    Megiddo-san

    Barium - Summer '12 Return?
    1,308
    Posts
    16
    Years
  • Here's the raws for you linkinzelda. Sorry about the wait. #raw 0x5C 0x09 0x47 0x01 0x03 0x00
    #raw 0xEA 0xDD 0x18 0x08 0x1A 0xDE
    #raw 0x18 0x08 3rd and 4th = trainer value reversed.
     
    145
    Posts
    16
    Years
    • Seen Sep 12, 2009
    Can someone show me a basic battle script so you can verse a wild pikachu when you go up to it. Then it dissapears after you won the battle, I need it for Pokemon ruby. Thanks.
     

    lukeh

    Former ROM Hacker
    122
    Posts
    15
    Years
  • I don't know the least thing about scripting. If nobody joins my team, then I will have to do it myself. Can someone tell me the basics with out confusing things that I won't even e able to read?
     

    GKS

    Retired Hacker
    1,320
    Posts
    16
    Years
    • Seen Dec 23, 2013
    Neither of those matter. You can put #raw as many times as you want. You can put checkflag anywhere you want as long as it is before a certain thing (according to certain people.)

    Also, you seemed to miss the fact where I said "It worked before on the exact same game"

    Edit: It works now. I forgot to change 0x2 to 0x1. D:

    Well, how was someone supposed to help you if the problem was something simple like that? You should make sure of those stuff before posting it for help.
     
    Status
    Not open for further replies.
    Back
    Top