Jump to content

Recommended Posts

Posted

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

Posted

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?

Posted

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

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock