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

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
    • Seen Oct 26, 2011
    So. Does anyone have any ideas on how to force the seagallop to go wherever you want it to with "special 0x17B"? I'd like it to NOT go to Vermillion or those seven islands.
    I read the romhacking newsletter issue two, and it still confused the dickens out of me, so if anyone could help me out, I would be quite grateful.

    Well, the Seagallop will always go in the same predefined places.
    To get custom places, you should edit the special itself.
    Which is ASM.

    For some reason, this script wont compile. It keeps saying,Run time error 9. Subscript out of range.

    What about trying XSE? I've fixed and recoded your script for you.
    I've also changed flags 0x230 and 0x230 to 0x1001 and 0x1002 respectively so they're safer.
    I haven't tested it, but it will compile just fine.

    Spoiler:
     
    Last edited:

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Suppose I want to make the player fish, but in a script. Not like using an old rod or anything. Just the fishing animation or whatever it's called.
    How do I do that? I forgot how.

    Thank you.
     

    Gyaridos1992

    Banned
    15
    Posts
    15
    Years
    • Seen Nov 14, 2008
    Well, there is nothing wrong in it, Only this:
    setflag 0x230
    setflag 0x231
    warp 0x6 0x0 0xFF
    #raw 0x07 0x00 0x0E 0x00
    end

    You should add an end.

    How do you compile it?
    Do you: Right click on the script( saved as.rbc), and press compile. You click Assign and search for your rom. Then you press Look(flashlight looking), and copy an offset, and press Assign.
    Then File>Burn.

    Is that what you do?

    Yea, I'm not a noob, ive been scripting for half a year. end doesnt help either.
     

    maximum911

    Beggining Scripter
    104
    Posts
    16
    Years
    • Seen Nov 1, 2009
    how do you make a pokeball disappear after you take the item or pokemon that it was?
    heres my script sofar
    Code:
    #Dynamic 0x800000000
    
    #org @start
    lock
    checkflag 0x200
    if b_true goto @done
    Message @cyn
    boxset 5
    compare LASTRESULT 1
    if b_true goto @yes
    compare LASTRESULT 0
    if b_true goto @no
    release
    end
    
    #org @cyn
    = So you choose the fire-mouse\nPokèmon Cyndaquil?
    
    #org @yes
    givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
    setflag 0x860
    setflag 0x200
    Message @rename
    boxset 6
    Message @likes
    boxset 6
    release
    end
    
    #org @rename
    = Here in Team Magma, you are not\nallowed to give Pokèmon cozy\lnicknames. It makes them seem less\ldangerous.
    
    #org @likes
    = This Pokèmon really seems to like\nyou!
    
    #org @no
    Message @neg
    boxset 6
    release
    end
    
    #org @neg
    = No, Well maybe you will like\nanother of the Pokèmon.
    
    #org @done
    Message @one
    boxset 6
    release
    end
    
    #org @one
    = No, you only get one Pokèmon from\nus.
    also how would you get the rename working using xse?
     
    857
    Posts
    15
    Years
  • how do you make a pokeball disappear after you take the item or pokemon that it was?
    heres my script sofar
    also how would you get the rename working using xse?

    A hidesprite command would work for hiding the pokeball.
    hidepsprite 0x(Person event no)
    I believe the rename command is #raw 0x68, but I'm not sure..
     

    Gyaridos1992

    Banned
    15
    Posts
    15
    Years
    • Seen Nov 14, 2008
    A hidesprite command would work for hiding the pokeball.
    hidepsprite 0x(Person event no)
    I believe the rename command is #raw 0x68, but I'm not sure..

    Nope its #raw 0x53 to disapear and #raw 0x55 to reapear example #raw 0x53 0x02 0x00
     

    Tony the Awesome

    mi nombre es tony
    233
    Posts
    16
    Years
    • Seen Mar 13, 2010
    ok, i need help wit this script
    Spoiler:

    The first yes pointer works fine but when I press no, the song doesnt change back to the default one but acts like as if the first no pointer was just release and end.
     

    maximum911

    Beggining Scripter
    104
    Posts
    16
    Years
    • Seen Nov 1, 2009
    I got the disappearing part to work bu thow would you get the rename to work?
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    ok, i need help wit this script
    Spoiler:

    The first yes pointer works fine but when I press no, the song doesnt change back to the default one but acts like as if the first no pointer was just release and end.

    "Programmers start counting at 0. The rest of the world starts counting at 1."

    When comparing the result of a yes/no message, you can either get 0x0 or 0x1, where 0x0 is the "NO" answer and 0x1 is the "YES" one.
    Except that, when there are only 2 type of choices (like in your case), it doesn't make a lot of sense checking the answer two times. If it's yes, it can't be no and vice-versa.
    For more details, see the fixed and optimized script below:

    Spoiler:



    I got the disappearing part to work bu thow would you get the rename to work?

    You would just need to call a script like this:
    Code:
    #org @rename
    fadescreen 0x1
    special 0x9E
    waitstate
    return
     

    Bluewarwolf

    Teh n00b haxorz
    25
    Posts
    15
    Years
    • Seen Nov 19, 2008
    Need help

    I'm not sure if this goes in this thread, but I am very new to scripting, and just need general help. Such as, best program, how to do it, etc.? I want to make my own Pokemon hack, and I have map editing down, but scripting is something I am unfamiliar with. Any help would be nice :)
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    I'm not sure if this goes in this thread, but I am very new to scripting, and just need general help. Such as, best program, how to do it, etc.? I want to make my own Pokemon hack, and I have map editing down, but scripting is something I am unfamiliar with. Any help would be nice :)

    I would suggest you XSE, you can find it in the Toolbox.
    Regarding general scripting, the best advice I can give you is: decompile, decompile and decompile. See how scripts in the original game work, and then try to make your own.
    You may take a quick look at the tutorials as well, but always try yourself first. Well, by using XSE I'm sure you'll appreciate the integrated Command Help.
     

    Bluewarwolf

    Teh n00b haxorz
    25
    Posts
    15
    Years
    • Seen Nov 19, 2008
    I would suggest you XSE, you can find it in the Toolbox.
    Regarding general scripting, the best advice I can give you is: decompile, decompile and decompile. See how scripts in the original game work, and then try to make your own.
    You may take a quick look at the tutorials as well, but always try yourself first. Well, by using XSE I'm sure you'll appreciate the integrated Command Help.

    Alright, so, what all should I download besides XSE, which I just now got? And thanks for replying :)
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    Alright, so, what all should I download besides XSE, which I just now got? And thanks for replying :)

    Considering you're used to mapping, XSE will be more than enough. After all, you'll need AM just to place your own scripts. All the rest will be done through XSE.
    To decompile scripts, goto Settings -> Choose Script Editor. A new window will appear, letting you choose the script editor.
    After choosing, a message will popup, asking you if the script editor is going to use ":" or " " (space) as offset separator.
    Since you're using XSE you can just choose whatever you like, since both modes are fully supported.
     

    cooley

    ///Keepin' it simple
    1,148
    Posts
    17
    Years
  • Alright, so, what all should I download besides XSE, which I just now got? And thanks for replying :)
    Well for that answer you'd best ask in the "Simple Questions Thread"
    But You would also find Unlz to be helpful. It's in HackMew's thread ^^
    Also PET, APE, I really can't think of anything...Oh, yeah. You WILL need a Hex editor!
     
    Status
    Not open for further replies.
    Back
    Top