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

rokrdude

POKEMON : SINNOH QUEST CREATOR
135
Posts
14
Years
    • Seen Oct 2, 2016
    Are we allowed to checkflag and setflag in trainerbattle script if yes then
    can anyone tell the problem in script
    The problem is after i battle the person im able to control his sprite and not mine(mine remains fixed at the position)

    Spoiler:
     

    rokrdude

    POKEMON : SINNOH QUEST CREATOR
    135
    Posts
    14
    Years
    • Seen Oct 2, 2016
    you could do that or just replace the offsets with @1 and try compiling it again.

    Sorry but i couldnt get u
    Is the script fine
    which offsets with @1 before after??

    The problem is after i battle the person im able to control his sprite and not mine(mine remains fixed at the position)

    Can u tell me what can i do to correct it?
     

    TB Pro

    Old-timer
    2,708
    Posts
    19
    Years
  • Sorry but i couldnt get u
    Is the script fine
    which offsets with @1 before after??

    The problem is after i battle the person im able to control his sprite and not mine(mine remains fixed at the position)

    Can u tell me what can i do to correct it?
    He wasn't talking to you. And yes, you can use flags in trainerbattle scripts.
     

    rokrdude

    POKEMON : SINNOH QUEST CREATOR
    135
    Posts
    14
    Years
    • Seen Oct 2, 2016
    can anyone tell the problem in script
    The problem is after i battle the person im able to control his sprite and not mine(mine remains fixed at the position)

    Spoiler:

    Any solutions to the problem?

    If we want to use custom flags in ruby like 0x900 is there a special command needed so that flag can be used in the script or can we give
    command like checkflag 0x900 before even using setflag 0x900?
     
    Last edited:
    30
    Posts
    15
    Years
    • Seen Jan 14, 2010
    Ok I've tried everything. Still dosent work, maybe its the ROM?
    EDIT: tried it with a different ROM, and it still didnt work am I compiling wrong?
     
    Last edited:

    TB Pro

    Old-timer
    2,708
    Posts
    19
    Years
  • Where do I place the offset to activate the Pokemon Menu option?
    Add-on- NarutoActor, the offset is 0x828, for your information.
    Spoiler:


    I have no clue where it goes. Thanks in advance.
    Basically anywhere before the givepokemon, though it's usually one line before it.

    EDIT ======================>

    Okay my headbutt tree script isnt working. Everything works, but there is no Pokemon battle, even if I set the encounter rate to 100% halpz?

    Code:
    #dynamic 0x800000
    
    #org @begin
    checkattack 0x1D
    compare 0x800D 0x6
    if 0x1 goto @[couldbeheadbutted]
    setanimation 0x0 0x800D
    bufferpartypokemon 0x00 0x800D
    bufferattack 0x1 0x1D
    msgbox @[question] 0x5
    compare 0x800D 0x0
    if 0x1 goto @end
    msgbox @[usedheadbutt] 0x6
    closeonkeypress
    doanimation 0x25
    waitstate
    goto @[pointertocontinuefrom]
    
    #org @[couldbeheadbutted]
    msgbox @[headbutttree] 0x6
    release
    end
    
    #org @[question]
    = A Pokémon could be hiding in this\ntree.\pShould [buffer1] use [buffer2]?
    
    #org @end
    release
    end
    
    #org @[usedheadbutt]
    = [buffer1] used [buffer2].
    
    #org @[headbutttree]
    = This tree could be headbutted.
    
    #org @[pointertocontinuefrom]
    applymovement 0x800F @[pointer]
    waitmovement 0
    special 0xAB
    releaseall
    end
    
    #org @[pointer]
    #raw 0x0 0xFE
     
    Last edited:
    8
    Posts
    14
    Years
  • I'm using JPAN's hacked Fire Red engine for my hack and scripting has been going well until I realized that due to my remapping that it has glitched up where the player goes when they "blackout/whiteout". I was wondering how I change this...it seems to be a scripting issue so I thought I'd ask it here. Is this just a matter of setting flags somewhere...?
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • I'm using JPAN's hacked Fire Red engine for my hack and scripting has been going well until I realized that due to my remapping that it has glitched up where the player goes when they "blackout/whiteout". I was wondering how I change this...it seems to be a scripting issue so I thought I'd ask it here. Is this just a matter of setting flags somewhere...?

    You have to have a level script in your Pokemon Centers (And Other healing locations)
    that include the "sethealingplace" command.
    An easy way you could do this is just remove the level script from a clean Fire Red rom, and insert it directly into your hacked one.
     

    Hoshiko Aki

    Avatar rules
    109
    Posts
    15
    Years
    • Seen Oct 17, 2011
    Whats wrong with this script?

    oncompilde:
    Spoiler:


    Compild

    Spoiler:


    Can some buddy help me?
     
    3
    Posts
    14
    Years
    • Seen Dec 25, 2009
    Can someone help me? I'm having trouble with warp scripts. Here's one that I recently put together.

    Code:
    '---------------
    #org 0x801240
    lock
    faceplayer
    countpokemon
    compare LASTRESULT 0x1
    if 0x1 goto 0x880125C
    release
    end
    '---------------
    #org 0x80125C
    lock
    faceplayer
    warp 0x18 0x58 0x0 0x0 0x0
    release
    end

    Basically, if the player has 1 pokemon in his party, he warps, if he has more or less, he doesn't warp. I want the player to warp to (24,88) or (18,58) in hex. Unfortunately, when I use this script, the game just freezes.
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
    1,069
    Posts
    16
    Years
  • I'm using JPAN's hacked Fire Red engine for my hack and scripting has been going well until I realized that due to my remapping that it has glitched up where the player goes when they "blackout/whiteout". I was wondering how I change this...it seems to be a scripting issue so I thought I'd ask it here. Is this just a matter of setting flags somewhere...?

    You have to have a level script in your Pokemon Centers (And Other healing locations)
    that include the "sethealingplace" command.
    An easy way you could do this is just remove the level script from a clean Fire Red rom, and insert it directly into your hacked one.
    Actually, using JPAN's hacked engine mans that only using sethealingplace no longer works. You need to set a few variables to the map bank, X, and Y positions of your healing place. Look at the documentation and search for "sethealingplace" in it.
     

    Darthatron

    巨大なトロール。
    1,152
    Posts
    18
    Years
  • Whats wrong with this script?

    oncompilde:
    Spoiler:


    Can some buddy help me?

    Simply put, your msgbox function points to something that isn't text, and your goto function points to text. I attempted to fix your script, though I'm not really sure what it was meant to do... Fixes are in bold.

    Can someone help me? I'm having trouble with warp scripts. Here's one that I recently put together.

    Code:
    '---------------
    #org 0x801240
    lock
    faceplayer
    countpokemon
    compare LASTRESULT 0x1
    if 0x1 goto 0x880125C
    release
    end
    '---------------
    #org 0x80125C
    [B]warpmuted 0x18 0x58 0x0 0x0 0x0[/B]
    release
    end

    Basically, if the player has 1 pokemon in his party, he warps, if he has more or less, he doesn't warp. I want the player to warp to (24,88) or (18,58) in hex. Unfortunately, when I use this script, the game just freezes.

    Try that, it seemed to fix the problem when I had a similar one. Also, you didn't need a second 'lock' and 'faceplayer' after your 'goto'.

    EDIT: Also, make sure you have a warp on the map you are warping to. ;)
     
    Last edited:

    Tropical Sunlight

    The Faltine
    3,476
    Posts
    16
    Years
  • ROM: FireRed
    Scripted in: XSE
    Script: Person
    Actual script:
    Spoiler:

    Don't mind the offset.

    Compiled:
    Spoiler:
     
    Last edited:

    Pokepal17

    More cowbell~
    1,519
    Posts
    15
    Years
  • ROM: FireRed
    Scripted in: XSE
    Script: Person
    Actual script:
    Spoiler:

    Don't mind the offset.

    You didn't tell us the problem. :D

    Anyway, I think I know.

    Checkflag doesn't use a compare.

    So it would be:

    Checkflag 0xflag
    if 0x1 goto @pointer.
     
    Status
    Not open for further replies.
    Back
    Top