SHOW:
|
|
- or go back to the newest paste.
| 1 | - | public void handlePlayerEnter(PlayerEntered event) {
|
| 1 | + | package twcore.bots.rpgbot; |
| 2 | - | String pName; |
| 2 | + | |
| 3 | import java.util.ArrayList; | |
| 4 | - | pName = b.getPlayerName(event.getPlayerID()); //Gets Player Name |
| 4 | + | import java.util.List; |
| 5 | - | Player p = b.getPlayer(event.getPlayerID()); //Gets Player just entered |
| 5 | + | import java.util.Timer; |
| 6 | - | PubPlayerList.add(p); //Adds Player into Pub List |
| 6 | + | |
| 7 | - | //Adds player to MR Player list |
| 7 | + | import twcore.core.BotAction; |
| 8 | - | kzP.createPlayer(pName); //Creates MRPlayer |
| 8 | + | import twcore.core.SubspaceBot; |
| 9 | - | KZPlayer kzp = kzP.getPlayer(pName); //Gets MRPlayer created |
| 9 | + | import twcore.core.events.PlayerEntered; |
| 10 | import twcore.core.events.PlayerLeft; | |
| 11 | - | if (db.CheckExist(pName)) |
| 11 | + | import twcore.core.game.Player; |
| 12 | - | {
|
| 12 | + | |
| 13 | - | db.GetPlayer(kzp); |
| 13 | + | public class RPGOps {
|
| 14 | - | kzChat.debugMessage("Loaded "+pName+"s Account");
|
| 14 | + | |
| 15 | /* | |
| 16 | ********************************************** | |
| 17 | - | if (!db.CheckExist(pName)) |
| 17 | + | * CLASSES |
| 18 | - | {
|
| 18 | + | ********************************************** |
| 19 | - | db.updatePlayer(kzp); |
| 19 | + | */ |
| 20 | - | kzChat.debugMessage("Created "+pName+"s Account");
|
| 20 | + | SubspaceBot bot; |
| 21 | BotAction ba; | |
| 22 | ||
| 23 | - | kzp.PlayerID(event.getPlayerID()); //Sets PlayerID into MRPlayer Object |
| 23 | + | ChatBuffer cb; |
| 24 | - | kzp.InitializePlayer(); //Starts Player Timer for Kill Messages |
| 24 | + | |
| 25 | - | kzp.PlayerShip(p.getShipType()); |
| 25 | + | /* |
| 26 | - | b.sendPrivateMessage(pName, "Welcome "+pName+" to SSDZ KAOS, Where Zombies are taking over the land" |
| 26 | + | ********************************************** |
| 27 | - | + " and you are here to destroy them! If you would like to contruct your house in the neighborhood" |
| 27 | + | * VARS |
| 28 | - | + " please contact AXE DEMENTO, If you would like to see your stats type !kc"); |
| 28 | + | ********************************************** |
| 29 | - | } |
| 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 | } |