View Single Post
Old September 22nd, 2012 (5:44 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
    Join Date: Jan 2008
    Location: England
    Posts: 5,185
    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:

    @>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.
    Go to the Pokémon Essentials Wiki

    | Downloads | Tutorials | Fangames |
    | All Animations Project |

    Follow me on Twitter: @maruno42

    Reply With Quote