marwan Posted March 1, 2013 Posted March 1, 2013 Hey guys , didn't share for a long time , so here we go : Its a npc which you can add your self to the famous top list if you have 100 pvp or more. You can vote for a player in the list every 24 hour. The list have only top 10 players sorted by votes. Code : http://pastebin.com/qJpCZEPB And for DB part : CREATE TABLE `famous` ( `name` text, `votes` int, `famous` int ) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=latin1; Coded by me
marwan Posted March 1, 2013 Author Posted March 1, 2013 Is it based on the same idea as Fanky's one? here -_- , didn't see it
Boorinio Posted March 1, 2013 Posted March 1, 2013 public void setCanVote(boolean h) + { + canVote = h; + if (!canVote) + { + ThreadPoolManager.getInstance().scheduleGeneral(new Famous(), 86400000); + } + } this way if the player restarts wouldn't make the instance to start over?
marwan Posted March 2, 2013 Author Posted March 2, 2013 public void setCanVote(boolean h) + { + canVote = h; + if (!canVote) + { + ThreadPoolManager.getInstance().scheduleGeneral(new Famous(), 86400000); + } + } this way if the player restarts wouldn't make the instance to start over? oh , forgot about that. will update it
Pauler Posted March 2, 2013 Posted March 2, 2013 oh , forgot about that. will update it It would be good to test some more your codes before sharing. Many people, who have no knowledge on coding, will use this and gonna have problems. Anyway, good job, thanks for sharing.
marwan Posted March 2, 2013 Author Posted March 2, 2013 It would be good to test some more your codes before sharing. Many people, who have no knowledge on coding, will use this and gonna have problems. Anyway, good job, thanks for sharing. Its really not a big problem.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now