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); 

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

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..