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

Scripting Tutorial - PokeScript

Status
Not open for further replies.

DeadlySplash

TTL 1337 PR0 d00d
10
Posts
16
Years
Thanks for the tutorial =D
Thanks to you, and some dude asking a question about Yes/No scripts, I FINALLY have a working Yes/No script xD

Now I have a question : In the giveitem script, how would I make it so that a sprite disappears after you get the item? For example, an item ball lying on the ground. Once you pick it up, it dissapears. How do I do this?
 
Last edited:
9
Posts
16
Years
  • Seen Mar 14, 2009
Can somebody help me with my script?

trainerbattle 0 1 $MadChall $MadDefeat $MadAfter
message $MadTalk

#org $MadChall
$MadChall 1 = Ashraf: You're going down Khalil!

#org $MadDefeat
$MadDefeat 1 = Ashraf: Next time, I'll win!

#org $MadAfter
$MadAfter 1 = Ashraf:Dude you already beat me\nwhy are you still here./nKhalil:So I can rub it\nin you face\pAshraf:......

yet nobody tries to help
 
Last edited:
7
Posts
16
Years
  • Seen Jul 4, 2015
I was having so much trouble getting the hang of scripting but this has really helped me out more so than the other tutorials on it so thanks!

Just one question. Can I somehow edit an already exsisting script and change the name of an item?
Say the 'Boulderbadge' in FR Brock gives you. Even if you change the trainer sprite and name etc you still get that at the end of the battle.
 
3
Posts
16
Years
  • Seen Feb 25, 2008
Code:
#org $begin
lock
faceplayer
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6
applymovement 0x1 $coming
pausemove 0
message $comeback
$comeback 1 =Come with me!
boxset 6
applymovement 0x1 $followone
applymovement 0xFF $followtwo
pausemove 0
message $hereyago
$hereyago 1 =Don't go out..\nRemember!
boxset 6
release
end

#org $coming
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org $followone
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org $followtwo
#raw 0x0B
#raw 0x0B
#raw 0xFE

I need help with the movements. I want professor Oak to come up from the bottom of the screen, like in FR/LG, and me follow him downward 7 steps, then left 6 steps, then up 1 step and through the door.
 

/Circa

a face in the clouds.
881
Posts
16
Years
I'll only respond to a few questions, cause these should be asked in the script help thread.

Thanks for the tutorial =D
Thanks to you, and some dude asking a question about Yes/No scripts, I FINALLY have a working Yes/No script xD

Now I have a question : In the giveitem script, how would I make it so that a sprite disappears after you get the item? For example, an item ball lying on the ground. Once you pick it up, it dissapears. How do I do this?

To make a sprite dissapear, you need three #raws.

#raw 53
#raw <Peoples Number>
#raw 00

Can somebody help me with my script?



yet nobody tries to help

There are major flaws to the script, you don't even have a #org at the start of the script!

I would recommend revising.

I was having so much trouble getting the hang of scripting but this has really helped me out more so than the other tutorials on it so thanks!

Just one question. Can I somehow edit an already exsisting script and change the name of an item?
Say the 'Boulderbadge' in FR Brock gives you. Even if you change the trainer sprite and name etc you still get that at the end of the battle.

You would need a different script,
The badges are in flags, so you would need to wewrite the script and make it a specified flag to get a different badge.

Code:
#org $begin
lock
faceplayer
message $dontgoout
$dontgoout 1 =Don't go out there!\nThere are wild POKEMON!
boxset 6
applymovement 0x1 $coming
pausemove 0
message $comeback
$comeback 1 =Come with me!
boxset 6
applymovement 0x1 $followone
applymovement 0xFF $followtwo
pausemove 0
message $hereyago
$hereyago 1 =Don't go out..\nRemember!
boxset 6
release
end

#org $coming
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org $followone
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org $followtwo
#raw 0x0B
#raw 0x0B
#raw 0xFE

I need help with the movements. I want professor Oak to come up from the bottom of the screen, like in FR/LG, and me follow him downward 7 steps, then left 6 steps, then up 1 step and through the door.

You would need a checkflag at the beginning, and a setflag at the end if you wanted it to not happen over and over.

To make the script continue in another map, you would need to do a level script, So that would be a bit tricky if you haven't experimented on a spare rom before.

You might need to add some movements aswell.
 

KoolGamesX

KoolX The Ultimate Trainer
17
Posts
16
Years
  • Age 29
  • Seen Feb 19, 2009
Thanks!

Hope this Helps!:)
Can't wait for more tutorials!
 
23
Posts
16
Years
  • Seen Apr 24, 2011
hi, nice tutorial, i have a problem though. Whenever i right click my code file (written in notepad and .rbc at the end) it doesn't come up with 'compile' in the sub menu, any help please?
 

TB Pro

Old-timer
2,708
Posts
19
Years
hi, nice tutorial, i have a problem though. Whenever i right click my code file (written in notepad and .rbc at the end) it doesn't come up with 'compile' in the sub menu, any help please?

Did you save it as "All Files" instead of "Text Files"??
 

Qwerty-117

Is looking for a VBScripter
66
Posts
16
Years
Where can i download Pokescript and PkmnAdv?
I couldnt find them anywhere with google, they all came to here.
 
Last edited:
1
Posts
16
Years
  • Seen Mar 3, 2008
Hey everyone im new to the forums and very new to scripting and i was wondering if u could help when i do this:

Click save as
type in the name of the script, and at the end put .rbc
Now, click file type, and scroll down to All Files.

Go to your script location, right click and click "Compile".
Your script should open in Pokescript and then BufRite should open.
Some offsets should be listed, click the top offset and click Assign.
The window should change, click File -> Burn. Find the offset at $begin and write it down somewhere.
Open up A-Map, load the map you want the script inserted.
Click the person and there should be a box that say's: Script Offset, insert the offset there and save.

You've succesfully inserted a new script!
I get up to click assign and i get a new window which is an open file window im not sure what to do next cause i haven't got an offset for the script and if i select a pkm rom i click assgin again uncheck reserve i get a 0 next to $begin if i don't uncheck reserve i get nothing so can anyone help please because i would really like to learn how to script and i know this is a really noob question so sorry and thanks in advance
 

Master_Track

ROM Reaverz Scripter
916
Posts
16
Years
Hey everyone im new to the forums and very new to scripting and i was wondering if u could help when i do this:

I get up to click assign and i get a new window which is an open file window im not sure what to do next cause i haven't got an offset for the script and if i select a pkm rom i click assgin again uncheck reserve i get a 0 next to $begin if i don't uncheck reserve i get nothing so can anyone help please because i would really like to learn how to script and i know this is a really noob question so sorry and thanks in advance
You have to klick file-destination before you klick on the blue symbol, then this window will not open anymore.

@knight: If I don't know what script you used, I can't say what the problem is.
Try this:
Code:
#org $begin
lock
faceplayer
message $1
$1 1 = I am a man...
boxset 6
release
end

If your script is right but doesn't work, you made a mistake when compiling it into the rom.
 
3
Posts
16
Years
  • Seen Apr 19, 2008
First Test

Im trying to do the oran berry test. Works fine until after I receive the berry and try to talk to person again it freezes.

Here is my script.

#ORG $ShowScript
Lock
Faceplayer
Checkflag 0x200
if b_true go to $Alreadygot
message $Getitem
$Getitem 1 = Do you like oran berries?
Boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 = Thats too bad.
Setflag 0x200
boxset 6
release
end

#ORG $Yes
message $Hereyougo
$Hereyougo 1 = I only need 1.
boxset 6
Giveitem 0x8B 0x1
Setflag 0x200
Release
End

#ORG $Alreadygot
message $Onlyone
$Onlyone 1 = I need this other one!\pDon't be greedy!
Boxset6
Release
End
 

/Circa

a face in the clouds.
881
Posts
16
Years
Im trying to do the oran berry test. Works fine until after I receive the berry and try to talk to person again it freezes.

Here is my script.

#ORG $ShowScript
Lock
Faceplayer
Checkflag 0x200
if b_true go to $Alreadygot
message $Getitem
$Getitem 1 = Do you like oran berries?
Boxset 5
compare LASTRESULT 1
if 1 goto $yes
message $no
$no 1 = Thats too bad.
Setflag 0x200
boxset 6
release
end

#ORG $Yes
message $Hereyougo
$Hereyougo 1 = I only need 1.
boxset 6
Giveitem 0x8B 0x1
Setflag 0x200
Release
End

#ORG $Alreadygot
message $Onlyone
$Onlyone 1 = I need this other one!\pDon't be greedy!
Boxset6
Release
End

You shouldn't really come to this tutorial, as i've abandoned it.
Why do you write every command with a capital at the start? :S. It doesn't matter, it's just annoying to me.

Anyways, your only problem is that in the Alreadygot script, boxset doesn't have a space between the 6. Just a small mistake. It sometimes happens, so go over your scripts well :).
 
3
Posts
16
Years
  • Seen Apr 19, 2008
Didnt Work

1. I use capitals because I used Irish Witch's tutorial first.

2. Where do I go if I have a question about scripting.

3. It did not work putting the space between Boxset and 6. Although I think the problem is that when I'm going through the steps to put it in my rom, on the part where you click burn, it says put an offset for Berry.go and I dont know what to do so I just put anything. (The name of the file I saved for Notepad is Berry.)
 

BakingBluePotatoe

The Red Death Alchemist
2,281
Posts
16
Years
okay, how do you make it so when you walk on a certain spot, and a person says something then walks onto the screen to the player? (Yeah, bassically like the oak script)
 

Toorchic

Scripter/ROm HAx0r
11
Posts
16
Years
  • Seen Apr 24, 2008
Is there a script that gives you the pokemon if you win a battle?

Also, how do you define the trainers pokemon?

Thanks
 
824
Posts
16
Years
help!

hi,
i made a script using scriptED where a man gives you a totodile.
When i load the rom, i get a white screen.
What's wrong?
here's the script:

#org 0x811111
Lock
FacePlayer
MsgBox Hi \v\h01\! Take this\nTotodile!
BoxSet 0x6
GivePokemon 0x208 0x7 0x0
Release
End

#org 0x
= Thanks \v\h01\
Release
End
 

Nexes

Daniel
3
Posts
16
Years
Help

I cant compile this script:

'-----------------------
#org 0x800000
special 0x187
compare LASTRESULT 0x2
if 0x1 jump 0x800001
special 0x188
lock
faceplayer
checkflag 0x2E1
if 0x1 jump 0x800002
checkflag 0x2
if 0x1 jump 0x800003
#raw 0x7E
nop
msgbox 0x800004 '"I perfected the ulti..."
callstd 0x4
special2 LASTRESULT 0x1A3
compare LASTRESULT 0x0
if 0x1 jump 0x800005
copyvar 0x8009 0x8005
compare 0x800C 0x2
if 0x1 call 0x800006
compare 0x800C 0x1
if 0x1 call 0x800007
compare 0x800C 0x4
if 0x1 call 0x800008
compare 0x800C 0x3
if 0x1 call 0x800009
msgbox 0x80000A '"Oh! This is the one!..."
callstd 0x5
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
call 0x80000C
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
msgbox 0x80000D '"You will allow it?\p..."
callstd 0x4
#raw 0x68
fadescreen 0x1
goto 0x80000E
fadescreen 0x0
goto 0x80000F
end

'-----------------------
#org 0x800001
release
end

'-----------------------
#org 0x800002
msgbox 0x800010 '"After I passed on my..."
callstd 0x4
release
end

'-----------------------
#org 0x800003
msgbox 0x800011 '"I implore you to mak..."
callstd 0x4
release
end

'-----------------------
#org 0x800005
msgbox 0x800012 '"[.]No[.]\nI was just..."
callstd 0x4
release
end

'-----------------------
#org 0x800006
applymovement 0x1 0x800013
pause 0x0
return

'-----------------------
#org 0x800007
applymovement 0x1 0x800014
pause 0x0
return

'-----------------------
#org 0x800008
applymovement 0x1 0x800015
pause 0x0
return

'-----------------------
#org 0x800009
applymovement 0x1 0x800016
pause 0x0
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x800018
#raw 0xC7
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x800019
call 0x80001A
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
goto 0x80000F
end

'-----------------------
#org 0x80001B
copyvar 0x8005 0x8009
special2 LASTRESULT 0x1A4
compare LASTRESULT 0x1
if 0x1 jump 0x80001C
msgbox 0x80001D '"Gasp, gasp, gasp[.]\..."
callstd 0x4
setflag 0x2
release
end

'-----------------------
#org 0x80001E
special 0x18D
#raw 0x27
lock
faceplayer
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x80001C
msgbox 0x80001D '"Gasp, gasp, gasp[.]\..."
callstd 0x4
setflag 0x2E1
release
end


'---------
' Strings
'---------
#org 0x80001E
= I perfected the ultimate move of\nits type[.]\pBut will no one take it for\nfuture use?\p[.]Hm? Hmmm!\pY-you[.]\nTh-that \v\h02[.]
#org 0x80001F
= Oh! This is the one!\nThis is the POKéMON!\pThis \v\h02 is worthy of\nlearning my ultimate move!\pWill you allow it?\pWill you allow your \v\h02 to\nlearn my \v\h03?
#org 0x800020
= You will allow it?\pThen, let me confer my ultimate\n\v\h03 on your \v\h02.\pGgggrah-awooo!
#org 0x800021
= After I passed on my knowledge to\nyou, I felt so much relief.\pIn fact, I feel rejuvenated,\nas if I were younger again!
#org 0x800022
= I implore you to make the best\nuse of that move and gain power!
#org 0x800023
= [.]No[.]\nI was just mistaken.
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800025
= Gasp, gasp, gasp[.]\pI didn't think I could teach that\nmove while I still lived[.]
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800026
= Gasp, gasp, gasp[.]\pI have no regrets now.\nI've passed on everything I know.\pNow I can live out my life knowing\nmy work is done.

'-----------
' Movements
'-----------
#raw 52 'mov52
#raw FE 'Exit

#raw 53 'mov53
#raw FE 'Exit

#raw 54 'Hide
#raw FE 'Exit

#raw 55 'Show
#raw FE 'Exit

Whenever I try to compile it I always get this message:

Run-time error '457
This key is already associated with an element of this collection.

Can somone help me. This script is from Fire Red and its the move tutor that teaches your pokemon Blast Burn, Hydro Cannon, and Frenzy Plant. I want to put the script into Emerald.
 
Status
Not open for further replies.
Back
Top