Jump to content
  • 0
JackTheGorrion

Card Counting NPC

Question

Hello, I would like to know if there is an NPC that counts the cards on the entire server and also tells who drew it and the time.
I am interested and willing to pay a fee if someone does it to my liking.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi, it's possible to do if you have mvp logs activated. And of course item log for any kind of card. (but I think this is not enabled by default, so you may lost all tracking from time behind).
 

image.png.f76db0e1c8c9deffccb8b82a02b8899e.png

 

As you can see in this table is stored any MVP killed and tells which mvp was killed and what exp, item was rewarded and which map and who. This is not useful at all because if the guy sells the card, the track is "lost", but you can ask SQL to char, bank, inventory, etc... to see where is a card, but then you leave the track of who got or where it was adquired.

 

What you want is, when a card is dropped get unique ID, and save who got it and where, I think this needs SRC editing and SQL modification in order to make an optimized script. But, this is the help I can give you, maybe if some one read this and wanna help further or tell a better solution is ok.

 

EDIT: For now you can do these to examine your DB.
image.png.6fc00c687d03e39703d8b73b6b462f81.png

 

SQL for inventory:

SELECT t2.name_english, t3.name
FROM inventory t1 
INNER JOIN item_db t2 
INNER JOIN `char` t3
ON t1.nameid = t2.id AND t1.char_id = t3.char_id
WHERE 
	t1.nameid IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card')
OR
	t1.card1 IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card')
OR
	t1.card2 IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card')
OR
	t1.card3 IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card');

SQL for bank: Storage saves only account id

SELECT t2.name_english, t1.account_id, t3.userid
FROM `storage` t1 
INNER JOIN item_db t2 
INNER JOIN `login` t3
ON t1.nameid = t2.id AND t1.account_id = t3.account_id
WHERE 
	t1.nameid IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card')
OR
	t1.card1 IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card')
OR
	t1.card2 IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card')
OR
	t1.card3 IN (SELECT `id` FROM `item_db` WHERE `type` = 'Card');

And you can keep looking for guild storage, etc.
 

Edited by rokimoki

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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