Page 1 of 1

Voting system

Posted: Mon Oct 05, 2009 8:30 am
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 :)

Re: Voting system

Posted: Mon Oct 05, 2009 7:39 pm
by Lee
no1..?

Re: Voting system

Posted: Tue Oct 06, 2009 2:36 pm
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.