The PokéCommunity Forums [Tutorial] Hack Tutorials: Scripting

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.

#151
December 24th, 2007 (07:24 PM).
 Mechanic Shin!~ hohohohoho!~ Join Date: Apr 2005 Age: 24 Gender: Male Nature: Quirky Posts: 317
So now you check my thing and tell me if its ok :P

Spoiler:
#ORG $begin checkflag 0x800 applymovement 0x01$thisguy
pause 0x60
message $Kidnap boxset 6 warp 0x[map bank] 0x[map] 0x[warp] setflag 0x800 release end #org$Kidnap
$Kipnap 1 = Sorry for this \v\h01.\pBut i got no choice other than Kidnap you.\p K.O. #org$thisguy
$thisguy 1 ; #binary 0x12 0x12 0x12 0x10 0x10 0x12 0xFE This is for when you step in X block then 0x01 comes to the right of you (planned moves) and pauses while he gets there and displays$kidnap text then warps you, flags for this happening only once and the warping part for the obvious warp to inside the lab where you get your first pokemon (i don't like the part when oak comes next to you and tells you to go to hes lab :P)

-Unit - Merry Christmas and thanks for the tut
__________________
#152
December 26th, 2007 (08:01 PM).
 0m3ga_S1nn3r Beginner Hacker :) Join Date: Dec 2007 Location: In my house Age: 18 Gender: Posts: 80
hi i have a 2 things to ask..... welll first is
1. how do we add sinnoh pokemon to the game because i really add sinnoh pokemon to my game.

2nd is could someone tell me wats wrong with this script cause when i compile it comes up with an error

#org $Startscript Lock Faceplayer checkflag 0x200 if B_TRUE goto$Gotten
message $AskMe$AskMe 1 = Hello, I've got this item that\pI dont really need\pWould you like it?
boxset 5
compare LASTRESUILT B_TRUE
if B_False goto $DontGet giveitem 0xC8 1 setflag 0x200 Release end #ORG$Gotten
Lock
Faceplayer
heckflag 0x200
if B_TRUE goto $Good message$Gotten
$Gotten 1 = Did this item help you? boxset 5 compare LASTRESULT 1 if B_False goto$TooBad
release
end

#ORG $DontGet Lock Faceplayer message$DontGet
$DontGet = Fine then you wont be getting this LEFTOVERS! boxset 6 release end #ORG$Good
Lock
Faceplayer
message $Good$Good = YAY! I knew one day I could\phelp someone inneed!\p Here, I'll give you this\p
boxset 6
giveitem 0x19 100
release
end

#ORG $TooBad Lock Faceplayer message$TooBad
$TooBad = Aww well, thing's happen. boxset 6 release end __________________ Things I like: Music Genre: R&B Song: We Run This [Stick it Edit] Ice-Cream: Chocolate Tv Show: Simpsons Pokemon: Chimchar Pokemon Game: Pokemon Red ¨°-_,,_-°¨ ::~- Elite -~:: ..-v'' ''v-... #153 December 29th, 2007 (02:45 AM).  [Antoine] Join Date: Nov 2007 Gender: Posts: 6 Good Morning ! I've got a question for my script : how can I do so that the hero looks to the left ? Thank you ! PS : I use GoogleTraduct because I'm french. #154 December 29th, 2007 (07:50 AM).  dragon70119 Join Date: Sep 2007 Posts: 3 Please show me the tutorial, when I put the Script in ROM, three letters such as o,i and a don't take place in my ROM. #155 December 29th, 2007 (10:57 PM).  /Circa a face in the clouds. Join Date: Nov 2007 Location: Melbourne, Victoria Gender: Male Nature: Quiet Posts: 881 kingdude256 There we're quite a few errors in your script, you overused the yes no commands, alot of places had them leading to wierd things. I'll wewrite the script for you. You might want to take note of some things. - You added too many lock and faceplayers. - There were some types. - You used the giveitem command wrong, in your script you had the item given 100 times... Anyway, heres the script I wrote: Code: #org$begin
lock
faceplayer
checkflag 0x200
if b_true goto $gotten message$askme
boxset 0x5
compare LASTRESULT b_true
if b_false goto $dontget giveitem 0xC8 0x1 message$getting
boxset 0x6
setflag 0x200
release
end

#org $gettingberry = You received LEFTOVERS! #org$dontget
= I guess you didn't want them...

#org $gotten lock faceplayer message$gotten
$gotten 1 = Did this item help you? compare lastresult 1 if b_true goto$helped
if b_false goto $didnt release end #org$helped
= It's good that it did.

#org $didnt = I guess thats too bad... If this script is wrong, someone can correct it for me . After all, i'm still learning. __________________ 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. #156 December 30th, 2007 (02:14 PM).  ikkerule Join Date: Dec 2007 Gender: Posts: 1 I just started playing around with screipting today and after a while I managed to get my own created npc's to say stuff. Afterwords I made it a boxset 5 (yes or no) and added a flag so that the question qould only be asked once, and by adding those things i came to this. Quote: #ORG$begin
lock
faceplayer
checkflag 0x200
if B_TRUE goto $really message$salestalk
$salestalk 1 = Oh, hello \v\h01.\nI still haven't sold the house \pYou think 10 million dollar is too\nhigh a price? boxset 5 compare LASTRESULT B_TRUE if B_False goto$disagree
message $agree$agree 1 = WELL WHAT DO YOU KNOW!!!
boxset 6
setflag 0x200
Release
end

#org $disagree Lock Faceplayer message$disagre
$disagre 1 = Yeah it's probally just bad luck\n boxset 6 release end #ORG$really
Lock
Faceplayer
message $confirm$confirm 1 = You really think so?
boxset 6
release
end
With this code I do get the first question ($salestalk) and my flag also works. And when i answer the question with "yes" it replies with "WELL WHAT DO YOU KNOW!!!" ($agree) however if I answer the question with "no" it replies with the exact same message.

Hope someone can help me.

EDIT: excuse the smilly's forum seems to do that automatically
#157
January 4th, 2008 (11:59 AM).
 lostprophetsown chatot,lucario and lance lover Join Date: Nov 2007 Age: 21 Nature: Naughty Posts: 356
thnx m8 helped me with scripting i just used to edit maps and stuff but now im making pretty good games id give this guide 9/10 and you would get the other mark if you used _ for spaces because it can confuse ppl a bit but other than that awesome guide
__________________
This signature has been disabled.
Image exceeds width limit by 20 px.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
#158
January 4th, 2008 (11:31 PM).
 UNDERSCORE_14 Join Date: Dec 2007 Location: NONE OF YOUR BIZNESS Gender: Nature: Bold Posts: 3
dont know why but when i beat a trainer i made from a script,the game freezes right after?
#159
January 5th, 2008 (04:39 AM).
 Satoshi Sugimori Hermit Join Date: Dec 2006 Location: Tokyo, Japan Age: 22 Gender: Male Nature: Timid Posts: 862
Quote originally posted by UNDERSCORE_14:
dont know why but when i beat a trainer i made from a script,the game freezes right after?
You should ask this in the scrapbox scripthelp topic..
__________________
#160
January 6th, 2008 (07:21 PM).
 pokeglitch86 Join Date: Jul 2007 Gender: Nature: Adamant Posts: 28
On pokescript whenever i put a script on my rom. Then I went to AM to put the script into my game. Whenever i went to that event in to the game it froze.

Any ideas?
#161
January 6th, 2008 (11:33 PM).
 dlongwoot addicted to everything pokemon Join Date: Jun 2007 Location: AUSTRALIA Age: 21 Gender: Nature: Adamant Posts: 5
hey how u doin ggreat tutorial but i need help creating a oak follow me script
ur help would be much appreaciated
__________________
#162
January 7th, 2008 (06:16 PM).
 pokeglitch86 Join Date: Jul 2007 Gender: Nature: Adamant Posts: 28
Nevermind my above question.

Can anybody tell me how to give badges or atleast the ability to use surf.
#163
January 10th, 2008 (03:48 AM).
 pokenar Lunatic Red Eyes Join Date: Jan 2008 Age: 20 Gender: Male Nature: Naive Posts: 44
i have i promblem im trying to give a bulbasaur but it wont work heres the script

#org $begin lock faceplayer checkflag 0x232 if B_true goto$gotit
message $q boxset 6 givepokemon 1 5 0 setflag 0x232 release end #org$gotit
message $hi boxset 6 release end #org$hi
$hi 1 = Hello, how's bulbasaur doing? #org$q
$q 1 = wow you seem like a good trainer.\pi think bulbasaur would be\nhappier with you. p.s good morning well at least here in Nova Scotia its morning. #164 January 10th, 2008 (03:50 AM).  destinedjagold Oh Hai Thar~ 'ω' Silver Tier Join Date: May 2007 Location: Philippines Gender: Male Nature: Careful Posts: 7,202 I see no problems in your script. However, I recommend you change the B_true unto b_true that may be it.., I think... __________________ 3DS FC: 0061-1111-6462 TSV: 1364(X), 0790(OR) #165 January 10th, 2008 (04:19 AM).  pokenar Lunatic Red Eyes Join Date: Jan 2008 Age: 20 Gender: Male Nature: Naive Posts: 44 ok i think the promblem is i dont no how to use pokescript and the map i use is advance map o and i have to go to school be back in three hours #166 January 10th, 2008 (04:22 AM).  destinedjagold Oh Hai Thar~ 'ω' Silver Tier Join Date: May 2007 Location: Philippines Gender: Male Nature: Careful Posts: 7,202 after saving your script with a '.rbc' extension, simply press left key on the script file and there will be a pop-up menu, and there, click 'Compile' and there, you're done... :\ __________________ 3DS FC: 0061-1111-6462 TSV: 1364(X), 0790(OR) #167 January 10th, 2008 (08:18 AM).  pokenar Lunatic Red Eyes Join Date: Jan 2008 Age: 20 Gender: Male Nature: Naive Posts: 44 i mean i know nothing like i suck at scripting so im trying to use pokescript but it makes no sence #168 January 10th, 2008 (10:09 AM). Edited January 10th, 2008 by foullump.  foullump Rom Hacking Guru Join Date: Mar 2007 Location: United States Nature: Calm Posts: 220 Hello, everyone! First off I must say: A moderator really needs to moderate in this thread! But if that's not possible, I'll say this: This is not a request/game question/map question/other question thread! This is a scripting thread! For you guys who don't even know how to script, read the tutorial before asking questions! And most importantly: ASK ABOUT THE SCRIPTS I WROTE, NOT ONES FROM OTHER TUTORIALS!!!! If you're asking a question about scripting for a script you wrote, ask it somewhere else! And here's a tip: When checking a flag, use this command: Code: checkflag 0x if 0x01 goto$set
And for compare LASTRESULT, use this:
Code:
message $1$1 1 = Do you want this?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yes And yes, it's okay to define something after you wrote the command. Ex: Code: applymovement 1$right
$right 1 ; #binary 0x01 0xFE pausemove 0x0000 Ex: Code: message$1
\$1 1 = Hello!
boxset 6
__________________
#169
January 10th, 2008 (11:59 AM).
 pokenar Lunatic Red Eyes Join Date: Jan 2008 Age: 20 Gender: Male Nature: Naive Posts: 44
nevermind i fergerd it out with a video on youtube
#170
January 23rd, 2008 (08:15 AM).
 hi sir tomato my password is syvniti gggggggggggggggggg Join Date: Jan 2007 Location: My user name _ asciii_ +&h1!" lulz Posts: 581
Follump, Yor are a true hero! I love this guide! Thanks, You leant me most of my scripting, White out even know it...!
Keep up...
__________________
THE CAKE IS A LIE!!!!!!!!!!!!!!!!!!!!!!!
#171
January 23rd, 2008 (08:19 AM).
 02magnus Creator of Digimon Chronicles Join Date: Jan 2008 Location: Norway, i told you -_-' Gender: Nature: Careful Posts: 39
Spoiler:
__________________
The creator of the upcoming hack, Digimon Chronicles!

Oh, and i 100% support Digimon World Alpha:

#172
January 23rd, 2008 (04:27 PM).
 AntiRellik ™ Join Date: Jan 2008 Age: 23 Gender: Posts: 68
^pokemongemmine DOT nl

Anyway, is there any list of commands with certain sounds that can be played through the scripts?
Sounds being from attacks or moving boulders, etc.
#173
February 17th, 2008 (01:13 PM).
 Glutexo Join Date: Feb 2008 Gender: Posts: 3
For waht is setvar 0x4000 0x4001 ........
#174
February 18th, 2008 (10:53 PM).
 /Circa a face in the clouds. Join Date: Nov 2007 Location: Melbourne, Victoria Gender: Male Nature: Quiet Posts: 881
Quote originally posted by ~Keyrin:
I think it's short for "Set Variable", but I'm not sure what that means. The numbers are probably for setting that, just like a Set Flag. Besides that, I can't help you.

Oh, Foullump, this tutorial is great! Hey, I'm starting to learn more and more with this, it's very helpful. Thanks for putting this here! ...So far I'm still learning to do Apply Movement scripts...
You are right, though there is much more to a setvar command than you think, there are heaps of different and long commands to back it up.
Someone correct me if i'm wrong, but there are things like "copyvarifnotzero"

Though this tutorial is outdated, it is pretty helpfull.
#175
February 23rd, 2008 (06:38 AM).
 The _talker_REBORN!!!!! Join Date: Feb 2008 Gender: Posts: 3
Ok I am new to this site a COMPLETE N00B at scripting but am very detirmined to make some dude (idc who) walk up to the player's sprite and give him a pokemon but it should be a yes or no b/c there will be three I plan to make them all check the same flag so you can only get one of the three pokemon (likely a hoenn starter) so if I could like get someone to literally walk me through it I think I would be able to understand give pokemon and moving scripts THANX ahead of time (if helped ;p