Skip to content

[Share] Auto Announce Without (.bat) files! (+ Guide)

Featured Replies

Hello....

  I know that he simply exists similar post here I do not use by no means bat files…

  I make post new file (__init__.py)..

   

   --Tested in l2jfree Ct1.5!

 

   Here is the Code!

   

print "Auto Announcements1 Loading..." 
import sys 
from com.l2jfree.gameserver import Announcements 
from com.l2jfree.gameserver import ThreadPoolManager 
from java.lang import Runnable 

INTERVAL = 45
ANNOUNCEMENT_1="First Announce Write Here!!"
ANNOUNCEMENT_2="Second Announce Write Here!!"
ANNOUNCEMENT_3="Third Announce Write Here!!"
class myTask( Runnable ): 
    def __init__( self ): 
        self.name = "autoAnnouncer" 
    def run( self ): 
        Announcements.getInstance().announceToAll(ANNOUNCEMENT_1)
        Announcements.getInstance().announceToAll(ANNOUNCEMENT_2)
        Announcements.getInstance().announceToAll(ANNOUNCEMENT_3)


startInstance = myTask() 
ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(startInstance,INTERVAL*60000,INTERVAL*60000)

 

 

GUIDE[How to Enable this step by step]

 

*This script is playing only in l2jfree!

*If you want to play it to another server pack you need only to change

           

  import sys 
from com.l2jfree.gameserver import Announcements 
from com.l2jfree.gameserver import ThreadPoolManager 
from java.lang import Runnable 

 

..........................................................................

 

..::Step1::..

Make a new txt file..

 

..::Step2::..

Open new txt file and copy the code inside..

 

..::Step3::..

Save and Close this file!

 

..::Step4::..

Rename the file to "__init__.py"

 

..::Step5::..

Ok now the script is allready!!

Copy the file in your server custom scripts!

 

..::Step6::..

Go to your script config(scripts.cfg) and add here the path for your script

expample,, [custom/announce/__init__.py]

 

 

..::Step7::..

Now edit (__init__.py) file!

Chanage your personal announcements!(ANNOUNCEMENT_1="First Announce Write Here!!")

Change the time to reload announce__find this line (INTERVAL = 45)

 

 

..::Step8::..

You are ready!! Restart your server!!

 

.......................................................................

 

I hope to help you... ;)

 

 

 

 

 

 

Rly nice ty for the share! it will perfect for newbies !

Questions..Is there anyway to auto announce the number of players for example every 30 minutes?

 

Thanks in advance,

Zeronimo.

 

Edit #1 and nope it's not for newbies.It's actually a good script  ;D

  • Author

i try to make something for announce online player!

If i make it i posted here!!

and nope it's not for newbies.It's actually a good script   ;D

 

Well TO me its seems like an easy peasy thing to do ;P

 

But Its a good scrip ^^ Keep up i would like to have also the script for online players

Nice Share

 

Keep Up :)

W0W ^^ Thanks for guide and code java. Gratulations Nightmare Alive

  • 3 weeks later...
  • 2 months later...

Great!! nice work!

 

but this dont work .. for me ;/

Very nice share, man. This script help a lot of people.

Keep up man! ;)

  • 3 weeks later...
  • 1 month later...

i want to make a question this auto announce works on gracia part 2?

plz anwser me

  • 1 month later...

beginner  thanx your lession, i need it

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.