The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Scripts & Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.


Reply
 
Thread Tools
  #1    
Old September 21st, 2012, 06:49 PM
Pia Carrot's Avatar
Pia Carrot
Owner of Desu Soft
 
Join Date: Aug 2010
Age: 18
Gender: Male
Nature: Adamant
This tutorial is for Pokémon Essentials. I use Version 7, but this should work on the most recent version as well.

Introduction
Hello, everyone. Today I will be teaching you how to set up a one-time buy in RPG Maker XP using Pokémon Essentials. An example of a one-time buy or a scam is the Magikarp Salesman in the Mt. Moon Pokémon Center. He offers you a "great" Pokémon called Magikarp for 500 Poké, and then swindles you saying "no refunds!"
Anyway, these types of sales are different from PokéMarts and for some reason a little more complex to set up. Without further ado, I shall allow the tutorial begin.




Step 1 Commands you need to know

Before we actually get started, you need to know some nifty commands that Poccil and Maruno added to the kit. Poccil made it so that the "Change Gold" command works effectively and is directly linked to your money. Therefore, it is extremely easy to add or subtract from the Player's wallet.

Code:
Change Gold...
An Image might help:
Spoiler:


Also added, the \G command in a text message will make a box pop up in the top-left corner displaying the Player's money.


The example picture at the beginning of the tutorial shows a direct example of how it looks in-game.




Step 2 Event Page 1

The entire process is set up into 2 pages, with only the first being somewhat cumbersome. I have the whole event page ready to be copied, and the buttons shouldn't be too hard to find.



Make sure you use a conditional branch and double check to make sure your Item ID is correct. "TMNAME" would not work and would result in error, but "TM07" would work just fine. Make sure you also include "Self Switch A = On"






Step 3 Event Page 2

Not much to say about this one. It's very easy, and should only include a single box of text, unless you plan on doing something fancy.




Alternate Method (provided by Maruno)





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
@>


Conclusion

Simple, ja? It's pretty simple if you have some experience with the GUI of RMXP, so try it out for yourself! Feel free to comment if you have any questions. Sorry if this is the wrong section, feel free to move it. Thanks to Poccil and Maruno for command reference and Pokémon Essentials.
__________________


Last edited by Pia Carrot; September 22nd, 2012 at 05:53 AM.
Reply With Quote
  #2    
Old September 21st, 2012, 06:57 PM
Whitney's Shaymin's Avatar
Whitney's Shaymin
Creator Of Pokemon Grace
 
Join Date: Apr 2012
Location: Goldenrod, Johto
Gender: Male
Nature: Timid
Very helpful, i will add one of these to my game!
Reply With Quote
  #3    
Old September 21st, 2012, 07:07 PM
Pia Carrot's Avatar
Pia Carrot
Owner of Desu Soft
 
Join Date: Aug 2010
Age: 18
Gender: Male
Nature: Adamant
Quote:
Originally Posted by pokemoner2500 View Post
Very helpful, i will add one of these to my game!
Thanks alot! Let me know if there are any problems.
__________________

Reply With Quote
  #4    
Old September 22nd, 2012, 03:50 AM
nuzamaki90's Avatar
nuzamaki90
Knight of The Volt
 
Join Date: Feb 2008
Location: North Carolina
Age: 20
Gender: Male
Nature: Relaxed
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.
Reply With Quote
  #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
  #6    
Old September 22nd, 2012, 05:53 AM
Pia Carrot's Avatar
Pia Carrot
Owner of Desu Soft
 
Join Date: Aug 2010
Age: 18
Gender: Male
Nature: Adamant
Quote:
Originally Posted by nuzamaki90 View Post
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 View Post
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.
I'm surprised I missed this on the Wiki. I'll add it as an alternative method to this tutorial.
__________________

Reply With Quote
Reply
Quick Reply

Sponsored Links


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:03 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.