public static void HandleChatMessage(Bot bot, ChatClientMultiMessage message) { if (message.content == ".gather on") { message.BlockNetworkSend();// do not send this message to the server if (!bot.Character.Jobs.Any(x => x.JobTemplate.id == GatherTest.FARMER_JOB)) { bot.Character.SendMessage("You haven't the farmer job"); } else { bot.AddFrame(new GatherTest(bot)); bot.Character.SendMessage("Gathering ..."); } } else if (message.content == ".gather off") { message.BlockNetworkSend();// do not send this message to the server bot.RemoveFrame <GatherTest>(); bot.Character.SendMessage("Stop gathering ..."); } }
public static void OnCharacterSelectedSuccessMessage(Bot bot, CharacterSelectedSuccessMessage message) { if (bot.Dispatcher is NetworkMessageDispatcher) { bot.AddFrame(new WindowDetector(bot)); } }
public void EnterMap(Map map) { Map = map; Context = map; Bot.AddFrame(new RolePlayHandler(Bot)); OnMapJoined(map); }
public static void HandleChatClientMultiMessage(Bot bot, ChatClientMultiMessage message) { if (message.content.StartsWith(".compare pathfinder")) { message.BlockNetworkSend(); if (bot.HasFrame <PathfindersComparer>()) { bot.RemoveFrame <PathfindersComparer>(); } else { bot.AddFrame(new PathfindersComparer(bot)); } } }
public void EnterFight(GameFightJoinMessage message) { if (IsFighting()) { throw new Exception("Player already fighting !"); } var fight = new Fight(message, Map); Fighter = new PlayedFighter(this, fight); Context = Fight; Bot.AddFrame(new FightHandler(Bot)); OnFightJoined(Fight); }
static void SetFrame(Bot bot, Mode mode) { if (bot.HasFrame <FFight>()) { bot.Character.SendInformation("Set existing FFight to {0} mode", mode); bot.GetFrame <FFight>().Mode = mode; } else if (bot.AddFrame(new FFight(bot, mode))) { bot.Character.SendInformation("Experimental AI fight started in {0} mode", mode); } else { bot.Character.SendInformation("Failed to start a new FFight frame !"); } }
public static void HandleChatMessage(Bot bot, ChatClientMultiMessage message) { if (message.content == ".fight on") { message.BlockNetworkSend();// do not send this message to the server bot.AddFrame(new AutoFight(bot)); bot.Character.SendMessage("Auto fight started"); } else if (message.content == ".fight off") { message.BlockNetworkSend();// do not send this message to the server bot.RemoveFrame <AutoFight>(); bot.Character.SendMessage("Auto fight stopped"); } }
public static void HandleCharacterSelectedSuccessMessage(Bot bot, CharacterSelectedSuccessMessage message) { bot.AddFrame(new ChatViewModel(bot)); }
public static void HandleCharacterSelectedSuccessMessage(Bot bot, CharacterSelectedSuccessMessage message) { bot.AddFrame(new NeighboursChecker(bot)); }
public static void HandleServersListMessage(Bot bot, ServersListMessage message) { bot.AddFrame(new ServerSelectorModelView(bot)); }
public static void HandleCharactersListMessage(Bot bot, CharactersListMessage message) { bot.AddFrame(new CharacterSelectionViewModel(bot)); }
public static void HandleCharacterSelectedSuccessMessage(Bot bot, CharacterSelectedSuccessMessage message) { bot.AddFrame(new FFight(bot, Mode.Follower)); }