Jump to content
MakeWebGames

Daily random items


SRB

Recommended Posts

Someone asked for this, so here it is.

Your players can click on this once daily, and get between 2 and 5 random items at a cost of 100 crystals.

SQL

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

DAILY CRON

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

CODE (random_items.php)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

LINK

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

NOTE This is untested and wrote "on the fly", so no guarantees of it not having an error, BUT if there is, post here and someone (May be me) should correct it.

Link to comment
Share on other sites

Nice contribution. What I would say is if you have you donator packs as items (or any items simply donator only) you should add a way to avoid giving those out. Also I don't like the ORDER BY RAND(),

Anyway thanks for helping someone out. :)

-

 

You must spread some Reputation around before giving it to Guest again.
Link to comment
Share on other sites

I don't particularly like the RAND() either but I'm decorating my house still, so time isn't plentiful right now.

Personally, I'd create the array of all items and then random the array.

In regards to donator items, I'd assume they aren't buy able, hence the clause for itmbuyable in the query

Link to comment
Share on other sites

  • 2 months later...

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.   Paste as plain text instead

  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...