public void Dispose() { handler.GetRoom().GetGameManager().OnScoreChanged -= scoreChangedDelegate; handler.GetRoom().GetGameManager().OnGameEnd -= gameEndDeletgate; this.item = null; this.handler = null; }
public void Handle(RoomUser user, Item TriggerItem) { if (this.NameBot == "" || this.Look == "") { return; } Room room = handler.GetRoom(); RoomUser Bot = room.GetRoomUserManager().GetBotOrPetByName(this.NameBot); if (Bot == null) { return; } Bot.BotData.Look = this.Look; ServerPacket Message = new ServerPacket(ServerPacketHeader.UserChangeMessageComposer); Message.WriteInteger(Bot.VirtualId); Message.WriteString(Bot.BotData.Look); Message.WriteString(Bot.BotData.Gender); Message.WriteString(Bot.BotData.Motto); Message.WriteInteger(0); room.SendPacket(Message); }
public void Dispose() { handler.GetRoom().OnUserSays -= delegateFunction; item = null; handler = null; triggerMessage = null; }
public void Handle(RoomUser user, Item TriggerItem) { if (this.NameBot == "" || this.items.Count == 0) { return; } Room room = handler.GetRoom(); RoomUser Bot = room.GetRoomUserManager().GetBotOrPetByName(this.NameBot); if (Bot == null) { return; } Item roomItem = this.items[0]; if (roomItem == null) { return; } if (roomItem.Coordinate != Bot.Coordinate) { Bot.MoveTo(roomItem.GetX, roomItem.GetY, true); } }
public void Handle(RoomUser user, Item TriggerItem) { if (this.NomBot == "" || this.message == "") { return; } Room room = handler.GetRoom(); RoomUser Bot = room.GetRoomUserManager().GetBotOrPetByName(this.NomBot); if (Bot == null) { return; } string TextMessage = this.message; if (user != null) { TextMessage = TextMessage.Replace("#username#", user.GetUsername()); TextMessage = TextMessage.Replace("#point#", user.WiredPoints.ToString()); TextMessage = TextMessage.Replace("#roomname#", this.handler.GetRoom().RoomData.Name.ToString()); } Bot.OnChat(TextMessage, (Bot.IsPet) ? 0 : 2, this.IsCrier); }
public void Handle(RoomUser user, Item TriggerItem) { if (string.IsNullOrEmpty(this.NameBot)) { return; } Room room = handler.GetRoom(); RoomUser Bot = room.GetRoomUserManager().GetBotOrPetByName(this.NameBot); if (Bot == null) { return; } if (user != null && !user.IsBot && user.GetClient() != null) { if (this.IsFollow) { if (Bot.BotData.FollowUser != user.VirtualId) { Bot.BotData.FollowUser = user.VirtualId; } } else { Bot.BotData.FollowUser = 0; } } }
public void Handle(RoomUser user, Item TriggerItem) { if (this.NameBot == "" || this.items.Count == 0) { return; } Room room = handler.GetRoom(); RoomUser Bot = room.GetRoomUserManager().GetBotOrPetByName(this.NameBot); if (Bot == null) { return; } Item roomItem = this.items[ButterflyEnvironment.GetRandomNumber(0, this.items.Count - 1)]; if (roomItem == null) { return; } if (roomItem.Coordinate != Bot.Coordinate) { this.gamemap.TeleportToItem(Bot, roomItem); } }
public void Handle(RoomUser user, Item TriggerItem) { if (this.NomBot == "" || this.message == "" || user == null || user.GetClient() == null) { return; } Room room = handler.GetRoom(); RoomUser Bot = room.GetRoomUserManager().GetBotOrPetByName(this.NomBot); if (Bot == null) { return; } string TextMessage = this.message; if (user != null) { TextMessage = TextMessage.Replace("#username#", user.GetUsername()); TextMessage = TextMessage.Replace("#point#", user.WiredPoints.ToString()); TextMessage = TextMessage.Replace("#roomname#", this.handler.GetRoom().RoomData.Name.ToString()); } if (IsMurmur) { ServerPacket Message = new ServerPacket(ServerPacketHeader.WhisperMessageComposer); Message.WriteInteger(Bot.VirtualId); Message.WriteString(TextMessage); Message.WriteInteger(0); Message.WriteInteger(2); Message.WriteInteger(0); Message.WriteInteger(-1); user.GetClient().SendPacket(Message); } else { ServerPacket Message = new ServerPacket(ServerPacketHeader.ChatMessageComposer); Message.WriteInteger(Bot.VirtualId); Message.WriteString(TextMessage); Message.WriteInteger(RoomUser.GetSpeechEmotion(this.message)); Message.WriteInteger(2); Message.WriteInteger(0); Message.WriteInteger(-1); user.GetClient().SendPacket(Message); } }
public void Dispose() { handler.GetRoom().GetGameManager().OnGameEnd -= gameEndsDeletgate; item = null; handler = null; }
public void Dispose() { handler.GetRoom().GetGameManager().OnGameStart -= gameStartsDeletgate; this.item = null; this.handler = null; }