PsyOps

RPGWtf

Jun 4th, 2014
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package twcore.bots.rpgbot;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. import java.util.Timer;
  6.  
  7. import twcore.core.BotAction;
  8. import twcore.core.SubspaceBot;
  9. import twcore.core.events.PlayerEntered;
  10. import twcore.core.events.PlayerLeft;
  11. import twcore.core.game.Player;
  12.  
  13. public class RPGOps {
  14.    
  15.     /*
  16.      **********************************************
  17.      *                  CLASSES
  18.      **********************************************
  19.      */
  20.     SubspaceBot bot;
  21.     BotAction ba;
  22.    
  23.     ChatBuffer cb;
  24.    
  25.     /*
  26.      **********************************************
  27.      *                  VARS
  28.      **********************************************
  29.      */
  30.    
  31.     private List<Player> APL = new ArrayList<Player>();
  32.     public Timer EventTimer = new Timer();
  33.     long ETUpdate = System.currentTimeMillis();
  34.    
  35.     /*
  36.      **********************************************
  37.      *                  BOT INSTANCE
  38.      **********************************************
  39.      */
  40.     public RPGOps(SubspaceBot Bot, ChatBuffer c) {
  41.         this.bot = Bot;
  42.         this.cb = c;
  43.     }
  44.    
  45.     /*
  46.      **********************************************
  47.      *                  EVENTS HANDLES
  48.      **********************************************
  49.      */
  50.     public void playerEnter(PlayerEntered event) {
  51.         try{
  52.         cb.debugMessage("[ "+ba.getPlayerName(event.getPlayerID())+" : "+event.getPlayerID()+" ] has logged on.");
  53.         }
  54.         catch (Exception e){cb.debugMessage(e)}
  55.        
  56.         try{
  57.         Player p = ba.getPlayer(event.getPlayerID());
  58.         cb.debugMessage("[ "+p.getPlayerName()+" : "+p.getPlayerID()+" ] has logged on.");
  59.         }
  60.         catch (Exception e){cb.debugMessage(e)}
  61.     }
  62.    
  63.     public void playerLeft(PlayerLeft event) {
  64.     }
  65.    
  66.     /*
  67.      **********************************************
  68.      *                  INITIALIZE
  69.      **********************************************
  70.      */
  71.     public void Initialize() {
  72.  
  73.     }
  74.  
  75. }
Advertisement
Add Comment
Please, Sign In to add comment