• 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.
215
Posts
11
Years
    • Seen Jul 14, 2020
    Simple Pick up Item Scripting

    Someone please, I'm begging you, PLEASE, show me how to make a pick up item script! I have been looking for 4 days now and no where online shows how to make a pick up item script! I am about to go insane! This is what I want to happen. Player goes up to the item on the ground, picks it up, and the player has the item. I am trying to make the player pick up 5 pokeballs right now and I am having troubles! =( Here is my script:

    #org $script
    lock
    faceplayer
    checkflag 0x1201
    if 0x01 goto $done
    giveitem 0x04 0x05
    boxset 6
    setflag 0x1201
    removesprite 0x5
    release
    end

    #org $done
    removesprite 0x5
    boxset 6
    release
    end

    What happens is after I pick up the pokeball, i get my items but the sprite is still there and the sprite is only removed after I leave the screen, How do I make the sprite leave ASAP? Please help me!

    I am new to this site so Idk how everything works, but if you know how to fix this problem, please PM me or reply here!
     

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • I would first suggest giving up on Pokescript since it's buggy as hell and go for XSE.
    After you do that, you will see that all you need is one giveitem command and a flag and everything will be the way you want.
     

    iLoveHate

    Hmmmmmm.... :D
    35
    Posts
    11
    Years
  • Someone please, I'm begging you, PLEASE, show me how to make a pick up item script! I have been looking for 4 days now and no where online shows how to make a pick up item script! I am about to go insane! This is what I want to happen. Player goes up to the item on the ground, picks it up, and the player has the item. I am trying to make the player pick up 5 pokeballs right now and I am having troubles! =( Here is my script:

    #org $script
    lock
    faceplayer
    checkflag 0x1201
    if 0x01 goto $done
    giveitem 0x04 0x05
    boxset 6
    setflag 0x1201
    removesprite 0x5
    release
    end

    #org $done
    removesprite 0x5
    boxset 6
    release
    end

    What happens is after I pick up the pokeball, i get my items but the sprite is still there and the sprite is only removed after I leave the screen, How do I make the sprite leave ASAP? Please help me!

    I am new to this site so Idk how everything works, but if you know how to fix this problem, please PM me or reply here!

    First of you need XSE 1.1.1 not pkescript: the 1 from Wahackpokemon is v1.0.0 update it to xse 1.1.1. Then you have to make this script:

    Spoiler:


    this should work if it doesnt feel free to Pm me cuz i know its annoying that something should work and it doesnt. exept it says found 1 pokeball while you received 5 pokeballs
     
    Last edited:

    RetroRoller

    Trailer Trash
    111
    Posts
    12
    Years
  • I made a giant level script for a room in my hack, and while the code itself is fine, XSE gives me a compiler error. "Missing dynamic label on line 38". I can guarantee you that a dynamic label shouldn't need to be on line 38. Here's the code.

    Be warned, it's long, but I've pointed out which line gives me the error.

    Spoiler:
     

    SKRoy

    Pokémon Hacker
    66
    Posts
    14
    Years
    • Seen Feb 8, 2016
    I have made a script, but when I talk to the person nothing happend... I have tried to change things, but sometimes the game just freeze...

    #dynamic 0x800000

    #org @start
    checkflag 0x1100
    if 0x1 goto @done2
    checkflag 0x820
    if 0x1 goto @done
    applymovement 0xFF @move
    waitmovement 0x0
    applymovement 0x05 @move1
    waitmovement 0x0
    lock
    faceplayer
    message @talk1 0x6
    release
    end

    #org @talk1
    = You don't have your first badge!

    #org @move1
    #raw 0x10
    #raw 0xFE

    #org @move
    #raw 0x12
    #raw 0xFE

    #org @done
    lock
    faceplayer
    message @1 0x6
    givepokemon 0x385 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    message @2 0x4
    waitfanfare
    closeonkeypress
    setflag 0x1100
    message @3 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    message @4 0x6
    release
    end

    #org @done2
    release
    end

    #org @name
    call 0x1A74EB
    return

    #org @1
    = I see you have your first badge!\nNow I have something for you!

    #org @2
    = [black_fr]You received a Castform!

    #org @3
    = [black_fr]Would you like to give a\nnickname to Castform?

    #org @4
    = Please take care of Castform!
     
    5,256
    Posts
    16
    Years
  • I made a giant level script for a room in my hack, and while the code itself is fine, XSE gives me a compiler error. "Missing dynamic label on line 38". I can guarantee you that a dynamic label shouldn't need to be on line 38. Here's the code.

    Be warned, it's long, but I've pointed out which line gives me the error.

    Spoiler:
    This had me stumped for a while but I've finally noticed the error.

    You need to change this:
    Code:
    #raw @yaystudent3
    #raw 0x66
    #raw 0xFE

    to this:

    Code:
    [b]#org[/b] @yaystudent3
    #raw 0x66
    #raw 0xFE
     

    BrandoSheriff

    Has a tendency to figure things out
    776
    Posts
    16
    Years
  • I'm confused with giving moves new descriptions. Every time I do, the game ends up glitching the text, and some of it appears on other sides, overlapping and whatnot. Anyone who has added new descriptions through scripts should understand. How would I go about doing this perfectly, and what is the most text I can use as a description?
     

    SKRoy

    Pokémon Hacker
    66
    Posts
    14
    Years
    • Seen Feb 8, 2016
    I don't know what's wrong with this script, but when I talk to the person where te script is for I only get the movement, no text... So what's wrong with this script?

    #dynamic 0x800000

    #org @start
    checkflag 0x1150
    if 0x1 goto @done2
    checkflag 0x820
    if 0x1 goto @done
    message @talk 0x6
    applymovement 0xFF @move
    waitmovement 0x0
    release
    end

    #org @talk
    = You don't have your first badge!

    #org @move
    #raw 0x12
    #raw 0xFE

    #org @done
    lock
    faceplayer
    message @1 0x6
    givepokemon 0x385 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    message @2 0x4
    waitfanfare
    closeonkeypress
    setflag 0x1150
    message @3 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    message @4 0x6
    release
    end

    #org @done2
    release
    end

    #org @name
    call 0x1A74EB
    return

    #org @1
    = I see you have your first badge!\nNow I have something for you!

    #org @2
    = [black_fr]You received a Castform!

    #org @3
    = [black_fr]Would you like to give a\nnickname to Castform?

    #org @4
    = Please take care of Castform!
     
    17
    Posts
    13
    Years
    • Seen Oct 15, 2018
    I don't know what's wrong with this script, but when I talk to the person where te script is for I only get the movement, no text... So what's wrong with this script?

    #dynamic 0x800000

    #org @start
    checkflag 0x1150
    if 0x1 goto @done2
    checkflag 0x820
    if 0x1 goto @done
    message @talk 0x6
    applymovement 0xFF @move
    waitmovement 0x0
    release
    end

    #org @talk
    = You don't have your first badge!

    #org @move
    #raw 0x12
    #raw 0xFE

    #org @done
    lock
    faceplayer
    message @1 0x6
    givepokemon 0x385 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    message @2 0x4
    waitfanfare
    closeonkeypress
    setflag 0x1150
    message @3 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    message @4 0x6
    release
    end

    #org @done2
    release
    end

    #org @name
    call 0x1A74EB
    return

    #org @1
    = I see you have your first badge!\nNow I have something for you!

    #org @2
    = [black_fr]You received a Castform!

    #org @3
    = [black_fr]Would you like to give a\nnickname to Castform?

    #org @4
    = Please take care of Castform!

    In XSE could you go to Help then click About and in the bottom right corner tell me what version you have? ex. 1.0.1
     

    RetroRoller

    Trailer Trash
    111
    Posts
    12
    Years
  • This had me stumped for a while but I've finally noticed the error.

    You need to change this:
    Code:
    #raw @yaystudent3
    #raw 0x66
    #raw 0xFE
    to this:

    Code:
    [B]#org[/B] @yaystudent3
    #raw 0x66
    #raw 0xFE

    Thank you muchly! It's the sort of thing I should've noticed myself, but the script took me about an hour to write and it was like 2 in the morning.
     

    SKRoy

    Pokémon Hacker
    66
    Posts
    14
    Years
    • Seen Feb 8, 2016
    In XSE could you go to Help then click About and in the bottom right corner tell me what version you have? ex. 1.0.1

    I have version 1.0.0, but is that why the script doesn't work or is there something wrong in the script?
     
    17
    Posts
    13
    Years
    • Seen Oct 15, 2018
    I have version 1.0.0, but is that why the script doesn't work or is there something wrong in the script?

    That is most likely causing the error. You need the latest XSE (Which is 1.1.1) which can be found in two links:

    4shared: http://www.4shared.com/rar/xn-E0lPP/XSE_Upload.html
    Mediafire: http://www.mediafire.com/?gr5wtvmyiqfasmh

    The 4shared is a .rar archive and the mediafire is a .zip archive. Though you need an account to download from 4shared. Download XSE 1.1.1 and compile the exact same script with the new XSE and replace the old script offset with the one from the compiler. Save in AMap and test again, it should work now.
     

    Acecaldwell01

    Spriter
    99
    Posts
    11
    Years
    • Seen Jun 15, 2019
    FLAG TROUBLE?

    I need help with my script. I think it is the flag number but I tried a bunch and they dont appear to be used but still... and by the way, is there a program to find emty flags? Back on subject. Here is my code:

    Code:
    '---------------
    #org 0x8000F3
    checkflag 0x808
    if 0x1 call 0x880011C
    msgbox 0x8800138 MSG_FACE '"I have a PIKACHU but do not have\n..."
    fanfare 0x13E
    msgbox 0x880018B MSG_NORMAL '"[player] obtained a\nPIKACHU!"
    waitfanfare
    givepokemon 0x19 0x10 0x0 0x0 0x0 0x0
    setflag 0x808
    release
    end
    
    '---------------
    #org 0x80011C
    msgbox 0x8800126 MSG_FACE '"How is PIKACHU?"
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x800138
    = I have a PIKACHU but do not have\ntime to train it. I Know!\lI will give it to you!
    
    #org 0x80018B
    = [player] obtained a\nPIKACHU!
    
    #org 0x800126
    = How is PIKACHU?
     
    17
    Posts
    13
    Years
    • Seen Oct 15, 2018
    I need help with my script. I think it is the flag number but I tried a bunch and they dont appear to be used but still... and by the way, is there a program to find emty flags? Back on subject. Here is my code:

    Code:
    '---------------
    #org 0x8000F3
    checkflag 0x808
    if 0x1 call 0x880011C
    msgbox 0x8800138 MSG_FACE '"I have a PIKACHU but do not have\n..."
    fanfare 0x13E
    msgbox 0x880018B MSG_NORMAL '"[player] obtained a\nPIKACHU!"
    waitfanfare
    givepokemon 0x19 0x10 0x0 0x0 0x0 0x0
    setflag 0x808
    release
    end
    
    '---------------
    #org 0x80011C
    msgbox 0x8800126 MSG_FACE '"How is PIKACHU?"
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x800138
    
    #org 0x800126
    = How is PIKACHU?
    = I have a PIKACHU but do not have\ntime to train it. I Know!\lI will give it to you!
    
    #org 0x80018B
    = [player] obtained a\nPIKACHU!

    Alright, first things first, in XSE could you go to Help and then About and tell me the numbers in the bottom right corner (Ex. 1.0.1). Secondly, here's my changes to your script and \\explanations not to be added to your script.

    Spoiler:
    I have tested this in game and it works for me. As for what flags aren't being used that is another story. Here's a list of flags that are being used normally by the games.

    diegoisawesome's XSE Tutorial said:
    Spoiler:


    &

    Spoiler:

    Now before you try the script I gave you, those numbers you found earlier. I'm guessing they weren't "1.1.1". If they weren't, go to my last post and download XSE 1.1.1 and use that to compile the script above. Then test it in game and it should work. ;)

    -Dark
     

    Acecaldwell01

    Spriter
    99
    Posts
    11
    Years
    • Seen Jun 15, 2019
    Alright, first things first, in XSE could you go to Help and then About and tell me the numbers in the bottom right corner (Ex. 1.0.1). Secondly, here's my changes to your script and \\explanations not to be added to your script.

    Spoiler:
    I have tested this in game and it works for me. As for what flags aren't being used that is another story. Here's a list of flags that are being used normally by the games.



    Now before you try the script I gave you, those numbers you found earlier. I'm guessing they weren't "1.1.1". If they weren't, go to my last post and download XSE 1.1.1 and use that to compile the script above. Then test it in game and it should work. ;)

    -Dark
    I am running Xse v 1.1.1
    And the script worked!
    Thanks ;)
    I had to change the flag even though it
    Was not used by the gme tho
    Anyway thanks
     

    SKRoy

    Pokémon Hacker
    66
    Posts
    14
    Years
    • Seen Feb 8, 2016
    That is most likely causing the error. You need the latest XSE (Which is 1.1.1) which can be found in two links:

    4shared: http://www.4shared.com/rar/xn-E0lPP/XSE_Upload.html
    Mediafire: http://www.mediafire.com/?gr5wtvmyiqfasmh

    The 4shared is a .rar archive and the mediafire is a .zip archive. Though you need an account to download from 4shared. Download XSE 1.1.1 and compile the exact same script with the new XSE and replace the old script offset with the one from the compiler. Save in AMap and test again, it should work now.

    Thanks the script worked in the newer version.
    Now I changed the script a little bit and now it is a normaal script, so not for talking to a person. But when I play the game and I walk over that script, than the whole game freezed... What can I do?
     
    5,256
    Posts
    16
    Years
  • Click on the Script Event and change the first "Unknown:" to "$03". Change the "Var number:" underneath it to an unused variable. A commonly used one "$4050".
     

    SKRoy

    Pokémon Hacker
    66
    Posts
    14
    Years
    • Seen Feb 8, 2016
    Click on the Script Event and change the first "Unknown:" to "$03". Change the "Var number:" underneath it to an unused variable. A commonly used one "$4050".

    I did... But now when I walked over the and nothing happend...
     
    5,256
    Posts
    16
    Years
  • Has the variable 4050 been set to anything other than 0 elsewhere in your ROM? If so, change it to another variable that is equal to (and always will be equal to) 0.
     
    Status
    Not open for further replies.
    Back
    Top