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

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
  • I need help with this script, it's suppose to check to make sure the pokemon you pick is a certain pokemon and if you pick the wrong one it stops you and takes you to the back of that string. What happens is that when I'm supposed to pick Venusaur it let's me pick any pokemon without stopping me. Then when I'm suppose to pick Onix and I go to pick another pokemon or when I try to go back (which you aren't suppose to be able to do at that point) it takes me to my @Goback string. This is just a little bit of my script, but everything else in the script works perfect except this part. Please take a look.
    Spoiler:

    I don't know if you meant to do this, but you set variable 8004 to 800A, then when you returned you set 8004 to 0x3. :\
     
    32
    Posts
    14
    Years
    • Age 38
    • Seen Dec 16, 2010
    I don't know if you meant to do this, but you set variable 8004 to 800A, then when you returned you set 8004 to 0x3. :\
    Yeah, that's the only way I know to bring up the pick a pokemon menu, and then it should take you back to the beginning which is where it sets variable 8004 to the pokemon again. Unfortunately it doesn't take me back, it says I choose the Venusaur.
     

    metapod23

    Hardened Trainer
    673
    Posts
    15
    Years
    • Seen Aug 18, 2016
    I need help with this script, it's suppose to check to make sure the pokemon you pick is a certain pokemon and if you pick the wrong one it stops you and takes you to the back of that string. What happens is that when I'm supposed to pick Venusaur it let's me pick any pokemon without stopping me. Then when I'm suppose to pick Onix and I go to pick another pokemon or when I try to go back (which you aren't suppose to be able to do at that point) it takes me to my @Goback string. This is just a little bit of my script, but everything else in the script works perfect except this part. Please take a look.
    Spoiler:

    Try troubleshooting using this script:

    http://www.pokecommunity.com/showthread.php?t=210016

    A suggestion you might try is changing where it goes after comparing variables 8004 and 8005. Try changing it to:

    Code:
    if 0x1 goto @Billshouseremoveonix
    goto @Billshousethatsnotaonix

    Sometimes that works for me ...
     
    32
    Posts
    14
    Years
    • Age 38
    • Seen Dec 16, 2010
    Try troubleshooting using this script:

    http://www.pokecommunity.com/showthread.php?t=210016

    A suggestion you might try is changing where it goes after comparing variables 8004 and 8005. Try changing it to:

    Code:
    if 0x1 goto @Billshouseremoveonix
    goto @Billshousethatsnotaonix
    Sometimes that works for me ...
    That's the tut I used to remove Pokemon. Switching those around worked though, so thank you for that. I really appreciate it. One last problem with the script though. When I try to go back it just tells me that that isn't the right pokemon. It should say something like, "You sure you don't want to try this?" and then take me back to deciding if I want to try it.
     

    metapod23

    Hardened Trainer
    673
    Posts
    15
    Years
    • Seen Aug 18, 2016
    That's the tut I used to remove Pokemon. Switching those around worked though, so thank you for that. I really appreciate it. One last problem with the script though. When I try to go back it just tells me that that isn't the right pokemon. It should say something like, "You sure you don't want to try this?" and then take me back to deciding if I want to try it.

    I'm not sure why it isn't working, it can sometimes be glitchy. I'd look at the fully compiled script first and see if all the offsets are doing what they're supposed to be, though ...

    (Edit: Oh, and I'm glad someone fount that tut useful - yay! :))
     
    32
    Posts
    14
    Years
    • Age 38
    • Seen Dec 16, 2010
    I'm not sure why it isn't working, it can sometimes be glitchy. I'd look at the fully compiled script first and see if all the offsets are doing what they're supposed to be, though ...

    (Edit: Oh, and I'm glad someone fount that tut useful - yay! :))
    Thank you, I'll try that.
     
    12
    Posts
    15
    Years
    • Seen Oct 25, 2019
    GAME: FIRE RED
    SYSTEM: POKESCRIPT
    TYPE: VARIOUS

    This script was supposed to make a guy walk, than he would give you a pokemon, a pokedex and some pokeballs, than he would go away and vanish, your mom would come up to you and give you the running shoes. but the script said random things and nothing happened, this is the SCRIPT:

    #org $lili
    checkflag 0x205
    if_b true goto $hehe
    applymovement 0xFE $jo
    pausemove 0x0
    applymovement 0x00 $jo2
    pausemove 0x0
    applymovement 0x01 $jo3
    pausemove 0x0
    message $jo4
    boxset 6
    givepokemon 133 5 197
    fanfare 0x13E
    message $jo5
    boxset 4
    waitfanfare
    #raw 0x68
    setflag 0x828
    message $jo6
    boxset 6
    setflag 0x829
    special 0x16F
    fanfare 0x13E
    message $jo7
    boxset 4
    waitfanfare
    #raw $0x68
    message $jo8
    boxset 6
    giveitem 4 5
    message $jo9
    boxset 6
    applymovement 0x01 $jo10
    pausemove 0x0
    #raw 0x53 0x01 0x00
    applymovement 0x00 $jo11
    pausemove 0x0
    message $jo12
    boxset 6
    setflag 0x82F
    fanfare ox13E
    message $jo13
    boxset 4
    waitfanfare
    #raw 0x68
    message $jo14
    boxset 6
    applymovement 0x00 $jo15
    pausemove 0x0
    setflag 0x205
    release
    end

    #org $hehe
    release
    end

    #org $jo
    #raw 0x62 0xFE

    #org $jo2
    #raw 0x62 0xFE

    #org $jo3
    #raw 0x62 0x0D 0x0F 0x0F 0x0D 0x0F 0x0F 0x55 0xFE

    #org $jo4
    $jo4 1 =Oh!\nMy boy!\pHAPPY BIRTHDAY!\nThis is a very special day!\pNow that you are ten years old\nYou can finally have your first\pPOKEMON.\pCan you guess who is giving it to\nyou?\pYES! ME!\nTAKE THIS EEVEE!!

    #org $jo5
    $jo5 1 = \v\h01 received a EEVEE!

    #org $jo6
    $jo6 1 =Now you can depart on your\njourney!\pBut you still need one thing\nYour POKEDEX!\pHere! Take it\nIt was mine...

    #org $jo7
    $jo7 1 = \v\h01 received the POKEDEX!

    #org $jo8
    $jo8 1 =Just one last birthday present...\pHere take these!\pThey will help you!

    #org $jo9
    $jo9 1 =That's it my boy...\nYour grandfather gave you\peverything he had...\pNow I need to go...\nMake sure to visit me on ASTIC CITY!\pBYE!

    #org $jo10
    #raw 0x0C 0x0C 0x0C 0x0C 0x0C 0x0E 0x0E 0x0E 0x0E 0x0E 0x0C 0xFE

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

    #org $jo12
    $jo12 1 = Your grandfather was realy generous!\pI'm so proud of you!\pNow it's time for my gift!

    #org $jo13
    $jo13 1 = \v\h01 switched into the RUNNING SHOES!

    #org $jo14
    $jo14 1 =Now go and make me PROUD!\p...\pAgain...

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

    Any IDEAS?
     

    adhdguitar

    Newbie Pokémon Hacker
    210
    Posts
    13
    Years
    • Seen Jan 16, 2015
    Yo, I'm new at scripting, and while I don't expect anyone to give me a full explanation, I do have one simple question.

    Where do I start?
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • GAME: FIRE RED
    SYSTEM: POKESCRIPT
    TYPE: VARIOUS

    This script was supposed to make a guy walk, than he would give you a pokemon, a pokedex and some pokeballs, than he would go away and vanish, your mom would come up to you and give you the running shoes. but the script said random things and nothing happened, this is the SCRIPT:

    Spoiler:

    If that's a level script, find a tutorial on them, because it's likely a #raw word problem. Also, it looks like you forgot a lock command, but I just kind of skimmed, to be honest.
     

    Chocos0

    Eclipse the Umbreon
    68
    Posts
    14
    Years
    • Seen Mar 12, 2012
    I know how to script, but getting the script IN the game is kinda confusing.
    So, my question is. How do I get the script in the game?
    Yes, yes, Pokescript.. But when I "Compile Script" The Buf Rit doesn't appear after it's done whatever it's doing.
    I've downloaded Pokescript, and PKMadv. I put the scripts and the hacking tools in separate folders. So, how do I make the Buf Rit window appear after it's done reading the script? "P.S. The script I'm making is giving the pokedex option and the pokemon option"

    I'm using Emerald as my rom, and this is my script:

    #org $pokedex
    lock
    faceplayer
    message $1
    $1 1 = Heres the pokemon and Pokedex option.
    boxset 6
    fanfare 0x13E
    message $got
    $got 1 = \v\h01 received the\nPokédex and Pokémon on the menu!
    boxset 4
    waitfanfare
    pause 0x30
    setflag 0x828
    setflag 0x829
    fadescreen 1
    removesprite 0x800F
    pause 0x30
    fadescreen 0
    release
    end
    -------------

    Please help me, it would help very much.
     

    Shiny Quagsire

    I'm Still Alive, Elsewhere
    697
    Posts
    14
    Years
  • I know how to script, but getting the script IN the game is kinda confusing.
    So, my question is. How do I get the script in the game?
    Yes, yes, Pokescript.. But when I "Compile Script" The Buf Rit doesn't appear after it's done whatever it's doing.
    I've downloaded Pokescript, and PKMadv. I put the scripts and the hacking tools in separate folders. So, how do I make the Buf Rit window appear after it's done reading the script? "P.S. The script I'm making is giving the pokedex option and the pokemon option"

    I'm using Emerald as my rom, and this is my script:

    #org $pokedex
    lock
    faceplayer
    message $1
    $1 1 = Heres the pokemon and Pokedex option.
    boxset 6
    fanfare 0x13E
    message $got
    $got 1 = \v\h01 received the\nPokédex and Pokémon on the menu!
    boxset 4
    waitfanfare
    pause 0x30
    setflag 0x828
    setflag 0x829
    fadescreen 1
    removesprite 0x800F
    pause 0x30
    fadescreen 0
    release
    end
    -------------

    Please help me, it would help very much.

    First off, I recommend you use XSE. It's much more efficient and less buggy.
    Next, You have your $1's in the middle of the script. That's a no no. Here is a fixed script.

    Code:
    #org $pokedex
    lock
    faceplayer
    message $1
    boxset 6
    fanfare 0x13E
    message $got
    boxset 4
    waitfanfare
    pause 0x30
    setflag 0x828
    setflag 0x829
    fadescreen 1
    removesprite 0x800F
    pause 0x30
    fadescreen 0
    release
    end
    
    #org $got
    = \v\h01 received the\nPokédex and Pokémon on the menu!
    
    #org $1
    = Heres the pokemon and Pokedex option.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    This next one has me completely stumped...

    Spoiler:


    When it gets to:
    msgbox @fightornot 0x5
    if 0x1 goto @yes
    if 0x0 goto @no

    In-game, if you choose yes it goes to no. So saying both yes and no sends the script to @no, saying "Come back when you are think you are read". I don't understand how choosing yes can send it to no when the script says the complete opposite :/

    When I choose yes, I'm supposed to be sent to @yes and start that trainer battle.
     
    Last edited:

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • This next one has me completely stumped...

    Spoiler:


    When it gets to:
    msgbox @fightornot 0x5
    if 0x1 goto @yes
    if 0x0 goto @no

    In-game, if you choose yes it goes to no. So saying both yes and no sends the script to @no, saying "Come back when you are think you are read". I don't understand how choosing yes can send it to no when the script says the complete opposite :/

    When I choose yes, I'm supposed to be sent to @yes and start that trainer battle.

    I didn't even need to open the spoiler tag to spot your problem. You need to precede each of those if commands with a "compare 0x800D 0x1".
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • You had:

    msgbox @fightornot 0x5
    if 0x1 goto @yes
    if 0x0 goto @no

    Instead, put:

    msgbox @fightornot 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes
    compare 0x800D 0x1
    if 0x0 goto @no

    Naturally, if it doesn't look at any variable it automatically assumes its value is 0, which is why you always got no. 0x800D is the lastresult variable, so with those compare commands it tells the game to check whether or not the player said yes.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    Ok, fixed that, now I'm having a problem further down the script.

    #org @yes
    trainerbattle 0x0 0x004 0x0 @choseyes @after
    msgbox @youwon 0x6
    givepokemon 0xF 0x8 0x0 0x0 0x0 0x0
    setflag 0x105
    preparemsg @gotpokemon
    waitmsg
    fanfare 0x13E
    waitfanfare
    msgbox @nickname MSG_YESNO
    compare LASTRESULT 0x1
    if 0x1 goto @nicknameyes
    compare LASTRESULT 0x0
    if 0x1 goto @nicknameno
    release
    end

    After the battle, the script just ends. What do I need to have it carry on with the script, initiating the give pokemon part?
     

    Collen

    I have returned.
    71
    Posts
    14
    Years
    • Seen Jan 1, 2015
    Ok, fixed that, now I'm having a problem further down the script.

    #org @yes
    trainerbattle 0x0 0x004 0x0 @choseyes @after
    msgbox @youwon 0x6
    givepokemon 0xF 0x8 0x0 0x0 0x0 0x0
    setflag 0x105
    preparemsg @gotpokemon
    waitmsg
    fanfare 0x13E
    waitfanfare
    msgbox @nickname MSG_YESNO
    compare LASTRESULT 0x1
    if 0x1 goto @nicknameyes
    compare LASTRESULT 0x0
    if 0x1 goto @nicknameno
    release
    end

    After the battle, the script just ends. What do I need to have it carry on with the script, initiating the give pokemon part?
    Change "trainerbattle 0x0" to "trainerbattle 0x1".
    Make sure that the trainer and veiw radius boxes aren't filled in.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    It was a script initiated event so I couldn't use 0x1. But 0x3 worked a treat (copied it from the vanilla Rival script on S.S.Anne). But thanks :)
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • No, 0x0 is the one you can't use in a script-initiated event. 0x1 would work perfectly in an event run with a script, and should be exactly what you needed. If 0x3 worked too, though, then no harm done, obviously.
     
    Status
    Not open for further replies.
    Back
    Top