Deanznet Posted November 27, 2007 Share Posted November 27, 2007 Hey I'm trying to make a game.. Keyword Trying lol I just need to clear something up.. If i have 3 different kinds Quality of item.. Some Items Will be Bronze Type Some Will Be Silver and Some Will be gold I also want it so when they first start playing they get to buy a pack Bronze Pack, Silver Pack, Gold Pack, That will pick 3 random items from what ever pack they buy and give it to them. So how do i set up my mysql database for this? Will it just be One table called Shop Items and than have the item id and item quality and what ever else that i put in their like the desc. Quote Link to comment Share on other sites More sharing options...
Stooney Posted November 27, 2007 Share Posted November 27, 2007 You're best bet is to make 1 table. Consisting of the following (plus whatever else u might add): itemId ItemColor (referring to the bronze, silver gold) itemName itemDesc and so on... Then when you need random items from say the silver pack, you can have your script grab the list of all silver items and store them in an array. Then just generate random numbers of zero through the size of the array. That's how I would go about it personally. Others probably have easier methods. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.