Jump to content

Just to clear things up


Deanznet

Recommended Posts

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.

 

 

 

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.