View Single Post
  #5    
Old September 22nd, 2012 (05:44 AM).
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
There exists an event comment which is turned into the basic scripts necessary for selling an item. The wiki has further details, but the basic usage is like this:

Code:
@>Text: \GHi!  Would you like a SlowpokeTail for only $200?
@>Show Choices: Yes, No
 : When [Yes]
  @>Comment: SellItem(SLOWPOKETAIL,200)
  @>
 : When [No]
  @>Text: \GOh, that's too bad.
  @>
 : Branch End
@>
That comment will be turned into the appropriate scripts when you compile the game. It only works for selling items, but you can change the Conditional Branch afterwards to make it give a Pokémon instead.

It's useful for vending machines and NPCs like this, and saves you a bit of hassle getting them set up. To make a selling one-time-only, change the event's Self Switch when the item is obtained, as described above.
__________________
Reply With Quote