![]() |
Stuff for Shops - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Stuff for Shops (/showthread.php?tid=210) |
Stuff for Shops - DarkX - 27-07-2006 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. - Dr. Spoon - 27-07-2006 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 - DarkX - 27-07-2006 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. - Dr. Spoon - 27-07-2006 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) - DarkX - 27-07-2006 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. - Dr. Spoon - 27-07-2006 Code: If Item(player(myindex).inv(item).num).Dur < item(itemnum).dur then 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 - DarkX - 30-07-2006 Ok thanks. Hey you play GuildWars or Diablo2, if so then you should know how I'm thinking of the buying and selling working. - Leighland - 30-07-2006 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. - DarkX - 31-07-2006 That's a good exaple, but now that I think about it, heres acouple good places to look, GuildWars, Diablo1-2, World Of WarCraft. - Dr. Spoon - 31-07-2006 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) - DarkX - 31-07-2006 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. - Anarchy - 01-08-2006 Doesnt magiknights have this feature? - Dr. Spoon - 01-08-2006 I am sure it is possible.. and i wouldn't know about magic knights never played it - DarkX - 01-08-2006 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. - Anarchy - 01-08-2006 Magiknights not Magic Knights Chased made it?? you havent heard of it?? - Obsidian - 02-08-2006 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) - DarkX - 02-08-2006 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] - Dr. Spoon - 03-08-2006 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. - DarkX - 05-08-2006 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] |