Jump to content
  • 0

Ranking MVP Cards


somer14

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   0
  • Joined:  08/18/12
  • Last Seen:  

hi could someone tell me if there is any way to rank MVP Cards in npc? to know the amount of mvp cards that are on the server in advance thanks Greetings

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  439
  • Reputation:   29
  • Joined:  12/08/11
  • Last Seen:  

You can use SQL query to look for the mvp cards in a player's inventory, an account's storage, vendor's shop, if you have mail enabled include mail attachments and guild storages.

SELECT SUM(amount) FROM `inventory` WHERE `nameid` = <card_id>"

The above will only count the specified mvp card id from all of the player's inventory, you have to include other tables (storage, vendings, etc.),

and you have to do it for ALL mvp cards (loop), and at the end sum everything for the grand total.

To hasten searches and avoid lagging the server, you may want to alter the table and index columns with `nameid` (this will also increase storage)

and also instead of pulling the data each time you speak to the npc, better to pull the data at certain time of the day and just include 'As of <datetime>'... something like that

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

Join the conversation

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

Guest
Answer this question...

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