View Single Post
Old September 22nd, 2012 (5:53 AM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 575
Quote originally posted by nuzamaki90:
I lol'd because yesterday I was getting so annoyed because I couldn't find or even make a script like this.

I'm glad you did because I have something like the Magikarp Salesmen, except this guy says he owns a rare Pokemon, then sells you the complete opposite (Says he has a Gyarados, gives you a Feebas)

Thanks a lot and I'll be sure to give you credit as well.
Glad it helped you; you don't need to worry about credits, dear.

Quote originally posted by Maruno:
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.
I'm surprised I missed this on the Wiki. I'll add it as an alternative method to this tutorial.

Reply With Quote