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

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Anselection

Malicious Mapper
174
Posts
14
Years
    • Seen Dec 20, 2011
    Can someone help, again?
    Spoiler:


    Whenever I do this, it'll run the script, but after it's over, it freezes the game.
    please help?
     
    10,078
    Posts
    15
    Years
    • Age 32
    • UK
    • Seen Oct 17, 2023
    Can someone help, again?
    Spoiler:


    Whenever I do this, it'll run the script, but after it's over, it freezes the game.
    please help?

    The second movement needs #raw 0xFE at the end
     

    Anselection

    Malicious Mapper
    174
    Posts
    14
    Years
    • Seen Dec 20, 2011
    Okay, now, I know me posting is getting annoying, but I just have one more teeny weeny problem.

    The script works fine, yes. However, whenever I step on that spot again, the whole script replays. Is there a way around that?
     
    10,078
    Posts
    15
    Years
    • Age 32
    • UK
    • Seen Oct 17, 2023
    Okay, now, I know me posting is getting annoying, but I just have one more teeny weeny problem.

    The script works fine, yes. However, whenever I step on that spot again, the whole script replays. Is there a way around that?

    You need another checkflag in there somewhere

    checkflag 0xYYYY
    if 0x1 goto @End


    #org @End
    end

    Then at the end of the script (after the movements) put a setflag 0xYYYY.

    This means once the script has run once a flag has been set, and the beginning of the script checks to see if it has already run.

    It's recommended to use flags 1000 and up, and remember not to reuse flags for future scripts :)
     

    rockman0

    I still claim Luxray!
    549
    Posts
    14
    Years
  • I'm having trouble with the script below. I set it to talk to someone and they give you a Pokemon, however, everytime I get the Pokemon, only one line of text is displayed and the Pokemon I gain is a question with no attacks. Anyone know what I'm doing wrong?

    P.S. I'm using XSE and followed diegoisawesome's tutorial. Thanks!
    This is what Advance Map changed it to. This isn't my original script. Thanks again!!

    -----------------------
    #org 0x71A450
    checkflag 0x828
    if 0x1 goto 0x871A4B2
    msgbox 0x871A4BA '"What's up? \nHappy Birthday, [playe..."
    compare LASTRESULT 0x1
    if 0x0 goto 0x871A473
    msgbox 0x871A4F0 '"Dude. \nEmpty your pockets!"
    release
    end

    '-----------------------
    #org 0x71A4B2
    msgbox 0x871A7B9 '"Yo! /nHow's Zangoose doing?"
    release

    '-----------------------
    #org 0x71A473
    callstd 0x6

    '---------
    ' Strings
    '---------
    #org 0x71A4BA
    = What's up? \nHappy Birthday, [player]!\nHere's a gift!

    #org 0x71A4F0
    = Dude. \nEmpty your pockets!

    #org 0x71A7B9
    = Yo! /nHow's Zangoose doing?
     
    10,078
    Posts
    15
    Years
    • Age 32
    • UK
    • Seen Oct 17, 2023
    I'm having trouble with the script below. I set it to talk to someone and they give you a Pokemon, however, everytime I get the Pokemon, only one line of text is displayed and the Pokemon I gain is a question with no attacks. Anyone know what I'm doing wrong?

    P.S. I'm using XSE and followed diegoisawesome's tutorial. Thanks!
    This is what Advance Map changed it to. This isn't my original script. Thanks again!!


    There is no givepokemon command in your script.
     

    rockman0

    I still claim Luxray!
    549
    Posts
    14
    Years
  • There is no givepokemon command in your script.

    Thanks for the reply. I just noticed that. My original script did have the givepokemon command. For some reason, when I enter it into AdvanceMap, it changes it to what I just posted. Any idea what I could be doing wrong?
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • When you decompile it and get that, it's showing you the offsets used. The changes in how the script looks make absolutely no difference on the effects of your script. I don't see a reason why the givepokemon command would be disappearing, make sure you're setting it up as givepokemon 0x(species) 0x(level) 0x(item) 0x0 0x0 0x0, with the species, level, and item values in hex, of course.

    EDIT: I just noticed an important flaw, you're missing a parameter on your msgbox commands. It should go msgbox (offset) (msg type), meaning for a yes/no question msgbox @offset 0x5, and for a normal one, msgbox @offset 0x6. Callstd is no longer used (so make sure you have the latest version of XSE). Remove that part entirely, and add msgbox types to your msgbox commands.

    One more thing I just noticed, you forgot to start the script with a lock command.

    No offense, but your script is a bit of a mess. I rewrote it for you, try this:

    Spoiler:


    Try looking at how that's written and it should help you out.
     
    Last edited:

    rockman0

    I still claim Luxray!
    549
    Posts
    14
    Years
  • All right, that's much clearer. Thanks for the help.

    And no offense taken, considering this is my first day at scripting...

    Thanks again. ^^
     
    72
    Posts
    16
    Years
  • How would you go about making a list of choose-able items, similar to Pokémon (Old) White, where there is a list for starter pokemon, and you can pick whichever.

    Here is a screenshot:
    Spoiler:

    Any help for my question?
     
    62
    Posts
    14
    Years
    • Seen Oct 24, 2013
    You have to use the multi command. And then, either you create you own or change the text.
     

    Reygok

    Beginning Hacker
    60
    Posts
    14
    Years
    • Seen Jan 22, 2016
    Hi, I have a big problem with all the Flags I set. Always when I leave the map an return, my flags are unset again. Always. I tried many Flags between up from 1000, 5000, 8000, whatever I choose, my flags get cleared as soon as I change the map in the game. What am I doing wrong?
    I'm Hacking a german Sapphire
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • I think you're setting flags way too high, and with those numbers there's no data to keep the set value saved. If you're completely remaking the game just start using flags from around 200, but if you're leaving old scripts intact, carefully choose what flags to use. I don't suggest using flags over 800 for those types of things, as those are often either temporary or important flags.
     
    10,078
    Posts
    15
    Years
    • Age 32
    • UK
    • Seen Oct 17, 2023
    Hi, I have a big problem with all the Flags I set. Always when I leave the map an return, my flags are unset again. Always. I tried many Flags between up from 1000, 5000, 8000, whatever I choose, my flags get cleared as soon as I change the map in the game. What am I doing wrong?
    I'm Hacking a german Sapphire

    Are you sure they are being set properly in the first place? I don't know about 5000 and 8000 but flags around 1000 are usually safe.

    The fact they are resetting themselves is a bit weird o.O It might be a problem with the ROM I suppose but not entirely sure what's causing this.
     

    The Noob Hacker

    Praise the sun.
    559
    Posts
    14
    Years
    • Seen Jul 16, 2016
    Can somebody tell me what is wrong with this script? For some reason the script stops at $go. If it makes any difference I'm not using XSE, I am writing these in Notepad and compiling them with Pocket Script.

    Spoiler:
     
    10,078
    Posts
    15
    Years
    • Age 32
    • UK
    • Seen Oct 17, 2023
    Can somebody tell me what is wrong with this script? For some reason the script stops at $go. If it makes any difference I'm not using XSE, I am writing these in Notepad and compiling them with Pocket Script.

    Spoiler:

    I haven't used Pokéscript for ages but I can tell you.

    setflag 1200 should be setflag 0x1200

    #binary on the movements should be #raw I think? Judging by Thethethethe's tutorial.

    Pausemove 0 should be pausemove 0x0.

    I can't really tell much more, but maybe you should check out the tutorial mentioned here or learn to use XSE as much more help is available on that.
     

    Buizark

    Always looking for an OU match
    72
    Posts
    14
    Years
    • Age 30
    • Seen Aug 5, 2016
    Anyone mind helping with this level script?It gives weird glitched letters after it is done.
    Spoiler:
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Age 29
    • Seen Apr 7, 2014
    Could anyone give me an example of that, or link me to a tutorial of it and/or tell me the offsets that need to be changed?

    You can find the tutorial with example here.
    You can use the pre-existing choices or edit them. I don't understand what you mean by "the offsets that need to be changed".
     
    Status
    Not open for further replies.
    Back
    Top