Jump to content
  • 0

Ranking MVP Cards


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

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

Join the conversation

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

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.