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

thethethethe's Scripting Tutorial

ScripterGold

A rookie Scripter
6
Posts
13
Years
  • Regards to scripting...

    I have followed your instructions and guidelines but still cannot make this script work properly.

    Script:
    #org $Uteampeon1
    trainerbattle 1 0x006 $before $after $later
    boxset 6
    release
    end

    #org $later
    message $1
    boxset 6
    fadescreen 0x1
    #raw 0x53 0x05 0x00
    setflag 0x501
    #raw 0x53 0x06 0x00
    setflag 0x502
    #raw 0x53 0x07 0x00
    setflag 0x503
    #raw 0x53 0x08 0x00
    setflag 0x504
    #raw 0x53 0x09 0x00
    setflag 0x505
    fadescreen 0x0
    setflag 0x200
    release
    end

    #org $before
    $before 1 = Very well. I am the leader of this\nsorry bunch, let's batt......\laren't you \v\h01? The one that made my\lplans of reviving Kyorge impossible?\lLet's settle our feud once and\lfor all, NOW!, me as a PEON\lLEADER of the UNKNOWN TEAM!

    #org $after
    $after 1 = This is not the last of me!\nLet's teleport, grunts!\lGrunts: Yes Sir!
    #org $1

    $1 = I'll never forget this!

    The script was supposed to actually supposed to make the whole bunch of trainers disappear after beating their leader but I mean, it does, but when I take a step to any direction, the Overworld sprites of the trainers I want to let them vanish appear again! So, thethethethe, sorry to trouble you, but please help me out with this and correect it, maybe, asap and post the corrected script in your next post. Sorry for being so abrupt, thethethethe.

    A scripter that needs your help,
    ScripterGold

    P.S. Once again, I am very sorry to trouble you.
     

    Gym leader ???

    Sent out BLASTOISE.
    6
    Posts
    13
    Years
    • Seen Aug 2, 2018
    when I (try to) compile
    Code:
    #org $kick
    #raw 0x8F 0x0A 0x00
    compare 0x800D 0x0
    if 0x1 goto $none
    compare 0x800D 0x1
    if 0x1 goto $none
    compare 0x800D 0x2
    if 0x1 goto $none
    compare 0x800D 0x2
    if 0x1 goto $none
    compare 0x800D 0x3
    if 0x1 goto $none
    compare 0x800D 0x4
    if 0x1 goto $none
    compare 0x800D 0x5
    if 0x1 goto $none
    compare 0x800D 0x6
    if 0x1 goto $none
    compare 0x800D 0x7
    if 0x1 goto $none
    compare 0x800D 0x8
    if 0x1 goto $wild
    compare 0x800D 0x9
    if 0x1 goto $none
    release
    end
     
    #org $wild
    wildbattle 204 9 0x8B
    release
    end
     
    #org $none
    release
    end

    I get the error:
    Pokéscript said:
    Runtime error '9':
    Supscript out of range

    What is it?
     
    Last edited:

    Civet

    Civet the Cat
    31
    Posts
    13
    Years
  • For some reason, the pictures in the tutorial don't load for me. I'm looking for the answer to a problem I've come up with as the required information isn't loading. It's for an applymovement script which I'm using for my hack. The pictures I'm looking for are in the spoiler right above the ''Countpokémon'' Sub-title. It'll look like this:

    Spoiler:


    The original script is this:

    Code:
    #org $start
    checkflag 0x828
    if b_true goto $done
    message $1
    boxset 6
    applymovement 0x04 $move
    pausemove 0x0
    applymovement 0xFF $move2
    pause 0x30
    message $2
    boxset 6
    playsound 0x13E
    nop
    applymovement 0x04 $move3
    applymovement 0xFF $move3
    pausemove 0
    fadesound 0x12C
    nop
    release
    end
    
    #org $done
    release
    end
    
    #org $move
    #raw 0x62 0x12 0x12 0x12 0x12 0xFE
    
    #org $move2
    #raw 0x03 0xFE
    
    #org $move3
    #raw 0x13 0x13 0x13 0x13 0xFE
    
    #org $1
    $1 1 =Waaaiiiitttt!!!
    
    #org $2
    $2 1 =You can't go out there\nwithout your own Pokemon.\pWild Pokemon will hurt you.

    Thanks in advance.
     

    M.L

    Invisible
    761
    Posts
    13
    Years
    • Seen Dec 21, 2017
    HELP!!

    Um sorry if this is out of the concept but i cant create a certain script what im trying to do is take a movement script and add a trainer battle to it but i cant get it to work for some reason, oh and when i put it on a script when you walk over it it doesn't activate and i do not know how to fix this take a look at my script

    _________________________________________________________________
    #org $start
    checkflag 0x1F2F
    if b_true goto $done
    boxset 6
    applymovement 0x37 $move
    pausemove 0x0
    message $1
    applymovement 0xFF $move2
    pause 0x30
    playsound 0x13E
    nop
    applymovement 0x39 $move3
    applymovement 0x38 $move3
    pausemove 0
    message $2
    trainerbattle 0 0x03A
    applymovement 0x39 $move4
    applymovement 0x38 $move4
    pausemove 0
    message $3
    applymovement 0x37 $move5
    pausemove 0
    message $4
    fadesound 0x12C
    nop
    boxset6
    #raw 0x53 0x0F 0x80
    setflag 0x144F
    release
    end

    #org $done
    release
    end

    #org $move
    #raw 0x35 0x35 0x35 0x35 0x35 0x56 0xFE

    #org $move2
    #raw 0x57 0xFE

    #org $move3
    #raw 0x35 0x35 0x35 0x35 0x35 0xFE

    #org $move4
    #raw 0x36 0x36 0x36 0x36 0x36 0x36 0xFE

    #org $move5
    #raw 0x36 0x36 0x36 0x36 0x36 0x36 0xFE

    #org $1
    $1 1 =WOAH i didnt see\nyou their sorry

    #org $2
    $2 1 =GRUNTS:HEY you\n we have been looking\lfor you you shall loose\l???:help me\ntake out the one ill\ltake out the other!

    #org $3
    $3 1 =Ahhhh we lost\nwe better get out\lof here!

    #org $4
    $4 1 =Thanks im BRET\nby the way!\lBYE
    _________________________________________________________________


    can you please tell me whats wrong with it oh and can you please tell me why once i stand on the script it doesn't activate?

    PLEASE HELP THANKS

    Ohk i dono why but i took lots all the numbers and all sorts for scripting
    and put it all together so i hope this helps and makes you life easier!


    Spoiler:



    Ohk i hope it works feel free to use take edit add and more!
     
    Last edited:

    Echidna

    i don't care what's in your hair
    2,077
    Posts
    13
    Years
  • dude....one...in advanced map.....click on the vent.... and on the side....type 0003 in the first box that is amed unknown... and in the var number.....type 4051...that will let the script work when you step on it.....and why it doesn't work in the first place is cause you haven't converted the people numbers to hex..... and possibley other numbers cause i haven't read the script...but look for number sthat need to be in hex and convert them so that it will work......i hope that this helped...
     

    M.L

    Invisible
    761
    Posts
    13
    Years
    • Seen Dec 21, 2017
    haha thanx man it did help but the walking does work most of the time ;) but you see im not sure how to add the trainer battle with the movment script it doesnt work when i try so i need help their aswell cause i want it to be like a rival battle or team rocket battle chase thing you see but you did help me man thanks!
     

    Echidna

    i don't care what's in your hair
    2,077
    Posts
    13
    Years
  • ok wait... so you want the guy to walk after or before the battle... i'll help but you gotta tell me in detail what you wanna do .....
     

    M.L

    Invisible
    761
    Posts
    13
    Years
    • Seen Dec 21, 2017
    oh this "(you must walk on the script to activate it) when you walk on the script a guy walks down to you and talks to you then two grunts come and he asks you to battle the one while he takes out the outher 1 then you beat the grunts and they run away he says thanks and also walks away thats how i basically want it to work THANX ALOT youve been alot of help in many ways
     

    Echidna

    i don't care what's in your hair
    2,077
    Posts
    13
    Years
  • alright it should look like this:
    #dynamic 0xOFFSET
    #org @start
    lock
    checkflag 0x9999
    if 0x1 goto @done
    applymovement 0xfirst guy's people number @move1
    waitmovement 0x0
    msgbox @talk1 0x6
    applymovement 0xfirst grunt's people number @move2
    applymovement 0xsecond grunt's people number @move2
    waitmovement 0x0
    msgbox @talk2 0x6
    trainerbattle 0x1 0xtrainer number from a-trainer 0x0 @before1 @after1 @later1
    release
    end

    #org @later1
    msgbox @talk3 0x6
    applymovement 0xfirst grunts people number @move3
    applymovement 0xsecond grunt's people number @move3
    waitmovement 0x0
    hidesprite 0xfirst grunt's people number
    hidesprite 0xscond grunt's people number
    msgbox @talk4 0x6
    applymovement 0xguy's people number 0xmove4
    hidesprite 0xguy's people number
    setflag 0x9999
    release
    end

    #org @done
    release
    end
    .....(add here the movements and messages.....)


    now add the movements and messages as you see fit........ and you have to put the number 9999 in the person ID box in advance mpa...of the grunts and the guy...yeah all three of them... and you have to make the trainer battle prior to doing this....i advize you to check my tutorial...in my sig..this one is great..and it got me going on hacking...but mine explains a bit more.....especially about trinrer battles....check part 1 and 2 cause the scripting tutorial is deided between the two.........gd luck.......
     

    M.L

    Invisible
    761
    Posts
    13
    Years
    • Seen Dec 21, 2017
    HAHA thanks so much i understood the tutorials but could never put scripts together properly this helps alot man thank you so much !!
     
    50
    Posts
    13
    Years
    • Seen Feb 4, 2012
    Where do i download pokescript? because i checked the toolbox forum, but i didn't find anything.
     

    colcolstyles

    Yours truly
    1,588
    Posts
    15
    Years
  • Where do i download pokescript? because i checked the toolbox forum, but i didn't find anything.

    You probably can't find it because most people don't use it anymore. It's horribly outdated and buggy. Instead, you should download XSE or PKSV. Don't worry; aside from a few commands with different names, scripting is still the same.
     
    1
    Posts
    12
    Years
    • Seen Mar 19, 2013
    The very Good Friendly Tutorial Want To request you that you raise again the imagery that you deem as the Applymovement What Happens Is That without that one imagery I lost right now your you will know it

    And if perhaps you have further down servant's imagery bad what if please you go back to raise them



    Thank you very much

    For some reason, the pictures in the tutorial don't load for me. I'm looking for the answer to a problem I've come up with as the required information isn't loading. It's for an applymovement script which I'm using for my hack. The pictures I'm looking for are in the spoiler right above the ''Countpokémon'' Sub-title. It'll look like this:

    Ami neither the images let's hope that please they place them appear to me
     

    Spritingyoshi22

    That guy over there
    112
    Posts
    12
    Years
  • I have a problem whenever I try to compile a wild battle script ,in my case charmander, it comes up with a box saying run time error 9 anyone know what i am doing wrong here's the script.
    #org $begin
    lock
    faceplayer
    message $1
    boxset 6
    cry 0xA1 4
    nop
    nop
    wildbattle 4 30 0x8B
    fadescreen 0
    #raw 0x53 0x0F 0x80
    setflag 0x200
    release
    end

    #org $1
    $1 1 = CHARMANDER: Charr!
     
    5,256
    Posts
    16
    Years
  • I have a problem whenever I try to compile a wild battle script ,in my case charmander, it comes up with a box saying run time error 9 anyone know what i am doing wrong here's the script.
    #org $begin
    lock
    faceplayer
    message $1
    boxset 6
    cry 0xA1 4
    nop
    nop
    wildbattle 4 30 0x8B
    fadescreen 0
    #raw 0x53 0x0F 0x80
    setflag 0x200
    release
    end

    #org $1
    $1 1 = CHARMANDER: Charr!

    You'll probably get more of a response were you to adapt to the easiest scripting language out there that comes with HackMew's eXtreme Script Editor, or XSE.
     

    ManInTheMask

    Pro Hacker
    31
    Posts
    12
    Years
    • Seen Oct 27, 2016
    Ummmmm............. Let's just say that this tut doesn't have a tutorial on trainer battle scripts WITH different battle music used for the battle scene, like in Gold, Silver, and Crystal, where the battle music is different between Johto and Kanto regions.
     
    275
    Posts
    13
    Years
    • Seen Oct 9, 2019
    Ummmmm............. Let's just say that this tut doesn't have a tutorial on trainer battle scripts WITH different battle music used for the battle scene, like in Gold, Silver, and Crystal, where the battle music is different between Johto and Kanto regions.
    To the best of my knowledge, you actually can't do that in Advance-gen games using just a script. It requires ASM hacking.
     

    TheShinyMew

    Wild Challenger appeared!
    125
    Posts
    13
    Years
  • Hehehe. I just made a Wigglytuff battle script in FireRed with messages. Here:

    Code:
    #org 0x874007F
    '-----------------------------------
    special INIT_STEPCOUNT
    compare LASTRESULT 0x2
    if == jump 0x81A7AE0 ' Equal To
    special GET_STEPCOUNT
    lock
    faceplayer
    checksound
    cry WIGGLYTUFF 0x2
    message 0x8740102 ' Wiggly!
    showmsg
    waitcry
    pause 0x14
    playsound 0x2 0x2
    battle WIGGLYTUFF 70 LUMBERRY
    setflag 0x807
    special BATTLE_PIXELLATE
    waitspecial
    clearflag 0x807
    special2 LASTRESULT 0xB4
    compare LASTRESULT 0x1
    if == jump 0x8162558 ' Equal To
    compare LASTRESULT 0x4
    if == jump 0x8162561 ' Equal To
    compare LASTRESULT 0x5
    if == jump 0x8162561 ' Equal To
    setflag 0x202
    release
    end
    
    #org 0x81A7AE0
    '-----------------------------------
    release
    end
    
    #org 0x8162558
    '-----------------------------------
    setflag 0x2BC
    jump 0x81A922D
    
    #org 0x81A922D
    '-----------------------------------
    fadescreen FADEOUT_BLACK
    disappear LASTTALKED
    fadescreen FADEIN_BLACK
    release
    end
    
    #org 0x8162561
    '-----------------------------------
    setvar 0x8004 0x96
    jump 0x81A9236
    
    #org 0x81A9236
    '-----------------------------------
    fadescreen FADEOUT_BLACK
    disappear LASTTALKED
    fadescreen FADEIN_BLACK
    storepokemon 0x0 0x8004
    msgbox 0x81A63C4 ' The \v\h02 flew away...
    callstd MSG_NOCLOSE ' Non-closing message
    release
         ' Release commands close any open messages
    end
    
    
    #org 0x8740102
    = Wiggly!
    
    #org 0x81A63C4
    = The \v\h02 flew away!

    Test it and works.
     
    Back
    Top