Voting system

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
Lee
Posts: 102
Joined: Wed Sep 02, 2009 11:10 pm

Voting system

Post by Lee »

Hello!
So i got Rizel's voting system and i modified it.. But i got a problem.
Once setVoteCount() is set to 1 (in sql) I have to think a way to make it expire in 12 hours..
So it should be like in 12 hours setvotecount should be 0 again.
I already thought a way ,but no idea how to make it. A new column in SQL votetime and when it expires ,after the char relog ,no vote bonus will be appliued.. So i asked for help 1 friend ,but he wants me to learn ,so he didn't gave me a ready-to-copy (xD) code ,but explained me a little how to make it ,but i was like LOLINDIAN.Anyways..

[quote=friend]Friend said:
the scheduleeventstart is the method which start the whole file
the try is the action
first its time calc
than _task = new and the action
and thats need to activated with a getInstance()
first in the gameserver.java
and than where your stuff is
[/quote]
so ,can somebody help me?
On a short message what i want is .. to reset the vote count every 12 hours.
Regards ,
Martin :)
Lee
Posts: 102
Joined: Wed Sep 02, 2009 11:10 pm

Re: Voting system

Post by Lee »

no1..?
User avatar
Ashitaka
Posts: 96
Joined: Thu Jul 12, 2007 4:04 am
Location: Spain

Re: Voting system

Post by Ashitaka »

Hi Lee,

Your friend is right with their instructions, first you have to code a TASK which is a RUNNABLE implementation that does what you want to do (the vote count reset), then you have to instance a THEADPOOLMANAGER to SCHEDULEGENERALATFIXEDRATE your TASK.

But this project is not precisely a plug-and-play one, so you have to work if you want help from members. If you show some effort on coding, then maybe someone would want to help you.
Post Reply