Page 1 of 1

NPC vote

Posted: Sun Jan 05, 2014 7:04 pm
by Archimed
L2J Revision 6291:
L2JDP Revision 9641:

Hello,
I have to create a npc vote with rewards, I thought the base directly inject the item in the player's inventory but I saw on the forum that it was not recommended because it could be duplication.

So I'd like to know if it is possible to make a SQL query from a NPC, if so, how?

thank you very much (and sorry for my english...)

Re: NPC vote

Posted: Sun Jan 05, 2014 8:40 pm
by Zoey76
I'd use (and used in the past) Premium Items service, you add the items to the table and run a task ever 5 min to check if there are items there and then send those items, player gets a notification ingame if it's logged, otherwise next time player logs.

Re: NPC vote

Posted: Sun Jan 05, 2014 10:10 pm
by Archimed
Thanks you very much for your help !

But i don't find where is the "Premium Items service" table, can say where it is ?

Thanks

EDIT: I found the table, thanks ^^

Re: NPC vote

Posted: Sun Jan 05, 2014 10:21 pm
by Archimed
What is the column difference between "itemNum" and "itemId" column ? :lol:

I don't understand..

Thank you very much !

Re: NPC vote

Posted: Sun Jan 05, 2014 11:03 pm
by St3eT
itemId == ID for the item
itemNum == count of items

Re: NPC vote

Posted: Sun Jan 05, 2014 11:16 pm
by Archimed
no, because there are a "itemCount" column :o

Re: NPC vote

Posted: Mon Jan 06, 2014 8:23 pm
by Archimed
someone can help me for add premium item in the database ? it's not working :cry:

i tried this :

character_premium_items structure
1 charId int(11) => 268484003
2 itemNum int(11) => ?????
3 itemId int(11) => 17 (wooden arrow)
4 itemCount bigint(20) => 1
5 itemSender varchar(50) => "Test"

I see the notification IG but i can't withdraw the item...