Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] Scripting Tutorial - PokeScript

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
 
Thread Tools
  #51    
Old February 28th, 2008 (08:10 AM).
mcdooby mcdooby is offline
 
Join Date: Feb 2008
Posts: 1
Hey everyone im new to the forums and very new to scripting and i was wondering if u could help when i do this:

Quote:
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
  #52    
Old February 28th, 2008 (08:29 AM).
Vegeta™'s Avatar
Vegeta™ Vegeta™ is offline
 
Join Date: Jul 2007
Location: London, UK
Age: 24
Gender: Male
Nature: Adamant
Posts: 425
Hey i just did that but when iload the rom up then go to talk to that person it doesnt allow me to talk to him.
__________________
My Pokemon Y Team:


My Pokemon Alpha Sapphire Team:
  #53    
Old March 29th, 2008 (10:35 AM).
Master_Track's Avatar
Master_Track Master_Track is offline
ROM Reaverz Scripter
 
Join Date: Mar 2008
Location: Austria
Age: 22
Gender:
Nature: Brave
Posts: 916
Send a message via Windows Live Messenger to Master_Track
Quote originally posted by mcdooby:
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.
__________________

*Busy with school*

  #54    
Old April 3rd, 2008 (10:40 PM).
qwerty10 qwerty10 is offline
 
Join Date: Mar 2008
Gender:
Posts: 3
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
  #55    
Old April 3rd, 2008 (11:23 PM).
/Circa's Avatar
/Circa /Circa is offline
a face in the clouds.
 
Join Date: Nov 2007
Location: Melbourne, Victoria
Gender: Male
Nature: Quiet
Posts: 881
Quote originally posted by qwerty10:
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? . 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 .
__________________
dragging himself, forw
ard again, the pain has
still not diminished. E
ventually though, he e
merges inside a v
ery large room w

here everything about

the house

suddenly

changes.
  #56    
Old April 4th, 2008 (03:05 PM).
qwerty10 qwerty10 is offline
 
Join Date: Mar 2008
Gender:
Posts: 3
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.)
  #57    
Old April 9th, 2008 (07:01 PM).
BakingBluePotatoe's Avatar
BakingBluePotatoe BakingBluePotatoe is offline
The Red Death Alchemist
 
Join Date: Aug 2007
Location: Catatonia
Age: 20
Gender: Female
Nature: Brave
Posts: 2,333
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)
__________________

Tausch Mit Mir?: 2208-5032-7062
Proud Member of Chaos Control & Equivalent Exchange!
Outlinks:
Twitter || deviantART Youtube
Potato Buddy

  #58    
Old April 14th, 2008 (04:14 AM).
Toorchic's Avatar
Toorchic Toorchic is offline
Scripter/ROm HAx0r
 
Join Date: Apr 2008
Gender:
Nature: Impish
Posts: 11
Is there a script that gives you the pokemon if you win a battle?

Also, how do you define the trainers pokemon?

Thanks
  #59    
Old April 18th, 2008 (12:01 AM).
Dr Gregory House's Avatar
Dr Gregory House Dr Gregory House is offline
 
Join Date: Apr 2008
Location: Brisbane, Australia
Age: 22
Gender: Male
Nature: Gentle
Posts: 824
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
__________________
  #60    
Old April 24th, 2008 (10:48 AM).
Nexes's Avatar
Nexes Nexes is offline
Daniel
 
Join Date: Apr 2007
Location: Bristol NH
Age: 26
Gender:
Nature: Lax
Posts: 3
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.
  #61    
Old April 26th, 2008 (12:31 AM). Edited April 26th, 2008 by jimsta.
jimsta's Avatar
jimsta jimsta is offline
 
Join Date: Apr 2008
Gender:
Posts: 122
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.
Mine opened up an open... thing were i had to pick a file.what i pick?
The window should change Yes it then opened a reserve... thing?
,click File -> Burn. Find the offset at $begin and write it down somewhere. i cant find it anywere?
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.
  #62    
Old April 26th, 2008 (02:33 PM).
Chimchar 9's Avatar
Chimchar 9 Chimchar 9 is offline
(:
Silver Tier
 
Join Date: Jan 2008
Location: England, Southampton.
Age: 21
Gender: Male
Nature: Calm
Posts: 1,621
where do u download pokemon advance
  #63    
Old April 28th, 2008 (12:08 AM). Edited April 28th, 2008 by Perfect_Palkia_10.
Perfect_Palkia_10's Avatar
Perfect_Palkia_10 Perfect_Palkia_10 is offline
Ruler of Space
 
Join Date: Apr 2008
Location: Between Dimensions
Age: 19
Nature: Naive
Posts: 28
Thanks for the great tutorial. Do you know how to put in that "Player recieved ...." music. If you do can you post it in. It would be much apreciated.

Quote originally posted by chimchar 9:
where do u download pokemon advance
It comes with PokeScript.
  #64    
Old May 9th, 2008 (02:49 PM). Edited May 9th, 2008 by PhaizeD.
PhaizeD PhaizeD is offline
 
Join Date: May 2008
Gender:
Posts: 7
Well, I'm just now trying to learn how to do this and I can't seem to do what the tutorial says is the easiest part. . .

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.
(This part lost me. Apparently there's a step between clicking Assign and the File-> Burn thing because when I click assign, a file browse window pops up, and I have no clue what to do after that. After the file browse window is gone, there's a small window that says reserve at the bottom. Neither of these are mentioned here so I have no clue what to do. I also don't know what I'm supposed to select after choosing burn. If anyone could tell me, I'd be grateful.)
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!
  #65    
Old May 14th, 2008 (02:42 PM).
Perfect_Palkia_10's Avatar
Perfect_Palkia_10 Perfect_Palkia_10 is offline
Ruler of Space
 
Join Date: Apr 2008
Location: Between Dimensions
Age: 19
Nature: Naive
Posts: 28
Quote originally posted by PhaizeD:
Well, I'm just now trying to learn how to do this and I can't seem to do what the tutorial says is the easiest part. . .

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. (This part lost me. Apparently there's a step between clicking Assign and the File-> Burn thing because when I click assign, a file browse window pops up, and I have no clue what to do after that. After the file browse window is gone, there's a small window that says reserve at the bottom. Neither of these are mentioned here so I have no clue what to do. I also don't know what I'm supposed to select after choosing burn. If anyone could tell me, I'd be grateful.)
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!
There is a missing step. First click assign and a browser should appear. Go to your rom that you are hacking and click on it. Some offsets will appear, choose one, go to assign then File, Burn.
  #66    
Old May 18th, 2008 (03:52 AM).
Platinum Lucario's Avatar
Platinum Lucario Platinum Lucario is offline
The Legendary Master of Light!
Crystal Tier
 
Join Date: Jan 2008
Location: Warrnambool, Victoria, Australia.
Age: 22
Gender: Male
Nature: Calm
Posts: 1,519
Umm... I've done everything, unfortunatly when I compile the script I get the
"File Not Found or user cancel" error, then when I insert the script into A-map,
then when I try the script the game crashes. Will anyone please help me?

Here's the pokescript log:
Code:
#PROCESS: script00.rbc F:2 for input
-----------------------------------
 
#OFFSET: 0, 0
Invalid Command : lock
Invalid Command : faceplayer
Invalid Command : message
 
#INLINE: 0, 1
9: Encoding text: Hey \v\h01!\nHows your journey going?
Invalid Command : boxset
Invalid Command : release
Invalid Command : end
|
\- Processed 0 Lines
 
#PROCESS: C:\Documents and Settings\Administrator\My Documents\Pokémon Green Diamond\PERSON_SCRIPT\script00.buf F:2 for write
----------------------------------------------------------------------------------------------------------------------------
COMMENT BUFFER DROP 10 [NO COMMENT]
DROPPING 0 Pointers
DROPPING 1 Offsetts
$begin at buffer 0 position 0 
DROPPING 1 Offsetts
$howareyou at buffer 1 position 0 
BUFFER 0 DROP: 56 [lock faceplayer message $howareyou boxset 6 release end ]
BUFFER 1 DROP: 510 [e vh1\Hw orjunygig
|
\- Processed 16 Buffers
 
|
\- Processed 0 Lines
 
|
\- Processed 0 Lines
Is there anything wrong with the script?
This is the script I tried:

Code:
#org $begin
lock
faceplayer
message $howareyou
$howareyou 1 = Hey \v\h01!\nHows your journey going?
boxset 6
release
end
__________________
[Platinum Lucario's Signature]
Researching the NDS ROMs...

sure does feel like a brand new adventure!

I'm gradually learning to use Microsoft Visual Studio!

Always focus on the present, best thing to do! Never look back into the past and never worry about anything bad of the future!
  #67    
Old May 28th, 2008 (06:14 AM).
Minun200's Avatar
Minun200 Minun200 is offline
 
Join Date: Dec 2007
Gender:
Posts: 145
Hello, I have a problem..
I use Pokescrip 1.2 and I managed to make a .rbc file. When I compile it, only Pokescript comes up and the other thing with the offset's doesn't appear..
Can someone help?
__________________


  #68    
Old May 30th, 2008 (01:19 PM).
Gundam-Fighter's Avatar
Gundam-Fighter Gundam-Fighter is offline
Look at the ickle Rhydon!
 
Join Date: Apr 2008
Age: 21
Gender:
Nature: Quiet
Posts: 35
Hi, I'm new here and I'm setting up an unnamed hack of fire-red and I've got a script that won't get onto the rom and I'm not sure if it's the script or the length of the script that stops it working can someone help?

Here's the script:
Quote:
#org $start
checkflag 0x829
if b_true goto $done
checkflag 0x828
if b_true goto $item
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 1x7E 0x5 0x0
fanfare 0x13E
message $3
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
boxset 6
release
end

#org $name
call 0x1A74EB
return

#org $item
message $7
boxset 5
compare LASTRESULT 0x1
if b_true goto $getitem
message $9
boxset 3
compare LASTRESULT 0x1
if b_true goto $alt

#org $getitem
message $8
boxset 6
giveitem 0x5E 0x1
setflag 0x829
release
end

#org $done
message $6
boxset 6
release
end

#org $alt
message $10
boxset 5
giveitem 0x5D 0x1
setflag 0x829
release
end

#org $1
$1 1 =Would you like an ARON?

#org $2
$2 1 =Oh.\nOk bye.

#org $3
$3 1 =/c/h01/h02You received an ARON!

#org $4
$4 1 =/c/h01/h02Would you like to rename ARON?

#org $5
$5 1 =Please don't hurt it.

#org $6
$6 1 =I hope you like Aron.

#org $7
$7 1 =Would you like a MOON STONE?\nIt'll evolve ARON to a\nSTEELDROM!\pSo do you want one?

#org $8
$8 1 =Well here you go\p\c\h01\h02You recieved a MOON STONE!

#org $9
$9 1 =Oh.\pWell would you like to\nhave a SUN STONE instead?

#org $10
$10 1 =Here you go!\p\c\h01\h02You received a SUN STONE!
PS: Steeldrom is a different version of a Rhyhorn. I'm respriting alot of pokemon as the hack's based in a different time period to the other games so there are different pokemon.
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 07:06 AM.