View Single Post
  #13  
Unread December 27th, 2008, 02:41 PM
diegoisawesome's Avatar
diegoisawesome
Working on Shining Opal, kinda
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 16
Gender: Male
Nature: Quirky
Money Commands

This is a pretty big section, so I'll split it up into 6 sections for each of the money related commands.
  • givemoney
  • paymoney
  • checkmoney
  • showmoney
  • hidemoney
  • updatemoney
I'll explain them in the order they were listed.
Givemoney

The name gives it away. This command will give the player a designated amount of money. The command is set out like this.
Let XX be the money value:
givemoney [XX] 0x00
The final 0x00 actually determines whether it updates your money account. If it were changed to 0x01, the money balance does not change and therefore defeats the purpose of the giving the player money. I'll move onto explaining the money now.
I'll give you an example to show what's happening. We'll use the amount 10,000. so let's convert 10000 to Hex, which gives us 0x2710.
Here's our line of code:
Code:
givemoney 0x2710 0x00
You should be able to understand what's happening. I'll give another example, just in case you need it:
Money amount = 500 [hex = 0x1F4]
Code:
givemoney 0x1F4 0x00
]I'd say that's enough information on givemoney.
Paymoney

Like givemoney, the name gives the function away. This command takes money from the player.
The command is set up in an almost identical manner to givemoney. I'll show the setup again, just in case you forgot already:
Let XX, be the money value:
paymoney [XX] 0x00
The final 0x00 has the same function as what it does with givemoney.
Just in case you wanted it, here's an example:
Money amount = 600 [Hex = 258]
Code:
paymoney 0x258 0x00
Ta-dah! You've now learned the givemoney and paymoney commands.
Checkmoney

This command, obviously, checks if your account for a designated amount of money. It's set up in the same way as the previous two commands, but there is a difference. I'll show you how it's set up.
checkmoney [XX] 0x00
Looks the same, doesn't it? That's because it is exactly the same. The difference is that the reason for the 0x00 at the end is for something different than the other two.
0x00 means "Check Money account", and 0x01 would mean "Don't check Money account", so if you were to use 0x01, it would defeat the purpose of the command.
Now, how do we check the amount? Remember the countpokemon command? We check in that same way, using the compare and if lines.
Here's also a little example, just in case that wasn't explained very well:
Conditions:
Money amount = 1000 [Hex = 3E8] ;
Need at least 1000 to continue in script
Code:
checkmoney 0x3E8 0x00
compare 0x800D 0x1
if 0x4 goto @continue
msgbox @notenough 0x6
Just in case you feel that you need another example, here's one more:
Conditions:
Money amount = 20,000 [Hex = 4E20] ;
Need less than 20,000 to continue in script
Code:
checkmoney  0x4E20 0x00
compare 0x800D 0x1
if 0x0 goto @continue
msgbox @toomuch 0x6
Showmoney

This breaks away from the style that the other money commands are written in. It's set out like this:
Code:
showmoney [X coordinate] [Y coordinate] 0x00
Okay. The first byte is showmoney, obviously, followed by the X coordinate and the Y coordinate on the screen. Personally, I just the co-ordinates (0,0). I think that by now you can just trust me and just use 0x00 for that last byte. There's a reason, but if you remember the reasons for the previous commands, just use the 0x00.
Here's a little example of what how it is set out:
X and Y co-ordinates - (0,0)
Code:
showmoney 0x00 0x00 0x00
This box will appear in the top left hand corner of the screen.
Hidemoney

This one is also different from the rest of them. This command is set out like this:
Code:
hidemoney     [X coordinate] [Y coordinate]
The second and third arguments are just the co-ordinates of the shown money box.
If I were to write this to counter-act the effect of my previously shown script, my hidemoney line would appear like this:
Code:
hidemoney 0x00 0x00
Nice and simple.
Updatemoney

This is the last money command. It's simply set out like this:
Code:
updatemoney [X-Co-ordinate]     [Y-co-ordinate] 0x00
Like the hidemoney command, the X & Y co-ordinates need to compliment the co-ordinates of the showmoney. Well, I'll just show an example, I guess.
Code:
updatemoney 0x00 0x00 0x00
I guess now I can move onto some different commands now.
Addvar

The name says it all. It says "Add to Variable". Before I explain what it does, I'll show you how it's set out.
Code:
addvar [Variable] [Value]

addvar
will add the designated value to the value that is already stored within the designated variable. What a mouthful. If that's a little complicated, I'll simplify it.
As an example, let's say the variable 0x4036 already has the value 0x1 stored into it, and we want to add 0x3 to it to make it 0x4.
I'll put it into an example:
Code:
setvar 0x4036 0x1
addvar 0x4036 0x3
That's pretty much all there is to it. It's up to you to find a use for it.
Subvar

Of course, since we can add to a variable, we must be able to subtract from the variable. It's set out in the exact same way as addvar:
Code:
subvar     [Variable] [Value]
Since it's just the opposing function to addvar, I think I can just go straight through to the example:
Code:
setvar 0x4004 0x6
subvar 0x4004 0x03
In the example, it takes 0x3 from what is stored in the variable 0x4004.
Lockall

It's just lockall. There's no other arguments. It's used when you want to lock all the people in the map, instead of locking just the person you're talking to. It's pretty useful.
Showpokepic

The name may be a little misleading. This command can bring up an image of a designated Pokemon. The command is set out like this:
Code:
showpokepic [Pokemon No.] [X coordinate] [Y coordinate]
We obviously need to begin with the command. Then, it's followed by the Pokemon number, which needs to be in hex. This is then followed by the X and Y coordinates of where you want the image of the Pokemon to appear. Here's a little example to help clarify things:
Conditions:
Pokemon = Dratini
Coordinates = (10,3) Center of Screen.
Code:
showpokepic 0x93 0x0A 0x03
I'd say that's about it for now, but I'll show a bigger example in the next section.
Hidepokepic

Without using this, your showpokepic box will remain open until you leave the map.
The command is just hidepokepic. There's no need for any arguments.
Well, here's an example of the two commands combined in a fragment of a script.
Code:
showpokepic 0x01 0x0A 0x03
msgbox @1 0x5
compare 0x800D 0x1
if 0x1 goto @seen
hidepokepic
msgbox @2 0x6
..... .....etc.

#org @seen
hidepokepic
msgbox @3 0x6
......... .........etc.

#org @1
= Have you seen this Pokemon?

#org @2
= That's too bad.

#org @3
= That's cool. I wish I could\nsee it.
The hidepokepic just closes the pokepic box.
Door Commands
There are three door related commands.
  • setdooropened [prepare to open door]
  • setdoorclosed [prepare to close door]
  • doorchange [activate door animation]

I guess we'll start with setdooropened.
Setdooropened
Obviously, this opens doors on a map. It's set out like this:
Code:
setdooropened [X coordinate] [Y coordinate]
Here's an example. Oak's Lab's Door in Pallet Town's coordinates are (10,0D).
Code:
setdooropened 0x10 0x0D
So try it in a ROM. Did it work?
It didn't, did it?
Here's the reason why. It need to be followed by this command.
Doorchange
This command needs to follow both setdooropened and setdoorclosed. Without this command following, they don't work. This command doesn't need any arguments. Here's an example, with the setdooropened command:
Code:
setdooropened 0x10 0x0D
doorchange
Setdoorclosed
It's set out in the same way as the setdooropened command. I'll show you the set-up again, just in case you've already forgotten.
Code:
setdoorclosed [X coordinate] [Y coordinate]
I'm going to show an example using all three commands:
Code:
setdooropened 0x10 0x0D
doorchange
applymovement 0xFF @move
waitmovement 0x0
setdoorclosed 0x10 0x0D
doorchange
warp 0x4 0x3 0x0
Coin Commands
There are 6 coin commands, and they are very closely "related" to the money commands, as they have similiar arguments. Here's a list of the different commands:
  • checkcoins
  • givecoins
  • removecoins
  • showcoins
  • hidecoins
  • updatecoins
I'll work my way from the top down, I guess.
Checkcoins
This is a pretty simple command, and isn't as difficult or as long as checkmoney. It checks to see if you have a certain amount of coins. It's set out like this:
Code:
checkcoins [Amount]
Here's a short little example:
Check for 3000 coins; if higher than, continue
Code:
checkcoins  0xBB8
compare 0x800D 0x1
if 0x4 goto @continue
Givecoins/removecoins

Since they have similiar aguments, I thought I'd put these two together.
This is how they are set out:
[command] [Amount]
I guess I'll give an example of both so we can move onto the other three commands:
givecoins
Give 1000 coins
Code:
givecoins 0x3E8

removec
oins
Take 1000 coins
Code:
removecoins 0x3E8
Showcoins

This command will display a little box with your coin count. It's set out in a similiar way to showmoney, except you drop off the last argument. This is how the command is set out:
Code:
showcoins [X     Coordinate] [Y Coordinate]
As an example, the co-ordinates (0,0) will appear like this:
Code:
showcoins 0x00 0x00
Not hard, is it?
Hidecoins

Obviously, this command hides the coin counter that was brought up with the showcoins command. It's set out in the same way as showcoins, but if you want to see it again, here it is:
Code:
hidecoins [X     Coordinate] [Y Coordinate]
Just remember that without this command, the counter will remain until the map is reset.
Updatecoins

Of course, this will update the coin counter and show any changes within your "coin balance". How's this set out? I bet you would be able to guess correctly. It's set up the same way as the showcoins and hidecoins, and just for the heck of it, I'll show the example again.
Code:
updatecoins     [X Coordinate] [Y Coordinate]
Here's what I promised. I'll make it a little bigger than what I normally do. I shouldn't have to explain this script because you should be able to understand it:
Code:
showcoins 0x00 0x00
givecoins 0x3E8
updatecoins 0x00 0x00
msgbox @1 0x5
compare 0x800D 0x1
if 0x1 goto @begin
hidecoins 0x00 0x00
msgbox @2 0x6
release
end

#org @1
= Is there anything else?

#org @2
= Thank you! Please come\nagain!
There! I've used four of the six commands in a few lines of one script.
Displaying Names/Values

The title may be a little hard to understand. This section is dedicated to assigning names of Pokemon, names of Items and numbers to \v\h02 and others of the sort.
Here's a list of the commands that we will go over.
  • bufferpokemon
  • bufferfirstpokemon
  • bufferitem
  • bufferattack
  • buffernumber
Like always, I'll start at the top and work my way down.
Bufferpokemon

With this, we will assign a certain Pokemon's name to a \v\hXX variable.
It's set out like this.
Code:
bufferpokemon [buffer#] [PKMN Number]
We have to subtract two from the end of the [buffer#] and use that number.
Here's an example. We're going to assign Charizard's name to [buffer1].
bufferpokemon 0x00 0x06
msgbox @1 0x6
release
end

#org @1
= How is [buffer1]?[/code]Nice and basic. Just in case you want a second example, I'll 'chuck' one more below.
Pokemon = Chikorita; Storing to? = \v\h03
Code:
bufferpokemon 0x01 0x98
msgbox @1 0x6
release
end

#org @1
= How's \v\h03 going?
Bufferfirstpokemon

This command is set out a little differently to the one above. We just set it out like this:
Code:
bufferfirstpokemon [buffer#]
There's just two bytes needed for it to work.
Since it's such a short command, I'll just show an example. In the example, we're going to show how to assign the first Pokemon in the party's name to [buffer1].
Code:
bufferfirstpokemon 0x00
msgbox @1 0x6
.... ....

#org @1
= Let me give \v\h02 a haircut.
Bufferitem

It's set out in the exact same way that bufferpokemon is, but it's still worth showing. In case you've forgotten how bufferpokemon was set out, here's how bufferitem is set out.
bufferitem [buffer#] [item #]
Since there really isn't too much need for a second explanation, I'll move straight into the example:
Code:
bufferitem 0x00 0x04
msgbox @doyou 0x5
.... .... ....

#org @doyou
= Do you have any [buffer1]s?
Notice how I've added "s" straight after [buffer1]. If you don't know why, it's so that the message will appear like this:
Quote:
Do you have any POKe BALLs?

Bufferattack

I bet you could probably guess how this command is set out. It's done the same way as bufferitem and bufferpokemon. It's set out like this.
Code:
bufferattack [buffer#] [attack #]
I think the only thing is that I haven't given you a list of the attacks yet, have I?
Anyway, here's the list. This will come in handy a little later:
HEX Values
Spoiler:
001 Pound
002 Karate Chop
003 DoubleSlap
004 Comet Punch
005 Mega Punch
006 Pay Day
007 Fire Punch
008 Ice Punch
009 ThunderPunch
00A Scratch
00B ViceGrip
00C Guillotine
00D Razor Wind
00E Swords Dance
00F Cut
010 Gust
011 Wing Attack
012 Whirlwind
013 Fly
014 Bind
015 Slam
016 Vine Whip
017 Stomp
018 Double Kick
019 Mega Kick
01A Jump Kick
01B Rolling Kick
01C Sand-Attack
01D Headbutt
01E Horn Attack
01F Fury Attack
020 Horn Drill
021 Tackle
022 Body Slam
023 Wrap
024 Take Down
025 Thrash
026 Double-Edge
027 Tail Whip
028 Poison Sting
029 Twineedle
02A Pin Missile
02B Leer
02C Bite
02D Growl
02E Roar
02F Sing
030 Supersonic
031 SonicBoom
032 Disable
033 Acid
034 Ember
035 Flamethrower
036 Mist
037 Water Gun
038 Hydro Pump
039 Surf
03A Ice Beam
03B Blizzard
03C Psybeam
03D BubbleBeam
03E Aurora Beam
03F Hyper Beam
040 Peck
041 Drill Peck
042 Submission
043 Low Kick
044 Counter
045 Seismic Toss
046 Strength
047 Absorb
048 Mega Drain
049 Leech Seed
04A Growth
04B Razor Leaf
04C SolarBeam
04D PoisonPowder
04E Stun Spore
04F Sleep Powder
050 Petal Dance
051 String Shot
052 Dragon Rage
053 Fire Spin
054 ThunderShock
055 Thunderbolt
056 Thunder Wave
057 Thunder
058 Rock Throw
059 Earthquake
05A Fissure
05B Dig
05C Toxic
05D Confusion
05E Psychic
05F Hypnosis
060 Meditate
061 Agility
062 Quick Attack
063 Rage
064 Teleport
065 Night Shade
066 Mimic
067 Screech
068 Double Team
069 Recover
06A Harden
06B Minimize
06C SmokeScreen
06D Confuse Ray
06E Withdraw
06F Defense Curl
070 Barrier
071 Light Screen
072 Haze
073 Reflect
074 Focus Energy
075 Bide
076 Metronome
077 Mirror Move
078 Selfdestruct
079 Egg Bomb
07A Lick
07B Smog
07C Sludge
07D Bone Club
07E Fire Blast
07F Waterfall
080 Clamp
081 Swift
082 Skull Bash
083 Spike Cannon
084 Constrict
085 Amnesia
086 Kinesis
087 Softboiled
088 Hi Jump Kick
089 Glare
08A Dream Eater
08B Poison Gas
08C Barrage
08D Leech Life
08E Lovely Kiss
08F Sky Attack
090 Transform
091 Bubble
092 Dizzy Punch
093 Spore
094 Flash
095 Psywave
096 Splash
097 Acid Armor
098 Crabhammer
099 Explosion
09A Fury Swipes
09B Bonemerang
09C Rest
09D Rock Slide
09E Hyper Fang
09F Sharpen
0A0 Conversion
0A1 Tri Attack
0A2 Super Fang
0A3 Slash
0A4 Substitute
0A5 Struggle
0A6 Sketch
0A7 Triple Kick
0A8 Thief
0A9 Spider Web
0AA Mind Reader
0AB Nightmare
0AC Flame Wheel
0AD Snore
0AE Curse
0AF Flail
0B0 Conversion 2
0B1 Aeroblast
0B2 Cotton Spore
0B3 Reversal
0B4 Spite
0B5 Powder Snow
0B6 Protect
0B7 Mach Punch
0B8 Scary Face
0B9 Faint Attack
0BA Sweet Kiss
0BB Belly Drum
0BC Sludge Bomb
0BD Mud-Slap
0BE Octazooka
0BF Spikes
0C0 Zap Cannon
0C1 Foresight
0C2 Destiny Bond
0C3 Perish Song
0C4 Icy Wind
0C5 Detect
0C6 Bone Rush
0C7 Lock-On
0C8 Outrage
0C9 Sandstorm
0CA Giga Drain
0CB Endure
0CC Charm
0CD Rollout
0CE False Swipe
0CF Swagger
0D0 Milk Drink
0D1 Spark
0D2 Fury Cutter
0D3 Steel Wing
0D4 Mean Look
0D5 Attract
0D6 Sleep Talk
0D7 Heal Bell
0D8 Return
0D9 Present
0DA Frustration
0DB Safeguard
0DC Pain Split
0DD Sacred Fire
0DE Magnitude
0DF DynamicPunch
0E0 Megahorn
0E1 DragonBreath
0E2 Baton Pass
0E3 Encore
0E4 Pursuit
0E5 Rapid Spin
0E6 Sweet Scent
0E7 Iron Tail
0E8 Metal Claw
0E9 Vital Throw
0EA Morning Sun
0EB Synthesis
0EC Moonlight
0ED Hidden Power
0EE Cross Chop
0EF Twister
0F0 Rain Dance
0F1 Sunny Day
0F2 Crunch
0F3 Mirror Coat
0F4 Psych Up
0F5 ExtremeSpeed
0F6 AncientPower
0F7 Shadow Ball
0F8 Future Sight
0F9 Rock Smash
0FA Whirlpool
0FB Beat Up
0FC Fake Out
0FD Uproar
0FE Stockpile
0FF Spit Up
100 Swallow
101 Heat Wave
102 Hail
103 Torment
104 Flatter
105 Will-O-Wisp
106 Memento
107 Facade
108 Focus Punch
109 SmellingSalt
10A Follow Me
10B Nature Power
10C Charge
10D Taunt
10E Helping Hand
10F Trick
110 Role Play
111 Wish
112 Assist
113 Ingrain
114 Superpower
115 Magic Coat
116 Recycle
117 Revenge
118 Brick Break
119 Yawn
11A Knock Off
11B Endeavor
11C Eruption
11D Skill Swap
11E Imprison
11F Refresh
120 Grudge
121 Snatch
122 Secret Power
123 Dive
124 Arm Thrust
125 Camouflage
126 Tail Glow
127 Luster Purge
128 Mist Ball
129 FeatherDance
12A Teeter Dance
12B Blaze Kick
12C Mud Sport
12D Ice Ball
12E Needle Arm
12F Slack Off
130 Hyper Voice
131 Poison Fang
132 Crush Claw
133 Blast Burn
134 Hydro Cannon
135 Meteor Mash
136 Astonish
137 Weather Ball
138 Aromatherapy
139 Fake Tears
13A Air Cutter
13B Overheat
13C Odor Sleuth
13D Rock Tomb
13E Silver Wind
13F Metal Sound
140 GrassWhistle
141 Tickle
142 Cosmic Power
143 Water Spout
144 Signal Beam
145 Shadow Punch
146 Extrasensory
147 Sky Uppercut
148 Sand Tomb
149 Sheer Cold
14A Muddy Water
14B Bullet Seed
14C Aerial Ace
14D Icicle Spear
14E Iron Defense
14F Block
150 Howl
151 Dragon Claw
152 Frenzy Plant
153 Bulk Up
154 Bounce
155 Mud Shot
156 Poison Tail
157 Covet
158 Volt Tackle
159 Magical Leaf
15A Water Sport
15B Calm Mind
15C Leaf Blade
15D Dragon Dance
15E Rock Blast
15F Shock Wave
160 Water Pulse
161 Doom Desire


Now I guess I could jump into an example now, couldn't I?
Code:
bufferattack 0x00 0x13B
bufferpokemon 0x01 0x06
msgbox @1 0x5
... ...

#org @1
= Can [buffer2] use [buffer1]?
I just thought I'd make it a little more confusing.
The message actually says:
Quote:
Can Charizard use Overheat?
Buffernumber

This is just used to display a number stored in a variable. It's set up like this:
buffernumber [buffer#] [Variable]
The downside of this command is that it can only display numbers from 0-65535 [Hex = 0x0 - I'll show an example. We're going to put the number 50000 in [buffer1].
Code:
setvar 0x800D 0xC350
buffernumber 0x00 0x800D
msgbox @1 0x6
.... .... ....

#org @1
= Account Balance: \hB7: [buffer1]
That's all there is to it.
Msgboxsign

This is a fun little command. This will turn your normal msgbox into a Signpost Box. Here's an example:
Code:
#dynamic 0x800000

#org @start
msgbox @1 0x6
msgboxsign
msgbox @1 0x6
msgboxnormal
msgbox @1 0x6
release
end

#org @1
= Test.
Try this in a ROM.
The first message should appear as a normal boxset 0x6. But when we used msgboxsign, our second boxset 0x6 became a signpost box. But what's this msgboxnormal doing here? msgboxnormal converts the box back into a normal boxset 0x6. This is just a little playful command that gave us a break from the commands that are having four and five arguments.
Callasm
This command is used to call an ASM function that you have added to the ROM. I'm not going to write an example. I'm going to use the example of the command used with Mastermind X's "Shiny Hack".
This is his hex script:
Quote:
Originally Posted by Mastermind_X
0071b7a0h: 23 71 B7 71 08 00 B6 82 00 1E 00 00 00 25 38 01 ; #q·q..¶‚.....%8.
0071b7b0h: 28 01 01 23 71 B7 71 08 02 FF FF FF FF FF FF FF ; (..#q·q..ÿÿÿÿÿÿÿ
With his explanation
Quote:
Originally Posted by Mastermind_X
[23] //asm call
[XXXXXXXX] //pointer to thumb-sub+1
[00] //filler
[B6] //define wild pokemon
[XXXX] //pokemon-id (INGAME)
[XX] //level
[XXXX] //held Item
[00]
[25] //special-event
[3801] //wild pokemon battle!
[28] //wait
[0101] //a second
[23] //asm call
[XXXXXXXX] //pointer to thumb-sub+1
[02] //end
Now here's my version of his script in XSE language:
Code:
#dynamic 0x800000

#org @start
callasm 0x71B771
wildbattle 0x82 0x1E 0x0
special 0x138
pause 0x101
callasm 0x71B771
end
with a bit more of an explanation.
He's called the ASM function twice: once to turn it on, and once to turn it off.
I think he's explained everything else.
Getplayerpos

getplayerpos can be used to store the player's X and Y positions on the map into designated variables.
The command is set out like this:
Quote:
getplayerpos [xxxx] [yyyy]
xxxx: Variable for x position
yyyy: Variable for y position
Here's an example. With this, we'll store the Player's X Position to 0x4000, and the Player's Y position into 0x4001.
Code:
....
getplayerpos 0x4000 0x4001
....
Repeattrainerbattle

This is a simple command that will begin the Last Trainer battle commenced. It's done simply with command repeattrainerbattle.
We can easily use this in a script by simply doing:
Code:
repeattrainerbattle
Releaseall

This command is used as the opposite to 'lockall''. This command will release all sprites on the current map.
Here's how it can be used:
Code:
releaseall
Waitkeypress

This command can be used as a pause. The command waitkeypress is used to wait until a key is pressed before it continues.
It's used like this:
Code:
waitkeypress
It doesn't need any arguments.

Yesnobox

This command is somewhat pointless when there is msgbox @text 0x5. It acts in the same way as 0x5 where when you use compare, yes = 1 and no = 0. Its only reason for use might be to have some flexibility as to where you want the box to be placed.
The command is set out like this:
Quote:
yesnobox [xx] [yy]
xx: X co-ordinate
yy: Y co-ordinate
In a script, we can use it like this:
Code:
msgbox @1 0x4
yesnobox 0x0 0x0
closeonkeypress
compare 0x800D 0x1
if 0x1 goto @yes
Multichoice, preparemsg, waitmsg

Yes, it's something people want to use, so here's a brief guide on multichoice and two other commands that normally accompany it.
I'll show an example first, which will make it easier for me to explain how it's used:
Code:
preparemsg 0x161232
waitmsg
multichoice 0xE 0x0 0x1E 0x0
copyvar 0x8000 0x800D
compare 0x8000 0x0
if 0x1 goto @option1
compare 0x8000 0x1
if 0x1 goto @option2
compare 0x8000 0x2
if 0x1 goto @option3
compare 0x8000 0x3
if 0x1 goto @option4
compare 0x8000 0x4
if 0x1 goto @option5
compare 0x8000 0x5
if 0x1 goto @option6
compare 0x8000 0x7F
if 0x1 goto @canceled
end
First, I'll explain preparemsg. The following four bytes refer to the pointer to text.
waitmsg is similar to closeonkeypress. This command is special and is used with preparemsg to close it.
Now onto the multichoice command. YAY! Well, it's set out like this:
Quote:
multichoice [xx] [yy] [zz] [aa]
xx: X co-ordinate
yy: Y co-ordinate
zz: Multi ID. Refer to Multi List
aa: Determines if B can cancel. 0x0 means B can cancel.
The first two parameters are easy to use. Like other commands, they are just the X and Y co-ordinates on the screen.
The third parameter is the options that appear on the multi list. It's for Fire Red, so sorry to Ruby hackers.
Spoiler:
[00] - Yes
No
[01] - Eevee
Flareon
Jolteon
Vaporeon
Quit looking.
[02] - Normal
Black
Pink
Sepia
[03] - Hall of Fame
Quit
[04] - Eggs
Quit
[05] - Victories
Quit
[06] - Hall of Fame
Eggs
Quit
[07] - Hall of Fame
Victories
Quit
[08] - Eggs
Victories
Quit
[09] - Hall of Fame
Eggs
Victories
Quit
[0A] - Exit
[0B] - Exit
[0C] - Exit
[0D] - Bicycle $1,000,000
No Thanks
[0E] - Abra 180 coins
Clefairy 500 coins
Dratini 2,800 coins
Scyther 5,500 coins
Porygon 9,999 coins
No Thanks
[0F] - SLP
PSN
PAR
BRN
FRZ
EXIT
[10] - Yes
No
Info
[11] - Single battle
Double battle
Multi battle
Info
Exit
[12] - Yes
No
Info
[13] - Make a Challenge
Info
Exit
[14] - Rooftop
B1F
Exit
[15] - Helix Fossil
Exit
[16] - Dome Fossil
Exit
[17] - Old Amber
Exit
[18] - Helix Fossil
Old Amber
Exit
[19] - Dome Fossil
Old Amber
Exit
[1A] - Fresh Water $200
Soda Pop $300
Lemonade $350
Exit
[1B] - 50 coins $1,000
500 coins $10,000
Exit
[1C] - Excellent
Not So Bad
[1D] - Right
Left
[1E] - TM13 4,000 coins
TM23 3,500 coins
TM24 4,000 coins
TM30 4,500 coins
TM35 4,000 coins
No Thanks
[1F] - 5F
4F
3F
2F
1F
Exit
[20] - Fresh Water
Exit
[21] - Soda Pop
Exit
[22] - Fresh Water
Soda Pop
Exit
[23] - Lemonade
Exit
[24] - Fresh Water
Lemonade
Exit
[25] - Soda Pop
Lemonade
Exit
[26] - Fresh Water
Soda Pop
Lemonade
Exit
[27] - Trade Center
Colosseum
Exit
[28] - Game Link Cable
Wireless
Exit
[29] - Smoke Ball 800 coins
Miracle Seed 1,000 coins
Charcoal 1,000 coins
Mystic water 1,000 coins
Yellow flute 1,600 coins
No Thanks
[2A] - B1F
B2F
B4F
Exit
[2B] - Linked game play
Direct Corner
Union Room
Quit
[2C] - Two Island
Three Island
Exit
[2D] - One Island
Three Island
Exit
[2E] - One Island
Two Island
Exit
[2F] - Trade Center
Colosseum
Berry Crush
Exit
[30] - Nada
Nada
Exit
[31] - Pokemon Jump
Dodrio Berry-Picking
Exit
[32] - Trade Center
Colosseum
Exit
[33] - 2 Tinymushrooms
1 Big Mushroom
[34] - Trade Center
Colosseum
Berry Crush
Exit
[35] - Trade Center
Colosseum
Exit
[36] - Sevii Islands
Navel Rock
Exit
[37] - Sevii Islands
Birth Island
Exit
[38] - Sevii Islands
Navel Rock
Birth Island
Exit
[39] - One Island
Two Island
Three Island
Exit
[3A] - Vermilion
Two Island
Three Island
Exit
[3B] - Vermilion
One Island
Three Island
Exit
[3C] - Vermilion
One Island
Two Island
Exit
[3D] - Vermilion
Exit
[3E] - Blank
Blank
Exit
[3F] - Join Group
Become Leader
Exit
[40] - Single
Double
Knockout
Mixed
Exit

From the example script, you should be able to tell that the selected result from multichoice is stored into the variable 0x800D.
You should be able to see I copied it to variable 0x8000 to see if it would confuse anyone. I hope it didn't. The copyvar was not needed. You can just compare with 0x800D, but by now, you should already know that.
The following compares should be fairly obvious as to what they do. They compare what option has been selected. 0x0 is the top option, 0x1 is the second to the top, and so on until the final option.
Name Pokemon

Here's another working Name Pokemon sequence, although this one will only work if the Pokemon is given into the party and not a PC box. Here's a script where it can be used. I'll explain it in the code.
But before I do that, Pokemon's party position is [Position] - 1. First in line is 0x0. And sixth would be 0x5. Now the script...
Code:
countpokemon
compare 0x800D 0x6 'If you have 6 Pokemon, don't continue.
if 0x1 goto @toomany
givepokemon 0x1 0x5 0x0 'Gives a Pokemon
msgbox @2 0x5 'the obligatory, "Would you like to rename....
compare 0x800D 0x1
if 0x1 gosub @name 'If yes call .... ....'
Who cares about this part?

#org @name
countpokemon 'Counts Pokemon
subvar 0x800D 0x1 'Takes one away from 0x800D. Reason Above.
copyvar 0x8004 0x800D 'copies over to 0x8004 which is used by special 0x166 
fadescreen 0x1 'Fades screen to black
special 0x166 'Name Pokemon, Party number at 0x8004
waitstate 'Wait for Special
return 'Returns

#org @toomany
msgbox @1 0x6
release
end

#org @1
= Your party is full.\nPlease deposit one to\nmake room.

#org @2
= Would you like to give a\nnickname to this Pokemon?
Hope that helped.
Store Pokemon to Pokedex

Okay, so here's another string like the Name Pokemon above. It simply adds a Pokemon to the 'Seen' section of your Pokedex.
This one is fairly easy to do. Here's the script. It'll make it easier for me to explain.
Code:
setvar 0x8004 0x97
special 0x163
See? Nice and short.
Pretty basic too. We put the Pokemon number of the Pokemon we want to set to 'Seen' to 0x8004. In this case, I'm preparing Mew to appear as Seen.
Special 0x163 only finishes the job and actually sets it as Seen in your Pokedex.


That was a very extensive and in-detail scripting tutorial. Hope you enjoyed it!
If you see any bugs, feel free to tell me about them.

P.S. It took me about a week to convert to XSE style.

1-17-09 P.P.S. It's been MEGA-UPDATED! WOOT!
__________________
My Website: o15.com
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial



Last edited by diegoisawesome; June 22nd, 2009 at 04:07 PM. Reason: MEGA-HUGE UPDATE
Reply With Quote