• 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.
860
Posts
17
Years
  • Nice new topic...:)

    I need help with a script tile in A-Map I want it to act like this:
    you can walk over it --->--->
    but you cant go back !<---

    If someone understands please help..XD
     

    akash

    Pikachu is the best.
    21
    Posts
    16
    Years
  • Could anyone help me? How do you use script editor? And how do you get the offsets for advanced map? And does anyone know how to make a trade pokemon script?
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Age 29
    • Seen Apr 7, 2014
    Could anyone help me? How do you use script editor? And how do you get the offsets for advanced map? And does anyone know how to make a trade pokemon script?

    Please read this for learning how to script and how to insert the script etc.

    ~Celebi
     

    linkandzelda

    Ex-rom hacker turned indie game developer
    777
    Posts
    17
    Years
  • Can sombody tell me if this part of script will do what i want:

    i want it to check for an item. if i have 1 or more then it goes to $????. if i have non then it continues

    checkitem 0x6
    compare LASTRESULT 1
    if B_>> goto $????



    thanks in advance
    link
     

    Twinx

    s o m e t h i n g M O R E
    1,802
    Posts
    17
    Years
  • I'm trying to learn how to script, I'm using Pokescript, but the problem is almost every script I compile doesn't work fully.

    Most of the time I get a red screen. Why does this happen?

    Here is the last script I tried and the same thing happened:
    Spoiler:


    The person says : "Oh, hello. Here take this potion."... RED SCREEN

    Is it the rom I'm using? I don't think there is anything wrong with the script...
    Anyway help is appreciated.
     
    860
    Posts
    17
    Years
  • I'm trying to learn how to script, I'm using Pokescript, but the problem is almost every script I compile doesn't work fully.

    Most of the time I get a red screen. Why does this happen?

    Here is the last script I tried and the same thing happened:
    Spoiler:


    The person says : "Oh, hello. Here take this potion."... RED SCREEN

    Is it the rom I'm using? I don't think there is anything wrong with the script...
    Anyway help is appreciated.

    You'll see the changes in the spoiler:
    Spoiler:


    I think it works now..:)I'm not to good at scripting but this should work.
     

    Twinx

    s o m e t h i n g M O R E
    1,802
    Posts
    17
    Years
  • 10x Poke-roy :) I think the giveitem command was the problem.

    Spoiler:



    I compiled the script and I burned it to an offset or whatever (8002F5). Now I want this script to occur when a player steps on a tile. I tried creating an event in a-map, I put 8002F5 in the script offset and the following settings:
    unknowns: 03 00
    Var number: 03 00
    var value: 50 40
    Unknown: 00 00

    yet when the player steps on the tile nothing happens... now what did I do wrong?
    I compiled the script and I burned it to an offset or whatever (8002F5). Now I want this script to occur when a player steps on a tile. I tried creating an event in a-map, I put 8002F5 in the script offset and the following settings:

    unknowns: 03 00
    var number: 03 00
    var value: 50 40
    Unknown: 00 00

    yet when the player steps on the tile nothing happens... now what did I do wrong?
     
    Last edited:
    860
    Posts
    17
    Years
  • 10x Poke-roy :) I think the giveitem command was the problem.

    Spoiler:



    I compiled the script and I burned it to an offset or whatever (8002F5). Now I want this script to occur when a player steps on a tile. I tried creating an event in a-map, I put 8002F5 in the script offset and the following settings:
    unknowns: 03 00
    Var number: 03 00
    var value: 50 40
    Unknown: 00 00

    yet when the player steps on the tile nothing happens... now what did I do wrong?
    I compiled the script and I burned it to an offset or whatever (8002F5). Now I want this script to occur when a player steps on a tile. I tried creating an event in a-map, I put 8002F5 in the script offset and the following settings:

    unknowns: 03 00
    var number: 03 00
    var value: 50 40
    Unknown: 00 00

    yet when the player steps on the tile nothing happens... now what did I do wrong?

    Did you place it in a script tile?
    And btw the numbers I use normally are
    03 00
    7C 40
    00 00
    00 00

    try it and maybe it works..;)
     
    860
    Posts
    17
    Years
  • The numbers work great... I don't know how to thank you man :)
    Poke-Roy, you're my hero :P

    Your welcome..:)
    Just want to help people:D


    Really need help with a script tile people...
    my problem is I want the player to walk over it and then it doesn't do anything but when he tries to walk back it says something and sends you back..
     

    linkandzelda

    Ex-rom hacker turned indie game developer
    777
    Posts
    17
    Years
  • Poke-Roy: the first time he walks over the tile set a flag. then when he walks over it again check that flag and applymovement him away. i don't have time to wright the script now but i hope you get the idea.

    hope it helps
    link

    EDIT: try this:

    #org $begin
    checkflag 0x200
    if B_TRUE goto $cantgoback
    setflag 0x200
    release
    end

    #org $cantgoback
    lock
    faceplayer
    message $nogoingback
    boxset 6
    applymovement 0xFF $back
    pause 0x20
    release
    end

    #org $nogoingback
    $nogoingback 1 = Sorry. You can't go back!

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

    that should work although its untested.
    link

    EDIT2: I have a problem with this script. if anybody can spot any problems it would be good. its quite long. its a script for kurt from g/s/c

    #org $begin
    lock
    faceplayer
    checkflag 0x106B
    if B_TRUE goto $afterrocket
    message $speak
    boxset 6
    applymovement 0x01 $kurtleave
    applymovement 0xFF $playermove
    pause 0x40
    setflag 0x1068
    setflag 0x1069
    release
    end

    #org $afterrocket
    checkflag 0x106E
    if B_TRUE goto $ballmaker
    message $iwillmake
    boxset 6
    giveitem 0x06 0x01
    setflag 0x106E
    goto $ballmaker
    release
    end

    #org $ballmaker
    checkflag 0x1077
    if B_TRUE goto $makingball
    message $apricorn
    boxset 6
    checkitem 0xA9
    compare LASTRESULT 1
    if B_>> goto $gotred
    checkitem 0xAA
    compare LASTRESULT 1
    if B_>> goto $gotgrn
    checkitem 0xAB
    compare LASTRESULT 1
    if B_>> goto $gotblu
    checkitem 0xAC
    compare LASTRESULT 1
    if B_>> goto $gotwht
    checkitem 0xAD
    compare LASTRESULT 1
    if B_>> goto $gotblk
    checkitem 0xAE
    compare LASTRESULT 1
    if B_>> goto $gotpnk
    checkitem 0xAF
    compare LASTRESULT 1
    if B_>> goto $gotylw
    message $no
    boxset 6
    release
    end

    #org $gotred
    message $red
    boxset 5
    compare LASTRESULT B_FALSE
    if B_TRUE goto $netball
    checkitem 0xAA
    compare LASTRESULT 1
    if B_>> goto $gotgrn
    checkitem 0xAB
    compare LASTRESULT 1
    if B_>> goto $gotblu
    checkitem 0xAC
    compare LASTRESULT 1
    if B_>> goto $gotwht
    checkitem 0xAD
    compare LASTRESULT 1
    if B_>> goto $gotblk
    checkitem 0xAE
    compare LASTRESULT 1
    if B_>> goto $gotpnk
    checkitem 0xAF
    compare LASTRESULT 1
    if B_>> goto $gotylw
    message $no
    boxset 6
    release
    end

    #org $gotgrn
    message $grn
    boxset 5
    compare LASTRESULT B_FALSE
    if B_TRUE goto $diveball
    checkitem 0xAB
    compare LASTRESULT 1
    if B_>> goto $gotblu
    checkitem 0xAC
    compare LASTRESULT 1
    if B_>> goto $gotwht
    checkitem 0xAD
    compare LASTRESULT 1
    if B_>> goto $gotblk
    checkitem 0xAE
    compare LASTRESULT 1
    if B_>> goto $gotpnk
    checkitem 0xAF
    compare LASTRESULT 1
    if B_>> goto $gotylw
    message $no
    boxset 6
    release
    end

    #org $gotblu
    message $blu
    boxset 5
    compare LASTRESULT B_FALSE
    if B_TRUE goto $nestball
    checkitem 0xAC
    compare LASTRESULT 1
    if B_>> goto $gotwht
    checkitem 0xAD
    compare LASTRESULT 1
    if B_>> goto $gotblk
    checkitem 0xAE
    compare LASTRESULT 1
    if B_>> goto $gotpnk
    checkitem 0xAF
    compare LASTRESULT 1
    if B_>> goto $gotylw
    message $no
    boxset 6
    release
    end

    #org $gotwht
    message $wht
    boxset 5
    compare LASTRESULT B_FALSE
    if B_TRUE goto $repeatball
    checkitem 0xAD
    compare LASTRESULT 1
    if B_>> goto $gotblk
    checkitem 0xAE
    compare LASTRESULT 1
    if B_>> goto $gotpnk
    checkitem 0xAF
    compare LASTRESULT 1
    if B_>> goto $gotylw
    message $no
    boxset 6
    release
    end

    #org $gotblk
    message $blk
    boxset 5
    compare LASTRESULT B_FALSE
    if B_TRUE goto $timerball
    checkitem 0xAE
    compare LASTRESULT 1
    if B_>> goto $gotpnk
    checkitem 0xAF
    compare LASTRESULT 1
    if B_>> goto $gotylw
    message $no
    boxset 6
    release
    end

    #org $gotpnk
    message $pnk
    boxset 5
    compare LASTRESULT B_FALSE
    if B_TRUE goto $luxuryball
    checkitem 0xAF
    compare LASTRESULT 1
    if B_>> goto $gotylw
    message $no
    boxset 6
    release
    end

    #org $gotylw
    message $ylw
    boxset 5
    compare LASTRESULT B_FALSE
    if B_TRUE goto $premierball
    message $no
    boxset 6
    release
    end

    #org $netball
    message $makeball
    boxset 6
    setflag 0x1070
    setflag 0x1077
    setflag 0x1079
    clearflag 0x1078
    removeitem 0xA9 1
    release
    end

    #org $diveball
    message $makeball
    boxset 6
    setflag 0x1071
    setflag 0x1077
    setflag 0x1079
    clearflag 0x1078
    removeitem 0xAA 1
    release
    end

    #org $nestball
    message $makeball
    boxset 6
    setflag 0x1072
    setflag 0x1077
    setflag 0x1079
    clearflag 0x1078
    removeitem 0xAB 1
    release
    end

    #org $repeatball
    message $makeball
    boxset 6
    setflag 0x1073
    setflag 0x1077
    setflag 0x1079
    clearflag 0x1078
    removeitem 0xAC 1
    release
    end

    #org $timerball
    message $makeball
    boxset 6
    setflag 0x1074
    setflag 0x1077
    setflag 0x1079
    clearflag 0x1078
    removeitem 0xAD 1
    release
    end

    #org $luxuryball
    message $makeball
    boxset 6
    setflag 0x1075
    setflag 0x1077
    setflag 0x1079
    clearflag 0x1078
    removeitem 0xAE 1
    release
    end

    #org $premierball
    message $makeball
    boxset 6
    setflag 0x1076
    setflag 0x1077
    setflag 0x1079
    clearflag 0x1078
    removeitem 0xAF 1
    release
    end

    #org $noapricorn
    release
    end

    #org $makingball
    checkflag 0x107B
    if B_TRUE goto $madeball
    message $makeball
    boxset 6
    release
    end

    #org $madeball
    message $finished
    boxset 6
    checkflag 0x1070
    if B_TRUE goto $givenet
    checkflag 0x1071
    if B_TRUE goto $givedive
    checkflag 0x1072
    if B_TRUE goto $givenest
    checkflag 0x1073
    if B_TRUE goto $giverepeat
    checkflag 0x1074
    if B_TRUE goto $givetimer
    checkflag 0x1075
    if B_TRUE goto $giveluxury
    checkflag 0x1076
    if B_TRUE goto $givepremier
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $givenet
    giveitem 0x6 0x1
    message $great
    boxset 6
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $givedive
    giveitem 0x7 0x1
    message $great
    boxset 6
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $givenest
    giveitem 0x8 0x1
    message $great
    boxset 6
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $giverepeat
    giveitem 0x9 0x1
    message $great
    boxset 6
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $givetimer
    giveitem 0xA 0x1
    message $great
    boxset 6
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $giveluxury
    giveitem 0xB 0x1
    message $great
    boxset 6
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $givepremier
    giveitem 0xC 0x1
    message $great
    boxset 6
    clearflag 0x1077
    clearflag 0x107B
    release
    end

    #org $speak
    $speak 1 = Hm? Who are you?\p\v\h01, eh? You want me to make\nsome BALLS?\pSorry, but that'll have to wait.\nDo you know TEAM ROCKET? Ah, don't\lworry. I'll tell you anyhow.\pTEAM ROCKET's an evil gang that\nuses POKéMON for their dirty work.\pThey're supposed to have disbanded\nthree years ago.\pAnyway, they're at the WELL, cutting\noff SLOWPOKETAILS for sale!\pSo I'm going to go give them a\nlesson in pain!\pHang on, SLOWPOKE! Old KURT is on his\nway!

    #org $kurtleave
    $kurtleave 1 ; 0x1D 0x1D 0x1D 0x1D 0x1F 0x04 0x60 0x1D 0x1D 0xFE

    #org $iwillmake
    $iwillmake 1 = KURT: Hi, \v\h01!\pYou handled yourself like a real\nhero at the WELL.\pI like your style!\pI would be honored to make BALLS for\na trainer like you.\pThis is all I have now, but take it.

    #org $apricorn
    $apricorn 1 = KURT: I make BALLS from APRICORNS.\nCollect them from trees and bring\l'em to me.\pI'll make BALLS out of them.

    #org $no
    $no 1 = KURT: Oh... That's a letdown.

    #org $red
    $red 1 = KURT: You have a RED APRICORN for me?\nShould I turn it into a NET BALL.

    #org $grn
    $grn 1 = KURT: You have a GRN APRICORN for me?\nShould I turn it into a DIVE BALL.

    #org $blu
    $blu 1 = KURT: You have a BLU APRICORN for me?\nShould I turn it into a NEST BALL.

    #org $wht
    $wht 1 = KURT: You have a WHT APRICORN for me?\nShould I turn it into a REPEAT BALL.

    #org $blk
    $blk 1 = KURT: You have a BLK APRICORN for me?\nShould I turn it into a TIMER BALL.

    #org $pnk
    $pnk 1 = KURT: You have a PNK APRICORN for me?\nShould I turn it into a LUXURY BALL.

    #org $ylw
    $ylw 1 = KURT: You have a YLW APRICORN for me?\nShould I turn it into a PREMIER BALL.


    #org $makeball
    $makeball 1 = KURT: It'll take a while to make you\na BALL. Come back for it later.

    #org $finished
    $finished 1 = KURT: Ah, \v\h01! I just finished\nyour BALL. Here!

    #org $great
    $great 1 = KURT: That turned out great.\nTry catching POKéMON with it.

    #org $playermove
    $playermove 1 ; #binary 0x12 0x03 0xFE
     
    Last edited:

    cooley

    ///Keepin' it simple
    1,148
    Posts
    17
    Years
  • Umm....Your script should not use the "CheckItem" Command. It should be written like this:
    Code:
    #raw 0x47 0x(item) 0x00 0x(Amount) 0x00
    compare LASTRESULT 0x1
    if 0x1 goto $fin

    That is an example.
     

    Piplup-Trainer

    This is my custom user title.
    228
    Posts
    16
    Years
  • Good idea to open a new script help thread.

    By the way, does someone of you know the commands, which does the following :

    1) The person looks at the wall and talks with himself.
    2) Then he turns to you and a "!" appears

    It should be like the event were May/Brendan
    - looks at his/her table and packs his bag
    - and then turns to you

    That event happens in LITTERROOT TOWN in his/her room.

    Can someone give me a example and explain me what the first command, then the secons command,... means (I'm a beginning scripter) ?
     
    860
    Posts
    17
    Years
  • Good idea to open a new script help thread.

    By the way, does someone of you know the commands, which does the following :

    1) The person looks at the wall and talks with himself.
    2) Then he turns to you and a "!" appears

    It should be like the event were May/Brendan
    - looks at his/her table and packs his bag
    - and then turns to you

    That event happens in LITTERROOT TOWN in his/her room.

    Can someone give me a example and explain me what the first command, then the secons command,... means (I'm a beginning scripter) ?

    Let me think..the command for looking at a wall can be left right up down..XD
    so these are left right up down (only looks no walking)
    0x01 = Up
    0x02 = Left
    0x03 = Right
    0x04 = Down
    These can also be used to turn and look at someone and then
    0x62 makes the "!" pop up...

    and if you really dont know hoe to use these commands you could do this:
    Code:
    #org $begin
    checkflag 0x200
    message $talktomyself
    $talktomyself 1 =Here comes the text you want him to say.
    boxset 6
    applymovement 0x(people number) $turn
    pausemove 0
    message $talktoplayer
    $talktoplayer 1 =Here comes the text of what the person says to you (if you want it)
    setflag 0x200
    release
    end
    
    #org $turn
    $turn 1 ; #binary 0x(left, right, down or up) 0x62 0xFE

    If i'm right this is the script..:)
     

    /Circa

    a face in the clouds.
    881
    Posts
    16
    Years
  • I have an idea of implementing the day/night system into FireRed, though yes, it would be complicated, and require alot of different scripts but I think it's worth it.

    Wouldn't it be something like this:

    Code:
    #org weather
    checkflag 0x200
    compare LASTRESULT 0x1
    if 0x1 goto dark
    
    #org dark
    setweather 0xB
    doweather
    end

    And then you would use a different script to change it back, or you could have two bits to it in the same one, so when he lands on it one way it turns dark, but then removes the flag of the daylight one in the same script until he lands on another weather script tile.. If that makes any sense...
     
    34
    Posts
    16
    Years
    • Seen Oct 16, 2008
    I am trying to write my first script, and I am having quite a few problems. This is the script that I am trying to get to work:
    Code:
    #org $ini
    checkflag 0x830
    if 1 goto $gotstarter
    checkflag 0x200
    if 1 goto $gotoshrine
    applymovement 0x01 $mothermove
    $mothermove 1 ; #binary 0x01 0x01 0x03 0x4A 0xFE
    pause 0x40
    message $oakwill
    $oakwill 1 = Sob...sniff\n It's terrible...\p 
    Professor Oak...\n He died.\p 
    \v\h01 he left you something in his 
    will.\n Here, I will read it.\p To \v\h01, I was going to give you\n this in person but\p I was not able to.  I left you\n a Pokedex in your mothers\p posession.\p I also hid a pokemon for you in the shrine\n I am sure you can find it.\p Take it and carry it with pride \n \v\h01 that is my gift to you.\p Now go and become a great trainer\n Sincerly, Professor Oak
    boxset 6
    
    setflag 0x829
    message $recievedex
    $recievedex 1 = You obtained the Pokedex!
    boxset 6
    
    message $onyourway
    $onyourway 1 = \v\h01 you must go and make Oak proud.\n Go to the shrine and claim your pokemon.
    boxset 6
    release
    end
    
    #org $gotstarter
    message $gogogo
    $gogogo 1 = Go and make me and Oak proud.
    boxset 6
    release
    end
    
    #org $gotoshrine
    message $gotoshrinemessage
    $gotoshrinemessage 1 = \v\h01 you must go and make Oak proud. \n Go to the shrine and claim your pokemon.
    boxset 6
    release
    end
    In Advance map I am using (and thoroughly don't understand):
    Unknown: 03 00
    Var Number: 7C 40
    Var Value: 00 00
    Unknown: 00 00


    What happens when it runs is, when it is triggered, the person turns (and doesnt move like they are supposed to), and then a yes/no input box pops up, and then it is all shot from then on, it displays a few menus, and a lot of random text (resembles CE but both w/ accents).
    Could this arise from the fact that I am attempting to give the player a pokedex before they have been given their first pokemon?

    Any help would be greatly appreciated.
     

    0m3ga_S1nn3r

    Beginner Hacker :)
    80
    Posts
    16
    Years
  • OK, i really suck at scripting so if someone could, could they explain how to use it for noobs and where do i get script ed?? if someone could tell me then thank you sooooooooooo much.(they'll become my new bestfriend)
     
    Status
    Not open for further replies.
    Back
    Top