• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Advanced Scripting Tutorial

Status
Not open for further replies.

D-Trogh

Dead
439
Posts
18
Years
Since you PM'd me I gave you a full answer in a PM as well, but the short half is that iftrue is not a valid command. If you're read the update following that conversation you would have learned I went with TIF and FIF respectively.

You shouldn't be doing it the lazy way anyhow...
pfft. Boys!
*places hands on hips and conspires to look like my mum!*

I made some other sugggestions in the PM btw.
As I told you in the PM.. I made the IfTrue and IfFalse allias.. :P
And that's not the problem because.. well.. did you read this:
I think it's wierd the 'IfTrue $receive' doesn't work, because the 'checkflag 0x10A ; IfTrue $Item' does !!

Pff.. girls :P
 

Irish Witch

Office Jenny
147
Posts
17
Years
Dangitall!

This is what I get for scripting at 4am....

Boys and girls please remember the following!

boxset 5 (or boxset 2, whichever you use) must be followed by
: compare LASTRESULT 1

Checkflag must NOT!


This has been a sleepy witch announcement.
Now excuse me while I go turn into a pumpkin!

- LAST MINUTE EDIT -

Ps, I think the reason a lot of movement scripts don't work is becasue people get mixed up between people number, people id and event number. (assuming advanced map)
Event number is the index of the object. It is not referenced.
Peaple number is referenced by applymovement, but if it is accidentally doubled up then neither object will move!
- the above is specific to the map you're on! (you cant have 2 2's on one map) The value written in this field may be written without a 0x in front when you write you're script if you don't want the have to convert it to hex.
- - The above applies to both pokescript and Scripted!
People ID is the flag. Setting this value in a script will make the character disapear!
 
Last edited:

D-Trogh

Dead
439
Posts
18
Years
Dangitall!

This is what I get for scripting at 4am....

Boys and girls please remember the following!

boxset 5 (or boxset 2, whichever you use) must be followed by
: compare LASTRESULT 1

Checkflag must NOT!


This has been a sleepy witch announcement.
Now excuse me while I go turn into a pumpkin!
Well.. you could've told that a lil sooner !!
Just kiddin ;) I really love working with PokéScript ^^
Will you edit that in a newer release ? Or not ?
You don't need to when your busy or something.. :)

B2T
 

zak

xpert trainer
244
Posts
19
Years
.......

just a question ......... are we alowed to request scripts here? coz i got script i need written , and i really hate scripting ,
 

D-Trogh

Dead
439
Posts
18
Years
just a question ......... are we alowed to request scripts here? coz i got script i need written , and i really hate scripting ,
Well.. technicly, this even isn't the place to ask for help. As this is the Documents and Tutorials page..
Maybe when we get Scizz's (or an other Moderators) attention, we can get a 'Script-Debug Thread' next to the Simple Questions Thread ^^
Soo..

To stay on topic:
Christos, will you update this tutorial with new things soon?
I don't know what you can learn us more.. but, try it :P
 
91
Posts
17
Years
  • Seen Nov 1, 2010
(using advanced map)

If you set the persons people id to the value you use for your setflag command they should disapear.
Dont used flags in the 0x300 range though!

Also note, the applymovement command refers to the the 'people' number not the event number!


the attached text file lists all the movements (to my knowledge) and the numbers refer to the amount of cycles for that movement. ie left4 is 4 moves per 'cycle', 1 is 1 move per 'cycle' and 0 no move!

I have yet to find a straight answer as to how long a 'cycle' is though!

How this works is if you are facing up then left1 is the equvelent of tapping left (you turn left) left2 = two taps (turn left, step left) etc etc.

Finally


I think there's a command called waitmovement that will pause the script until the character stops moving????
- EDIT -
Found it! Pausemove 0x0 will make the script wait for all movement scripts to stop!
Under scripted it may also be listed as wait 0x0

Ofcourse i already tried those commands, but those commands are R/S/E only.
I need the FR/LG commands.
 

Overclocked

Paired with......Myself
72
Posts
17
Years
  • Age 30
  • Seen May 1, 2007
Just keep testing them until you get the right ones.

Also with flags, can I just use any flag (0 - 300) without harming the game? e.g. If I use the flag for Prof. Oak wanting the Pokedex, will he start wanting it again?
 

Irish Witch

Office Jenny
147
Posts
17
Years
I'm not sure whick is the flag for 'wanting' the pokedex but the reason I say avoid the 300 range is cause I've encountered a number of flags there that cause game crashes, one flag that converted the battle method to the safari zone rules (no safari balls though so no use there on it's own), one that accidentally opened the fly map? 300's and 800's seem to be where most of the system flags are stored. Use them without knowing what they are and there's potential to mess up you'r game.

Use the others freely but know that virtually every script uses a flag so if your game starts playing up then it's possible another object is using the same flag as you're script!

- EDIT -
Alternatively, make sore you remove all the existing scripted objects and program in new ones from scratch, but that could be a harrowing experience.

*Considers making an erase script command in bufrite....*
 
Last edited:

Overclocked

Paired with......Myself
72
Posts
17
Years
  • Age 30
  • Seen May 1, 2007
Sorry, what I meant by him wanting the Pokedex was him giving you the Pokedex.
So does that mean that I can just use the flag 0x1, 0x2, 0x10A without caring?
 

Irish Witch

Office Jenny
147
Posts
17
Years
Pretty much, although when I decompile Prof Birch I notice that flag 380 is the pokedex flag.. This will turn on the pokedex in the game menu!
That what you're looking for?

Theres another flag to turn on the national dex as well, no idea what it is though!!

- EDIT -
UPDATE
meowths accent :/ We're not spamming ya! Well. maybe we are!

Poke Script is now no longer in Beta Test mode and is compiling scripts smoothely without aparent error.

Please abuse freqently!

Sincerely,
Kirsty [Witch]
 
Last edited:
112
Posts
17
Years
need help with my script
Its rayquazza script so that i click on it
it asks me if i want to battle
you click no and nothing happens
click yes its meant to have its cry then the battle
but it doesnt
it just has the battle no cry before the battle

this is the script i have put in
#org 0x800000
lock
faceplayer
message 0x800100
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x800200
message 0x800300
boxset 0x6
release
end
#org 0x800200
cry 0xA1 0x196
release
wildbattle 0x196 0x46 0x3
end
#org 0x800100
= Are you sure you want to battle?
#org 0x800300
= Suit yourself

help please
 

Irish Witch

Office Jenny
147
Posts
17
Years
The script won't wait till cry is finished before starting the battle, ie, the battle music is overriding the sound of the cry!
so eithet,
.... put a pause 0x50 after the cry statement.
.... Or put a msgbox with something like "Let's do it" after the cry!
.... Or alternatively, put the cry statement in the beginning of the script before the question...
 

Overclocked

Paired with......Myself
72
Posts
17
Years
  • Age 30
  • Seen May 1, 2007
Are you sure that it's the right cry? Don't forget to put the pause in RIGHT AWAY. It won't even work if it's after the command "release".
 
Last edited:

Irish Witch

Office Jenny
147
Posts
17
Years
Ok. Here's a fun little tutorial thing I just learned I could do with my own program
<.<
>.>
... Here I designed it and I hadn't even thought of using it like this!


Inside pokescript I have special directives for performing different tasks and one of these is #rawdecode, which will decode an offsett from a source (ROM) at and dump it into a file. These are traditionally typed into the instant window but there is nothing stopping you from writing them in a script.
The attached file was made by using translexhation and the ruby thing table.
Renamed to a .rbc and compiled, will go through and decompile the offsetts for the text at the opening of the game (The stuff prof birch says) into seperate files. It will also create one solitary .buf file.

Once it's done compiling delete all the .psc files, then rename the solitary .buf file to a .rbc file...

Hey presto, a complete list by offsett of the text he says in an easy to read format instead of having to look the characters up on a table and edit them in a hex editor!!
Simply write you're text above it making sure you take up the same amount of space -- Allowing that a letter following a backslash(\p) and letters between square brackets[player] both translate into 1-byte characters!
 
19
Posts
17
Years
  • Seen Sep 5, 2008
can someone give me a base script were when i talk to someone you can choose one of three pokemon

so instead of yes and no it has grassiga, pheonx and trewin
 

Irish Witch

Office Jenny
147
Posts
17
Years
there is a 'multi' command that can do tht but I haven't figured out how to use that yet....

... But if your usign ruby then you should be able to use a RS start pokemon changer to change your pokemon then create a script that uses the following line:

special &H9C ' Choosepokemon

That will show 'Prof Birch's bag' without doing the battle or the momements, tranfer to the lab etc etc.....

All you need to do afterwards is link in the 'would you like to name your pokemon' script from my 'professional givepokemon' script in the 'script discussion thread.'
 

BlackRainbow*

Pokemon Coralo Version ?
519
Posts
17
Years
can anyone help me what's wrong whit this script
#org 0x800000
checkflag 0x1
if 0x1 call 0x800200
applymovement 0x3 0x800100
pause 0x30
setflag 0x1
end

#org 0x800200
release
end

#org 0x800100
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw 0xFE

i got run-time error 13
type mismatch
 

D-Trogh

Dead
439
Posts
18
Years
Err..
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
#raw oxA
Those need to be '0xA' not 'oxA' - -'
And use 'pausemove 0x0' instead of 'pause 0x30'
 
Status
Not open for further replies.
Back
Top