The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Erk64 on June 22, 2007, 06:31:08 PM

Title: shops that run on items other than gold
Post by: Erk64 on June 22, 2007, 06:31:08 PM
Can someone design a script (or show me one that already exists) that opens up a shop that runs on something other than the game's primary currancy? Throughout my game, for instance, the player can earn tickets by winning mini-games, and I want the player to be able to spend these tickets on items in a shop, but to do that I need it scripted so that the shop will only accept the tickets, and will ignore gold. Help will be greatly appreciated, and I'll credit anyone who helps solve this problem.
Title: Re: shops that run on items other than gold
Post by: ShadowLatios on June 22, 2007, 11:38:42 PM
Version? 2003? XP?  2000?
Title: Re: shops that run on items other than gold
Post by: Erk64 on June 23, 2007, 12:51:43 AM
XP. I can't believe I forgot to mention that...
Title: Re: shops that run on items other than gold
Post by: Esmeralda on June 23, 2007, 12:58:28 AM
It was pretty obvious since you requested for a script. Last time I checked Rm2k/3 didn't support 'em.

Anyway, this can be pulled off with events unless you want a shop screen to be shown.
Title: Re: shops that run on items other than gold
Post by: Erk64 on June 23, 2007, 02:04:09 AM
Indeed, it can. I thought about that, but in the end I decided that I wanted the shop screen to be shown. It's easier to show how weapons and armor benefit (or don't benefit) your charater before you buy them.
Title: Re: shops that run on items other than gold
Post by: modern algebra on June 28, 2007, 07:00:20 PM
Well, unfortunately I am on vacation and so I cannot fulfill this request right now, but in case anybody does want to, my suggestion is to merely copy the default shop script, rename it, and replace the gold requirements with requirements for a global variable you define. A good place to request this would be the Simple Script Shop (http://rmrk.net/index.php/topic,17670.0.html). It should fill the simple requirement  ;8
Title: Re: shops that run on items other than gold
Post by: Reddawg on June 29, 2007, 01:13:54 AM
Well I just finished figured out how to turn gold into a in-game variable (0007 in my case), I had to edit the shop aswell. but what you want (I'm guessing) is to have a brand NEW shop which would accept only tickets, whilst keeping the old shop.  So the only way I can think of to do that is to copy all the shop scripts and rename it to something (i.e. Scene_Tshop) and change the words in the script to refer to Tshop instead of shop, and then make a secondary currancy as of which I did.  If you reply (im not sure if this is a populated forum or not but ill find out) then I can try and make a script for you.

btw I cant speak the language, only understand it, but this weekend Im going to learn it as well as I can.

EDIT* just fyi, I made all windows think a variable instead of gold so that I could make an event-made bank using conditional branches + variables, works fantastically.  I still dont know how to script a closing window, I want it so that when you're in the bank itll pop up and show you what you have in your account like so:

http://reddawg.freepgs.com/Bank.JPG

but it won't update when a transaction is made and when you go to update it it overlaps the previous window, making it fugly. anyone know the script command to close a window? a window probably called something among the lines of @window_gold = window_bank.new  do I have to type something like close.window_bank or something?

EDIT** ah sweet, I figured it out, it was @gold_window.dispose =p, now the window will be fully update-to-date with transaction changes