• 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.
  • 1,104
    Posts
    16
    Years
    How do you change the position of a sprite forever after an event?
    A combination of "movesprite" and level scripts.
    Does anybody know how to display the money box in the top left hand corner of the screen?

    Thanks
    #raw 0x93 0x00 0x00 0x00
    to show money box.
    #raw 0x94 0x00 0x00
    to make it disappear.
    Hey does anyone know how to make a POKEMART script
    because it never tells in tutorals
    so can anyone ell me how to make a POKEMART script?

    Here's an example of the "Pokemart" command. If you want me to explain it, just ask.
    Code:
    #org $StartMarket
    lock
    faceplayer
    pokemart $marketValues
    release
    end
    
    #org $marketValues
    #binary int 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8
    #binary int 0x9 0xa 0xb 0xc 0x13 0x14 0x0
     

    ShyRayq

    Unprofessional Unprofessional
  • 1,856
    Posts
    16
    Years
    • Seen May 21, 2024
    hey thethethethe i don't get the mart script can you explain it?
     
  • 1,104
    Posts
    16
    Years
    I've been avoiding this for a while, but how would I make the hero follow someone?

    Just like a normal follow-me script. Just make the player follow the other OW, instead of the OW, following you.

    hey thethethethe i don't get the mart script can you explain it?
    Ok.
    Code:
    #org $StartMarket
    lock
    faceplayer
    pokemart $marketValues 'pointer to items in the pokemart.
    release
    end
    
    #org $marketValues
    #binary int 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8  'items. So in this case it's Masterball, Ultraball, Greatball, pokeball, etc
    #binary int 0x9 0xa 0xb 0xc 0x13 0x14 0x0  'continueing items... Must End in 0x0 otherwise it won't work.
    Is that enough explanation?
     

    ShyRayq

    Unprofessional Unprofessional
  • 1,856
    Posts
    16
    Years
    • Seen May 21, 2024
    you mean the first line joins with the second line?
    or are they separate?
     

    ShyRayq

    Unprofessional Unprofessional
  • 1,856
    Posts
    16
    Years
    • Seen May 21, 2024
    you mean the first line joins with the second line?
    or are they separate?
     

    /Circa

    a face in the clouds.
  • 881
    Posts
    16
    Years
    I meant what would I use?
    applymovement 0xFF moves only the Hero.
    applymovement 0x1 moves the person number.
    I want the hero to follow someone.
     

    Thrace

    @tion
  • 1,048
    Posts
    17
    Years
    • Seen Oct 2, 2016
    I meant what would I use?
    applymovement 0xFF moves only the Hero.
    applymovement 0x1 moves the person number.
    I want the hero to follow someone.
    In the situation that the hero is behind someone:
    Spoiler:

    Just change the $MovePlayerUp in respect to the person being followed.

    ------------------------------------------------------------------------------------


    So if I wanted to make a sprite disappear after an event could I just compile the following code from PokeScript and change the pointer?

    Code:
    #org $Start
    checkflag 0x82f
    if B_false gosub $no
    applymovement 0x04 $disappear
    $disappear 1 ; #Binary 0x0a 0x60 0xfe
    end
    
    #org $no
    release
    end
     
    Last edited:

    /Circa

    a face in the clouds.
  • 881
    Posts
    16
    Years
    Alright, i've tried to fix this script and have made steady progress, but I cant find out whats wrong with it. I know theres something wrong with battle 4 because it stuffs up there, but I don't know what... Could someone help me?

    What happens is I land on the script, a pidgey comes and versus me, but then the next time I have to click for the next one to come. And the first pidgey doesn't dissapear.

    Code:
    #org $begin
    lock
    checkflag 0x208
    if b_true goto $done
    message $wierd
    $wierd 1 =Something wierd is going on...
    boxset 6
    applymovement 0x5 $battle1
    pausemove 0
    wildbattle 0x10 0x5 0x3
    cry PKMN_MEW
    #raw 0x53
    message $another1
    $another1 1 =Not another one!
    boxset 6
    applymovement 0x3 $battle2
    pausemove 0
    wildbattle 0x10 0x5 0x3
    cry PKMN_MEW
    #raw 0x53
    message $another2
    $another2 1 =Not another one!
    boxset 6
    applymovement 0x7 $battle3
    pausemove 0
    wildbattle 0x10 0x5 0x3
    cry PKMN_MEW
    #raw 0x53
    message $another3
    $another3 1 =Not another one!
    boxset 6
    applymovement 0x6 $battle4
    pausemove 0
    wildbattle 0x10 0x5 0x3
    cry PKMN_MEW
    #raw 0x53
    message $another5
    $another5 =Not another one!
    boxset 6
    applymovement 0x4 $battle5
    pausemove 0
    wildbattle 0x10 0x5 0x3
    cry PKMN_MEW
    #raw 0x53
    message $another4
    $another4 1 =Huh?
    boxset 6
    applymovement 0x8 $suicune
    pausemove 0
    setflag 0x08
    release
    end
    
    #org $battle1
    #raw 0x08
    #raw 0x02
    #raw 0xFE
    
    #org $battle2
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x0A
    #raw 0x0A
    #raw 0xFE
    
    #org $battle3
    #raw 0x08
    #raw 0x08
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0xFE
    
    #raw $battle4
    #raw 0x08
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0xFE
    
    #org $battle5
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0xFE
    
    #org $suicune
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    
    #org $done
    release
    end
     

    Thrace

    @tion
  • 1,048
    Posts
    17
    Years
    • Seen Oct 2, 2016
    Alright, i've tried to fix this script and have made steady progress, but I cant find out whats wrong with it. I know theres something wrong with battle 4 because it stuffs up there, but I don't know what... Could someone help me?

    What happens is I land on the script, a pidgey comes and versus me, but then the next time I have to click for the next one to come. And the first pidgey doesn't dissapear.

    You really need to read some tutorials.
    You're raw movement codes should be after the applymovement (dosn't have to be just so that it is easier) and they don't need a separate line. Also you must end with 0xfe.

    example:
    Code:
    applymovment 0x01 $something
    $something 1 ; #raw 0x01 0x09 [...] [B]0xfe[/B]

    You have 4 messages that say Not another one! Just use one and have the messages point to the same thing.

    example:
    Code:
    message $h
    $h 1 = gklhglahjklghjkab
    boxset 6
    [...]
    message  $h
    boxset 6
    [...]
    message $h
    boxset 6

    In wildbattle scripts you don't have the 0x.

    example
    Code:
    wildbattle 5 20 1

    Lastly check your setflag you wrote 0x08 should be 0x208. There might be some more, your script was hard to read try using paragraphs.

    ---------------------------------------------------------------------------------------------
    --------------------------------------- MY QUESTION ---------------------------------------
    ---------------------------------------------------------------------------------------------

    So if I wanted to make a sprite disappear after an event could I just compile the following code from PokeScript and change the pointer?

    Code:
    #org $Start
    checkflag 0x82f
    if B_false gosub $no
    applymovement 0x04 $disappear
    $disappear 1 ; #Binary 0x0a 0x60 0xfe
    end
    
    #org $no
    release
    end
     
    Last edited:

    /Circa

    a face in the clouds.
  • 881
    Posts
    16
    Years
    To make a sprite dissapear you use #raw 0x53, but you don't put it in the movements commands. You put it after the the person walks off the screen, or in a battle situation, before they exit the screen.
    And no, movements don't really work on my rom if they're after the applymovement, as I said. All the movements work fine, if I changed it to your way it just wouldn't work, none of my scripts worked like that. I'm using FireRed so some things might be different >_>. Also having 0x doesn't make a different, but I use it that way cause I learned that way ... Most of my scripts work fine so I don't think I need to read alot of tutorials..

    Also, #raw is another way to write a command that isn't in the program. And sometimes it works better with that command. #raw commands are basically hex..

    Hopefully that explains it a bit better..

    About ending with a 0xFE in the suicune pointer I probably forgot it, but thats not where the problem appears >.>
    And the setflag 0x208 was probably a typo, but again it's not where the problem appears.
     

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    What's wrong with this script? It's supposed to make your mom walk up 1 step adn then talk to you, but all that happens is the game freezes.
    ________________
    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $momwalk
    pausemove 0
    message $momtalk
    boxset 6
    setflag 0x200
    release
    end

    #org $done
    release
    end

    #org $momwalk
    $momwalk 1 ; 0x11 0xFE

    #org $momtalk
    $momtalk 1 = Good morning \v\h01\ !. \nProfessor Blazer is looking \pfor you. He wants \nto show you another one \pof his pokemon. \nAnd just think, when you \pare 10, he'll give you \na pokemon! Just wait 1 more \pyear, and you can! \nSo, I wonder what \ppokemon Professor Blazer \nhas to show you this \ptime!
     
  • 170
    Posts
    16
    Years
    What's wrong with this script? It's supposed to make your mom walk up 1 step adn then talk to you, but all that happens is the game freezes.
    ________________
    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $momwalk
    pausemove 0
    message $momtalk
    boxset 6
    setflag 0x200
    release
    end

    #org $done
    release
    end

    #org $momwalk
    $momwalk 1 ; #binary 0x11 0xFE

    #org $momtalk
    $momtalk 1 = Good morning \v\h01\ !. \nProfessor Blazer is looking \pfor you. He wants \nto show you another one \pof his pokemon. \nAnd just think, when you \pare 10, he'll give you \na pokemon! Just wait 1 more \pyear, and you can! \nSo, I wonder what \ppokemon Professor Blazer \nhas to show you this \ptime!
    What i edited is in bold..
    try that.
     

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    It's still freezing.
    I can't figure out why...

    This is where i put the scripts (i put 4 using the same flag in those 4 spots, all using different movements)

    [Archive] Script help thread
     

    Swampert 22

    Is making tools for you...
  • 393
    Posts
    18
    Years
    It's still freezing.
    I can't figure out why...

    This is where i put the scripts (i put 4 using the same flag in those 4 spots, all using different movements)

    [Archive] Script help thread

    Have you set the Unknown and Var Numbers in Advance Map like this?

    Unknown 03 00
    Var Number 52 40

    9 times out of 10 that's why movement scripts freeze.
     

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    Have you set the Unknown and Var Numbers in Advance Map like this?

    Unknown 03 00
    Var Number 52 40

    9 times out of 10 that's why movement scripts freeze.

    No, i didn't even know those mattered lol

    I'll try it, thanks!

    Edit: Works perfectly!
    Thanks so much!
    I better remember to do that for all my movement scripts!

    Edit (again): I have another question:
    How do you make a script for a person to not let you go somewhere until you've cleared an event.

    Example: I want to make a guy block route 1 until you've done a certain event
    Lets say the flag for that event is 0x205

    Would i set the flag on the guy whoes blocking route 1's script 0x205?
     
    Last edited:

    Swampert 22

    Is making tools for you...
  • 393
    Posts
    18
    Years
    Basically, you don't have to put anything in the script itself, just in AdvanceMap, set the 'People Id' of the person that's blocking the path to the flag you used for the event.

    Eg. You can't get into a cave until you do an event that sets the 888 flag. You simply set the 'ID' to 888 and when you do the event, he will be gone.

    Try It!
     

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    Basically, you don't have to put anything in the script itself, just in AdvanceMap, set the 'People Id' of the person that's blocking the path to the flag you used for the event.

    Eg. You can't get into a cave until you do an event that sets the 888 flag. You simply set the 'ID' to 888 and when you do the event, he will be gone.

    Try It!

    Wow, that was easy!
    Thanks again, swampert22
     
    Status
    Not open for further replies.
    Back
    Top