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

Help Thread: Script Help Thread

Status
Not open for further replies.

C me

Creator of Pokemon League Of Legends
681
Posts
10
Years
    • Seen Apr 9, 2021
    Ok fixed it I just changed the setvar I was using and now it works fine.
     
    Last edited:
    417
    Posts
    9
    Years
    • Seen Nov 20, 2016
    I'm looking for the help of anyone who has used FBI agent's surf hack found here: https://www.pokecommunity.com/showthread.php?t=338513

    I (believe) I followed the instructions exactly as stated.

    (a) At 0x6D588, changed 0C D1 to 00 00

    (b) I inserted the 12b modified routine using the hex provided into free space with an offset ending with 0 (without "pushing" anything down)

    (c) I inserted 00 48 00 47 at 0xCA840

    (d) I took the offset from (b), which was 0x92F000,
    threw 08 in front -> 0892F000
    added 1 -> 0892F001
    reversed -> 01 F0 92 08
    and typed it after the 00 48 00 47 from step (c)

    (e) Changed the 00 at 0xCA862 to 06

    (e) Decompiled the original surf script at 0x81A6AC8 and recompiled it to instead jump to the surf hack + special example provided. The exact same script, only different offsets.

    I'm testing it with Squirtle at the beginning of fire red, and talking to the water does nothing. Is there some other area before 0x81A6AC8 that checks for the soul (surf) badge?

    In desperation, I tried ignoring the special 12B completely, only altering the hm check offset at 0x6D588 and altering the surf script at 0x81A6AC8 to have no surf check. Even so, talking to the water does nothing. I don't know what I'm doing wrong :(
     

    C me

    Creator of Pokemon League Of Legends
    681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    How do I make a level script repeat? I just want some text to be said every time you walk in but taking away setvar doesnt work. What type of level script do I use and what do I need in the script.

    Thanks
     
    14
    Posts
    10
    Years
    • Seen Jan 20, 2020
    Hey everyone,
    What I want: The sprite shall disappear after the battle.
    What happens: There ist no battle and the sprite disappears, when I talk to it.
    Anybody knows the answer? Plase help. thank you. :)

    Spoiler:
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Spoiler:

    You need trainerbattle 0x1 and change the pointers a bit - I've adjusted your script above.
     
    76
    Posts
    9
    Years
  • How do I make a level script repeat? I just want some text to be said every time you walk in but taking away setvar doesnt work. What type of level script do I use and what do I need in the script.

    Thanks
    You have to use a type 2 level script for that. As your trigger var (the one that you enter at 'flag' in AdvanceMap) you can take 0x4000. This var gets reset to 0 every time you enter a new map, thus you have to write 0 at 'value'.
    The script itself could look like that:
    Spoiler:
     

    Splash

    But nothing happened.
    658
    Posts
    14
    Years
  • Hi simple question.. What vars are safe to use? Or is any var number safe to use? I havent seen a tutorial that elaborates vars.. If theres any Id appreciate it if someone would provide me with the link
     
    3,044
    Posts
    9
    Years
  • Hi simple question.. What vars are safe to use? Or is any var number safe to use? I havent seen a tutorial that elaborates vars.. If theres any Id appreciate it if someone would provide me with the link

    You can extend the flags, too! (this is for FireRed only)
    link
     

    Teh Blazer

    Divider of Zero
    776
    Posts
    15
    Years
  • I'm using Shiny Quagsire's asm magix with the Berry Bag hack (https://www.pokecommunity.com/showthread.php?t=295749) and the routine works as planned, but when I select the item in the routine, it doesn't get removed from the player's bag. I've copied the selected berry's index number to the 401E variable, can I use 401E instead of the berry's index number when I use the "removeitem" command after I finish the original stuff?

    So basically, would this be okay or cause unprecedented and unparalleled destruction to my hack?

    setvar 0x8000 0x7E
    setvar 0x800E 0x0
    callasm 0x0A1881
    waitmsg
    setvar 0x8000 0x0
    compare 0x800E 0x0
    if 0x1 goto @noberry
    bufferitem 0x0 0x800E
    copyvar 0x800E 0x401D
    removeitem 0x401D 0x1

    Or is there a much easier alternative that I'm just looking over?
     

    Splash

    But nothing happened.
    658
    Posts
    14
    Years
  • Last edited:
    16
    Posts
    9
    Years
    • Seen Nov 28, 2015
    REPOST: (Sorry, but my post got a whole bunch of questions answered before it.)

    For this script, the issue is that the nicknaming portion (#org @name) just brings up a bunch of weird text that doesn't make any sense. If you avoid nicknaming the Pokemon, the script will continue on with the professor and Milton going through the door and hiding away to give off the illusion that they went into the lab. This is the huge issue I am having. Rather than having the main character walk to the doors and warp inside the lab, he instantly warps to the map location and appears on the outside of the building, not even the inside. Does anyone know how to fix this? (Also, I tried to make a script happen off of interacting with a Poke-Ball instead of stepping on a script tile. If that is the issue, than how do I make long scripts like this happen off of interacting with a Poke-Ball?)

    Spoiler:
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    REPOST: (Sorry, but my post got a whole bunch of questions answered before it.)

    For this script, the issue is that the nicknaming portion (#org @name) just brings up a bunch of weird text that doesn't make any sense. If you avoid nicknaming the Pokemon, the script will continue on with the professor and Milton going through the door and hiding away to give off the illusion that they went into the lab. This is the huge issue I am having. Rather than having the main character walk to the doors and warp inside the lab, he instantly warps to the map location and appears on the outside of the building, not even the inside. Does anyone know how to fix this? (Also, I tried to make a script happen off of interacting with a Poke-Ball instead of stepping on a script tile. If that is the issue, than how do I make long scripts like this happen off of interacting with a Poke-Ball?)

    Spoiler:

    I haven't scripted in a while (been too busy with work and real life stuff), but...
    Code:
    ...
    applymovement [COLOR="Red"]0xFF[/COLOR] @walk3
    [COLOR="red"]waitmovement 0x0[/COLOR]
    warp 0x4 0x3 0x3 0x0 0x0
    [COLOR="red"]waitstate[/COLOR]
    [COLOR="Blue"]sound 0x9
    setvar 0x4029 0x1
    release
    end[/COLOR]
    ...
    Fixes are in red. Also, the ones in blue will be ignored. Why? Because the script will automatically end after a warp+waitstate combo (or even without a waitstate command).

    Also...


    Code:
    ...
    msgbox @2 0x6
    ...
    
    ...
    #org @2
    [COLOR="Red"]release
    end[/COLOR]
    ...
    @2 doesn't have a message in there.

    No idea about the renaming part, unfortunately.
     

    U.Flame

    Maker of Short Games
    1,326
    Posts
    15
    Years
  • Dunno why I took a long while to get back into hacking, so I'm a little rusty. Trying to set up a new level script here. This is what I have so far.
    Spoiler:


    In Advance Map it's script type 2 with flag 4092 and value 0007. I set up the previous script to set variable 4092 to 7 so it can activate. For some reason though, it isn't activating. I have an NPC that reacts to variable 4092 at 7 as well, could it be interfering?
     

    Splash

    But nothing happened.
    658
    Posts
    14
    Years
  • Hello guys i have a problem with implementing a script it always freezes my game and I dont know why.

    Edit: Fixed it myself, again bad scripting on my part I shouldve used #raw word on the items
     
    Last edited:

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • Hello guys, I'm currently working on my Firered USA rom and what I'm trying to do is to force a certain sprite (who is not the hero) to do the flying animation and then vanish.

    When it is time for the sprite to fly away the "doanimation 0x3B" works just for the hero.
    Do you know how to emulate the steven stone script?
    You know, the one when he flies after defeating the kekleon?

    Much appreciated!

    -----
    Ninja edit: i've been looking for the animations codes here https://www.pokecommunity.com/showthread.php?t=205158&page=5
     

    C me

    Creator of Pokemon League Of Legends
    681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    I'm having an issue with this scipt. The weather part works fine but the map won't darken. I'm using level script #3 because game freak uses that in Dewford gym to darken. Does it not work because it's between two maps? Does it need a warp to work? I want it to happen as your sailing into the map.

    Spoiler:


    Thanks
     

    Splash

    But nothing happened.
    658
    Posts
    14
    Years
  • I'm having an issue with this scipt. The weather part works fine but the map won't darken. I'm using level script #3 because game freak uses that in Dewford gym to darken. Does it not work because it's between two maps? Does it need a warp to work? I want it to happen as your sailing into the map.

    Spoiler:


    Thanks

    Im not familiar with darken, do you mean fadescreen by that?
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    I'm having an issue with this scipt. The weather part works fine but the map won't darken. I'm using level script #3 because game freak uses that in Dewford gym to darken. Does it not work because it's between two maps? Does it need a warp to work? I want it to happen as your sailing into the map.

    Spoiler:


    Thanks

    I don't think I've used darken - I normally go the opposite way and use lighten to get rid of the darkness.

    If you always want your map dark, why can just change the 'cave' setting in A-Map. Not sure if that's what you need though :).
     

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • Hi guys
    Solved the previous one. Now I've got another problem: after catching a pokemon there's a weird error that won't show the pokedex page of the Pokémon.
    Do you know how should I proceed?
     
    Status
    Not open for further replies.
    Back
    Top