• 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.
13
Posts
11
Years
  • I was just wondering if someone could explain to me how the "set world map" script work such as the one in saffron city in fire red: '---------------
    #org 0x167365
    setworldmapflag 0x89A
    checkflag 0x23C
    if 0x0 call 0x8167372
    end

    '---------------
    #org 0x167372
    movesprite2 0x6 0x21 0x1F
    return
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • I just did as karatekid552 said and looked it up in a-map. the 3rd map script of Sootopolis City seems to have it...

    Code:
    '---------------
    #org 0x1E5946
    pause 0x3C
    special 0x116
    applymovement MOVE_CAMERA 0x81E5A68
    waitmovement 0x0
    special 0x117
    ....

    Unsure if 0x117 is needed. So try 0x116 then I guess.


    weird... i tried that yesterday when i saw a post about it but it didnt work but now it is. maybe it was a script error on my part ie switching the specials positions.

    thank you for your help


    @karatekid thanks also
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

    Spoiler:
     

    Teh Blazer

    Divider of Zero
    776
    Posts
    15
    Years
  • why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

    Spoiler:

    Are you using a script tile or a level script for this?
     
    199
    Posts
    12
    Years
    • Seen Jul 18, 2016
    why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

    Spoiler:

    Is flag 0x1106 even safe in the ROM you are using? Try deleting an item on the ground and use that flag instead.
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

    Spoiler:

    Try this...
    Code:
    #org @event
    compare 0x4014 0x1
    if 0x1 goto @done
    [COLOR="Red"]setvar 0x4014 0x1[/COLOR]
    removeitem 0x119 0x1
    sound 0x15
    applymovement MOVE_PLAYER 0x89C9ECD
    waitmovement 0xFF
    msgbox 0x89C9EB1 MSG_NORMAL
    setflag 0x1106
    release
    end
    
    #org @done
    setvar 0x4014 0x1
    release
    end
     

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • Try this...
    Code:
    #org @event
    compare 0x4014 0x1
    if 0x1 goto @done
    [COLOR="Red"]setvar 0x4014 0x1[/COLOR]
    removeitem 0x119 0x1
    sound 0x15
    applymovement MOVE_PLAYER 0x89C9ECD
    waitmovement 0xFF
    msgbox 0x89C9EB1 MSG_NORMAL
    setflag 0x1106
    release
    end
    
    #org @done
    setvar 0x4014 0x1
    release
    end

    shinyquags said some vars arent safe and to test it, i tried 4022 in the place of 4014 with no other changes and it worked. apparently its the vars im using.

    thanks anyways !
     
    191
    Posts
    10
    Years
  • How would I make a script that as soon as you walk downstairs for the first time you get the running shoes? I have tried doing it before but anytime I try it either freezes the game or I get them but they don't work... Oh this is for FR btw
     
    Last edited:

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
    870
    Posts
    10
    Years
  • How would I make a script that as soon as you walk downstairs for the first time you get the running shoes? I have tried doing it before but anytime I try it either freezes the game or I get them but they don't work... Oh this is for FR btw

    use a level script and just use the special for FR running shoes which is special 0x82F

    so something like

    #dynamic 0xyouroffset

    #org @event
    lock
    msgbox @talk 0x6
    special 0x82F
    fanfare 0x212
    msgbox @received 0x6
    waitfanfare
    setvar 0x4050 0x1
    release
    end

    #org @talk
    = Better put on my shoes!

    #org @received
    = [player] received the RUNNING SHOES!

    something of that matter... obviously change it to what you want and to do a level script, you can learn on this page: https://www.pokecommunity.com/showthread.php?t=279345
    it's like the very last thing on the first post
     
    3
    Posts
    10
    Years
    • Seen Feb 10, 2014
    Hi im new and have trouble scripting i dont know if this is where i would post this but i need scripting help and help changing the title screen im using pokemon firered if that makes a difference. Thanks in advance!
     
    25
    Posts
    12
    Years
    • Seen Aug 25, 2017
    @Dazza12

    Did you Hex Edit the Level Script Header?

    If you have not:

    View the Map Header with the Advanced Mode (Strg+H)
    Note the offset written in "MAP SCRIPT OFFSET" and decompile it with XSE.

    You will see nothing, so just click the "Level Script" button (on the very right, the symbol of a tool)

    Then you will find something looking like this:

    '-----------------------
    #org 0x71C5FC
    #raw 02
    #raw pointer 0xXXXXXXX
    #raw 00

    '-----------------------
    #org 0x71C602
    #raw word 0x402A
    #raw word 0x0
    #raw pointer 0xXXXXXXX
    #raw word 0x0

    jump to the offset i marked red.
    You will find a hex code like this

    [Activation Variable] [Value of the Variable] [Offset] FF FF

    change the FF FF at the end to 00 00

    that should be it.
     
    25
    Posts
    12
    Years
    • Seen Aug 25, 2017
    Then you're doing it wrong...

    but if the level script is type 02 you have to do this
     
    4
    Posts
    10
    Years
    • Seen Jan 19, 2014
    I have 2 other scripts before this one that work fine for eg.

    *game start* walk down stairs, mum walks up to PLAYER says something and walks back to where she was. The PLAYER is free to move then. So PLAYER walks outside then my 2nd Map Script kicks in.
    A message pops up PLAYER says [ ! ] a trainer walks up to you and talks. PLAYER auto follows trainer into OAKs LAB then my 3rd Map Script kicks in the whole script runs as needed just no release on the end.

    I have narrowed the problem in my script down to the very end of it. I added an extra message on to it just before the addvar (which match the one entered in Map Script Settings) and the message popped up. But still couldn't move after the message. What I don't understand is why the 1st Map Script releases PLAYER and this one doesn't when they end exactly the same way. Except the addvar 0xXXXX are different to match the FLAG I put in.
     
    63
    Posts
    13
    Years
    • Seen Dec 6, 2023
    Trying to make a script for Fire Red, what am I doing wrong?
    It freezes the game, no matter if I had set the flag before or not

    Spoiler:
     

    Kyoko1

    Banned
    63
    Posts
    10
    Years
    • Seen Feb 27, 2014
    Is this a scrip-field? (green S in AM)
    Then you have to put in a variable in the "flag" field in AM.
     
    Status
    Not open for further replies.
    Back
    Top