add a treasure chest in RPG Maker XP.
RPG Maker XP is a development environment published by the Japanese company Enterbrain. The software was designed with one goal in mind: to make it possible for those without programming experience to design, develop and publish their own 2-D computer role playing games (RPG) similar to popular RPGs like Final Fantasy 3 and Chrono Trigger.
Instructions
1. Press F8 to change to the events layer. Alternatively, you can click "Mode" and "Events" in the menu bar.
2. Right-click the location on the map where you would like the treasure chest to be placed. Choose "Create New Event."
3. Double click the square underneath the word "Graphic." Scroll down the list of graphics until you see "174-Chest01." Choose one of the images of a closed treasure chest and click "OK."
4. Double click inside the "List of Event Commands" box and select "Change Items." Select the item you would like the player to receive from the Item drop-down list and click "OK." If you wish the player to have more than one item added, just increase the "constant" field to the number you would like the player to receive.
5. Click "Show Text" and write a short sentence to tell the player what he found in the chest. At this point, you have a chest, but it is a chest that is never empty. Every time the player walks up to the chest and clicks the action button, he will receive an item.
6. Double-click in the "List of Event commands" menu and select "control self switch." Click the "on" button to tell the chest that its "A" switch is turned on.
7. Click "New Event Page" to create another set of code for the event. This set of code will describe what to do if the chest has already been opened. Check the box that says "self switch" and set it to "A is ON." Double-click the graphic box, except this time, you will want to choose one of the images of an open treasure chest.
8. Double click the "List of Event Commands" box and choose "Show text." Write "It is empty." Check the "direction FX" box on both pages. That will ensure that the chest doesn't open and close every time the player walks up to it.
9. Click OK and press F12 to run your game.