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

XSE Scripting Tutorial

Status
Not open for further replies.

DemonParia

Gangsterfresh Swagmaster
104
Posts
15
Years
    • Seen Oct 6, 2015
    Ugh! I've been working on this for a while. I'm using XSE (XSE is AWESOME) and put this script on it. However, it reports an error on the line 'givepokemon 3 100 1'. This is the full script:

    #dynamic 0x2E4FB7
    #org @begin
    lock
    faceplayer
    checkflag 0x200
    if B_true goto @done
    message @person
    boxset 6
    givepokemon 3 100 1
    setflag 0x200
    release
    end

    #org @done
    message @person2
    boxset 6
    release
    end

    #org @person
    @person = Ah! Hello, NIKOLAI. The POKéMON\nyou wanted is here.\pTake it, and deposit the money\nlater.

    #org @person2
    @person2 = Wait! You're not NIKOLAI!\pHmm. The POKéMON seems to like you.\nI guess you can keep it.



    I just want to know if I'm using the right givepokemon thing.
     
    Last edited:

    Madridista

    -#666
    40
    Posts
    15
    Years
  • @demonparia
    Spoiler:

    After the 'givepokemon' command, 0x(pokemon's pokedex number translated into hex) 0x(level) 0x(item number in hex) always add 0x0 0x0 0x0.
     

    DemonParia

    Gangsterfresh Swagmaster
    104
    Posts
    15
    Years
    • Seen Oct 6, 2015
    When I do what you said, there is still an error on the line 'givepokemon' even with doing what you said to do. "Error 6 Overflow on line 10. Wrong parameter type. Line: givepokemon 0x3 0x100 0x1 0x0 0x0 0x0"

    So, what now?

    EDIT: Nevermind, I figured it out.
     
    Last edited:
    20
    Posts
    15
    Years
    • Seen Oct 26, 2010
    Trainer help, please.

    I want to make a trainer, but i don't know how to put in the pokemon of the trainer..
    Can someone tell me how to do that?
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • It would seem your ROM is corrupt. Try putting the script into a new offset, and if it still happens, then you'll need to start again (unless you have back ups).
    I don't think his #dynamic was actually free space, because I found that some clusters of FFFF~etc are actually, in some obscure way, required by the ROM.
    Any free space past 0x800000 (half the ROM size) is usually safe.
    Also, its \n, not /n.
    My XSE gives an error on these words:
    - Lock
    - FacePlayer
    - Release
    - End

    I don't get it. Can someone help? Please??
    Time to re-download? It should work.
    __________________
    My signature would have been received very badly in this thread, so I removed it :P
     
    20
    Posts
    15
    Years
    • Seen Oct 26, 2010
    I used a give script, but it won't work. it is TM 29, it says i have it. if i look in my bag, i don't have it. Can someone check if it's good?

    #dynamic 0x800000

    #org @potion
    giveitem 0x13D 0x0 0x1
    end


    Ps. Sorry for my english
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    I used a give script, but it won't work. it is TM 29, it says i have it. if i look in my bag, i don't have it. Can someone check if it's good?

    #dynamic 0x800000

    #org @potion
    giveitem 0x13D 0x0 0x1
    end


    Ps. Sorry for my english

    Try this:

    #dynamic 0x800000

    #org @potion
    giveitem 0x13D 0x1
    end

    or

    #dynamic 0x800000

    #org @potion
    giveitem 0x13D 0x1 0x0
    end

    Hope that helps.
     
    20
    Posts
    15
    Years
    • Seen Oct 26, 2010
    Try this:

    #dynamic 0x800000

    #org @potion
    giveitem 0x13D 0x1
    end

    or

    #dynamic 0x800000

    #org @potion
    giveitem 0x13D 0x1 0x0
    end

    Hope that helps.

    Thanks, it works. Only now they keep giving the item xD. But i don't mind, it's really handy.
     
    12
    Posts
    15
    Years
    • Seen Apr 17, 2011
    Whenever I go to Open, before I can compile, it can never find the rom right for some reason. Any way to fix this?
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    Thanks, it works. Only now they keep giving the item xD. But i don't mind, it's really handy.

    Yes, because you need a flag:

    Code:
    #dynamic 0x800000
    
    #org @potion
    checkflag 0x1001
    if B_TRUE goto @end
    giveitem 0x13D 0x1 0x0
    setflag 0x1001
    end
    
    #org @end
    release
    end

    Anyway, since it's a person, it would be nice it he/she says something else and not just give you the item.


    Whenever I go to Open, before I can compile, it can never find the rom right for some reason. Any way to fix this?
    Could you explain a bit more what do you mean exactly?
     
    12
    Posts
    15
    Years
    • Seen Apr 17, 2011
    When I go to file and open to open the rom, I go where my rom is at, where it always is, and when I open the folder it says the folder is empty, but when I open it normaly through the desktop the rom is right where it should be.
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    When I go to file and open to open the rom, I go where my rom is at, where it always is, and when I open the folder it says the folder is empty, but when I open it normaly through the desktop the rom is right where it should be.

    You need to select GameBoy Advance ROMs from the Open dialog, indeed.
     

    VanillaThunderbolt

    Generic User Title
    94
    Posts
    15
    Years
    • Seen Mar 1, 2012
    Mmkay, I'm a scripting noob, not gonna lie.
    I followed the tutorial and understand basic scripting.
    How do I
    1) Make it so after the script the player moves a certain direction? [Say down 1 space.]
    2) After another event, this script isn't there anymore? [Like with the old guy in FR before/after you get the Pokedex].
     
    12
    Posts
    15
    Years
    • Seen Apr 17, 2011
    Whenever I click the open button it goes to my documents, so I do not see anything about Open dialog. Sorry I am very new to this.
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    Mmkay, I'm a scripting noob, not gonna lie.
    I followed the tutorial and understand basic scripting.
    How do I
    1) Make it so after the script the player moves a certain direction? [Say down 1 space.]
    2) After another event, this script isn't there anymore? [Like with the old guy in FR before/after you get the Pokedex].

    1) You just need to use the applymovement command (plus waitmovement 0x0).
    The applymovement command has 2 params. The first one is the people number, the second is the pointer to the movements. For movements, see the tutorials around here.

    2) In this case you need to use checkflag/setflag.
     
    Status
    Not open for further replies.
    Back
    Top