• 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

Weavile05

Currently Hacking BW
1,431
Posts
13
Years
Hello, I am new here in pokecummunity and to pokemon hacking. First of all, once I take a closer look at this tutorial, it will help me out alot. secondly, does anyone know how to write a script where you can choose from multiple pokemon? kinda like a combination of the givepokemon script and the multilist? third, I'm having trouble getting this script to work.

#org $begin
lock
faceplayer
checkflag 0x3200
if b_true goto $alreadygotone
message $poke
$poke 1 =Hey kid, please, take this.
boxset 5
compare LASTRESULT 1
if 1 goto $get
message $nope
$nope 1 =Come on!!
bosxet 6
release
end

#org $get
lock
message $get1
$get1 1 =Thanks!!
boxset 6
givepokemon 25 5 0
fanfare 0x13E
message $received
$received 1 =PLAYER received Pikachu!
boxset 4
waitfanfare
#raw 0x68
steflag 0x3200
release
end

#org $alreadygotone
lock
faceplayer
message $how
$how 1 =Thanks, I couldn't handle it anymore. \p It's in better hands with you.
boxset 6
release
end

does anyone know whats wrong with it?
 
4
Posts
14
Years
  • Seen May 13, 2013
I need a little help here

Alright, before I tell you my problem, let me explain what I am trying to do with this script.

I want to know why my flags don't work.


I hope I made that clear, anyways here is the script :

Spoiler:


Any and all help is appreciated =D
 
Last edited:
1
Posts
14
Years
  • Seen Jul 17, 2010
Rival Battle Script

Does anybody know how to make a rival battle script?? I am so confused, I've searched all around the internet but there are no tutorials on them. PLEASE somebody help me!!!

EDIT: Forget it, I already learned how. I will put up a tutorial on youtube soon if anybody needs it.
 
Last edited:
9
Posts
14
Years
  • Seen May 19, 2013
Anyone, can you please tell me what I did wrong?

Code:
#org $start
countpokemon 
compare LASTRESULT 0x1
if B_<< goto $back
release
end
#org $back
message $1
boxset 6
applymovement 0x04 $move
pausemove 0x0
release
end
#org $1
$1 1 =I should go get my POKEMON\nfrom my desk.
#org $move
#raw 0x00 0x10 0xFE

What is supposed to happen is if the player has not gotten his pokemon from his desk yet, he will turn around and walk back 1 step so he can go get it. Everytime I try it, the player steps on the spot, and he cant move anymore. The music still plays, and the npc in the room still walks around, so I know the game didnt crash. He just froze. An Help?
 
79
Posts
13
Years
  • Seen Aug 27, 2014
I have a lot of events in my hack and i was wondering how to make on script after another specific one. i have my game so far starting in kanto and you get your starter and the pokedex like normal but i want my script for oaks aide to give you the national dex exactly after you get the pokedex in oaks lab if somebody could help with this i would be very grateful!
 

Funfat.

Working on scripts that fail
17
Posts
15
Years
The attached script dosn't do any thing when stepped on.

i did convert it frome .rbc to .txt .
so if you test it do the oppisite

EDIT:other factors
unknown: 0003
var number: 6001
var value: 0001
 
Last edited:

dbzmay

Advanced Adventure
212
Posts
13
Years
  • Seen Feb 4, 2019
funfat, first of all you didnt set your var. That would cause it to not work. it should be setvar 6001x0001 and in the values in advanced map it should be number : 6001 value: 0
 
17
Posts
13
Years
  • Seen Jul 10, 2011
When I use advancemap and pokescript to open a script I get

Invalid Command : pokemon
 

colcolstyles

Yours truly
1,588
Posts
15
Years
When I use advancemap and pokescript to open a script I get

Invalid Command : pokemon

As far as I know, there is no command in Pokescript called "pokemon" (and if you got an error message saying "Invalid Command", then chances are there isn't a "pokemon" command). Perhaps you meant "givepokemon"?
 
17
Posts
13
Years
  • Seen Jul 10, 2011
Nope this is exactly what it says (except the link, cuz I cant post them yet)

WELCOME TO POKESCRIPT
Copyrite Pokewitch Inc

Invalid Command : pokemon

It says this on every script, is it just a bad ROM?
 

shawn0173

Pokemon: Metallic Flames!
82
Posts
13
Years
  • Age 31
  • Seen May 7, 2013
how would i write a script to get lets say a person event like lets say a pokemon follow our character without scripting the movement for our character, so we can move our character freely and the person event still follow us like in pokemon yellow how pikachu follows the hero??
 

colcolstyles

Yours truly
1,588
Posts
15
Years
how would i write a script to get lets say a person event like lets say a pokemon follow our character without scripting the movement for our character, so we can move our character freely and the person event still follow us like in pokemon yellow how pikachu follows the hero??

To do that you're going to need to go beyond scripting. It requires ASM. There's a thread about the subject in Research & Development (link) but nobody has really given it much effort. For all intents and purposes, you should consider it impossible for the time being.
 
32
Posts
14
Years
This is kind of an irrelevant question, but I'm looking at the PokePic command and I was wondering if there was a listing of the Pokemon's hex numbers? If not, is there a program to find it out? (Don't say hex editor, please)
 

colcolstyles

Yours truly
1,588
Posts
15
Years
This is kind of an irrelevant question, but I'm looking at the PokePic command and I was wondering if there was a listing of the Pokemon's hex numbers? If not, is there a program to find it out? (Don't say hex editor, please)

You can find a list in XSE's "stdpoke.rbh" header file.
 

shawn0173

Pokemon: Metallic Flames!
82
Posts
13
Years
  • Age 31
  • Seen May 7, 2013
ASM? is this a coding kind of thing? what exactly is it?
 
47
Posts
13
Years
hi, i'm new to rom hacking and wanted to learn scripting. so i started with some simple scripts like placing a message when you step on a certain square.

#org 0xE6D800
msgbox 0x8E6D000
end

#org 0xE6D000
= Testbox

(offsets are found with free space finder)
compiling and burning worked hooray :D

so i open advance map (leaf green rom). and in pallet town i add the script.
unknown: 0003(like the tutorial said)
script offset: E6D800
i save it, when i click open script i see the script i wrote... hooray it's gona work right :D

but it doesn't. . .

when i walk over the script nothing happens... i used a diffrent script (one that moves your character one to the right)

same story, everything works until i go to test... but in this case the rom freezes.

it's probably something silly i forgot since i'm new, but i wasted half an afternoon already looking for what it could be.

any ideas?

[EDIT]
I have done some more tests and appearently i can edit existing game scripts and they will work. But any new script i add myself either does nothing or freezes up the game.
[\EDIT]
 
Last edited:
Back
Top