For my opinion XSE is the best scripting program there is. XSE stands for Xtreme Script Editor (Not really extreme don't mind the title xD).
There are many features XSE covers that other scripting programs don't. Like Pokescript, PKSV, Diamond Cutter, and Easy Script Maker.
All of the scripts here are tested and working.
Some Feature's XSE has:
1. Dynamic Offsets
2. Use Of Hex Values
3. Less than a second script compiling.
4. Decompiling and can open scripts with Advance Map.
5. A Text Adjuster to adjust the text to align properly.
6. Can be use to shrink or expand the Rom.
7. Has a Free-Space Finder.
8. Has a Hex Viewer.
9. A calculator.
10. A mini-notepad to keep codes.
Firstly I'll teach everyone how to compile scripts.
First of all you must load your Rom. And then script! After scripting click the Compile or the gear Icon on top of XSE. Then copy the very first offset and paste it on Advance Map where your event is.
That is all. :)
Now to start things.
Pointers
Dynamic offsets are great additions to it. In every script you must type first the dynamic offset you are going to use.
For safe scripting it will be best if you use an offset greater than 0x800000 it has a lot Free Space on it. XSE will automatically find free-space in a matter of less than a second.
For pointers you have to put the Character "@" Then your pointer name. The name could be anything just make sure it doesn't include spaces. So here's an example pointer, "@pointer".
Pointer are things that label your script they will be useful when using goto and call commands which will be explained later in the Tutorial.
And don't worry if you have made a typo or something XSE will automatically check errors in your script when you compile them. There will be a warning box that says the specific code line location.
Now for the real deal.
Message Scripts
I'll put an example at first and explain it later.
Quote:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @hi 0x6
release
end
#org @hi
= Hello everyone!/nHappy Hacking.
Ok, time to explain.
#dynamic 0x800000 - Finds Free-Space around offset 0x800000. Always type this before anything. #org @start - Starts the script. Remember the pointer can be anything just don't use spaces. lock - Locks the player. faceplayer - Makes the NPC face the player. msgbox @hi 0x6 - Loads a normal text box. I will explain how they are used later. #org @hi - Loads the text to be displayed in the text box. release - releases the player. end - ends the script.
The textbox message will be like this.
Quote:
Hello everyone!
Happy Hacking.
Extra Message Commands: \c - refers to the color. \h - used with hex values. \l - makes a new line after /n. \p - use to continue the script to a new box. \n - makes a new line. \v - used for stored text.
\c is used for colors. Here's an example script.
Quote:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @hi 0x6
release
end
#org @hi
= \c\h01\h04Hello!
The textbox will appear like this.
Quote:
Hello!
Color Commands: Firered and Leafgreen Only.
Spoiler:
White - \c\h01\h00
Black - \c\h01\h02
Grey - \c\h01\h03
Red - \c\h01\h04
Orange - \c\h01\h05
Dark Green - \c\h01\h06
Cyan - \c\h01\h07
Blue - \c\h01\h08
Light Blue - \c\h01\h09
But, those are made easier by the use of XSE. Here are much easier commands for colors.
Color Commands:
Fire Red/Leaf Green
Spoiler:
White - [white_fr]
Black - [black_fr]
Gray - [grey_fr]
Red - [red_fr]
Orange - [orange_fr]
Green - [green_fr]
Light Green - [lightgreen_fr]
Blue - [blue_fr]
Light Blue - [lightblue_fr]
Light Blue 2 - [lightblue2_fr]
Cyan - [cyan_fr]
Light Blue 3 - [lightblue3_fr]
Navy Blue - [navyblue_fr]
Dark Navy Blue - [darknavyblue_fr]
Ruby/Sapphire
Spoiler:
Transparent - [transp_rs]
Dark Gray - [darkgrey_rs]
Red - [red_rs]
Light Green - [lightgreen_rs]
Blue - [blue_rs]
Yellow - [yellow_rs]
Cyan - [cyan_rs]
Magenta - [magenta_rs]
Gray - [grey_rs]
Black - [black_rs]
Light Gray - [lightgrey_rs]
White - [white_rs]
Sky Blue - [skyblue_rs]
Dark Sky Blue - [darkskyblue_rs]
Emerald
Spoiler:
White - [white_em]
Dark Gray - [darkgrey_em]
Gray - [grey_em]
Red - [red_em]
Orange - [orange_em]
Green - [green_em]
Light Green - [lightgreen_em]
Blue - [blue_em]
Light Blue - [lightblue_em]
White 4 - [white4_em]
Lime Green- [limegreen_em]
Aqua - [aqua_em]
Navy - [navy_em]
Now for \h.
It's used for symbols that the game cannot display and some alternative method to make a text appear. This things are in hex.
So if your text is like this, Happy Birthday!\nFriend!
It will appear like this.
Quote:
Happy Birthday!
Friend!
\l is used for a new line too. But, it can only be used after \n is used.
So if your text is like this, Happy Birthday!\nTo You!\lFriend!
It will appear like this.
Quote:
Happy Birthday!
To You!
Friend!
\p is used for a new textbox.
So if it's like this, Pokemon is...\pthe best!
Quote:
Pokemon is...
Quote:
the best!
And finally \v It's used for text that are already stored in the Rom.
Here are some codes using \v.
\v\h01 - Player Name \v\h06 - Rival Name
Or it could be like this too in XSE.
[player] - Player Name [rival] - Rival Name
And that's it for extra message commands.
Message Box Numbers
0x2
- Like a normal textbox but, already includes the lock, faceplayer and release commands.
Quote:
#dynamic 0x800000
#org @start
msgbox @hi 0x2
end
#org @hi
= I'm looking at you.
In-Game Screenshot:
0x3
- Used for signpost scripts. It doesn't Include the Lock and Faceplayer command. It only shows the sign textbox when used in a sign.
Quote:
#dynamic 0x800000
#org @start
msgbox @earth 0x3
end
#org @earth
= You are here on Earth.
In-Game Screenshot:
0x4
- A normal text box as well. The thing is it doesn't close until the closeonkeypress command is used. It's used right after the msgbox command.
Quote:
#dynamic 0x800000
#org @start
msgbox @cantclose 0x4
end
#org @cantclose
= I'm stuck for being fat.
In-Game Screenshots:
0x5
- Used for yes/no questions. It will automatically show the multichoice box for the yes/no question. This would be useful in hacks that requires the player's decision. More things, and commands for this would be explained later.
Quote:
#dynamic 0x800000
#org @start
msgbox @question 0x5
end
#org @question
= Are you human?
In-Game Screenshot:
0x6
- Just another normal textbox. No lock and faceplayer command on it.
Quote:
#dynamic 0x800000
#org @start
msgbox @hello 0x6
end
#org @hello
= Hello, \v\h01!
In-Game Screenshot:
Flags
- Flags are like bookmarks they can be placed, they can be checked, and can be removed. They are also used to a person event and be placed in the person ID and be set so it will disappear without even using the hidesprite command. The hidesprite command will be explained later in the Tutorial.
There are also many flags that are being used in the game. Luckily in Fire Red Jpan made a patch that makes it clean. So that mean there will be no flags that are already set.
Here are some flags that are already being used in the game. Note: Please refrain from using these flags they can make your hack buggy.
#org @start
lock
faceplayer
checkflag 0x500
if 0x1 goto @dont
msgbox @i 0x6
setflag 0x500
release
end
#org @dont
msgbox @said 0x6
end
#org @i
= I don't want to talk to you\nanymore.
#org @said
= I said I don't want to!
checkflag 0x500 - Checks if flag 0x500 is already been set. If it isn't it continues the script. if 0x1 goto @dont - Checks if true, and if true it goes to pointer @dont. If you put 0x0 it checks if it is false, then goes to pointer @don't setflag 0x500 - Set's the flag 0x500.
Remember: 0x1 - True 0x0 - False
And now to explain clearflag scripts. I will still be using flag 0x500.
Quote:
#dynamic 0x800000
#org @start
lock
checkflag 0x500
if 0x0 goto @apologize
msgbox @phone 0x6
clearflag 0x500
release
end
#org @apologize
msgbox @sorry 0x6
release
end
#org @phone
= Friend: What? You have some\nproblems with your other Friend?\pHere's my phone so you can\napologize to your other friend.
#org @sorry
= Friend: Hello Friend! :)
clearflag 0x500 - Clears flag 0x500, or removes the flag. checkflag 0x500 - Checks if flag 0x500 has already been set. if 0x0 goto @apologize - Checks if false and goes to pointer @apologize
Note: You can use the text adjuster when typing text so it will be properly adjusted. You can go to tools then Text Adjuster. Or simple Ctrl+T. :)
0x800 - Activates Pokemon Menu
0x801 - Activates Pokedex Menu
0x802 - Activates Pokenav Menu
0x807 - Activates First Badge
0x808 - Activates Second Badge
0x809 - Activates Third Badge
0x80A - Activates Fourth Badge
0x80B - Activates Fifth Badge
0x80C - Activates Sixth Badge
0x80D - Activates Seventh Badge
0x80E - Activates Eighth Badge
0x860 - Activates Running Shoes
Emerald:
Spoiler:
0x860 - Activates Pokemon Menu
0x861 - Activates Pokedex Menu
0x862 - Activates Pokenav Menu
0x867 - Activates First Badge
0x868 - Activates Second Badge
0x869 - Activates Third Badge
0x86A - Activates Fourth Badge
0x86B - Activates Fifth Badge
0x86C - Activates Sixth Badge
0x86D - Activates Seventh Badge
0x86E - Activates Eighth Badge
0x8C0 - Activates Running Shoes
Badge flags and the running shoes flag found by Crocky.
And that's all for Flags.
Yes/No Scripts
- Scripts that uses the msgbox 0x5 command. It let's you pick between two choices.
I'll explain this later. First here's a script.
Quote:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @are 0x5
compare 0x800D 0x1
if 0x1 goto @yes
compare 0x800D 0x0
if 0x0 goto @no
end
#org @yes
msgbox @blurry 0x6
release
end
#org @no
msgbox @alien 0x6
release
end
#org @are
= Are you human?
#org @blurry
= Oh, sorry to judge you lad.\pIt's just that I have poor\neyesight.
#org @alien
= You're an alien!
msgbox @are 0x5 - Makes a textbox with the yes or no function. compare 0x800D 0x1 - Get's the lastresult and the 0x1 beside it means yes. if 0x1 goto @yes - Checks if true and if Yes is selected the script continues to pointer @yes. compare 0x800D 0x1 - Get's the lastresult and the 0x0 beside it means no. if 0x1 goto @no - Checks if true and if No is selected the script continues to pointer @no.
Note: Lastresult and 0x800D are the same. It's just that Lastresult isn't used in the latest version of XSE. And remember also that;
0x1 - Yes 0x0 - No
And that covers Yes/No scripts.
Giveitem
- This is the command so you can give Items. You can use this too to give Rare Candies and Master Balls for free! xD
Pretty easy to do the command goes like this. giveitem 0x(Item No.) 0x(Quantity) 0x0 (Remember to put 0x0 at the end.) Remember to have them in hex.
Here's an example script. I'm also going to make a flag so the person can only give you once.
And that pretty much does it for the GiveItem Command.
GivePokemon
- This is the command that give's you a Pokemon. but In order to access them in the Main Menu you have to set the flag to activate the Pokemon Menu. The flag is 0x828 in FireRed.
The Command goes like this;
givepokemon 0x(Pokemon No.) 0x(Level) 0x(Held Item) 0x0 0x0 0x0. Remember to put those 3 0x0 i the end.
Here's an example script. I will also explain how to give proper nicknames . Of course I'll have the Pokemon Menu enabled.
Quote:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @how
msgbox @give 0x5
compare 0x800D 0x1
if 0x1 goto @get
compare 0x800D 0x0
if 0x1 goto @ok
end
#org @nickname
fadescreen 0x1
special 0x9E
waitstate
return
#org @go
closeonkeypress
goto @takecare
#org @takecare
msgbox @please 0x6
release
end
#org @how
msgbox @check 0x6
release
end
#org @give
= Hello there.\pBy any chance would you want to\nhave this Pikachu?
#org @oh
= Oh, I see...
#org @receive
= [black_fr]\v\h01 received a Pikachu from the\nOld Man.
#org @givenickname
= [black_fr]Would you like to give your\nPokémon a nickname?
#org @please
= Please take care of my dear\nPikachu.
#org @check
= How's my old Pokémon?
Now with this you will get a level 5 Pikachu holding a Rare Candy. ^_^ And you will get to nickname it.
In-Game Screenshot:
You can also just call offset 0x1A74EB. But, in case your using Jpan's engine you should do it like this.
checkflag 0x828 - Checks if the flag for the Pokemon Menu is set. I used this flag because this is the player's first Pokemon. if 0x1 goto @how - If true goes to pointer @how. givepokemon 0x19 0x5 0x44 0x0 0x0 0x0 - Give's a level 5 Pikachu holding a Rare Candy. fanfare 0x13E - Plays the fanfare when receiving a Pokemon. (The Fanfare list is also found in Advance Map) I'll give the fanfare list later in the tutorial waitfanfare - Is a command that ways for the fanfare to be finish so the script will continue. setflag 0x828 - Set's the flag for the Pokemon Menu. call @nickname - Call is a command to call scripts which in this case is pointer @nickname goto @takecare - Same as call it goes to the script which is pointer @takecare fadescreen 0x1 - An effect to make the screen black. More about this will be explained later. special 0x9E - Is a command that is needed for the nickname event to be done. More things about specials will be explained later. waitstate - Wait's for the special to be finished. This is put always after a special command. return - Is a command to return to the list script it was called upon in this case. The one that called it is pointer @name and continues to the rest of the script.
Note: This is for Fire Red mainly all the scripts here are for Fire Red.
And that's it for Givepokemon.
Fanfare, Sound, and Playsong.
- Are things sounds and fanfares that can be called upon in a script. Pretty useful in events it would be much better.
Here how the commands go;
fanfare 0x(Fanfare no.) - Plays a fanfare.
waitfanfare - Wait's for the fanfare to finish.
sound 0x(sound no.) - Plays a sound.
playsong 0x(song no.) 0x0 - Uses the same list with Fanfare.
This 4 commands below are used with the playsong command to make the song stop.
fadedefault - used for the current music to the maps default music.
fadesong - Gently fades to another song.
fadeout - Fades out the currently playing song.
fadein - Fades the currently playing song back in.
Here are the list of the musics... :)
For Fanfares and Songs: (For Fire Red Only.)
Spoiler:
0105 Healing (RS)
0106 Level Up
0107 Evolution Start
0108 Evolution/Safari
0109 Battle 1
010A Battle 2
010B Unknown/Not listed in Sappy
010C Fanfare 1
010D Fanfare 2
010E You Fail It!
010F You Fail It Again!
0110 Follow Me
0111 Game Corner
0112 Evil Lurks
0113 Gym
0114 Jigglypuff's Song
0115 Introduction
0116 Pokemon Theme
0117 Cinnabar Island
0118 Lavender Town
0119 Healing
011A Bicycle
011B Encounter 1
011C Encounter 2
011D Encounter 3
011E You're In The Hall of Fame!
011F Viridian Forest
0120 Mount Moon
0121 Abandoned Place
0122 End Credits
0123 Route Theme 1
0124 Route Theme 2/Intro
0125 Route Theme 3
0126 Route Theme 4
0127 Indigo Plateau
0128 Battle 3
0129 Battle 4
012A Battle 5
012B Battle 6
012C Pallet Town
012D Oak's Lab
012E Oak's Theme
012F Pokemon Center
0130 SS Anne
0131 Surf's Up
0132 Pokemon Tower
0133 Silph Co.
0134 Cerulean City
0135 Celadon City
0136 Victory 1
0137 Victory 2
0138 Victory 3
0139 Vermillion City
013A Viridian City and Pewter City
013B Gary's Theme
013C Gary's Theme (bis)
013D Fanfare 3
013E Fanfare 4
013F You caught a Pokemon!
0140 Trainer Card Photo
0141 Gamefreak
0142 Victory 2 (bis)
0143 Intro Message 1
0144 Intro Message 2
0145 Intro Message 3
0146 Game Corner (+1)
0147 Game Corner (+2)
0148 Net Corner
0149 Mystery Connection
014A Game Corner (+3)
014B Mount Ember
014C Follow Me (alt)
014D Water Labyrinth
014E Tanoby Ruins
014F Islands 1-3
0150 Islands 4-5
0151 Islands 6-7(AKA Violet City Theme from GSC)
0152 PokeFlute
0153 Battle - Deoxys
0154 Battle 5 (+1)
0155 Battle 5 (+2)
0156 Encounter 4
0157 Deoxys Encounter
0158 Trainer Tower
0159 Pallet Town (fame mix)
015A Teachy TV
Sound List:
Spoiler:
0x0 - Blank Noise (Stops BGM, not other S.E.)
0x1 - Use Item
0x2 - Log onto PC
0x3 - Turn off PC
0x4 - Turn on PC
0x5 - Click Noise
0x6 - Open Menu
0x7 - Wall Bump
0x8 - Door Open
0x9 - Exit Room
0xA - Jump
0xB - Bike Bell
0xC - Loud Crash (Like dropping of a heavy object)
0xD - Loud Crash (Higher pitch, and with echo)
0xE - Loud Crash (3 in rapid sucession, with long echo)
0xF - Low Pitch Pokeball Open
0x10 - Pokeball Close
0x11 - Flee S.E.
0x12 - PokeCenter Door Open
0x13 - Strange Noise (Like Water at the beginning, then like electricity)
0x14 - Low Pitch crash
0x15 - Super high pitch beep
0x16 - Error / False sound
0x17 - PokeCenter Pokeball Load up (Pokeballs being placed onto the heal machine.)
0x18 - PokeCasino Reel Stop
0x19 - Insert Coin into Machine
0x1A - Buzz (False/fail at Casino)
0x1B - EXP gauge
0x1C - Hop (Like on an Acro Bike)
0x1D - Lock / Break small rock?
0x1E - Unlock
0x1F - Strange Sound (Like a dor being locked, but different...)
0x20 - Strange Sound (A singular version of the previous sound)
0x21 - Crash sound (With echo)
0x22 - Singular Metal attack Sound (Like when using steel wing, but singular)
0x23 - Ice Break
0x24 - Ice Crack
0x25 - Falling
0x26 - Strange Sound (Super Low Pitch Ice Break?)
0x27 - Warp Away
0x28 - Warp Return
0x29 - Electricity?
0x2A - Turn Winch (Like in Winona's Gym)
0x2B - Truck Driving (Loop)
0x2C - Truck Stoping
0x2D - Truck Brake
0x2E - Truck Open
0x2F - Airplane Turbines
0x30 - Save
0x31 - Pokeball Bounce (Like in a trade)
0x32 - Pokeball Bounce (Quieter)
0x33 - Pokeball Bounce (Even Quieter)
0x34 - Pokeball Bounce (Even Quieter Still)
0x35 - Pokeball Open (Like in a trade)
0x36 - Throw Pokeball
0x37 - Musical Decoration Pad (Low C)
0x38 - Musical Decoration Pad (D)
0x39 - Musical Decoration Pad (E)
0x3A - Musical Decoration Pad (F#)
0x3B - Musical Decoration Pad (G)
0x3C - Musical Decoration Pad (A)
0x3D - Musical Decoration Pad (B)
0x3E - Musical Decoration Pad (High C)
0x3F - Mud Ball Smash
0x40 - Wodden Board
0x41 - Get Money
0x42 - P.A. (Like when an elevator is done, or end of Safari Zone)
0x43 - Water Baloon Pop (Low)
0x44 - Water Baloon Pop (Med)
0x45 - Water Baloon Pop (High)
0x46 - Wodden Smash
0x47 - Wooden Break
0x48 - Poison Afliction
0x49 - Conveyor Belt
0x4A - Conveyor Belt 2 (Loop)
0x4B - Conveyor Belt 2 (end)
0x4C - Loud Noise (Like a low conveyor belt 2) (Loop)
0x4D - Loud Noise (End)
0x4E - Light noise (Like a High conveyor belt 2) (Loop)
0x4F - Light Noise (End)
0x50 - Strange Noise (Like sonething being absorbed into a dark void. Sound goes from high to low)
0x51 - Strange Noise (Like an extension of hte previous sound. Sound goes from Low to Super Low)
0x52 - Buzz (Like a Circular Saw)
0x53 - Low Health Alert (Loop) (Can Not Be Turned Off Without Map Refresh)
0x54 - Level Up Ding
0x55 - Low Grumbling (Like a Diesel Engine) (Loop)
0x56 - Low Grumbling (End)
0x57 - Swipe Sound (Loop)
0x58 - Sell Item
0x59 - Low Ding (Like a really low "Low C" note)
0x5A - High Pitch Swipe
0x5B - High Pitch Swipe (Reverse)
0x5C - Smack
0x5D - Small Noise (Like a person kicking dirt)
0x5E - VS Seeker?
0x5F - Light Jingle
0x60 - Explosion
0x61 - Explosion (After Effect / Cont)
0x62 - STRONG Wind (Or Crowd Screaming? My PC to slow to tell...)
0x63 - Low Slamming sound (Like someone setting down a heavy box.)
0x64 - Red / Blue Orb
0x65 - Computer Chatter (One High Pitch Blip)
0x66 - Computer Chatter (2 Blips, pattern: MedHi-High)
0x67 - Computer Chatter (High Pitch PC on?)
0x68 - Computer Chatter (High Pitch PC off?)
0x69 - Computer Chatter (PC Scanning)
0x6A - Glass Breaking?
0x6B - Light Shuffle sound (Like feet sliding across the floor)
0x6C - High Pitch Quiet Blip
0x6D - Small Sound (Like a twig snaping)
0x6E - Strange Sound (Like low pitch Ice Shimmering, or Use of Flute)
0x6F - Loud Bang (Like a gun shot, but different)
0x70 - Lout Buzz
0x71 - Metal Sheen (Like on steel wing, but a little longer)
0x72 - Curse Attack
0x73 - Baton Pass Attack (Like a swipeing / falling sound)
0x74 - Low Crash
0x75 - Bubble Attack (Launch)
0x76 - Substitute attack?
0x77 - Watyer Gun Attack (Launch)
0x78 - Rain Dance Attack
0x79 - Slash Attack
0x7A - Gust Attack?
0x7B - Very Strange Sound (Like a downward Spiral?)
0x7C - Rock Smash Attack? (In Battle or not? I Can't tell)
0x7D - Powerful Wind (Loop)
0x7E - Powerful Wind (End)
0x7F - Pound Attack?
0x80 - Throwing Sound (Like Bait in the Safari Zone)
0x81 - Deep Slashing noise
0x82 - Ice Ball Attack
0x83 - Loud Swipe?
0x84 - Deep Bang (Like someone hit something hard with a big log...)
0x85 - Beam Attack Charge Sound. (Like Solar Beam's Charging sound)
0x86 - Deep Bang (Similar to 0x84)
0x87 - Bubbling Noise
0x88 - Throwing noise (Slightly Higher Pitch)
0x89 - VERY DEEP Throwing sound
0x8A - Deep Explosion like sound
0x8B - Deep Wave-like sound
0x8C - Strange Sound (A Smack Noise, tehn a Short Deep Explosion-ish sound)
0x8D - Deep Bubbling
0x8E - Deep Crash (Like a super deep opening pokeball)
0x8F - Deep Fire
0x90 - Deep Smack
0x91 - Low Whirling
0x92 - High Pitch Powerful Wind (Loop)
0x93 - High Pitch Powerful Wind (End)
0x94 - High Pitch Shuffling
0x95 - Loud Noise (No Explaination)
0x96 - Wing Flapping (Singular)
0x97 - Wing Flapping (Decending Octaves, High To Low)
0x98 - Kicking Sand?
0x99 - High Pitch Whips Sound
0x9A - Strange Sound (No Explaination)
0x9B - Whirling Upwards (Short....)
0x9C - Super Strong Wind Burst
0x9D - MEGA ULTRA Strong wind burst. (I think....)
0x9E - MEGA ULTRA Strong wind burst. (Pitch Goes up, then down, more like actual wind...)
0x9F - Small Noise (Like a twig breaking)
0xA0 - Splash Attack Flopping sound (Singular)
0xA1 - Sandpaper-ish?
0xA2 - Small Noise (No Explaination)
0xA3 - Stretching noise?
0xA4 - Speeding up fan? (Pitch raises, that is all)
0xA5 - Sing Attack
0xA6 - Perish Song Attack
0xA7 - Ice? (Souns like when a pokemon gets frozen...)
0xA8 - Noise (No Explaination)
0xA9 - Little Sound (No explaination...)
0xAA - Loud Sound (No Explaination)
0xAB - Explosion-ish Sound
0xAC - Recover Attack
0xAD - Absorb Smack (The sound before the absorbtion)
0xAE - Metal Sound?
0xAF - Aurora Beam (Small)
0xB0 - Aurora Beam (Main)
0xB1 - Confusion
0xB2 - Drum?
0xB3 - Amnesia "?" Appear
0xB4 - Egg Crack?
0xB5 - Amnesia (Deeper ? Sound)
0xB6 - Loud Hover Sound (Decending)
0xB7 - Loud Hover Sound (Acending)
0xB8 - Strange Sound (Sounds like a speed up, then an upward whirling noise)
0xB9 - Smack (With Echo)
0xBA - Wooshing noise
0xBB - Frustration "Angry" Symbols
0xBC - Small Metalic "Bling" sound
0xBD - Whisping noise
0xBE - Rest Attack
0xBF - Shattering Ice
0xC0 - Deep Watery noise
0xC1 - Strange Noise (No Explaination)
0xC2 - Solar Beam (Launch)
0xC3 - Sunny Day Attack
0xC4 - Strange Noise (Sounds like a small absorption, but not from any absorb attacks...)
0xC5 - Strange Noise (Previous sound, in reverse)
0xC6 - Small Noise (No Explaination)
0xC7 - Swift Attack (Singular - higher pitch)
0xC8 - Swift Attack (Singular - Longer)
0xC9 - Swift Attack (Singular - Lower Pitch)
0xCA - Odor Sleuth Attack
0xCB - Small Noise (Like a twig Snapping... again)
0xCC - Strange noise (Like... Ding, Dong... Ding, Dong....)
0xCD - Strange noise (Frustration "Angry" Symbols... highrt pitch)
0xCE - Noise (Decending Sound)
0xCF - Loud Crash (Very Deep)
And that pretty much explains for fanfares, sounds, and songs. :)
Specials
- This are used for special events that can help a lot when making hacks.
Here are the Special Lists.
Specials:
Spoiler:
special 0x0 - Heal Pokemon
special 0x3C - Acess Bill's PC (FR/LG)
special 0x98 - Going up to Mountain (R/S)
special 0x9C - Wally Catch (R/S)
special 0x9F - choose A Pokemon (R/S)
special 0xE0 - Pokeblock Case (R/S)
special 0x10F - Restart Game
special 0x110 - Hall of Fame and Credits
special 0x111 - Elevator Animation
special 0x119 - Groudons Orb effect (R/S)
special 0x131 - Earthquake (R/S)
special 0x132 - Show Floors
special 0x136 - Earthquake (FR/LG)
special 0x137 - Lava Battle
special 0x156 - Battle with Ghost (FR/LG)
special 0x157 - Get on Bike (FR/LG)
special 0x161 - Start Surfing (FR/LG)
special 0x166 - Nickname
special 0x16F - Activate National Dex (FR/LG)
special 0x17B - Seagallop Animation
special 0x191 - SS. Anne Leaving
special 0x1F3 - Activate National Dex (Emerald)
#org @hello
= Hello there Trainer!\pI am a Magician and will make your\n5 Pokeballs in your bag disappear.\p\v\h01: O...k...?\pOk, get ready!\pAbra!\pKadabra!\pAlakazam!
#org @alakazam
= See they're gone now!\pIt's magic.
#org @cant
= What?!\pYou want your Poke Balls back?\pThey're gone so SCRAM!
removeitem 0x4 0x5 - This will remove 5 poke Balls from your bag.
And that pretty much explains things about the Removeitem Command.
CheckItem
- This command checks for a certain Item in your bag before the script continues. It's good for checkpoints and some other things for your Rom Hacks.
Here's how the command goes;
checkitem 0x(Item No.) 0x(Quantity)
Now this script is kinda tricky cause I will check if the Item is greater than 1.
Quote:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @doyou 0x5
compare 0x800D 0x1
if 0x1 goto @check
compare 0x800D 0x0
if 0x0 goto @understand
end
#org @check
checkitem 0xD 0x1
compare 0x800D 0x1
if 0x4 goto @wow
msgbox @liar 0x6
release
end
#org @understand
msgbox @ok 0x6
release
end
#org @wow
msgbox @use 0x6
release
end
#org @doyou
= Hello there do you have a Potion\nwith you?
#org @liar
= Your a liar.
#org @ok
= Oh, ok...
#org @use
= Wow, you can use that to heal\nPokémon.
checkitem 0xD 0x1 - Checks if you have one potion with you. if 0x4 goto @wow - Checks if you have one or more Potions, if true goes to pointer @wow.
You might ask how did you know that? If you need values to be checked this things can be useful. I made a table for them.
Quote:
Lower Than (0x0)
Equals (0x1)
Greater Than (0x2)
Lower than or Equal to (0x3)
Greater than or Equal to (0x4)
Not exactly equal to (0x5)
Pretty useful huh? Use it in Checkitem or some other value relating scripts.
And that's it for CheckItem.
WildBattle
- Ever wanted to have your own WildBattle script? Then you can use this command. You can use this to make Legendaries appear and capture em! xD
cry 0x19 0x0 - Plays Pikachu's Cry. waitcry - Waits for the cry to finish. wildbattle 0x19 0x5 0xCA - Makes a Wild battle with a Level 5 Pikachu holding a Light Ball. hidesprite 0x800F - Makes the sprite of the last person talked to disappear. More about Hidesprite will be xplained later.
300 must be input in the person ID in A-map so that Pikachu's Sprite will be gone forever.
Reminder: If you are using Jpan's Engine you can put special 0x25 to make the Pokemon shiny.
And that's all for WildBattle.
Checkgender
- This command checks you gender in the game. Pretty useful in genderbending sotrylines... xD
Just a simple checkgender command followed by the decision part of the script. Here's an example script for everyone to understand better.
Quote:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @hmm 0x4
checkgender
compare 0x800D 0x1
if 0x1 goto @female
compare 0x800D 0x0
if 0x1 goto @male
end
#org @female
closeonkeypress
msgbox @yourf 0x6
release
end
#org @male
closeonkeypress
msgbox @yourm 0x6
release
end
#org @hmm
= Hmm...
#org @yourf
= Your a Female!
#org @yourm
= Your a Male!
checkgender - The command that checks your gender in the game. compare 0x800D 0x1 - Checks if the player is female. if 0x1 goto @female - If female, goes to pointer @female. compare 0x800D 0x0 - Checks if the player is male. if 0x1 goto @male - If male, goes to pointer @male.
And that covers things about Checkgender.
Applymovement
- Ever wanted to make someone move? :) Then you can, with the Applymovement command. This makes a specific sprite move in the game with a script.
Here's how the command works;
applymovement 0x(person event no.) @pointer <- This is the pointer for the Raw commands so moving will be possible. And if you don't know what Person event no. is. Here is where you can see it.
If you want your player to move use 0xFF as your person event no. And if you the camera/screen to move use 0x7F as your person event no.
And here's another command after the applymovement.
waitmovement 0x0 - Practically just waits for the movement to be finished and keep it on 0x0. :)
And if you want a follow me script or a script that can make people move at the same time. Your script must be set like this.
And to make commands for movements you will need this.
Fire Red/ Leaf Green:
Spoiler:
#raw 0x0 = Face Down
#raw 0x1 = Face Up
#raw 0x2 = Face Left
#raw 0x3 = Face Right
#raw 0x4 = Face Down (Faster)
#raw 0x5 = Face Up (Faster)
#raw 0x6 = Face Left (Faster)
#raw 0x7 = Face Right (Faster)
#raw 0x8 = Step Down (Very Slow)
#raw 0x9 = Step Up (Very Slow)
#raw 0xA = Step Left (Very Slow)
#raw 0xB = Step Right (Very Slow)
#raw 0xC = Step Down (Slow)
#raw 0xD = Step Up (Slow)
#raw 0xE = Step Left (Slow)
#raw 0xF = Step Right (Slow)
#raw 0x10 = Step Down (Normal)
#raw 0x11 = Step Up (Normal)
#raw 0x12 = Step Left (Normal)
#raw 0x13 = Step Right (Normal)
#raw 0x14 = Jump2 Down
#raw 0x15 = Jump2 Up
#raw 0x16 = Jump2 Left
#raw 0x17 = Jump2 Right
#raw 0x18 = Delay1
#raw 0x19 = Delay2
#raw 0x1A = Delay3
#raw 0x1B = Delay4
#raw 0x1C = Delay5
#raw 0x1D = Step Down (Fast)
#raw 0x1E = Step Up (Fast)
#raw 0x1F = Step Left (Fast)
#raw 0x20 = Step Right (Fast)
#raw 0x21 = Step on the Spot Down (Normal)
#raw 0x22 = Step on the Spot Up (Normal)
#raw 0x23 = Step on the Spot Left (Normal)
#raw 0x24 = Step on the Spot Right (Normal)
#raw 0x25 = Step on the Spot Down (Faster)
#raw 0x26 = Step on the Spot Up (Faster)
#raw 0x27 = Step on the Spot Left (Faster)
#raw 0x28 = Step on the Spot Right (Faster)
#raw 0x29 = Step on the Spot Down (Fastest)
#raw 0x2A = Step on the Spot Up (Fastest)
#raw 0x2B = Step on the Spot Left (Fastest)
#raw 0x2C = Step on the Spot Right (Fastest)
#raw 0x2D = Face Down (Delayed)
#raw 0x2E = Face Up (Delayed)
#raw 0x2F = Face Left (Delayed)
#raw 0x30 = Face Right (Delayed)
#raw 0x31 = Slide Down (Slow)
#raw 0x32 = Slide Up (Slow)
#raw 0x33 = Slide Left (Slow)
#raw 0x34 = Slide Right (Slow)
#raw 0x35 = Slide Down (Normal)
#raw 0x36 = Slide Up (Normal)
#raw 0x37 = Slide Left (Normal)
#raw 0x38 = Slide Right (Normal)
#raw 0x39 = Slide Down (Fast)
#raw 0x3A = Slide Up (Fast)
#raw 0x3B = Slide Left (Fast)
#raw 0x3C = Slide Right (Fast)
#raw 0x3D = Slide Running on Right Foot (Down)
#raw 0x3E = Slide Running on Right Foot (Up)
#raw 0x3F = Slide Running on Right Foot (Left)
#raw 0x40 = Slide Running on Right Foot (Right)
#raw 0x41 = Slide Running on Left Foot (Down)
#raw 0x42 = Slide Running on Left Foot (Up)
#raw 0x43 = Slide Running on Left Foot (Left)
#raw 0x44 = Slide Running on Left Foot (Right)
#raw 0x46 = Jump Facing Left (Down)
#raw 0x47 = Jump Facing Down (Up)
#raw 0x48 = Jump Facing Up (Left)
#raw 0x49 = Jump Facing Left (Right)
#raw 0x4A = Face Player
#raw 0x4B = Face Against Player
#raw 0x4C = Lock Sprite Facing
#raw 0x4D = Release Sprite Facing
#raw 0x4E = Jump Down
#raw 0x4F = Jump Up
#raw 0x50 = Jump Left
#raw 0x51 = Jump Right
#raw 0x52 = Jump in Place (Facing Down)
#raw 0x53 = Jump in Place (Facing Up)
#raw 0x54 = Jump in Place (Facing Left)
#raw 0x55 = Jump in Place (Facing Right)
#raw 0x56 = Jump in Place (Facing Down/Up)
#raw 0x57 = Jump in Place (Facing Up/Down)
#raw 0x58 = Jump in Place (Facing Left/Right)
#raw 0x59 = Jump in Place (Facing Right/Left)
#raw 0x60 = Hide Sprite
#raw 0x61 = Show Sprite
#raw 0x62 = Exclamation Mark (!)
#raw 0x63 = Question Mark (?)
#raw 0x64 = Cross (X)
#raw 0x65 = Double Exclamation Mark (!!)
#raw 0x66 = Happy (^_^)
#raw 0xFE = End of Movements
Ruby/Sapphire/Emerald:
Spoiler:
#raw 0x00 = Face Down
#raw 0x01 = Face Up
#raw 0x02 = Face Left
#raw 0x03 = Face Right
#raw 0x04 = Step Down (Slow)
#raw 0x05 = Step Up (Slow)
#raw 0x06 = Step Left (Slow)
#raw 0x07 = Step Right (Slow)
#raw 0x08 = Step Down (Normal)
#raw 0x09 = Step Up (Normal)
#raw 0x0A = Step Left (Normal)
#raw 0x0B = Step Right (Normal)
#raw 0x0C = Jump2 Down
#raw 0x0D = Jump2 Up
#raw 0x0E = Jump2 Left
#raw 0x0F = Jump2 Right
#raw 0x10 = Delay1
#raw 0x11 = Delay2
#raw 0x12 = Delay3
#raw 0x13 = Delay4
#raw 0x14 = Delay5
#raw 0x15 = Step Down (Fast)
#raw 0x16 = Step Up (Fast)
#raw 0x17 = Step Left (Fast)
#raw 0x18 = Step Right (Fast)
#raw 0x19 = Step on the Spot Down (Slow)
#raw 0x1A = Step on the Spot Up (Slow)
#raw 0x1B = Step on the Spot Left (Slow)
#raw 0x1C = Step on the Spot Right (Slow)
#raw 0x1D = Step on the Spot Down (Normal)
#raw 0x1E = Step on the Spot Up (Normal)
#raw 0x1F = Step on the Spot Left (Normal)
#raw 0x20 = Step on the Spot Right (Normal)
#raw 0x21 = Step on the Spot Down (Faster)
#raw 0x22 = Step on the Spot Up (Faster)
#raw 0x23 = Step on the Spot Left (Faster)
#raw 0x24 = Step on the Spot Right (Faster)
#raw 0x25 = Step on the Spot Down (Fastest)
#raw 0x26 = Step on the Spot Up (Fastest)
#raw 0x27 = Step on the Spot Left (Fastest)
#raw 0x28 = Step on the Spot Right (Fastest)
#raw 0x29 = Slide Down
#raw 0x2A = Slide Up
#raw 0x2B = Slide Left
#raw 0x2C = Slide Right
#raw 0x2D = Slide Down
#raw 0x2E = Slide Up
#raw 0x2F = Slide Left
#raw 0x30 = Slide Right
#raw 0x31 = Slide Down
#raw 0x32 = Slide Up
#raw 0x33 = Slide Left
#raw 0x34 = Slide Right
#raw 0x35 = Slide Running Down
#raw 0x36 = Slide Running Up
#raw 0x37 = Slide Running Left
#raw 0x38 = Slide Running Right
#raw 0x3A = Jump Facing Left (Down)
#raw 0x3B = Jump Facing Down (Up)
#raw 0x3C = Jump Facing Up (Left)
#raw 0x3D = Jump Facing Left (Right)
#raw 0x3E = Face Player
#raw 0x3F = Face Against Player
#raw 0x40 = Lock Sprite Facing
#raw 0x41 = Release Sprite Facing
#raw 0x42 = Jump Down
#raw 0x43 = Jump Up
#raw 0x44 = Jump Left
#raw 0x45 = Jump Right
#raw 0x46 = Jump in Place (Facing Down)
#raw 0x47 = Jump in Place (Facing Up)
#raw 0x48 = Jump in Place (Facing Left)
#raw 0x49 = Jump in Place (Facing Right)
#raw 0x4A = Jump in Place (Facing Down/Up)
#raw 0x4B = Jump in Place (Facing Up/Down)
#raw 0x4C = Jump in Place (Facing Left/Right)
#raw 0x4D = Jump in Place (Facing Right/Left)
#raw 0x4E = Face Left
#raw 0x54 = Hide Sprite
#raw 0x55 = Show Sprite
#raw 0x56 = Exclamation Mark (!)
#raw 0x57 = Question Mark (?)
#raw 0x58 = Love (<3)
#raw 0x62 = Walk Down
#raw 0x63 = Walk Down
#raw 0x64 = Face Down (Delayed)
#raw 0x65 = Face Up (Delayed)
#raw 0x66 = Face Left (Delayed)
#raw 0x67 = Face Right (Delayed)
#raw 0x70 = Jump in Place (Facing Down)
#raw 0x71 = Jump in Place (Facing Up)
#raw 0x72 = Jump in Place (Facing Left)
#raw 0x73 = Jump in Place (Facing Right)
#raw 0x74 = Jump Down Running
#raw 0x75 = Jump Up Running
#raw 0x76 = Jump Left Running
#raw 0x77 = Jump Right Running
#raw 0x78 = Jump2 Down Running
#raw 0x79 = Jump2 Up Running
#raw 0x7A = Jump2 Left Running
#raw 0x7B = Jump2 Right Running
#raw 0x7C = Walk on the Spot (Down)
#raw 0x7D = Walk on the Spot (Up)
#raw 0x7E = Walk on the Spot (Left)
#raw 0x7F = Walk on the Spot (Right)
#raw 0x80 = Slide Down Running
#raw 0x81 = Slide Up Running
#raw 0x82 = Slide Left Running
#raw 0x83 = Slide Right Running
#raw 0x84 = Slide Down
#raw 0x85 = Slide Up
#raw 0x86 = Slide Left
#raw 0x87 = Slide Right
#raw 0x88 = Slide Down on Left Foot
#raw 0x89 = Slide Up on Left Foot
#raw 0x8A = Slide Left on Left Foot
#raw 0x8B = Slide Right on Left Foot
#raw 0x8C = Slide Left diagonally (Facing Up)
#raw 0x8D = Slide Right diagonally (Facing Up)
#raw 0x8E = Slide Left diagonally (Facing Down)
#raw 0x8F = Slide Right diagonally (Facing Down)
#raw 0x90 = Slide2 Left diagonally (Facing Up)
#raw 0x91 = Slide2 Right diagonally (Facing Up)
#raw 0x92 = Slide2 Left diagonally (Facing Down)
#raw 0x93 = Slide2 Right diagonally (Facing Down)
#raw 0x96 = Walk Left
#raw 0x97 = Walk Right
#raw 0x98 = Levitate
#raw 0x99 = Stop Levitating
#raw 0x9C = Fly Up Vertically
#raw 0x9D = Land
#raw 0xFE = End of Movements
Ok, let's do it in a script. :) I'm gonna have the player move at the same time with another person.
applymovement 0xff @move - Makes the player move with the raw's at pointer @move. applymovement 0x1 @move - Makes the sprite with Person Event #1 move with the raw's at pointer @move. waitmovement 0x0 - Waits for the movement to be finished. #raw 0x11 #raw 0x11 - Step Up (Normal) #raw 0x11 #raw 0xfe - End of movements. (Remember to put this at the end of movement raws.)
Some things to remember:
Person Event # FF - is the players person event no. Person Event # 7F - is the camera/screen's person event no. #raw 0xfe - Ends movements must be put at the end of movement raws. waitmovement 0x0 - Always put after the applymovement command.
Remember to have the person event no. in hex. You can convert decimal to hex by using XSE as well.
And that's all for Applymovement's.
Hidesprite and Showsprite
- This two commands can be used for major/minor events. Hidesprite is used to make a person event no. to vanish/disappear. And Showsprite makes them appear again. However to make a person vanish permanently you have to use a flag and input it on the person ID no.
#org @hey
= Hey, hey!\pI just discovered a new trick\nlook, look!
#org @pop
#raw 0x62
#raw 0xfe
#org @haha
= Haha, you can't see me.\pBut, I can see you!\pOk, I'll go back to normal.
#org @now
= Haha, unbelievable right?\pLet me do it again.\pDissapear!
#org @ok
= Ok, time to go back now.\pHuh?\pI can't go back to normal!\pHELP!
hidesprite 0x1 - Makes person event no.1 disappear showsprite 0x1 - Makes person event no. 1 appear again.
I used a flag to make him disappear completely hehe...
Remember:
If you want to make a person disappear completely use a flag and input it in the person ID in Advance-Map.
And please do not use #raw 0x60 so you can make sprites disappear it will appear again after you move again.
And that's all for Hidesprite and Showsprite commands.
SetVars
- This is quite complicated in scripting. This are used for script boxes and level scripts. More about Level scripts will be explained later in the Tutorial. SetVars are somewhat like flags but the difference is that scripts that need setvars doesn't work without them. They will either freeze or crash. They are also used in the script so that the script will not happen again.
This is how they work.
setvar 0x(variable) 0x(value)
You have to set them up in A-map. The variable in the Var Number and the value in the unknown.
So here's an example variable.
setvar 0x5000 0x1
It should be like this in A-map.
You have to -1 in the value so 1-1=0 so I recommend everyone to just use 1 as your value in script boxes and level scripts so it will just be 0. :)
There will be further things about setvars later on the tutorial.
For now this will be the things that Setvar covers. :)
Trainerbattles
- This is a command that makes you battle a trainer. Since Trainerbattles covers a wide area I'll explain this one by one. You can edit the trainers using A-Trainer the best Trainer Editor out there.
Ok first let's start with trainerbattle 0x0.
Trainerbattle 0x0
This is just a normal trainer battle command. Used by Normal trainer in the game.
This is how the command works in trainerbattle 0x0;
trainerbattle 0x0 0x(Trainer ID) 0x0 @see @win <- You need these two pointer for the messages that the trainer will say when you see the trainer before the battle and when you win the battle.
And make a msgbox @pointer 0x6 after it. It will be the message that it will say after losing the battle.
It should already been explained so I'll go to the next one.
Trainerbattle 0x1
Trainerbattle 0x1 is used by Gym Leaders in the game.
This is how trainerbattle 0x1 works in the game.
trainerbattle 0x1 0x(Trainer ID) 0x0 @see @win @later <- Later is the pointer to the script that it will do after the battle like giving a badge an Item or talking about something. And you can just use a flag so you can point it to a script after defeating the trainer.
#org @after
= Your one annoying KID.\pYou know that?\pDon't talk to me again.
You can see that it continues through the script.
And that's all for Trainerbattle 0x3.
Trainerbattle 0x4
- Now this command is used for Double Battles you can edit the Double Battle setting in A-trainer.
Here's how the command works;
trainerbattle 0x4 0x(Trainer ID) 0x0 @see @win @2Pokemon <- This is a text that will be said if you don't have 2 Pokemon with you. It automatically uses the countpokemon command to check if you have two or more Pokemon with you. I will explain things about countpokemon later on.
#org @2Pokemon
= James: You don't have 2 Pokémon\nwith you.\pDo you want us to defeat you\neasily?
That's pretty much it for trainerbattle 0x4.
Trainerbattle 0x5
- is used for single rematch battles. Used outdoors so this will be the battle when you use the VS SEEKER.
Here's how the command works;
The script for this command has two trainerbattles the other one is 0x0 And after that command you have to put this.
special2 0x800D 0x39
compare 0x800D 0x1
if 0x1 goto @(pointer for the script which has trainerbattle 0x5.)
trainerbattle 0x5 0x(Trainer ID) 0x0 @saw @win <- I put saw because I wanted a new message when rematching the trainer. But, the win message is still the same.
Here's an example script to put more understanding to it.
#org @after
= Some Pokémon evolve by using Items\nand some through Trades.
#org @saw
= I won't back down from a\nchallenge!
Here you can see how the command was used. special2 will be explained later on. So if you have defeated the Trainer and used your VS SEEKER after that then you will have a rematch with the trainer which is the sole purpose of trainerbattle 0x5.
And that's all for Trainerbattle 0x5.
Trainerbattle 0x7
- Just like 0x5 this is used for rematches. But, this time it's for 0x4 or for a Double Battle.
Here's how the command work;
Same as 0x5 you need this after the trainerbattle for 0x4.
special2 0x800D 0x39
compare 0x800D 0x1
if 0x1 goto @(pointer to rematch script.)
#org @can't
= Guard: You can't proceed further\nif you don't have at least 2\lPokémon with you.\pHmm...
#org @sorry
= Guard: Sorry you don't have 2\nPokémon with you.\pI suggest capturing more so you\ncan enter.
#org @oh
= Guard: Oh, you have 2 Pokémon with\nyou.\pYou may proceed.
countpokemon - Counts your current Pokemon in your party. compare 0x800D 0x2 - Checks for 2 Pokemon. if 0x4 goto @proceed - Checks if the result is greater than or equal to 2. If true goes to pointer @proceed.
And that's all for CountPokemon.
Giveegg
- This is a command like the Givepokemon command the only difference is it gives an egg of a specific Pokemon.
Here's how the command works;
Quote:
giveegg 0x(Pokemon no.)
Pretty easy right?
Here's a script to put more understanding to it.
Quote:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @would 0x5
compare 0x800D 0x1
if 0x1 goto @give
compare 0x800D 0x0
if 0x1 goto @ok
end
#org @would
= Hello there young Trainer!\pWould you care to have this egg?
#org @here
= Here.\pPlease take care of it it's a very\nspecial egg.
#org @receive
= [black_fr]\v\h01 received an EGG!
#org @legendary
= That egg belongs to a Legendary\nPokémon.\pThat only lays an egg every 10,000\nyears.\pPlease take good care of it. I'll\nbe going now.
#org @oh
= Oh, ok I understand.
#org @seems
= It seems you don't have anymore\nspace in your party you better\ldeposit a Pokémon in a nearby\lPokémon Center.
giveegg 0x196 - Gives you an egg of a Rayquaza! ^_^
That's all for giveegg.
Weather Commands
- If you can manipulate the weather you can make an epic hack. xD
Here's how the command works;
Quote:
setweather 0x(Weather no.)
- Set's the weather to be called upon.
Quote:
doweather
- Does the weather that you have set. Must be used after the weather has been set.
Here's the weather list.
Weather List:
Spoiler:
None = 0x0
Reflected Clouds = 0x1
Normal = 0x2
Rain = 0x3
3 Snowflakes = 0x4
Thunderstorm = 0x5
Fog = 0x6
Snow = 0x7
Sandstorm = 0x8
Diagonal Fog = 0x9
Thin Fog = 0xA
Bit Dark = 0xB
Overheat = 0xC
Thunderstorm2 = 0xD
None = 0xE
#org @i'm
= I'm on a lucky streak today.\pWhat could possibly go wrong?
#org @great
= GREAT!\pJust my luck.
setweather 0x3 - Set's a rainy weather. doweather - Does the weather.
And that's all for Weather Commands.
Pokemart
- Do you want to have your own items in A-map or maybe put the Masterball and Rare Candy there? xD Well you can do that with the Pokemart command.
The command goes like this;
Quote:
pokemart @(pointer to the raw's)
The raw's work like this, #raw 0x(Item no.) Pretty easy right? And remember to put #raw 0x0 at the end. Just like in applymovement you have to put #raw 0xfe at the end of the movements. But, in pokemart you'll use #raw 0x0.
It will let me choose from Potion, Antidote, Burn Heal, Ice Heal, Awakening, Paralyz heal.
The preparemsg command will be explained later.
And that's all for Pokemart.
Lockall and Releaseall
- same as the normal lock and release functions. But, this lock's all, and releases all.
Just put, lockall and releaseall. That's all in to it pretty much easy.
Preparemsg and Waitmsg
Same as the normal text box the only difference is it doesn't have a variable next to it. Just the pointer. And waitmsg is just like closeonkeypress the command is to close the message.
Here's how the command works;
Quote:
preparemsg @(pointer to your message)
Quote:
waitmsg
Pretty much easy if you already read through the tutorial so I'll leave it that way so that's all for Preparemsg and Waitmsg.
Warps
- warps are used in doors. They are pretty much useful for travelling scripts. :) Warps have many kinds but, I'll explain them all one by one.
- Just like the normal warp command but the last 3 values are changed. The warp number is changed into 0xFF it let's the script know that we're warping the player to a certain position.
You can view the X and Y coordinates in A-map. If you read through the Tutorial I think this will not require anymore further explanation.
Reminder: Do not try to move the player or use 0xFF as your person event. The screen will not be properly adjusted and you'll end up getting trapped. (Even with Walk Through Wall Codes and editing their Movement Permission in A-map).
And that's all for Movesprite.
SetMapTile
- This is a command in a script to edit the tiles of the specific tileset you have in the map in-game.
And if you want to make that block passable put 0x0, If not put 0x1.
0x0 - Passable 0x1 - Blocked
And that's all for SetMaptile.
$Money Commands$
- This is used to update your money, remove, and view it. Used in Pokemarts and such.
Givemoney
- Pretty much like any give scripts it just gives money in hex of course.
Here's how it works for example we want $500 Poke Dollars so it would be 500 and if you convert 500 into hex it will be 1F4 so here's a command to explain it.
Quote:
givemoney 0x(Amount of Money in hex) 0x0
That's all for Givemoney.
Paymoney
- Same as remove commands just removes a certain amount of money from the player so for example you have received 500 Poke Dollars and you want to take it back then I'll use this.
Quote:
paymoney 0x1F4 0x0
That's all for Paymoney.
Callasm
- This is a command to call asm routines in the game. Very useful in major events.
This is how the command works;
Quote:
callasm 0x(offset +1)
You should use so you can call asm routines, you must first insert the routine using a hex editor. But, I won't get any further about that since it will make more complicated explanation's.
That's all for Callasm.
Level Scripts
- You may have already noticed but Script Boxes in front of doors doesn't work when you enter. In that case you don't need a script box but, you need a level script. A level script can be edited in the header in A-map.
First we need a script make sure it ha a setvar in the end of it. :)
#org @realize
= \v\h01: Woah, I just realised that\nI'm outside the house.
Now do what I say.
Go to A-map and open your map then go to Header you should see there Map Script. It looks like this. Then press add.
And then click the drop-down menu list in script type and select script type 2.
There are many types of level script and you must pick the appropriate one for your script.
First of all.
"setmaptile" script [01] - It's mainly used for setmaptile commands and weather commands.
Validates values, loads handler to 0x03000EB0 (playback) [02] - The most often used script type. All things are can be done in this script type, applymovement, trainerbattles, give scripts, flags, wildbattles, etc. But it's better to use this command when you warp into a house or building. You can just use a script box if you didn't warp it will be much easier and will save up some time.
On entering map/not on menu close [03] - This is used for flags, var comparing, and some other things.
Validates values, loads handler to 0x03000F28 [04] - Same as #2 used when you warp into a house or building.
Ok, you should now compile your script. Then put the offset in script offset 2;
Now remember I made a setvar in the end of the script so I have to put the variable in flag and value in value. And since our value is 1 you have to subtract it by 1 so you don't need to input anything in the value box. Just put 4000 on the flag box.
After that click save Map scripts and your done. Now to test it out.
It worked, but look... It's somewhat messed up.
To fix this go to header in A-map again. Then press Ctrl+H then copy the Map Script Offset.
Now decompile that in XSE. First click the Level Script next to decompile then press decompile.
Next is find the 0xFFFF in the script.
Now delete those F's and replace it with a zero.
Now Compile it then press save in A-map
Test it out.
Ta Daa! Your very first Level script.
And that covers everything about Level Scripts.
END
The Tutorial may be updated from time to time(mostly when I feel like it), in the meantime enjoy hacking! :)
And that concludes tajaros' Xtreme Scripting Tutorial. If you have any questions you can ask me, or simply post here on the thread.
Great tutorial! I will be sure to come to this thread if I need any help in the future.
I didn't see this command in your tutorial and is a working one.
Movesprite
Here it is:
#org $script
lock
faceplayer
message $t1
$t1 1 = Someone on your screen will\nnow be instantly moved.
boxset 6
Then comes the moving part of the script:
movesprite 0x01 0x02 0x04 (The sprite # to move, X Coords, Y Coords)
Then the ending:
release
end
NOTE: This is a bad command to use for 0xFF because it will make the player become off-center with the screen. You won't be able to get back to the middle.
*Sorry if this was already in the tutorial, I didn't see it *
Last edited by CrystalStatic; June 3rd, 2012 at 02:27 AM.
Reason: Your double post has been automatically merged.
This is the wild battle command, as if obvious from it's name(I ripped this from Moltres' code): setwildbattle 0x91 0x32 0x0. Anyway, I was wondering which of those values next to it decides what Pokemon you are battling, if any of them do. I need to know this stuff because I'm currently unsure of how to set up my own legendary battles.
This is the wild battle command, as if obvious from it's name(I ripped this from Moltres' code): setwildbattle 0x91 0x32 0x0. Anyway, I was wondering which of those values next to it decides what Pokemon you are battling, if any of them do. I need to know this stuff because I'm currently unsure of how to set up my own legendary battles.
Here's the answer for that:
Setwildbattle is just like the normal wildbattle command.
And you can use the dowildbattle command to trigger the command. You can still use the wildbattle command for Legendaries the only difference is in legendary wild pokemon battle there's this music that's going to be played.
Setwildbattle is just like the normal wildbattle command.
And you can use the dowildbattle command to trigger the command. You can still use the wildbattle command for Legendaries the only difference is in legendary wild pokemon battle there's this music that's going to be played.
Thanks for this tutorial, just wanna ask if you can give an example of a script for a legendary battle that takes only once if you captured that legendary pokemon, thanks in advance,
Thanks for this tutorial, just wanna ask if you can give an example of a script for a legendary battle that takes only once if you captured that legendary pokemon, thanks in advance,
What do you mean? Like a Legendary battle and disappears after battle? You can just use my Wildbattle script and set a flag it should work well.
Or you can use the setwildbattle command like how other legendaries are battled. I'll provide an example later on.
What do you mean? Like a Legendary battle and disappears after battle? You can just use my Wildbattle script and set a flag it should work well.
Or you can use the setwildbattle command like how other legendaries are battled. I'll provide an example later on.
What i mean is that
1. when i battle that pokemon an i kill that pokemon i can still fight it again.
2. when i was lost with that pokemon i can still fight it again.
3. when i captured it the pokemon will vanish forever.
you see i can't understand well the tutorial part of "compare".
Okay, I want to make a haunted house area like 'strange house' except for the moving furnature thing cause that's way too advanced.( and obviously very limited thanks to firered being the rom...)
What I want to do is I want it to play a floor creeking sound when you step on the tile, it plays the sound only when you walk on the tile and at no other time.
Okay, I want to make a haunted house area like 'strange house' except for the moving furnature thing cause that's way too advanced.( and obviously very limited thanks to firered being the rom...)
What I want to do is I want it to play a floor creeking sound when you step on the tile, it plays the sound only when you walk on the tile and at no other time.
Then use a script box in every tile, that should work... xD
lol it wouldn't be creepy if it played the sound on every tile. Besides, it's a 80 tall and 20 wide map ._. do you have any idea how long it's going to take completing it?
It's going to be a disturbing visit to a disturbing house for some unwary youtube membes.
Also whenever I try to do scripts in levels my game just freezes :/
even if it's just a simple follow me script....
lol it wouldn't be creepy if it played the sound on every tile. Besides, it's a 80 tall and 20 wide map ._. do you have any idea how long it's going to take completing it?
It's going to be a disturbing visit to a disturbing house for some unwary youtube membes.
Also whenever I try to do scripts in levels my game just freezes :/
even if it's just a simple follow me script....
Did you changed 0xffff with 0x0? It will work if you followed everything that I wrote there.