How do I make a "vending machine?"

From OHRRPGCE-Wiki
Jump to: navigation, search

First go under custom.exe and edit the shops. Feel free to check before if you have items with drinks names to make the test. For example Santa Lola.

Once you have pick a shop, name it "vending machine". Then edit the shop bitsets. Be sure you put only "buy" avialable

Once it's done "edit the avialable stuff". As you give the shop items, go down to the line "on stock" use the arrow until you see 99. Replace it by 25 or 30. This number represents the number of items stored in the vending machine.

Then, go down and put an affordable price to your items.

Now let's see how to store again the vending machine. Pick up a tag and call it "restore vend.mach" (or any other names that recall you what is the tag for). Let's say it's tag nb 17.

Then, go back under the edit shop menu and pick again the veding machine shop. Edit the avialable stuff and add new items. Just like before check the store line. Then just go one line above. Change the no check tag line to "buy requires tag(17) restore vend.mach"

"Et voilà!" When you want the vending machine to be stored again just turn the tag ON using the really really useful set tag command.

set tag (17, ON)

Feel free to include it in a larger and more complex plotscript with an npc that comes to store again the machine.

Feel also to create many type of vending machine like coffee machine, soda drinks machine, or vending machine that sells sweets and cakes....

To place it on the map, just draw an npc that looks like a vending machine and link it to a text box which conditionals are always: do the following "go to shop vending machine"

To prevent the number of items from decreasing very very quickly I don't recommend you to copy the npc. You have many shops avialable so feel free to create several vending machines (even if they sell the same kind of items)

See Also[edit]