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

Blitzballer

Sarcasm: now GMO-free.
  • 215
    Posts
    17
    Years
    I was making the script to basically give the starter Pokémon in Fire Red, can anyone tell me why the script isn't working!!

    If someone can fix it, I'd be much appreciated!

    Code:
    #org $StarHop
    lock
    faceplayer
    checkflag 0x829
    if 0 goto $NeedDex
    checkflag 0x828
    if 1 goto $TakeCare
    message $GetHop
    $GetHop 1 = Ow, my back!\pExcuse me.\pWould you take care of Hoppip for me\lme?
    callstd 5
    compare LASTRESULT 1
    if 0 goto $DontHop
    givepokemon 187 5 0
    jingle
    message $GotHop
    $GotHop 1 = You recieved a Hoppip!
    setflag 0x828
    message $NamePoke
    $NamePoke 1 = Well of course you want to name it.
    namepokemon
    message $BeGood
    $BeGood 1 = Be good to Hoppip now, ya here!
    
    #org $NeedDex
    message $NeedDex
    $NeedDex 1 = Did you know that a friend of mine\lhas an old Pokedex that he doesn't\nneed anymore?\lYou should pay him a visit.
    callstd 6
    release
    end
    
    #org $DontHop
    message $DontHop
    $DontHop 1 = Fine, don't help an old man in need.\lHumph!
    callstd 6
    release
    end
    
    #org $TakeCare
    message $TakeCare
    $TakeCare 1 = Take care of your Pokemon, and\lyourself!
    callstd 6
    release
    endBy the way, I'm using Firered.
    Any Help is appreciated, THANKS!
     

    /Circa

    a face in the clouds.
  • 881
    Posts
    16
    Years
    I'm getting errors with PokeScript.
    It wont let me compile this script:

    Code:
    #org $startscript
    lock
    checkflag 0x200
    if b_true goto $finished
    applymovement 0x1 $walkingto
    pausemove 0
    message $beforegetting
    boxset 0x6
    givepokemon 0x19 0x5 0x0
    message $gettingpoke
    boxset 0x6
    applymovement 0x1 $gotpoke
    pausemove 0
    setflag 0x200
    release
    end
    
    #org $beforegetting
    = Hi \v\h01!\pYou might need a Pokemon\nbefore going on your journey.
    
    #org $gettingpoke
    =\c\h01\h02You received a Pikachu!
    
    #org $finished
    release
    end
    
    #org $walkingto
    #raw 0x09
    #raw 0x09
    #raw 0x09
    #raw 0x0B
    #raw 0x0B
    #raw 0xFE
    
    #org $gotpoke
    #raw 0x0A
    #raw 0x0A
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x03
    #raw 0xFE

    I get this error:
    Code:
    Invalid Command : E:\Pokewitch\gettingpokemon.rbc
     
  • 1,104
    Posts
    16
    Years
    I'm having trouble with my script:
    Code:
    #org $start
    #raw 0x47 0x6E 0x00 0x01 0x00
    compare 800D 0x0
    if 0x1 goto $done
    showmsgstatic $have
    $have 1 = \c\h01\h08\v\h01: I have to give Mom her\nNeckalace.
    boxset 6
    applymovement 0xFF $Move
    $Move 1 ; 0x11 0xFE
    pausemove 0
    release
    end
    
    #org $done
    release
    end

    It is alright but, after Mom takes the item, then it will go back to doing what its supposed to do.
    I want to make it so that If you step on it the first time and don't have the item, then it'll display the message.

    And after you've given the item to mom, then it'll not do anything. Anyone get what I'm saying?

    I have absollutely no idea what you're trying to say. I'm sure you're script does what you want it to.
    You're using Dabomstew's command database. I can tell. It might be better if you posted that normally next time.
    Here are the problems I found.
    compare 800D 0x0
    This doesn't check anything. 800D, doesn't mean anything.
    0x800D = LASTRESULT
    Without the "0x" in front of that 800D,it won't work.
    AND
    I'm somewhat familiar with Dabomstew's database, and showmsgstatic has an inbuilt boxset 4 in it. So you've scripted
    message $have
    boxset 4
    boxset 6

    Remove the boxset 6
    and change "showmsgstatic" to "showmsg" I'm pretty sure that uses the boxset 6 instead of 4.

    I made this script to test myself after a few successful movement scripts.
    I put alot of movements in this one to challenge myself and see if i could do it.

    this is the script.
    ____________________
    #ORG $begin
    checkflag 0x202
    if B_true goto $done
    applymovement 0x3 $hwalk1
    applymovement 0xFF $playerturn
    pausemove 0
    message $htalk
    boxset 6
    giveitem 0xD 1
    applymovement 0x3 $hgoback
    pausemove 0
    setflag 0x202
    release
    end

    #org $done
    release
    end

    #org $hgoback
    $hgoback 1 ; 0x0A 0xFE

    #org $hwalk1
    $hwalk1 1 ; 0x1E 0x1F 0x4E 0x08 0x20 0xFE

    #org $htalk
    $htalk 1 = I'm crazy and can't \p take care of this misdreavus. \pHere, you can have it!

    #org $playerturn
    $playerturn 1 ; 0x02 0xFE
    _____________________

    This is where i put the offset-
    [Archive] Script help thread


    What is supposed to happen once you step where the green script square is, the guy...
    walks up 4
    walks left 4
    jumps over the ledge 1
    walk down 1
    walk right 4

    Your player turns right
    The guy gives you a potion
    After your player receives the potion, the guy is supposed to go left 1

    Don't ask why he has to do all that, i made it to challenge myself to see if i could do it, And i can't... :-(

    You've used the worng movements. The movement 0x1E = Move up(2xNormal Speed). Not 4 steps. And same for the other movements. To move four up, you'd use 0x1E 0x1E 0x1E 0x1E or something with a slower movement.

    Nobody can help me to activate pokedex via script?... I mean...

    #org $POKEDEX
    lock
    faceplayer
    checkflag 0x200
    if B_True goto $Got
    setflag 0x800
    setflag 0x801
    setflag 0x200
    message $takethis
    $takethis 1 = Here, you need this to carry\non whit your trip on this lands.
    boxset 6
    applymovement 0xFF $move1
    $move 1 ; #Binary 0x11 0x11 0x11 0xFE
    pausemove 0
    release
    end

    #org $Got
    message $greedy
    boxset 6
    $greedy 1 = You greedy bastard...\nyou alredy have one Pokedex...\pWhy would you endd another one?
    boxset 6
    release
    end


    (just worite it now).

    So, it is SUPPOSED that setflag 0x800 and 0x801 enables Pokemon and Pokedex in menu. But, it does not work. (Maybe it's because i'm using emerald?)

    Help, would be really be apreciated. I dont want you to write me a script or anything... a explaniation will do. I just want to learn to improve my scripting skills and help people whit their scripts like you do.

    I'm not actually 100% sure what the flags are for Emerald. It's not hacked very often.
    But I think it's 0x860(Pokemon) and 0x861(Pokedex), and special 0x1F3(National DeX), It's worth a try. Please let me know if I'm wrong and I'll look again.

    I'm getting errors with PokeScript.
    It wont let me compile this script:

    Code:
    #org $startscript
    lock
    checkflag 0x200
    if b_true goto $finished
    applymovement 0x1 $walkingto
    pausemove 0
    message $beforegetting
    boxset 0x6
    givepokemon 0x19 0x5 0x0
    message $gettingpoke
    boxset 0x6
    applymovement 0x1 $gotpoke
    pausemove 0
    setflag 0x200
    release
    end
    
    #org $beforegetting
    = Hi \v\h01!\pYou might need a Pokemon\nbefore going on your journey.
    
    #org $gettingpoke
    =\c\h01\h02You received a Pikachu!
    
    #org $finished
    release
    end
    
    #org $walkingto
    #raw 0x09
    #raw 0x09
    #raw 0x09
    #raw 0x0B
    #raw 0x0B
    #raw 0xFE
    
    #org $gotpoke
    #raw 0x0A
    #raw 0x0A
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x03
    #raw 0xFE

    I get this error:
    Code:
    Invalid Command : E:\Pokewitch\gettingpokemon.rbc

    I don't know. I tried to compile the script and mine worked fine. I guess you could try moving the script to the desktop.

    how do we add sinnoh pokemon to ppokemon emerald?

    Now please tell me, how this has anything to do with scripting?
    Either look through the tutorials section or ask in the simple questions thread.
     

    Derlo

    Tired....
  • 135
    Posts
    16
    Years
    hello!
    I wanted to know because my script that activates the earthquake no this working right. I am using FR.
    here:
    ...
    special 0x136
    pause 0x20
    #raw 0x27
    ...
    ------------------
    Another thing! Which the commands in HEX that change the wether using setweather?

    Example: Rain 0x??, Snow x??

    THANKS
     

    Binary

    え?
  • 3,977
    Posts
    16
    Years
    • Seen Apr 7, 2014
    I just had a question, How do I do a give egg script? thanks in advance

    ~Celebi
     
  • 26
    Posts
    16
    Years
    • Seen Mar 20, 2011
    Thethethethe those flags worked reeeeeeeeeeeeeeeeeaaaaaaaaally well! THANKS Alot.
    BTW, wich rom is better to start hacking... FR/LF or R/S?

    I just had a question, How do I do a give egg script? thanks in advance

    ~Celebi

    #binary 7A E7 00 - #binary 7A Pk2 Pk1
    PHANPHY EGG

    In PK2 you put the last 2 numbers of the pokemon offset abd in PK1 the first 2.

    So if you want to give a Poochyena it would be: #binary 7A 1E 01

    And a redy to go script:

    #org $givephanphy
    lock
    faceplayer
    checkflag 0x200
    if B_True goto $alredygot
    message $here
    boxset 6
    $here 1 = Here \v\h01, take this egg.\nIt is supposed to be a Phanphy.
    jingle
    pause 0x10
    message $got
    boxset 6
    $got 1 = \v\h01 recieved an Egg!
    setflag 0x200
    release
    end

    #org $alredygot
    message $ag
    boxset 6
    $ag 1 = I got no more eggs left...\nI ATE THEM! HAHAHA
    release
    end
     
    Last edited:

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    This is the simple script i used to battle mew.

    _____________________

    #ORG $wildbatt
    lock
    wildbattle 151 5 0
    _____________________
    It works, but after i catch it/defeat it, it doesn't go away.
    Is there a certain comand i have to do to make it vanish?
     

    ~*Pikafan*~

    Man I gotta stop leaving!
  • 202
    Posts
    16
    Years
    • Age 30
    • Seen Oct 23, 2011
    Yes, you need to put

    #raw 0x55
    #raw 0x(per. no)
    #raw 0x00

    So if it's number (not event number) is 3, you'd put 0x03.
     

    ~*Pikafan*~

    Man I gotta stop leaving!
  • 202
    Posts
    16
    Years
    • Age 30
    • Seen Oct 23, 2011
    Make a script like this:

    #org $begin
    checkflag 0x(no. of flag in script or The pokemon menu code, depending on what game you're using)
    if B_true goto $done

    And then put whatever you need to put to block them off. If you need me to explain more, I will.
     

    Kingdra

    *-_Pokémon Larimar_-*
  • 20
    Posts
    16
    Years
    Can someone see a mistake in this script? Only person 1 move and then the vba freeze.

    Spoiler:
     
  • 26
    Posts
    16
    Years
    • Seen Mar 20, 2011
    Try changing the flags code... to 200 201 and so.

    Second you have 2 checkflag 102 in there... and both do the same

    try this:

    Spoiler:
     
  • 860
    Posts
    17
    Years
    My earthquake script works almost great..!

    But my only problem is my earthquake won't come..:(
    I have put in the special 0x136...but it wont come..
    help please
     

    Megiddo-san

    Barium - Summer '12 Return?
  • 1,308
    Posts
    16
    Years
    Make a script like this:

    #org $begin
    checkflag 0x(no. of flag in script or The pokemon menu code, depending on what game you're using)
    if B_true goto $done

    And then put whatever you need to put to block them off. If you need me to explain more, I will.

    Yes. Please explain more. I haven't been able to make any script work.
     

    ~*Pikafan*~

    Man I gotta stop leaving!
  • 202
    Posts
    16
    Years
    • Age 30
    • Seen Oct 23, 2011
    If you don't want someone to go past a script tile and someone comes to stop you, then make a script like this:

    #org $begin
    checkflag 0x200 <--That checks if the current flag has been set. If it has, then it goes to $done.
    if B_true goto $done
    applymovement 1 $mw1 <-That makes the person with the person number 1 move.
    pausemove 0 <-I learned this from thethethethe, he says putting this is easier than putting pause 0x30 or whatever. And it does.
    message $wait
    boxset 6
    applymovement 1 $mw2
    applymovement 0xFF $mw2 <-The 0xFF will make the player move
    pausemove 0
    release
    end

    #org $mw1
    $mw1 1 ; #binary 0x11 0xFE <-The 0x11 is the movement. This will make person number 1 move up one. 0xFE ends the movement.

    #org $wait
    $wait 1 = You can't leave yet.

    #org $mw2
    $mw2 1 ; #binary 0x10 0xFE

    If you compile that in poketscript (getting rid of my comments) it should work.
     
  • 26
    Posts
    16
    Years
    • Seen Mar 20, 2011
    what do you want? To block you if you dont have ANY pokemon or just one in particular?. If it is the first is easy.

    You just need the offset of Pokemon (In Menu) And Pokedex (in Emerald are 860 and 861). So it would be something likeeeeeee this:

    Spoiler:


    I think that would work
     

    Megiddo-san

    Barium - Summer '12 Return?
  • 1,308
    Posts
    16
    Years
    I want a person to be by the exit of the town: like the kid in R\S\E. I've done the right click, compile, destination, assign, burn, advancemap thing before. I used the first offset I got in the burn list: $800000, but when I talked to the person the game froze. I assigned it to the aide on the left in oak's lab. It was the first complete script in foullump's tutorial. A similar thing happened when I used above script. I talked to the person and got weird glitch letters and then the game froze. I burned, went to the very top, got the offset, created a new event, and entered the offset as the person's script.
     
    Last edited:
  • 26
    Posts
    16
    Years
    • Seen Mar 20, 2011
    I want a person to be by the exit of the town: like the kid in R\S\E. I've done the right click, compile, destination, assign, burn, advancemap thing before. I used the first offset I got in the burn list: $800000, but when I talked to the person the game froze. I assigned it to the aide on the left in oak's lab. It was the first complete script in foullump's tutorial.

    you used my script? what rom are you using?
     
    Status
    Not open for further replies.
    Back
    Top