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

Pokepal17

More cowbell~
1,519
Posts
15
Years

  • Game: Pokemon Fire Red
    Script Editor: XSE
    Script: Trigger Script

    Spoiler:


    The script works fine until it ends and it starts to play the music which is in most of the game's cave maps and it won't stop playing until I enter a map which has different music to the current map.
     
    Last edited:
    38
    Posts
    15
    Years
    • Seen Aug 27, 2009
    Im working on a hack from LG, any way that i can remove/edit this part of the intro?

    59419819zh5.jpg
     

    Andryandrew

    Italian Asm Hacker
    117
    Posts
    17
    Years
    • Age 30
    • Seen Jul 4, 2015
    OK so Iam trying to make a script where a person says something and then gives you a pokemon. and depending on whether your party is full or not give you the pokemon.

    Here's what I have:
    Spoiler:
    It still gives me the pokemon but the pokemon is at level 16 when it should be at lvl 10. Also this happens:

    Pokemon-FireRedGBA.png
    Start talking
    Pokemon-FireRedGB1A.png
    receive pokemon
    Pokemon-FireRed2GBA.png
    not sure

    Also where do I get the pokemons numbers for scripting? I only know that the above one is Pikachu from a document within XSE.

    you went wrong with static/dynamic offsets... Changes are in BOLD
     

    hot_kage

    I am like a rose cute and calm
    35
    Posts
    15
    Years
  • '---------------
    #org 0x16A2F9
    lock
    checkflag 0x82F
    if 0x0 call 0x829F6C8
    release
    end
    '---------------
    #org 0x29F6C8
    playsong 0x14B 0x0
    setvar 0x8004 0x0
    setvar 0x8005 0x3
    setvar 0x8006 0x9
    setvar 0x8007 0x2
    special 0x136
    pause 0x6
    fadedefault
    applymovement MOVE_PLAYER 0x829F700
    setflag 0x82F
    special 0x171
    waitstate
    setflag 0x1000
    setflag 0x1001
    setflag 0x1002
    release
    end

    '-----------
    ' Movements
    '-----------
    #org 0x29F700
    #raw 0x63 'Question Mark (?)
    #raw 0xFE 'End of Movements

    fixes in bold
    althoughwhat is this suppose to do exactly?
     

    darkmewham2

    Cold's catch rate- 100%. D:
    129
    Posts
    15
    Years
  • These 2 codes are meant to go together, and neither of which works...
    Code:
    #org @start
    lock
    faceplayer
    countpokemon
    #define compare 0x800D 0x1
    #define if 0x1 goto @continue
    if 0x0 goto @goaway
    checktrainerflag 0x2e6
    compare 0x800D 0x1 
    if 0x1 call @alreadybattled
    release
    end
    
    #org @continue
    = trainerbattle 0x0 0x2e6 0x0 @intro @defeat
    msgbox @msg 0x2
    end
    
    #org @intro
    = Battle commencing.
    
    #org @defeat
    = Congradulations.
    
    #org @msg
    = Please go get your\nEEVEE returned to you.
    cleartrainerflag 0x19E
    
    #org @goaway
    = POKeMON number does\nnot equal one. Try again after\nyou've talked to the man beside\nme.
    Code:
    dynamic 0x8013F7
    #org @start
    lock
    faceplayer
    countpokemon
    compare 0x800D 0x1
    if 0x1call @continue
    if 0x0 call @please
    checktrainerflag 0x2e6
    compare 0x800D 0x1
    if 0x1 goto @alreadybattled
    release
    end
    
    #org @continue
    checkflag 0x1019
    if 0x1 call @nomore
    givepokemon 0x175 0x50 0x0 0x0 0x0 0x0
    setflag 0x1019
    end
    
    #org @nomore
    msgbox @msg 0x2
    end
    
    #org @msg
    = Please go battle my sim.
    
    #org @alreadybatted
    setvar 0x8008 0x8
    call 0x1A8CAD
    checkflag 0x1000
    if 0x1 goto @how
    msgbox @yesno 0x5
    compare LASTRESULT 0x0
    if 0x1 goto @too
    call 0x1A8CBD
    compare 0x8004 0x6
    if 0x4 goto @too
    call 0x1A8CC9
    comparevars LASTRESULT 0x8009
    if 0x5 goto @not
    call 0x1A8CD9
    msgbox @thanksalot 0x4
    setflag 0x1000
    release
    end
    
    #org @not
    bufferpokemon 0x0 0x8009
    msgbox @not2 0x4
    release
    end
    
    #org @too
    bufferpokemon 0x0 0x8009
    msgbox @too2 0x4
    release
    end
    
    #org @how
    msgbox @old 0x4
    release
    end
    
    #org @thanksalot
    = Okay. Lets go.
    warp 0x4 0x2 0x3 0x0 0x0
    #org @not2
    = My hack, not yours.
    
    #org @too2
    = Why are you messing with my hack?
    
    #org @yesno
    = Okay. I'll give you your\nEEVEE back and end the SIM.
    
    #org @old
    = I'm supprised your cheats work\n in my hack. o.o

    Its logically impossible to not have the Pokemon in your party at this point in time, thats why the second code is kinda.. iffy... >.>

    My script is basically 2 people.
    Person 1 is the person who battles you.
    Person 2 gives you a Pokemon, trades it to you with Eevee, and teleports you out of the SIM.

    Person 2 gives you a SALAMENCE.
    Person 1 battles you.
    Person 2 realizes that you have battled person 1 because of the flag and trades you SALAMENCE with EEVEE.
    Person 2 warps you out of the SIM.

    fixes in bold
    althoughwhat is this suppose to do exactly?
    Looks like a follow me script.
     
    Last edited:

    amtrax

    Pheonix will rule the world...
    43
    Posts
    15
    Years
    • Seen Nov 7, 2010
    This is both a script and mapping question, but mostly just scripting, I want to add a new area to the map and I want to make that area accesable only after specific actions have been performed, most likely just beating the Elite Four but Im not sure just yet.

    So basicly how do I create a new island or a dive area that takes you to a new underwater then up to the new island and make that area only accesable after the elite four has been defeated. Like the dive area only apears when they are defeated.

    well you would probably use script tiles to simply make it that the player turns around unless the requirements have been filled
     

    Charlzard

    Banned
    3
    Posts
    15
    Years
    • Seen Mar 7, 2009
    Looks like a follow me script.

    No, It's a script that activates the running shoes, and has the player run. I don't know what the variables are there.

    well you would probably use script tiles to simply make it that the player turns around unless the requirements have been filled
    code

    Yes, all you have to do is use setflag and checkflag. In the script, put a checkflag so it checks if the flag has been set. Here's an example.

    Code:
    #org $start
    lock
    [B]checkflag 0x1002[/B]
    if 0x1 goto $done
    message $no
    boxset 6
    applymovement 0xFF $no1
    pausemove 0
    end
    
    #org $done
    release
    end
    
    #org $no
    $no = Mom: You need a Pokemon First!
    
    #org $no1
    #raw 0x10 0xFE
     

    Andryandrew

    Italian Asm Hacker
    117
    Posts
    17
    Years
    • Age 30
    • Seen Jul 4, 2015
    Do you, or anyone, know how to make it so when you answer incorrectly, she lets you retake the quiz? When you answer incorrectly, it doesn't let you take it again, :/
    uhm... when you retalk to her, it say that you've already took the quiz or she say nothing?
     
    14
    Posts
    16
    Years
    • Seen Jul 1, 2009
    hey could some one please give me a script were someone gives the player an item. because each time i do it dioesnt work. (using XSE)
     
    136
    Posts
    16
    Years
  • Code:
    #org @start
    msgbox @message 0x2
    giveitem 0x6 0x1 0x0
    release
    end
    
    #org @message
    = [blue_fr]Here, have a NET BALL.

    Here you go.
     
    224
    Posts
    16
    Years
    • Seen Mar 8, 2016
    Just a thought guys and girls.
    Is it possible to export the Deoxys script (the changing form at meteorites) and put it into Emerald?

    Yes, it should be possible. Now I have a question of my own.

    I've been trying to figure this out for ages but I just couldn't figure it out.
    I want to learn how to make scripts that deal with Ruby's real time clock like check the time, and if its a certain time go do a certain command, or like the script on cycling road on the signpost that tells you how many collisions you had and how long it took you to finish the course. Can someone help me out here?
     
    7
    Posts
    15
    Years
    • Seen Jan 20, 2013
    1-Ok, one more question, I have asked this a few tims and I still don't really know what to do. I got to a point where I can Change Rayquaza to Deoxys or Mew wich was my last resort, but really what I was looking for was Jarachi, I don't know the script offset for Jarachi and I don't know how to change the wild battle script to make it so that clicking on Rayquaza(wich will be edited into Jarachi) makes you fight Jarachi.
    2-Is there a way to place a scritp from Fire Red into Emerald, specificly the Snorlax event, and the pokeflute item. Basicly I want to make the entrance to a certain area blocked by a sleeping snorlax and have Birch give you the PokeFlute when you beat the elite four
     

    Tyzer

    Ruby Destiny Player
    3
    Posts
    15
    Years
    • Seen Feb 9, 2015
    PKSV-UI Gymleader script

    Hey, I have writed a gymleader script for the 5ft gym and when i compile it into my rom and I open it from my rom, the script is whole changed...
    Are there some faults in my script?

    Here is my script
    Code:
    #org 0x816D54E
    '-----------------------------------
    setvar 0x8004 0x6
    setvar 0x8005 0x2
    special 0x174
    trainerbattle 0x1 0x1A2 0x0 0x819832E 0x8198444 0x816D580
    checkflag 0x259
    if 0x0 jump 0x816D5A6 ' Smaller Than
    msgbox 0x8198481 ' When a pokémon uses IRON TAIL,\nit changes it's tail to steel\nand hits the opponent!
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    #org 0x816D580
    '-----------------------------------
    setvar 0x8004 0x6
    setvar 0x8005 0x1
    special 0x173
    clearflag 0x9F
    setflag 0x4B4
    setflag 0x824
    setvar 0x8008 0x5
    call 0x81A6B18
    jump 0x816D5A6
    #org 0x81A6B18
    '-----------------------------------
    copyvar 0x8000 0x8008
    compare 0x8000 0x1
    if 0x1 jump 0x81A6B76 ' Equal To
    compare 0x8000 0x2
    if 0x1 jump 0x81A6B7A ' Equal To
    compare 0x8000 0x3
    if 0x1 jump 0x81A6B81 ' Equal To
    compare 0x8000 0x4
    if 0x1 jump 0x81A6B8B ' Equal To
    compare 0x8000 0x5
    if 0x1 jump 0x81A6BA1 ' Equal To
    compare 0x8000 0x6
    if 0x1 jump 0x81A6BB4 ' Equal To
    compare 0x8000 0x7
    if 0x1 jump 0x81A6BCA ' Equal To
    compare 0x8000 0x8
    if 0x1 jump 0x81A6BE0 ' Equal To
    end
    #org 0x81A6B76
    '-----------------------------------
    cleartrainerflag 0x8E
    return
    #org 0x816D5A6
    '-----------------------------------
    msgbox 0x819850E ' Now that you have the STEELBADGE,\nthe DEFENSE of your POKéMON rises.\pIt also lets you SURF outside of\nbattle.\pAh!\nTake this, too!
    callstd MSG_NOCLOSE ' Non-closing msg
    checkitemamount 0x137 0x1
    compare LASTRESULT 0x0
    if 0x1 jump 0x816D5E7 ' Equal To
    additem 0x137 0x1
    msgbox 0x819858F ' \v\h01 received TM23\nfrom RUBEN.
    copyvarifnotzero 0x8000 0x126
    copyvarifnotzero 0x8001 0x1
    copyvarifnotzero 0x8002 0x101
    callstd 0x9 ' 
    setflag 0x259
    msgbox 0x81985AB ' This TM contains IRON TAIL,\nyou can teach it to each\npokémon that has a tail!
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    #org 0x816D5E7
    '-----------------------------------
    msgbox 0x819860D ' Make space for this, kid!
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    #org 0x81A6B7A
    '-----------------------------------
    cleartrainerflag 0x96
    cleartrainerflag 0xEA
    return
    #org 0x81A6B81
    '-----------------------------------
    cleartrainerflag 0x8D
    cleartrainerflag 0xDC
    cleartrainerflag 0x1A7
    return
    #org 0x81A6B8B
    '-----------------------------------
    cleartrainerflag 0x84
    cleartrainerflag 0x85
    cleartrainerflag 0xA0
    cleartrainerflag 0x109
    cleartrainerflag 0x10A
    cleartrainerflag 0x10B
    cleartrainerflag 0x192
    return
    #org 0x81A6BA1
    '-----------------------------------
    cleartrainerflag 0x126
    cleartrainerflag 0x127
    cleartrainerflag 0x120
    cleartrainerflag 0x121
    cleartrainerflag 0x124
    cleartrainerflag 0x125
    return
    #org 0x81A6BB4
    '-----------------------------------
    cleartrainerflag 0x118
    cleartrainerflag 0x119
    cleartrainerflag 0x11A
    cleartrainerflag 0x11B
    cleartrainerflag 0x1CE
    cleartrainerflag 0x1CF
    cleartrainerflag 0x1D0
    return
    #org 0x81A6BCA
    '-----------------------------------
    cleartrainerflag 0xB1
    cleartrainerflag 0xB2
    cleartrainerflag 0xB3
    cleartrainerflag 0xB4
    cleartrainerflag 0xD5
    cleartrainerflag 0xD6
    cleartrainerflag 0xD7
    return
    #org 0x81A6BE0
    '-----------------------------------
    cleartrainerflag 0x128
    cleartrainerflag 0x129
    cleartrainerflag 0x142
    cleartrainerflag 0x143
    cleartrainerflag 0x144
    cleartrainerflag 0x188
    cleartrainerflag 0x190
    cleartrainerflag 0x191
    return
     
    #org 0x819832E
    = RUBEN: Fwahahaha!\pA mere child like you dares to\nchallenge me?\pThe very idea makes me shiver\nwith mirth!\pWell then, if you wish,\nI'll show you the real, horrific\nstrengt of STEEL-TYPE POKéMON!\hFC\h0B\h56\h01
    #org 0x8198444
    = Humph!\nYou have proven your worth!\pHere!\nTake the STEELBADGE!
    #org 0x8198481
    = When a pokémon uses IRON TAIL,\nit changes it's tail to steel\nand hits the opponent!
    #org 0x819850E
    = Now that you have the STEELBADGE,\nthe DEFENSE of your POKéMON rises.\pIt also lets you SURF outside of\nbattle.\pAh!\nTake this, too!
    #org 0x819858F
    = \v\h01 received TM23\nfrom RUBEN.
    #org 0x81985AB
    = This TM contains IRON TAIL,\nyou can teach it to each\npokémon that has a tail!
    #org 0x819860D
    = Make space for this, kid!

    I hope you can help me with that!
     

    Andryandrew

    Italian Asm Hacker
    117
    Posts
    17
    Years
    • Age 30
    • Seen Jul 4, 2015
    Yes, it should be possible. Now I have a question of my own.

    I've been trying to figure this out for ages but I just couldn't figure it out.
    I want to learn how to make scripts that deal with Ruby's real time clock like check the time, and if its a certain time go do a certain command, or like the script on cycling road on the signpost that tells you how many collisions you had and how long it took you to finish the course. Can someone help me out here?
    mmm... yeah, it's *quite* simply... colck's data is at 02024f47 (this is the address of minute's byte of the internal clock). Hour's byte is at 02024f46. If you know ASM, you can make a routine that checks the byte; However there's some scripting commands (like comparefarbytetovar and similar) that let you make it more simply.
     

    darkmewham2

    Cold's catch rate- 100%. D:
    129
    Posts
    15
    Years
  • These 2 codes are meant to go together, and neither of which works...
    Code:
    #org @start
    lock
    faceplayer
    countpokemon
    #define compare 0x800D 0x1
    #define if 0x1 goto @continue
    if 0x0 goto @goaway
    checktrainerflag 0x2e6
    compare 0x800D 0x1 
    if 0x1 call @alreadybattled
    release
    end
    
    #org @continue
    = trainerbattle 0x0 0x2e6 0x0 @intro @defeat
    msgbox @msg 0x2
    end
    
    #org @intro
    = Battle commencing.
    
    #org @defeat
    = Congradulations.
    
    #org @msg
    = Please go get your\nEEVEE returned to you.
    cleartrainerflag 0x19E
    
    #org @goaway
    = POKeMON number does\nnot equal one. Try again after\nyou've talked to the man beside\nme.
    Code:
    dynamic 0x8013F7
    #org @start
    lock
    faceplayer
    countpokemon
    compare 0x800D 0x1
    if 0x1call @continue
    if 0x0 call @please
    checktrainerflag 0x2e6
    compare 0x800D 0x1
    if 0x1 goto @alreadybattled
    release
    end
    
    #org @continue
    checkflag 0x1019
    if 0x1 call @nomore
    givepokemon 0x175 0x50 0x0 0x0 0x0 0x0
    setflag 0x1019
    end
    
    #org @nomore
    msgbox @msg 0x2
    end
    
    #org @msg
    = Please go battle my sim.
    
    #org @alreadybatted
    setvar 0x8008 0x8
    call 0x1A8CAD
    checkflag 0x1000
    if 0x1 goto @how
    msgbox @yesno 0x5
    compare LASTRESULT 0x0
    if 0x1 goto @too
    call 0x1A8CBD
    compare 0x8004 0x6
    if 0x4 goto @too
    call 0x1A8CC9
    comparevars LASTRESULT 0x8009
    if 0x5 goto @not
    call 0x1A8CD9
    msgbox @thanksalot 0x4
    setflag 0x1000
    release
    end
    
    #org @not
    bufferpokemon 0x0 0x8009
    msgbox @not2 0x4
    release
    end
    
    #org @too
    bufferpokemon 0x0 0x8009
    msgbox @too2 0x4
    release
    end
    
    #org @how
    msgbox @old 0x4
    release
    end
    
    #org @thanksalot
    = Okay. Lets go.
    warp 0x4 0x2 0x3 0x0 0x0
    #org @not2
    = My hack, not yours.
    
    #org @too2
    = Why are you messing with my hack?
    
    #org @yesno
    = Okay. I'll give you your\nEEVEE back and end the SIM.
    
    #org @old
    = I'm supprised your cheats work\n in my hack. o.o
    Its logically impossible to not have the Pokemon in your party at this point in time, thats why the second code is kinda.. iffy... >.>

    My script is basically 2 people.
    Person 1 is the person who battles you.
    Person 2 gives you a Pokemon, trades it to you with Eevee, and teleports you out of the SIM.

    Person 2 gives you a SALAMENCE.
    Person 1 battles you.
    Person 2 realizes that you have battled person 1 because of the flag and trades you SALAMENCE with EEVEE.
    Person 2 warps you out of the SIM.


    Looks like a follow me script.
    Sorry for bumping my post, but it got buried in other questions.
     
    38
    Posts
    15
    Years
    • Seen Aug 27, 2009
    Rofl.

    Use the Search function. It's there for a reason. =P

    I know :P, ive tried searching for "change intro' and 'change intro text' But all I came up with was changing the palette of the player in the intro. And apparently the rom im hacking (LG) doesnt have the intro in Advance Text to edit.
     

    Larsie13

    Guest
    0
    Posts
    I know :P, ive tried searching for "change intro' and 'change intro text' But all I came up with was changing the palette of the player in the intro. And apparently the rom im hacking (LG) doesnt have the intro in Advance Text to edit.
    Lol, he means the Search function in Advance Text :P
     
    Status
    Not open for further replies.
    Back
    Top