• 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.
  • 857
    Posts
    15
    Years
    I have a question about warp scripts in XSE...

    an example warp script would look like this...
    Code:
    warp 0xA 0x1 0x3 [COLOR=Black][U]0xFD02 0xB401[/U][/COLOR]
    my question is, what does the 0xFD02 and 0xB401 mean?
    they differ from different scripts in-game though... :\
    I believe those are suppose to be X and Y Coordinates...
     
  • 857
    Posts
    15
    Years


    I see... but they are kinda useless in my opinion, though...
    what are their uses?

    Heres an example:

    warp 0x0 0x9 0x1 0x5 0x8
    Would put You here
    Spoiler:


    warp 0x0 0x9 0x1 0x5 0x9
    Would put you here
    Spoiler:
     

    destinedjagold

    I do not exist.
  • 8,593
    Posts
    17
    Years
    • Seen May 26, 2024
    Heres an example:

    warp 0x0 0x9 0x1 0x5 0x8
    Would put You here
    Spoiler:


    warp 0x0 0x9 0x1 0x5 0x9
    Would put you here
    Spoiler:

    that's the use of those? o.O
    I still think they are pretty useless :\ , because no matter what I type on those "x and Y coordinates", the player will always land on where I put the warp tile, at least, in Ruby...

    But thanks for that information though. :)
     
    Last edited:

    Hiche..

     
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Code:
    '---------------
    #org 0x2DDCFC
    faceplayer
    msgbox 0x82DD400 MSG_NORMAL '"Hah! Hah! Hey there, kid! People\n..."
    trainerbattle 0x1 0xB7 0x0 0x82DD445 0x82DD4C5 0x82DD328
    end
    
    '---------------
    #org 0x2DD328
    msgbox 0x82DD69F MSG_NORMAL '"Haha...You got lucky kid. That was..."
    compare PLAYERFACING 0x2
    if 0x0 goto 0x82DD71E
    goto 0x82DD727
    
    '---------------
    #org 0x2DD71E
    applymovement 0x5 0x82DDD19
    end
    
    '---------------
    #org 0x2DD727
    applymovement 0x5 0x82DDCE9
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x2DD400
    = Hah! Hah! Hey there, kid! People\ncall me the King of the Mountain!
    
    #org 0x2DD445
    = So what do you want?\p...\pWhat? You want to pass? Hah.\nAlright then.\pIf you, puny little kid, can beat\nme, I'll let you pass!\l
    
    #org 0x2DD4C5
    = No way!
    
    #org 0x2DD69F
    = Haha...You got lucky kid. That was\nmy weak team.\pA deal's a deal, I'll let you\npass.\pThis won't be the last time you\nsee me!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x2DDD19
    #raw 12 'Step Left (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 60 'Hide
    #raw FE 'End of Movements
    
    #org 0x2DDCE9
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 60 'Hide
    #raw FE 'End of Movements
    It's the decompiled one because I don't have the original. It does everything except move... It doesn't freeze, it just stops. Then, when I talk to him again, he just says the first part...


    NINJA'D BY TIME!

    Time, uh...the first one is Map bank, then map, then warp, then X coordinate, then Y coordinate. I don't see why there's both warp and coordinates, but anyway.

    DL, I think you missed the waitmovement 0x0 under the applymovements. I don't know if that's your problem.
     
  • 857
    Posts
    15
    Years
    Are there any problems with this script?
    Spoiler:
     
  • 224
    Posts
    16
    Years
    • Seen Mar 8, 2016
    @Hiche: According to XSE setworldmapflag: Sets the flag used to allow the player to fly to a specific place. FR/LG only.

    Hope that helped.

    I just learned how to make level scripts, and everything is working fine except for one problem I'm running into. You see I set a flag in the beginning of the game to hide a sprite in one of the houses in pallet town. That flag was 112. So the sprite was hidden. Then I went and made a script that when I talk to a man he leads him to his house, and in his house I put a level script where he gives me a Pokemon (celebi). It all works fine, and I get the Celebi and everything. I made it so that the flag I set in the beginning of the game is cleared when I talk to the man, because I want the sprite in the house that he's leading me to to be visible again. So, the sprite is visible again and all works fine. HOWEVER, my problem is that when I go into the house without talking to the old man, as soon as I enter the house, the game freezes... Or at least the character freezes. I've been trying to solve this for like 2 weeks but to no avail... any help?

    Here are my 2 scripts:

    The first one, when the old man leads me to his house (this one works fine)

    Spoiler:


    Here is the LEVEL script:

    Spoiler:


    I'm not sure If I posted this same issue here before and pmed a lot of people but I still didn't get it to work. Oh and the type of level script I'm doing is the "validates values, loads handler to 0x30000EB0" since that's the only one I know how to use and if I try to experiment with the other types it leads to failure.. so yeah.... Oh and people keep telling me stuff like don't use flags used in the game and variables use in the game but I already know that and I tried using different variables and flags it made no difference.

    I hope you guys didn't forget my script.. I tried fixin it for like 3 weeks now and its NOT that variable number that's the problem!
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    I hope you guys didn't forget my script.. I tried fixin it for like 3 weeks now and its NOT that variable number that's the problem!

    Why not just try to re-script it from scratch, and try to use that one? Don't use the other one as a reference; maybe it's just some stupid mistake that can be easily fixed. I would help, but I have absolutely no idea.
     

    Hiche..

     
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Are there any problems with this script?
    Spoiler:

    Nothing is wrong, but the rename part won't work, unless setvar 0x8004 0x0 is added.
     
  • 1
    Posts
    15
    Years
    • Seen Jun 14, 2009
    can anyone give me a seucune event for pokemonemerald? (dont remember how seucune or what it was spells) :)
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    can anyone give me a seucune event for pokemonemerald? (dont remember how seucune or what it was spells) :)

    This is a Script Help Thread. Not a Script Give Thread.

    Learn how to script yourself, as well as spell.
     

    destinedjagold

    I do not exist.
  • 8,593
    Posts
    17
    Years
    • Seen May 26, 2024
    I have a question about XSE scripting...

    For example, I am done scripting SCRIPT A, e.g.;
    Code:
    #Dynamic 0x900000
    
    #org @start
    lock
    faceplayer
    checkflag 0x200
    message @1
    boxset 0x6
    release
    end
    
    #org @done
    release
    end
    
    #org @1
    = Hi!

    and I compiled it in the ROM and it took the offset 0x900000 and consumed it all the way to 0x900100.
    and then I compiled SCRIPT B, e.g.;

    Code:
    #Dynamic 0x900101
    
    #org $start
    lock
    faceplayer
    message @1
    boxset 0x6
    release
    end
    
    #org @1
    = Who was that guy?

    and compiled successfully and it took offsets 0x900101 to 0x900200...

    then suddenly, I tried it out in the ROM and SCRIPT A didn't worked the way I wanted it to. So I opened SCRIPT A and added some codes to perfect it.
    so it turned like this;

    Code:
    #Dynamic 0x900000
    
    #org @start
    lock
    faceplayer
    checkflag 0x200
    if 0x1 goto @done
    message @1
    boxset 0x6
    setflag 0x200
    release
    end
    
    #org @done
    release
    end
    
    #org @1
    = Hi!

    now my question...
    since I already compiled SCRIPT A first and then I compiled SCRIPT B and afterwards I edited SCRIPT A and compiled it back, will XSE overwrite the offsets of SCRIPT B or will find free space either automatically or the offsets after SCRIPT B?

    Thanks~
     

    0m3GA ARS3NAL

    Im comin' home...
  • 1,816
    Posts
    16
    Years
    Can someone show me how to make a script check weather your bag is full?

    If you are talking about the item bag... (You probably are, but some people talk about bag as in pokemon in the bag...)

    To check for a full bag of items, try using these 3 lines of code in your script
    (Assuming you are using XSE)

    checkitemamount 0x4001 0x1
    compare LASTRESULT 0x0
    if 0x1 goto 0xOFFSET

    You would make the Offset the offset that you choose to tell the person there bag is full
    Example:
    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    checkitemamount 0x4001 0x1
    compare LASTRESULT 0x0
    if 0x1 goto 0xfullbag
    message @youhavespace
    boxset 6
    release
    end

    #org @fullbag
    message @bagisfull
    boxset 6
    release
    end

    #org @youhavespace
    = You have space in\nyour bag for items.

    #org @bagisfull
    = Your bag is full.

    the example script would tell you if your bag was full or not.

    If you use Pokescript... sorry about your luck, but I script exclusively in XSE
    Hrmm.... I'll be a nice person and tell you it in Pokescript also...

    #raw 0x46 0x4001 0x1
    compare LASTRESULT 0x0
    if 0x1 goto @FULLBAGOFFSET
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022

    since I already compiled SCRIPT A first and then I compiled SCRIPT B and afterwards I edited SCRIPT A and compiled it back, will XSE overwrite the offsets of SCRIPT B or will find free space either automatically or the offsets after SCRIPT B?

    Thanks~

    No, I don't think it will. The pointer that you give XSE is simply a pointer that XSE uses to find the next free space. It won't override whatever's already there.


    Also, I want to make a sort of intro sequence. For example, I want to have the player in bed, and then, I want to fadescreen and move the camera to a different map, and show an event that's happening there, and then return back to the player. Does anyone have any idea how to do that? Thanks.
     
    Last edited:

    Hiche..

     
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    No, I don't think it will. The pointer that you give XSE is simply a pointer that XSE uses to find the next free space. It won't override whatever's already there.


    Also, I want to make a sort of intro sequence. For example, I want to have the player in bed, and then, I want to fadescreen and move the camera to a different map, and show an event that's happening there, and then return back to the player. Does anyone have any idea how to do that? Thanks.

    Well, that requires level scripting, and I am sure you know how to move the camera.

    So, make a level script at the start of the game, and it will work(Like the truck, at the beginning, in Ruby)
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    Well, that requires level scripting, and I am sure you know how to move the camera.

    So, make a level script at the start of the game, and it will work(Like the truck, at the beginning, in Ruby)

    M'kay. Time to learn how to level script. ^^
     

    Hoshiko Aki

    Avatar rules
  • 109
    Posts
    15
    Years
    • Seen Oct 17, 2011
    Can some buddy make a give away script? the pokemon who's giving away is bulbasaur
     
    Status
    Not open for further replies.
    Back
    Top