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

O.G. Duke

a.k.a OmegaGroudon
974
Posts
17
Years
  • Seen May 18, 2016
A quick question: Where should I insert the script?
Is it open elite map and load the rom, ctrl click the event and edit the script? Then how to save the script to the rom?
 
32
Posts
17
Years
  • Seen Oct 12, 2018
got a question about that battle script

is it

#org 0x800000
trainerbattle 0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

that or

#org 0x800000
0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

this one?

is 800000 the offset then ? so $800000

do i need before i do it in scripted and compile it give a new trainer/people the script offset $80000 then compile it? thit was it i think
 

Overclocked

Paired with......Myself
72
Posts
17
Years
  • Age 30
  • Seen May 1, 2007
#org 0x800000
trainerbattle 0x0 0x1A 0x0 0x800100 0x800200
msgbox 0x800300
callstd 0x6
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

#org 0x800300
= Insert message here

Use this instead. Don't forget to fix it up though.
 
91
Posts
17
Years
  • Seen Nov 1, 2010
Heey, I've made this script.

#org 0xDDC810
faceplayer
message 0xDDC950
boxset 0x2
applymovement 0xFF 0xDDC940
pause 0x10
applymovement 0x12 0xDDC970
pause 0x10
message 0xDDC980
boxset 0x2
applymovement 0x13 0xDDF990
pause 0x70
message 0xDDD000
boxset 0x2
end

#org 0xDDC940
#raw 0x31
#raw 0xFE

#org 0xDDC950
= Go away!

#org 0xDDC970
#raw 0x01
#raw 0xFE

#org 0xDDC980
= And don't dare it to come back!

#org 0xDDF990
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0xFE

#org 0xDDD000
= Chef!\pGiovanni is in trouble!

The beginning works fine, the team rocket guy kicks me away, says his text and turns around.
But the next event ( also team rocket guy ) doesn't move!
No mather what movement.
It's just takes the time of 7 steps and then says the tekst, without moving.
Help?
 
6,355
Posts
18
Years
  • Seen Apr 16, 2020
got a question about that battle script

is it

#org 0x800000
trainerbattle 0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

that or

#org 0x800000
0x00 0x1A 0x800100 0x800200
end

#org 0x800100
= Bring it on!

#org 0x800200
= I lost...

this one?

is 800000 the offset then ? so $800000

do i need before i do it in scripted and compile it give a new trainer/people the script offset $80000 then compile it? thit was it i think

You have to compile the script to work but you can put "800000" on the trainer before if you want.

Heey, I've made this script.

#org 0xDDC810
faceplayer
message 0xDDC950
boxset 0x2
applymovement 0xFF 0xDDC940
pause 0x10
applymovement 0x12 0xDDC970
pause 0x10
message 0xDDC980
boxset 0x2
applymovement 0x13 0xDDF990
pause 0x70
message 0xDDD000
boxset 0x2
end

#org 0xDDC940
#raw 0x31
#raw 0xFE

#org 0xDDC950
= Go away!

#org 0xDDC970
#raw 0x01
#raw 0xFE

#org 0xDDC980
= And don't dare it to come back!

#org 0xDDF990
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0x6
#raw 0xFE

#org 0xDDD000
= Chef!\pGiovanni is in trouble!

The beginning works fine, the team rocket guy kicks me away, says his text and turns around.
But the next event ( also team rocket guy ) doesn't move!
No mather what movement.
It's just takes the time of 7 steps and then says the tekst, without moving.
Help?

Are the events nr. 12 and 13 in hexadecimal? Because 12 = C, 13 = D.
 
32
Posts
17
Years
  • Seen Oct 12, 2018
wen i compile i get a error

Rubikon 1.3 by Kyoufu Kawa
--------------------------------------------------------------
Loading command database...
Empty command database detected. Program halted.

i loaded the rom then did compile then saved the script under battletrainer and then did go to pet and did $800000 and tested it on the trainer doesnt work?
 

D-Trogh

Dead
439
Posts
18
Years
wen i compile i get a error

Rubikon 1.3 by Kyoufu Kawa
--------------------------------------------------------------
Loading command database...
Empty command database detected. Program halted.

i loaded the rom then did compile then saved the script under battletrainer and then did go to pet and did $800000 and tested it on the trainer doesnt work?
Plzz use the search function !
Christos in the SQT said:
Your ROM must be in your ScriptED folder with no spaces in the name.
 
32
Posts
17
Years
  • Seen Oct 12, 2018
aah ok ty forgot the search function becouse i tought it was a probleme with script orsomething

edit:when i compile it know i get overflow:S?
 
91
Posts
17
Years
  • Seen Nov 1, 2010
Are the events nr. 12 and 13 in hexadecimal? Because 12 = C, 13 = D.

I've tried that now with this script:

Spoiler:


The 'second sprite' does not takes seven steps, but just turns his head to the left.
( 0x06 is 1 step to the left. )

Any ideas?
And btw, if i try the '!' ( alert ) movement, he just jumps.
Are those movements for R/S/E or something?
If so, does anybody have the correct movements for FR/LG?
 
6,355
Posts
18
Years
  • Seen Apr 16, 2020
Replace the "6"s with "A"s. "Left0" is face left, "Left1" one step left but the person stays there and "Left2" is one normal step left.
The alert raw in the text document is for R/S/E.
 
91
Posts
17
Years
  • Seen Nov 1, 2010
Replace the "6"s with "A"s. "Left0" is face left, "Left1" one step left but the person stays there and "Left2" is one normal step left.
The alert raw in the text document is for R/S/E.

Thanks.
Last question, i not really understand the 'pause' command.
If i have seven times 0x0A, i entered pause 0x70, but when i tried it, the message came while walking at step 4.
Is it possible to raise the pause?

And do you know more FR/LG applymov. raw commands?
If not, i'll look for it by myself..
 

D-Trogh

Dead
439
Posts
18
Years
I have a question for you Christos..
Do you have a list with flags we MAY NOT use.. so, a list with flags that are used in the game..
Or, can we use whatever we want ?
 
91
Posts
17
Years
  • Seen Nov 1, 2010
Another problem .
When team rocket walks away, they just are standing there after the steps.
How can i let them disappear?
I already tried Checkflag and Setflag, but it doesn't help.
Any ideas?

And to make this post easy, christos, do you know any more FR/LG movement commands?
Would be helpfull.

Thanks in advance, frank$or.
 

D-Trogh

Dead
439
Posts
18
Years
Another problem .
When team rocket walks away, they just are standing there after the steps.
How can i let them disappear?
I already tried Checkflag and Setflag, but it doesn't help.
Any ideas?

And to make this post easy, christos, do you know any more FR/LG movement commands?
Would be helpfull.

Thanks in advance, frank$or.
I have an idea..
Try the 'movesprite' command and move those sprites outside the map.. (Or somewhere you can't see them..)
 
91
Posts
17
Years
  • Seen Nov 1, 2010
I have an idea..
Try the 'movesprite' command and move those sprites outside the map.. (Or somewhere you can't see them..)

Yes, i was also thinking about this, but this isn't good because it will take to much time to bring them out of town.
And btw, if i go into an house or something, and go out, they will be there.
If i knew the FR/LG command for 'hide' then it would be easy.
 

Irish Witch

Office Jenny
147
Posts
17
Years
Another problem .
When team rocket walks away, they just are standing there after the steps.
How can i let them disappear?
I already tried Checkflag and Setflag, but it doesn't help.
Any ideas?
(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!

And do you know more FR/LG applymov. raw commands?
If not, i'll look for it by myself..
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
Last question, i not really understand the 'pause' command.
If i have seven times 0x0A, i entered pause 0x70, but when i tried it, the message came while walking at step 4.
Is it possible to raise the pause?

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
 
Last edited:

D-Trogh

Dead
439
Posts
18
Years
Ok, I've made my second script ! [Spoiler!!]
But, it doesn't work :\ :P
(I use PokéScript, so it's written for PokéScript...)
RED » What goes wrong/Doesn't work..
BLUE » This is done every time instead of doing the good thing..
Spoiler:

I think it's wierd the 'IfTrue $receive' doesn't work, because the 'checkflag 0x10A ; IfTrue $Item' does !!

BTW:
This thread is becoming a 'Script-Debug-Help-Me-WHAAH-Thread' if you know what I mean..
I asked Scizz already to open such a thread next to the 'Simple Questions' one.. but -meh-
 

Irish Witch

Office Jenny
147
Posts
17
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.
 
Status
Not open for further replies.
Back
Top