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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...