Jump to content
  • 0

Pm Fun With Time Interval


Question

Posted
 

Good morning everyone, I'm here again to ask you how I could implement my idea ..

In my rev (JFrozen) has the pm server fun, which sends messages in pm when the players log, what I was wanting to do is to put this message to appear every 30 minutes for example, like the admin ads. can anybody help me?

 

Obs: The Pm Fun is the retail that already comes at all frozen

5 answers to this question

Recommended Posts

  • 0
Posted

Find the message and add threadpool to it.

+

+                if (Config.SHOW_WELCOME_PM)

+                  {

+                CreatureSay np = new CreatureSay(0, Say2.TELL,Config.PM_FROM,Config.PM_TEXT1);

+                CreatureSay na = new CreatureSay(0, Say2.TELL,Config.PM_FROM,Config.PM_TEXT2);

+                activeChar.sendPacket(np);

+                activeChar.sendPacket(na);

+                  }

+

How would that part look?

  • 0
Posted

Search for threadpool, there are hundreds of examples.

 
I thought of something like that to advertise from time to time.
 
ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new MyTask(), 5000, 5000);
  • 0
Posted
 

I created it here and it got more or less like this

Is correct

 

 

ThreadPoolManager.announceToOnlinePlayers( Config.PM_TEXT1,Config.PM_TEXT2, 5000, 5000); 

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
Answer this question...

×   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...