SHARE
TWEET

Untitled

a guest May 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print "Loading auto announcements..."
  2. import sys
  3. from net.sf.l2j.gameserver import Announcements
  4. from net.sf.l2j.gameserver import ThreadPoolManager
  5. from java.lang import Runnable
  6.  
  7. INTERVAL = 1
  8. ANNOUNCEMENT_1="Remember to vote every day"
  9. ANNOUNCEMENT_2="Every 12 hours!!! jajaj
  10.  
  11. class myTask( Runnable ):
  12.     def __init__( self ):
  13.         self.name = "autoAnnouncer"
  14.     def run( self ):
  15.         Announcements.getInstance().announceToAll(ANNOUNCEMENT_1)
  16.         Announcements.getInstance().announceToAll(ANNOUNCEMENT_2)
  17.  
  18. startInstance = myTask()
  19. ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(startInstance,INTERVAL*1000000,INTERVAL*10000
RAW Paste Data
Top