Mirage Source http://www.miragesource.net/forums/ |
|
Stuff for Shops http://www.miragesource.net/forums/viewtopic.php?f=210&t=330 |
Page 1 of 2 |
Author: | DarkX [ Thu Jul 27, 2006 10:20 pm ] |
Post subject: | Stuff for Shops |
I was playing a game my friend made in C++ and in it, the shops had certain things that you could buy, but you were able to sell anything you had in your inventory to the shop,(unless it was a quest item). Having a thing in the edit item that is shop resale value? I have been expirementing with it and have been unable to figure it out, so I was wondering if any of you could give some assisstance in a good way to mod the shops codes to be able to sell stuff to them. example 1. purchase item from shop, 2. aquired item from the fields, 3. sold the item from the fields to shop owner. 4. player aquires preset amount of gold. If any ideas come to mind please post them, thanks. |
Author: | Dr. Spoon [ Thu Jul 27, 2006 10:52 pm ] |
Post subject: | |
well it would be possible.. but it would require you adding another integer or byte to the item type.. simply saveing it as the items regular value or sell value but inrelalife stores only take backor buy bakck what they sell in that way you can make a shop buy the items that it sells at half the price they pay for them but that would mean rebuilding the entire shop system kind of NOTE: I have been working on a new shop system but as far as a full tutorial you will have to wait a while because I must first finish it then put it into the TPO game that is being built then maybe I will share some of its treasures |
Author: | DarkX [ Thu Jul 27, 2006 11:00 pm ] |
Post subject: | |
Well, my idea, was to have like normal shops that buy back weapons, or armor or items, then have ponshops that buy pretty much everything. Then I'm working on installing pets and making a petshop, that you can buy the pets from rather than only recieving them by gift from a admin. |
Author: | Dr. Spoon [ Thu Jul 27, 2006 11:10 pm ] |
Post subject: | |
I see then you would want to go with adding a new data bit to the item rec that is only used when the shops need to buy something from a player so when you make the items you set a predetermined price this would help but I would also recomend adding a percentage to the shops editor so it can sell items at a percentage of the regular price (I would base it on the durability left on the equipment so they get paid a fair value for a used one and for a new one) |
Author: | DarkX [ Thu Jul 27, 2006 11:20 pm ] |
Post subject: | |
Yeah I thought about that but not sure how to base it, I mean I was going to make it for every 5% missing the price drops by about 4gold. |
Author: | Dr. Spoon [ Thu Jul 27, 2006 11:31 pm ] |
Post subject: | |
Code: If Item(player(myindex).inv(item).num).Dur < item(itemnum).dur then
percent = item(itemnum).dur / item(player(myindex).inv(item).num).dur diff = 100 - percent Cost to shop = item(itemnum).cost - diff else cost to shop = item(itemnum).cost end if her is a sample idea (not gonna work as is jsut an idea) i am sure you can extrapolate teh rest of yoru work form this if not let me know I should be able to help you when I have time |
Author: | DarkX [ Sun Jul 30, 2006 5:17 am ] |
Post subject: | |
Ok thanks. Hey you play GuildWars or Diablo2, if so then you should know how I'm thinking of the buying and selling working. |
Author: | Leighland [ Sun Jul 30, 2006 8:41 pm ] |
Post subject: | |
First thing i thought of when I read this was Runescape. There they have item specific shops as well as shops that buy nearly everything you can acquire in the game. It's a good idea.. maybe I'll work on this and see what I come up with. |
Author: | DarkX [ Mon Jul 31, 2006 12:02 am ] |
Post subject: | |
That's a good exaple, but now that I think about it, heres acouple good places to look, GuildWars, Diablo1-2, World Of WarCraft. |
Author: | Dr. Spoon [ Mon Jul 31, 2006 2:27 pm ] |
Post subject: | |
and no I have not played any of those games I kind of model things from the real world and in real life stores don't just take any kind of merchandise but pawn shops do take most types of merchandise that can be resold for a profit.. in this sence a pawn shop would have a constantly changing inventory and masot pawn shops don't show everything they have if you were to follow this model then you would need to have an invetnory for traded/bought/sold items using the inventory to store traded items/cash is a good way of doing it if you need any help let me know (i am kind of working on an inventory system for my shops system as well) |
Author: | DarkX [ Mon Jul 31, 2006 9:21 pm ] |
Post subject: | |
Well, I got to thinking about it. Is it possible to take the bank code, and modify it so that when you store an item you can't withdraw it, and it gives you so-odd amount of cash for giving the item to the store. |
Author: | Anarchy [ Tue Aug 01, 2006 6:46 am ] |
Post subject: | |
Doesnt magiknights have this feature? |
Author: | Dr. Spoon [ Tue Aug 01, 2006 8:24 pm ] |
Post subject: | |
I am sure it is possible.. and i wouldn't know about magic knights never played it |
Author: | DarkX [ Tue Aug 01, 2006 8:34 pm ] |
Post subject: | |
That's pretty bad, games are my life and I haven't heard of Magic Knights. Ohh by the way I'm currently working on making it so if you don't remember a players name he will always be in a list, so when on he'll be in the online list, and in the offline list when not logged in. Because I'm not sure if I'm the only one but I hate it when I forget a players name. |
Author: | Anarchy [ Tue Aug 01, 2006 11:58 pm ] |
Post subject: | |
Magiknights not Magic Knights Chased made it?? you havent heard of it?? |
Author: | Obsidian [ Wed Aug 02, 2006 2:48 pm ] |
Post subject: | |
You could just add a "Byte" to a shop, and use it as a percentage.... e.g., Set a Shop to BuyBack Items for 10% less than they're sold for... it would require a bit more programming than spoon's method where you just set the new variable in the ItemRec, but it would work as well. Actually now that i think about it, if you did it my way, you'd probably still have to use Spoon's way of setting a value for an item that the shop didn't already sell, unless you only wanted players to be able to sell an item at the store that sold it to them. (that sounds confusing to me... e.g., Item #1 is sold at shop #1, so shop #1 will buy it from the player if it's found later... Shop #2 doesn't sell Item #1, so it WON'T buy it back from the player) |
Author: | DarkX [ Wed Aug 02, 2006 8:18 pm ] |
Post subject: | |
Quote: Item #1 is sold at shop #1, so shop #1 will buy it from the player if it's found later... Shop #2 doesn't sell Item #1, so it WON'T buy it back from the player[/qoute]
that's almost what I'm thinking about, see, I'm trying to make it so when you make a shop you select what it is, (like in the old final fantasy) you select weapon, armor, item, pawn from a combo list, weapon, armor, and item will only buy back items in the general type.... Example. Shop #1(Weapon) Shop #2(Armor) Shop #3(Items) Shop #4(Pawn) 1.Player aquires armor, goes to shop #1, owner won't buy that item type; player try's selling armor at Shop #3, owner won't buy item type. 2. Player goes to Shop #4, player recieves preset amount of gold. Or player goes to Shop #2 and gets 10% less than it is sold for in the shop. But the idea is that when making the shops(in shop editor) you get to pick what shop type it is from a drop down combo list. |
Author: | Dr. Spoon [ Thu Aug 03, 2006 6:40 pm ] |
Post subject: | |
i see that could be done.. maybe a list of the players inventory adn allselabel items inteh players inventory are enabled adn those not useable are disabled.. this woudlbe onteh shops sell screen where the player sells stuff ot hte shop. adn youcould do the item type to sell ina drop list.. adn youcould then sue a percentage thing do degrade tehprice theshop pays for equipment this does sound liek a very nice setup.. let meknwo ifyouwna tsomehelp. |
Author: | DarkX [ Sat Aug 05, 2006 1:27 am ] |
Post subject: | |
Ok, I'm not sure if I explained that correctly, but, when you make a map thats a shop theres a drop down list that lets you select the type of shop your wanting to make it. aka shop #1-4 what ever they are.[/img] |
Page 1 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |