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

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
    • Seen Dec 23, 2023
    #org $start
    checkflag 0x828
    if b_true goto $done
    message $1
    boxset 6
    applymovement 0x04 $move
    pausemove 0x0
    pause 0x30
    message $Hello
    boxset 6
    playsound 0x13E
    nop
    nop
    applymovement 0x04 $move2
    pausemove 0x0
    message $hello
    boxset 6
    fadesound 0x12C
    nop
    nop
    release
    end

    #org $done
    release
    end

    #org $move
    #raw 0x10 0x10 0x10 0x10
    #raw 0x10 0x10 0x12 0x12
    #raw 0x12 0x12 0x12 0x12
    #raw 0x12 0xFE

    #org $move2
    #raw 0x13 0x13 0x13 0x13
    #raw 0x13 0x13 0x11 0x11
    #raw 0x11 0x11 0x11 0x11 0xFE

    #org $hello
    $1 1 = Hello,Whats your name\n\v\h01:My name is \v\h01.\lOh hello. im \v\h06\nI heard about the new\lType discoverie. Then when\nI got here i heard he\lwas Obbducted.\n\v\h01: I know, i have to find\lhim. hes my-\n\v\h06: Here have this\lI wont be needing that..

    #org $2
    $2 1 =Im going back to HOENN.

    #org $take
    special 0x16F
    message $got
    boxset 6
    setflag 0x200
    release
    end


    #org $3
    3 1 =You Received Pokedex.


    errors:
    red-lack
    blue-where does this connect to the script?
    also, apply spaces in between #orgs

    also, post the problem of your script, not just post a script and done.
     

    Vrai

    can you feel my heart?
    2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    I've got a problem with movement scripts on XSE. I dunno if I'm just missing something, or what.

    Here's my script:

    #dynamic 0x2DD318

    #org @start
    msgbox @idkwhatisay
    boxset 0x2
    msgbox @kickhim
    boxset 0x5
    compare LASTRESULT 1
    if b_true goto @kickhim!
    else goto @noway
    release
    end

    #org @kickhim!
    applymovement 0x08 @move
    waitmovement 0
    applymovement MOVE_PLAYER @move2
    waitmovement 0
    applymovement 0x08 @move
    waitmovement 0
    applymovement MOVE_PLAYER @move2
    waitmovement 0
    applymovement 0x08 @move
    waitmovement 0
    applymovement MOVE_PLAYER @move2
    waitmovement 0
    applymovement 0x08 @move3
    waitmovement 0
    msgbox @why?
    boxset 0x6
    release
    end

    #org @noway
    msgbox @nowayfool
    boxset 0x6
    release
    end

    #org @nowayfool
    = I guess that's a bad idea.

    #org @why?
    = Why would you kick me? \nI'm gonna cry now...

    #org @kickhim
    = Do you want to kick him?

    #org @idkwhatisay
    = Zzzz... Snork...\n...There's a sign taped \ito his back...\iIt reads, "Kick me."

    Every time that I debug it, it says:

    Error 13 'Type mismatch' on line 15.
    Missing #define or parameter.

    Line: applymovement 0x08 @move

    I'm not sure if I did something stupid or what. If you have the time, help please. :)
     
    857
    Posts
    15
    Years
  • You didn't use applymovement Properly.
    Changes in Bold
    Code:
    #dynamic 0x2DD318
    
    #org @start
    msgbox @idkwhatisay
    boxset 0x2
    msgbox @kickhim
    boxset 0x5
    compare LASTRESULT 1
    if b_true goto @kickhim!
    else goto @noway
    release
    end
    
    #org @kickhim!
    [B]applymovement 0x08 @move
    waitmovement 0x0[/B]
    msgbox @why?
    boxset 0x6
    release
    end
    
    #org @noway
    msgbox @nowayfool
    boxset 0x6
    release
    end
    
    [B]#org @move
    #raw 0x(Movement No) ... 0xFE "FE is end movement [/B]
    
    #org @nowayfool
    = I guess that's a bad idea.
    
    #org @why?
    = Why would you kick me? \nI'm gonna cry now...
    
    #org @kickhim
    = Do you want to kick him?
    
    #org @idkwhatisay
    = Zzzz... Snork...\n...There's a sign taped \[B]l[/B]to his back...\[B]l[/B]It reads, "Kick me."
    FR/LG Movements:

    Spoiler:


    R/S Movements:
    Spoiler:
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    I dont know if this Thread does pokescrript scripts anymore but:

    #org $start
    checkflag 0x828
    if b_true goto $done
    message $1
    boxset 6
    applymovement 0x04 $move
    pausemove 0x0
    pause 0x30
    message $Hello
    boxset 6
    playsound 0x13E
    nop
    applymovement 0x04 $move2
    message $Hello
    boxset 6
    pausemove 0
    fadesound 0x12C
    nop
    release
    end

    #org $done
    release
    end

    #org $move
    #raw 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0xFE

    #org $move2
    #raw 0x13 0x13 0x13 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

    #org $hello
    $1 1 =Hello,Whats your name\n\v\h01:My name is \v\h01.\lOh hello. im \v\h06\nI heard about the new\lType discoverie. Then when\nI got here i heard he\lwas Obbducted.\n\v\h01: I know, i have to find\lhim. hes my-\n\v\h06: Here have this\lI wont be needing that..

    #org $2
    $2 1 =Im going back to HOENN.


    #org $take
    special 0x16F
    message $got
    boxset 6
    setflag 0x200
    release
    end

    #org $3
    3 1 =You Received Pokedex.


    He is supposed to give you a pokedex and walk off.


    What Time said, and there is a little problem here:

    #org $3
    $3 1 =You Received Pokedex.

    You forgot the $ before the pointer.
     

    zak

    xpert trainer
    244
    Posts
    19
    Years
  • Did you try decompiling the Oak script on FR/LG? That acts pretty much the same as you want. If you want the player to never return to that map you should remove any map connection and flight position.

    i looked at that script but there was tons and tons of movements and stuff i didn't understand but i'l take another look i guess.
     

    sharkshank

    Banned
    47
    Posts
    15
    Years
  • I posted this agin because i need to know how to fix thuis
    I dont know if this Thread does pokescrript scripts anymore but:

    #org $start
    checkflag 0x828
    if b_true goto $done
    message $1
    boxset 6
    applymovement 0x04 $move
    pausemove 0x0
    pause 0x30
    message $Hello
    boxset 6
    playsound 0x13E
    nop
    applymovement 0x04 $move2
    message $Hello
    boxset 6
    pausemove 0
    fadesound 0x12C
    nop
    release
    end
    #org $done
    release
    end
    #org $move
    #raw 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0xFE
    #org $move2
    #raw 0x13 0x13 0x13 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
    #org $hello
    $1 1 =Hello,Whats your name\n\v\h01:My name is \v\h01.\lOh hello. im \v\h06\nI heard about the new\lType discoverie. Then when\nI got here i heard he\lwas Obbducted.\n\v\h01: I know, i have to find\lhim. hes my-\n\v\h06: Here have this\lI wont be needing that..
    #org $2
    $2 1 =Im going back to HOENN.

    #org $start
    lock
    faceplayer
    checkflag 0x829
    message $1
    boxset 6
    setflag 0x829
    release
    end

    #org $done
    message $2
    boxset 6
    special 0x16F
    release
    end


    #org $3
    $3 1 =You Received Pokedex.

    He is supposed to give you a pokedex and walk off. but insted it glitches like hell and makes my emulator close. im new to scripting so dont Curse me or make bad comments.
    (You can laugh tho..:laugh:)
    I just dont know where to place things..
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    I posted this agin because i need to know how to fix thuis
    I dont know if this Thread does pokescrript scripts anymore but:

    #org $start
    checkflag 0x828
    if b_true goto $done
    message $1
    boxset 6
    applymovement 0x04 $move
    pausemove 0x0
    pause 0x30
    message $Hello
    boxset 6
    playsound 0x13E
    nop
    applymovement 0x04 $move2
    message $Hello
    boxset 6
    pausemove 0
    fadesound 0x12C
    nop
    release
    end
    #org $done
    release
    end
    #org $move
    #raw 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0xFE
    #org $move2
    #raw 0x13 0x13 0x13 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
    #org $hello
    $1 1 =Hello,Whats your name\n\v\h01:My name is \v\h01.\lOh hello. im \v\h06\nI heard about the new\lType discoverie. Then when\nI got here i heard he\lwas Obbducted.\n\v\h01: I know, i have to find\lhim. hes my-\n\v\h06: Here have this\lI wont be needing that..
    #org $2
    $2 1 =Im going back to HOENN.

    #org $start
    lock
    faceplayer
    checkflag 0x829
    message $1
    boxset 6
    setflag 0x829
    release
    end

    #org $done
    message $2
    boxset 6
    special 0x16F
    release
    end


    #org $3
    $3 1 =You Received Pokedex.

    He is supposed to give you a pokedex and walk off. but insted it glitches like hell and makes my emulator close. im new to scripting so dont Curse me or make bad comments.
    (You can laugh tho..:laugh:)
    I just dont know where to place things..

    The script has a lot of errors. You placed them randomly, it won't work that way.
    Try reading thethethethe's tutorial. It will help.
     

    zak

    xpert trainer
    244
    Posts
    19
    Years
  • Halp =]

    Wells im making this script (with very little knowledge of using xse) and basicly i wan't the proffesor to give the character a pokemon, do his lil speech and then walk 1 step down(into a warp) and leave the house and never return, i have most of the script

    #Dynamic 0x812000

    #org @start
    lock
    faceplayer
    msgbox @text
    boxset 0x6
    checkflag 0x828
    if 0x0 goto @give
    if 0x1 goto @sry
    release
    end

    #org @text
    = Hey! sorry about this but i've got a \ntrain to catch i only\p stopped by to give you this!\nEnjoy!

    #org @give
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    waitfanfare
    setflag 0x828
    msgbox @yay
    boxset 0x6
    release
    end

    #org @sry
    msgbox @sorry
    boxset 0x6
    end

    #org @yay
    = You recieved Charmander!

    #org @sorry
    = I can't give you anymore.

    And so far all of this works fine, but i have no idea how to make him leave the house and never return, any1 help please?:'(
     

    machomuu

    Stuck in Hot Girl Summer
    10,507
    Posts
    16
    Years
  • I have a question

    This script
    Spoiler:


    But when I go to it for the first time, it just goes to @howa, before flag 0x830 is set, help please!
     

    sharkshank

    Banned
    47
    Posts
    15
    Years
  • What

    Whats wrong with this script?

    #org $begin
    lock
    faceplayer
    checkflag 0x232
    if B_true goto $gotit
    message $q
    boxset 6
    message $mygod
    boxset 6
    givepokemon 155 5 0
    message $NameCyndaquil
    boxset 5
    setflag 0x232
    setflag 0x828
    release
    end

    #org $gotit
    message $hi
    boxset 6
    release
    end

    #org $hi
    $hi 1 = Hello son. Hows the\njourney going?\pFind anything?

    #org $q
    $q 1 = Happy birthday son, i \n have somthing \pto tell you...You know \n before your father passed\p away he told me that \nhis son was Destined to be\pa pokemon trainer'.And \nhe also made a will. for \pyou to have this \npokemon. Now go out there \p and make me and your father \nproud.

    #org $mygod
    $mygod 1 = You received a Cyndaquil!

    message $NameCharm
    $NameCharm 1 = Would You like to give \nCyndaquil a name?
    boxset 5
    compare LASTRESULT 1
    if b_False goto $seeya
    Namepokemon
    setflag 0x203

    message $seeya
    $seeya 1 = Thanks!
    release
    end


    It glitches at the end.
     

    machomuu

    Stuck in Hot Girl Summer
    10,507
    Posts
    16
    Years
  • Whats wrong with this script?

    #org $begin
    lock
    faceplayer
    checkflag 0x232
    if B_true goto $gotit
    message $q
    boxset 6
    message $mygod
    boxset 6
    givepokemon 155 5 0
    message $NameCyndaquil
    boxset 5
    setflag 0x232
    setflag 0x828
    release
    end
    #org $gotit
    message $hi
    boxset 6
    release
    end
    #org $hi
    $hi 1 = Hello son. Hows the\njourney going?\pFind anything?
    #org $q
    $q 1 = Happy birthday son, i \n have somthing \pto tell you...You know \n before your father passed\p away he told me that \nhis son was Destined to be\pa pokemon trainer'.And \nhe also made a will. for \pyou to have this \npokemon. Now go out there \p and make me and your father \nproud.
    #org $mygod
    $mygod 1 = You received a Cyndaquil!
    message $NameCharm
    $NameCharm 1 = Would You like to give \nCyndaquil a name?
    boxset 5
    compare LASTRESULT 1
    if b_False goto $seeya
    Namepokemon
    setflag 0x203
    message $seeya
    $seeya 1 = Thanks!
    release
    end

    It glitches at the end.
    what do you mean by "at the end"? If you tell me, I can help you, even though I script with XSE, I still understand pokescript.
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Wells im making this script (with very little knowledge of using xse) and basicly i wan't the proffesor to give the character a pokemon, do his lil speech and then walk 1 step down(into a warp) and leave the house and never return, i have most of the script

    #Dynamic 0x812000

    #org @start
    lock
    faceplayer
    msgbox @text
    boxset 0x6
    checkflag 0x828
    if 0x0 goto @give
    if 0x1 goto @sry
    release
    end

    #org @text
    = Hey! sorry about this but i've got a \ntrain to catch i only\p stopped by to give you this!\nEnjoy!

    #org @give
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    waitfanfare
    setflag 0x828
    msgbox @yay
    boxset 0x6
    release
    end

    #org @sry
    msgbox @sorry
    boxset 0x6
    end

    #org @yay
    = You recieved Charmander!

    #org @sorry
    = I can't give you anymore.

    And so far all of this works fine, but i have no idea how to make him leave the house and never return, any1 help please?:'(

    Well, to make him walk away, you will need applymovement command, hidesprite, and another setflag.

    So replace this:
    #org @give
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    waitfanfare
    setflag 0x828
    msgbox @yay
    boxset 0x6
    release
    end

    with this:

    #org @give
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    waitfanfare
    setflag 0x828
    msgbox @yay
    boxset 0x6
    applymovement 0x[people event number] @leave
    waitmovement 0x0
    hidesprite 0x[people event number]
    setflag 0x[any flag]

    release
    end
    ....
    #org @leave
    #raw 0x10
    #raw 0xFE


    Notice the "people event number thing", you will find in in Advance Map, just put it. Like, the people event number is 1, then it would be 0x1.
    waitmovement 0x0 is the pause command for applymovement, it should be there.
    Hidesprite is the command that makes the PROF. you want, to disappear.
    If you noticed, another setflag is put, it's to make sure the person does not reappear.
    If you put setflag 0x200 for example, go to Advance map, and put the PROF.'s, you want to disappear, people ID 0200
     

    sharkshank

    Banned
    47
    Posts
    15
    Years
  • How come

    I started using XSE, people saying its easy and all..
    Well this script freezes when i walk on the ..

    #Dynamic 0x800001 - Is this the offset im supposted to use in advanced map?
    #org @start
    checkflag 0x828
    if 0x0 goto @hey!
    if 0x1 goto @end
    end

    #org @hey!
    lock
    msgbox @icant
    boxset 0x6
    applymovement 0xFF @back
    waitmovement 0x0
    release
    end

    #org @icant
    = I can't go out of the house/nwithout saying bye..

    #org @back
    #raw 0x11 0xFE

    #org @end
    release
    end

     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    I started using XSE, people saying its easy and all..
    Well this script freezes when i walk on the ..

    #Dynamic 0x800000 - Is this the offset im supposted to use in advanced map?
    #org @start
    checkflag 0x828
    if 0x0 goto @hey!
    if 0x1 goto @end
    end

    #org @hey!
    lock
    msgbox @icant
    boxset 0x6
    applymovement 0xFF @back
    waitmovement 0x0
    release
    end

    #org @icant
    = I can't go out of the house/nwithout saying bye..

    #org @back
    #raw 0x11 0xFE

    #org @end
    release
    end



    It freezes because in Advance map, the green S has on the right, Unknown and var number right?
    Change the unknown to 0003, and the var number to 5040 or 4050 or 7C40.
     

    sharkshank

    Banned
    47
    Posts
    15
    Years
  • Man..

    I made this in pokescript, but it had a problem, when the script finished
    and you spoke to here again she would give you another pokemon.
    I cant find where or how to stop scripts repeating there self..

    Also, i was wondering if someone could help me Change this to a XSE script.
    Because Pokescript has problems and XSE is easyer to use.

    Thanks.

    #org $begin
    lock
    faceplayer
    checkflag 0x828
    if B_true goto $gotit
    message $q
    boxset 6
    message $mygod
    boxset 6
    givepokemon 155 6 139
    setflag 0x828
    release
    end
    #org $gotit
    message $hi
    boxset 6
    release
    end
    #org $hi
    $hi 1 = Hello son. Hows the\njourney going?\pFind anything?
    #org $q
    $q 1 =Happy birthday son,i\n have somthing very important\pto tell you...You know that scientist\nthat got abducted.. well he..\phe is your father!\n\v\h01: Mom why dident you tell me\pthis before! ..... ..\nMOM: Im sorry..But son promise me\pOne thing: Find your father.\n\v\h01: Mom, Thats a Promise..\pMOM: Well have this pokemon\nIt will protect you in your quest.
    #org $mygod
    $mygod 1 =You received a Cyndaquil!
    message $NameCharm
    $NameCharm 1 = Please Find your father\nI hope he's ok..
    #org $done
    setflag 0x200
    release
    end
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011

    #Dynamic 0x800001 - Is this the offset im supposted to use in advanced map?


    That's a commonly misunderstood thing. XSE is smart enough: all it needs is an offset where to start searching free space from, using #dynamic.
    After compiling a script, the Compiler Output will show you the actual offset of each dynamic label.

    Spoiler:


    Spoiler:
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top