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

cooley

///Keepin' it simple
  • 1,148
    Posts
    17
    Years
    First Problem with a script in a Long time, hehe....
    Well First, the script doesn't make entei appear, and it's like a Invisible entei jumping on trees!

    Second the Cry doesn't work, Third, The Message "\v\h01: Put the NUGGET in the Items poket" Doesn't disappear, ....Well, Everything after

    "Applymovement 0xFF $turn" Doesn't work.

    Code:
    #org $start
    lock
    message $neck
    $neck 1 = \v\h01: Mom's Neckalace. Take it?
    boxset 5
    compare LASTRESULT 1
    if 1 goto $got
    message $put
    $put 1 = \v\h01 left it there.
    boxset 6
    release
    end
    
    #org $got
    giveitem 0x6E 1
    #raw 0x53 0x01 0x00
    #raw 0x55  0x02 0x00
    applymovement 0x02 $entei
    pausemove 0
    applymovement 0xFF $turn
    $turn 1 ; 0x2E 0x62 0xFE
    pausemove 0
    cry 0xF4
    pause 0x28
    message $scare
    $scare 1 = \c\h01\h08\v\h01: AHHHHHH!!!!!!
    boxset 6
    applymovement 0x02 $jmp
    $jmp 1 ; 0x14 0x4E 0x4E 0x4E 0x4E 0x4E 0x4E
    pausemove 0
    #raw 53
    #raw 02
    nop
    message $have
    $have 1 = \c\h01\h08\v\h01: You don't see that every\nday.\lI have to tell someone!
    boxset 6
    setflag 0x202
    release
    end
    
    #org $entei
    #raw 0x51 0x51 0x4F 0x4F 0x51 0x51 0x51 0x51 0x51
    #raw 0x51 0xFE

    I had to refer to thethethethe's hex tutorial to try and fix it!
    Anyone willing to help out?

    Anyone? I plan on releasing my hack today(Not on these forums), I can't release it without this script.
     
    Code:
    #org $start
    lock
    message $neck
    $neck 1 = \v\h01: Mom's Neckalace. Take it?
    boxset 5
    compare LASTRESULT 1
    if 1 goto $got
    message $put
    $put 1 = \v\h01 left it there.
    boxset 6
    release
    end
    
    #org $got
    giveitem 0x6E 1
    #raw 0x53 0x01 0x00
    #raw 0x55  0x02 0x00
    applymovement 0x02 $entei
    pausemove 0
    applymovement 0xFF $turn
    $turn 1 ; 0x2E 0x62 0xFE
    pausemove 0
    cry 0xF4
    pause 0x28
    message $scare
    $scare 1 = \c\h01\h08\v\h01: AHHHHHH!!!!!!
    boxset 6
    applymovement 0x02 $jmp
    $jmp 1 ; 0x14 0x4E 0x4E 0x4E 0x4E 0x4E 0x4E
    pausemove 0
    #raw 53
    #raw 02
    nop
    message $have
    $have 1 = \c\h01\h08\v\h01: You don't see that every\nday.\lI have to tell someone!
    boxset 6
    setflag 0x202
    release
    end
    
    #org $entei
    #raw 0x51 0x51 0x4F 0x4F 0x51 0x51 0x51 0x51 0x51
    #raw 0x51 0xFE

    Well, I don't use Pokescript, so don't know if I'll be much help. On "#org $entei" you look to be missing an "0xFE" on the first line of the "#raw."

    Also, the ScriptEd command for the cry requires an "0xA1" before the Pokemon's hex number, then two "nop" commands. Like this:

    Code:
    cry 0xA1 0xpkmn
    nop
    nop

    I'm not sure if PokeScript requires this, but it's worth a shot right? I hope I was of some help.

    Spoiler:


    ^ Can anyone help this script? It's ScriptEd based.
     
    Thanks. What's wrong with you're Huge script?

    Deokishisu said:
    So, it's supposed to move you, someone's supposed to speak and then move. Then it asks you questions and, depending on what you say yes to, it sets a flag. If you keep saying no, it'll repeat the questions. Then another event is supposed to move, the one that spoke is supposed to have an exclamation point appear over his head, and then it sets a flag and ends. If you walk over the trigger event again, it says something and moves you upward.

    This is part one of a two part script. Problem is, I get an overflow error. I checked it over and I'm not sure what I did wrong.

    That's what's wrong. It's an overflow error. Problem is, I don't see anything wrong with the script, but obviously, there is.
     

    akash

    Pikachu is the best.
  • 21
    Posts
    16
    Years
    Well in elite map it says ctrl+click to view script. But when I ctrl+click the script Ed opens but it is always blank. Please help me dont just ignore it please.
     

    cooley

    ///Keepin' it simple
  • 1,148
    Posts
    17
    Years
    WARINING! Kinda big script in spoiler!

    Spoiler:


    So, it's supposed to move you, someone's supposed to speak and then move. Then it asks you questions and, depending on what you say yes to, it sets a flag. If you keep saying no, it'll repeat the questions. Then another event is supposed to move, the one that spoke is supposed to have an exclamation point appear over his head, and then it sets a flag and ends. If you walk over the trigger event again, it says something and moves you upward.

    This is part one of a two part script. Problem is, I get an overflow error. I checked it over and I'm not sure what I did wrong. Does anyone else see any problems with it? Can someone help me out?

    It works fine for me, I even played the game and it worked perfectly.
    If you want I could compile it for you, but we'll talk over PM.

    @akash: You have to go to Tools> Folder Options > then "View" Tab > Uncheck "Hide File extenstions for known files"
    It should work now.

    Is there a way to deactivate scripts from a trigger? Is there a command?
     
    Last edited:

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    O.K., i just figured out how to put a simple script in. Now, i tried to applymovements. First, before i make my own, i wanted to see if i can insert it correctily. So i copied the one follump did in his tutorial and used it. The one where the aid walks 3 steps and gives you a potion. But first off here is the script (it should work, it was from the tutorial)

    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $aidwalk1
    pause 0x30
    message $aidtalk
    boxset 6
    giveitem 0xD
    setflag 0x200
    release
    end

    #org $done
    release
    end

    #org $aidwalk1
    $aidwalk1 1 ; #binary 0x13 0x13 0x13 0xFE

    #org $aidtalk
    $aidtalk 1 = Oh, hello \v\h01.\pHere, take this potion!

    So i imputed it like this. ($80005B isthe script offset)

    [Archive] Script help thread


    Both the aid on the right and the green script square have this offset. BUt what happens is it freezes when i walk on the green script square and when i talk to the aid, he says what he would normally say but without walking over toward the player.

    Please help!
     
    @cooley: I still get the error. How 'bout I PM you and we talk more, like you said. And what do you mean by "deactivate scripts from a trigger?"

    O.K., i just figured out how to put a simple script in. Now, i tried to applymovements. First, before i make my own, i wanted to see if i can insert it correctily. So i copied the one follump did in his tutorial and used it. The one where the aid walks 3 steps and gives you a potion. But first off here is the script (it should work, it was from the tutorial)

    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $aidwalk1
    pause 0x30
    message $aidtalk
    boxset 6
    giveitem 0xD
    setflag 0x200
    release
    end

    #org $done
    release
    end

    #org $aidwalk1
    $aidwalk1 1 ; #binary 0x13 0x13 0x13 0xFE

    #org $aidtalk
    $aidtalk 1 = Oh, hello \v\h01.\pHere, take this potion!

    So i imputed it like this. ($80005B isthe script offset)

    [Archive] Script help thread


    Both the aid on the right and the green script square have this offset. BUt what happens is it freezes when i walk on the green script square and when i talk to the aid, he says what he would normally say but without walking over toward the player.

    Please help!

    Your green script square (I'll call it a trigger from now on) needs to have the right values. When you click on the trigger event, on the right hand side of A-Map, there should be some values that you can fill in (flag value, flag number, unknown, and unknown.) Try inputting these for those values, then try again:

    03 00
    7C 40
    00 00
    00 00
     

    cooley

    ///Keepin' it simple
  • 1,148
    Posts
    17
    Years
    @ Itman1234: Ok, You don't have to give the aid the offset. You don't put Pause 0x30, you just put pausemove 0, which means, it will wait until the movements complete to go on to the next line of the script.

    0x13 means to move to the right, so you would have to put this for the aid on the left so he can move 3 squares to the right.
    Fill the values like this:
    03 00
    50 40
    00 00
    00 00
     

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    @ Itman1234: Ok, You don't have to give the aid the offset. You don't put Pause 0x30, you just put pausemove 0, which means, it will wait until the movements complete to go on to the next line of the script.

    0x13 means to move to the right, so you would have to put this for the aid on the left so he can move 3 squares to the right.
    Fill the values like this:
    03 00
    50 40
    00 00
    00 00

    Ok, I did this and this is what happens.

    Well first of all, the script looks like this now:

    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $aidwalk1
    pausemove 0
    message $aidtalk
    boxset 6
    giveitem 0xD
    setflag 0x200
    release
    end

    #org $done
    release
    end

    #org $aidwalk1
    $aidwalk1 1 ; #binary 0x13 0x13 0x13 0xFE

    #org $aidtalk
    $aidtalk 1 = Oh, hello \v\h01.\pHere, take this potion!

    What happens is when i step on the script square, which is now here:
    [Archive] Script help thread




    The aid comes over but I don't face him when he comes over.
    Then he says what he normally says, and then i look and i don't even have a potion.
     

    ~*Pikafan*~

    Man I gotta stop leaving!
  • 202
    Posts
    16
    Years
    • Age 30
    • Seen Oct 23, 2011
    You forgot to put the amount of potions.

    For your script, for giveitem, it has to be:

    giveitem 0xD 1

    To give one potion.

    And you don't face him because you'd have to put:

    applymovement 0xFF $randomname

    And for that name, you'd put

    #org $randomname
    $randomname 1 ; #binary 0xwhatevernumbertoface

    So if he is above you, then you put #binary 0x01, to the left 0x02, right 0x03, and down 0x04 because you just want to make the person move in place.

    And for him to face you, you need to put 0x4A.
     

    cooley

    ///Keepin' it simple
  • 1,148
    Posts
    17
    Years
    Ok, To face down is 0x00 to face up is 0x01 to face left is 0x02 and right is 0x03.
    You do not need #binary , It wastes time, but if you want it that way, then it's your decision.
     

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    Is this what you guys mean? i tried and nothing changed, my player still didn't face the aid.

    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $aidwalk1
    pausemove 0
    message $aidtalk
    boxset 6
    giveitem 0xD 1
    setflag 0x200
    release
    end

    #org $done
    release
    end

    #org $aidwalk1
    $aidwalk1 1 ; #binary 0x13 0x13 0x13 0xFE

    #org $aidtalk
    $aidtalk 1 = Oh, hello \v\h01.\pHere, take this potion!

    #org $randomname
    applymovement 0xFF $randomname
    $randomname 1 ; #binary 0x01

    Sorry that i'm being such a hastle, I'm just totally started learning.

    Edit: I tried making another script as a test and failed, it doesn't even activate.
    Here is the script:

    #ORG $begin
    checkflag 0x200
    if B_true goto $done
    applymovement 0x01 $testwalk1
    pausemove 0
    message $test
    boxset 6
    giveitem 0x1 1
    setflag 0x200
    release
    end

    #org $done
    release
    end

    #org $testwalk1
    $testwalk1 1 ; #binary 0x65 0x01 0x01 0x01 0x03

    #org $test
    $test 1 = Oh, hello \v\h01.\pHere, take this masterball.

    What i wanted was for the person in the bottom left hand corner to first show !! and then go up 3 and right 1
    Then he is supposed to give me a master ball.
    This is what it looks like (Can you also tell me what script i'm supposed to give teh guy when i don't step on the green script space?)

    [Archive] Script help thread
     
    Last edited:

    Roddy

    Absent Scripter
  • 10
    Posts
    16
    Years
    • Seen May 5, 2008
    I heard somewhere that the third offset in the trainer script does not really continues the script.

    #org 0x800000
    lock
    faceplayer
    applymovement 0x1 0x800400
    pause 0x50
    message 0x800600
    boxset 0x6
    trainerbattle 0 001 0x800100 0x800200 0x800500
    release
    end

    #org 0x800600
    =Don't even dare to touch it!\pThey are all mine!

    #org 0x800100
    =Prepare!

    #org 0x800200
    =Gah..!

    #org 0x800400
    #raw 0x62
    #raw 0xFE

    #org 0x800700
    #raw 0x01
    #raw 0x01
    #raw 0x12
    #raw 0x11
    #raw 0x11
    #raw 0xFE

    #org 0x800500
    message 0x800900
    boxset 0x6
    setflag 0x200
    giveitem 0x3F 1
    applymovement 0x1 0x800700
    release
    end

    #org 0x800900
    =I did not expected this.\1You're indeed a talented person.\pI shall give you this, \nbut I'll face you again.

    So then, how can I do it to continue, as shown above?

    Anyone? .D
     
  • 860
    Posts
    17
    Years
    Can someone check this please...
    Spoiler:
     

    cooley

    ///Keepin' it simple
  • 1,148
    Posts
    17
    Years
    Do Not, I repeat DO NOT use the command Checkitem
    It is written this way: #raw 0x47 0x<Item> 0x00 0x<Quantity> 0x00

    Checkitem won't work because there is a bug in the coding of pokescript.
    The script looks alright, and you can write compare LASTRESULT as

    compare 0x800D 0
    if 1 goto $nono

    If It is true that you said no then it will go to $nono

    ___________________________

    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?
     

    +Sneasel™

    It's a meeee, itman!
  • 1,032
    Posts
    17
    Years
    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... :-(
     
  • 26
    Posts
    16
    Years
    • Seen Mar 20, 2011
    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
    boxset 6
    $takethis 1 = Here, you need this to carry\non whit your trip on this lands.
    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?

    (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.
     
    Status
    Not open for further replies.
    Back
    Top