NPC vote

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Archimed
Posts: 15
Joined: Thu Dec 05, 2013 9:11 pm

NPC vote

Post 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...)
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: NPC vote

Post 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.
Powered by Eclipse 4.34 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.3.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
Archimed
Posts: 15
Joined: Thu Dec 05, 2013 9:11 pm

Re: NPC vote

Post 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 ^^
Archimed
Posts: 15
Joined: Thu Dec 05, 2013 9:11 pm

Re: NPC vote

Post by Archimed »

What is the column difference between "itemNum" and "itemId" column ? :lol:

I don't understand..

Thank you very much !
User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Re: NPC vote

Post by St3eT »

itemId == ID for the item
itemNum == count of items
If i should be black sheep for sure no as punishment
Image
Archimed
Posts: 15
Joined: Thu Dec 05, 2013 9:11 pm

Re: NPC vote

Post by Archimed »

no, because there are a "itemCount" column :o
Archimed
Posts: 15
Joined: Thu Dec 05, 2013 9:11 pm

Re: NPC vote

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