Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package twcore.bots.rpgbot;
- import java.util.ArrayList;
- import java.util.List;
- import java.util.Timer;
- import twcore.core.BotAction;
- import twcore.core.SubspaceBot;
- import twcore.core.events.PlayerEntered;
- import twcore.core.events.PlayerLeft;
- import twcore.core.game.Player;
- public class RPGOps {
- /*
- **********************************************
- * CLASSES
- **********************************************
- */
- SubspaceBot bot;
- BotAction ba;
- ChatBuffer cb;
- /*
- **********************************************
- * VARS
- **********************************************
- */
- private List<Player> APL = new ArrayList<Player>();
- public Timer EventTimer = new Timer();
- long ETUpdate = System.currentTimeMillis();
- /*
- **********************************************
- * BOT INSTANCE
- **********************************************
- */
- public RPGOps(SubspaceBot Bot, ChatBuffer c) {
- this.bot = Bot;
- this.cb = c;
- }
- /*
- **********************************************
- * EVENTS HANDLES
- **********************************************
- */
- public void playerEnter(PlayerEntered event) {
- try{
- cb.debugMessage("[ "+ba.getPlayerName(event.getPlayerID())+" : "+event.getPlayerID()+" ] has logged on.");
- }
- catch (Exception e){cb.debugMessage(e)}
- try{
- Player p = ba.getPlayer(event.getPlayerID());
- cb.debugMessage("[ "+p.getPlayerName()+" : "+p.getPlayerID()+" ] has logged on.");
- }
- catch (Exception e){cb.debugMessage(e)}
- }
- public void playerLeft(PlayerLeft event) {
- }
- /*
- **********************************************
- * INITIALIZE
- **********************************************
- */
- public void Initialize() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment