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 Quote
^Wyatt Posted March 1, 2013 Posted March 1, 2013 Is it based on the same idea as Fanky's one? here Quote
marwan Posted March 1, 2013 Author Posted March 1, 2013 On 3/1/2013 at 7:24 PM, ^Wyatt said: Is it based on the same idea as Fanky's one? here -_- , didn't see it Quote
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? Quote
marwan Posted March 2, 2013 Author Posted March 2, 2013 On 3/1/2013 at 11:03 PM, Boorinio said: 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 Quote
Pauler Posted March 2, 2013 Posted March 2, 2013 On 3/2/2013 at 7:13 AM, marwan said: 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. Quote
marwan Posted March 2, 2013 Author Posted March 2, 2013 On 3/2/2013 at 2:55 PM, Pauler said: 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.