Quote: (tumble) infact kill your poodle (jarinor) Nah i...
blade2k » articles & tutorials

jump to:
Tutorials » Game Creation » RPG Maker 2000

Steal Command Tutorial


Reading Article
Author: The Fierce Diety
Posted on 08/04/2004
print :: back to list
Use this tutorial to make a flawless steal command (not a skill).

T

his tutorial will explain how to make a command that will allow you to steal rare items from enemies. I have done this with Rm2k3, so I'm not sure if this works correctly with Rm2k.

For this to work, you will need 1 command, 1 condition, 1 variable, 8 switches, and 2 pages of battle events.

First of all, you need to make the command. Go to the "class" tab in the database. Click "set" near "battle commands." Make a new command and call it "Steal" and set the archtype to "attack." Give it to a character. Lets call your character "Alex."

Next, make the condition. Call it "Normal" and set its color to whatever color you use when a character doesn't have a condition. Set the priority to 1 and the action restriction to "no action allowed." Set recovery to 100% chance to recover each turn. Set the animation to 2 (right hand). If you're thief is left-handed, set it to 3 (left hand).

Make a variable and call it steal. Lets pretend you are using variable [0001].

Make 8 switches. Call them steal1, steal2, steal3, etc. Lets pretend you are using switches [0001] - [0008].

Now for the battle events. Just make a monster group with 8 monsters. Lets call them monster1 - monster8.

The first page is very simple. Set the trigger to turns elapsed 0x + 0. then use switch operations. Select switch range and put the numbers in as [0001]-[0008] (or whatever range of switches you used before) and turn them off. The scripting should look like this:

Trigger Turns Elapsed [0]

<>Switch Operation: [0001-0008] OFF
<>

Now for the second page. This is where it gets a bit tricky. Set the trigger to Hero [Alex] uses the [steal] command. Then use change hero condition to inflict "Alex" with the "normal" condition youjust made. This stops him from attacking when the steal command is used and makes the battle events take over so he can steal an item.

Then use variable operations to set the variable [steal] to a random number between 1 and 5 (you can make it 1 and 10 if it is hard to stal, or 1 and 25 if it is really rare.).

Now make a conditional branch. The condition should be monster1 is the current target. Under the main section of the branch, make another conditional branch wiith a custom handler if the condition is not met. The condition should be switch [0001:steal1] is ON. Under this branch, put a message saying "nothing to steal!" Now under the else handler, make another branch with a custom handler if the condition is not met. Make the condition for this branch Variable [0001:Steal] is 1. Under this branch, put a message saying "Stole X" X is the item that you can steal. Also rember to use item managment to add X to your items. Then use switch operations to turn switch [0001:steal1] ON. Under the else handler put a message saying "Couldn't Steal"

Now, copy all of the scripting that was described in the last paragraph, and paste it under itself. Just change the target to monster 2 and the switches to [0002:steal2] and change X if a different item is being stolen. Keep doing this until you have it for all 8 monsters.

The scripting for the first monster should look like this:

Trigger [Alex] uses the [steal] command

<>Change Cond: Alex Normal Inflict
<>Variable Oper: [0001:steal] Set, Rnd [1-5]
<>Branch: 1:Monster1 Targetted
<>Branch: Switch [0001:steal1] is ON
<>Message: Nothing to Steal!
<>
: Else Handler
<>Branch: Var [0001:steal] is 1
<>Message: Stole X!
<>Change Items: X 1 Add
<>Switch Operation: [0044:steal1] ON
<>
: Else Handler
<>Message: Couldn't Steal!
<>
: End
<>
: End
<>
:End
<>

Now copy and paste these two pages in all monster groups and change X if different items are going to be stolen.

If you have any questions, BMS me - The Fierce Diety