SHOW:
|
|
- or go back to the newest paste.
| 1 | using System; | |
| 2 | using System.Collections.Generic; | |
| 3 | using System.Linq; | |
| 4 | using BattleCore; | |
| 5 | using BattleCore.Events; | |
| 6 | using BattleCore.PsyOps; | |
| 7 | using System.Text; | |
| 8 | ||
| 9 | namespace FirstBot | |
| 10 | {
| |
| 11 | [Behavior("firstModule", "true", "0.01", "mashem", "My first module.")]
| |
| 12 | ||
| 13 | public class turretModule : BotEventListener | |
| 14 | {
| |
| 15 | public turretModule() | |
| 16 | {
| |
| 17 | - | RegisterCommand("!turret", TurretEvent);
|
| 17 | + | RegisterCommand("!mirror", MirrorMe);
|
| 18 | } | |
| 19 | ||
| 20 | - | public void TurretEvent(object sender, TeamChangeEvent e) |
| 20 | + | |
| 21 | bool MirrorOn = false; | |
| 22 | - | Game(msg.pm("MashBot", "*setship 1"));
|
| 22 | + | string player2mirror = "mashem"; |
| 23 | - | Game(msg.pm("MashBot", "*freq " + e.Frequency));
|
| 23 | + | |
| 24 | public void MirrorMe(ChatEvent c) | |
| 25 | {
| |
| 26 | if (MirrorOn) | |
| 27 | {
| |
| 28 | MirrorOn = false; | |
| 29 | Game(msg.pm("MashBot", "*spec"));
| |
| 30 | Game(msg.pm("MashBot", "*spec"));
| |
| 31 | } | |
| 32 | else | |
| 33 | {
| |
| 34 | player2mirror = c.PlayerName; | |
| 35 | MirrorOn = true; | |
| 36 | Game(msg.pm("MashBot", "*setship 1"));
| |
| 37 | } | |
| 38 | ||
| 39 | Game(msg.arena("Mirror mode is now set to [ " + MirrorOn + " ]"));
| |
| 40 | } | |
| 41 | ||
| 42 | public void AllPlayerMovement(object sender, PlayerPositionEvent p) | |
| 43 | {
| |
| 44 | if (p.PlayerName == player2mirror && MirrorOn) | |
| 45 | Game(p); | |
| 46 | } | |
| 47 | ||
| 48 | public override void Dispose() | |
| 49 | {
| |
| 50 | throw new NotImplementedException(); | |
| 51 | } | |
| 52 | } | |
| 53 | } |