public NetworkWindow(IGUIMessages receiver) { chat = new Chat(receiver); chat.togglePos = new Rect(0,30,togglePos.width,25); receiver.AddNetworkMessageRecipient((INetworkMessage)this); menus.Add(new MainContent(receiver,this)); }
protected void Awake() { // force the twitch libraries to be loaded Twitch.Broadcast.UnityBroadcastController.LoadTwitchLibraries(); m_Chat = new Chat(new CoreChatAPI()); }
public NetworkObject Parse(Match match) { Chat chat = new Chat { Now = { Players = new List<Player>() { new Player() { Name = match.Groups["name"].Value, Uid = match.Groups["uniqueid"].Value } }, Content = new List<String>() { match.Groups["text"].Value.Replace("\r", "") } }, Origin = ChatOrigin.Player }; if (String.Compare(match.Groups["context"].Value, "say", StringComparison.OrdinalIgnoreCase) == 0) { chat.Scope.Groups = new GroupingList(); } else { // Can we get a team identifier here? chat.Scope.Groups = new GroupingList() { new Grouping() { Type = Grouping.Team } }; } return chat; }
public void RequestNewChat(string auctionId, string participant, Message message) { CurrentChat = new Chat(auctionId, participant); CurrentChat.Message = message; Chats.Add(CurrentChat); OnChatCreated(EventArgs.Empty); }
public void onChatMessage(SocketModel model) { NoticeMessage.MsgChatRep msg = MsgSerializer.Deserialize<NoticeMessage.MsgChatRep>(model); Chat chat = new Chat(); chat.uid = msg.uid; chat.name = msg.name; chat.type = msg.type; chat.data = msg.data; chat.targetUid = msg.target; if (msg.item != null) { chat.goods.guid = msg.item.guid; //server changed, client not change // chat.goods.number = msg.item.number; } chat.targetName = msg.tarname; ChatManager chatManager = MonoInstancePool.getInstance<ChatManager>(); if (chat.type == (int)GlobalDef.CHAT_CHANNEL.ALL_CHANNEL) { chatManager.setSystemChatList(chat); chatManager.setHaveNewSystemChat(true); } else if (chat.type == (int)GlobalDef.CHAT_CHANNEL.WORLD_CHANNEL) { chatManager.setWorldChatList(chat); chatManager.setHaveNewWorldChat(true); } else if (chat.type == (int)GlobalDef.CHAT_CHANNEL.PRIVATE_CHANNEL) { chatManager.setPrivateChatList(chat); chatManager.setHaveNewPrivateChat(true); //chatManager.setTargetId(chat.uid); } chatManager.setIsDirty(true); }
/// <summary> /// Chatオブジェクトが検索keyにHITするかどうかを判定する /// 検索keyは以下 /// 個人チャットの場合 : 相手のskype名 /// グループチャットの場合 : 会話のタイトル /// </summary> /// <param name="key"></param> /// <param name="chat"></param> /// <returns></returns> private bool checkKey(string key, Chat chat) { try { textBox1.Text = "chat.Status: " + chat.Status + "\r\n" + textBox1.Text; //けっこうあいまいな判定 switch (chat.Status) { case TChatStatus.chsDialog: //個人チャットかな~ //個人チャットの相手のskype名 if (key == chat.DialogPartner) { return true; } break; case TChatStatus.chsMultiSubscribed://グループチャットかな~ //グループチャットの会話のタイトル if (key == chat.Topic) { return true; } break; default://分からん break; } return false; } catch (Exception exp) { return false; } }
void Start() { game = GameObject.Find("Networking").GetComponent<Game>(); sender = GameObject.Find("Networking").GetComponent<PacketSender>(); chat = GameObject.Find("Chat").GetComponent<Chat>(); side = GameObject.Find("SideObjects").GetComponent<SideObjects>(); }
public string[] Join(string name) { MyChat = new Chat(UserHandler); lock (syncObj) { if (!Chatter.Contains(name)) //이름이 기존 채터에 있는지 검색한다. { //이름과 이벤트를 추가한다. this.name = name; Chatter.Add(name); //사용자에게 보내 줄 채널을 설정한다. callback = OperationContext.Current.GetCallbackChannel<IChatCallback>(); //현재 접속자 정보를 모두에게 전달 BroadcastMessage(name, "", "UserEnter"); //델리게이터 추가 List += MyChat; //사용자리스트를 보내준다. string[] list = new string[Chatter.Count]; lock (syncObj) { Chatter.CopyTo(list); } return list; } else //이미 사용자가 사용하고 있는 이름일 경우 { return null; } } }
public NetworkWindow(NetworkInterface nif) { chat = new Chat(nif); chat.togglePos = new Rect(0,30,togglePos.width,25); nif.AddMessageRecipient((INetworkMessage)this); menus.Add(new MainContent(nif,this)); }
void Awake() { Instance = this; mClient = LobbyManager.s_Singleton.client; NetworkServer.RegisterHandler(MSG_TYPE, OnServerPostChatMessage); }
public static Chat CreateNewChat(Visitor v, Operator o) { Chat c = new Chat(); c.AccountId = v.AccountId; c.OperatorId = o.OperatorId; c.VisitorId = v.VisitorId; return c; }
public void AddChat(Chat chatRequest) { string sql = string.Format("INSERT INTO LiveChat_Chat "+ "(ChatId,CreateBy,CreateTime,AccountId,VisitorId,Status) " +"VALUES('{0}','{1}','{2}','{3}','{4}','{5}')" , chatRequest.ChatId, chatRequest.CreateBy, chatRequest.CreateTime,chatRequest.AccountId, chatRequest.VisitorId, chatRequest.Status); DBHelper.ExecuteCommand(sql); }
public void Accept(Chat chat) { this.chat = chat; visitor = operatorServiceAgent.GetVisitorById(chat.VisitorId); initChat(); operatorServiceAgent.AcceptChatRequest(chat.ChatId); }
public ChatInterface() { m_chat = new Chat(); m_chat.Visible = true; m_chat.OnInput += OnChatInput; Overlay.System.Register(m_chat); }
public Chat CreateChat(string auctionId, string participant, IMessageListener messageListener) { CurrentChat = new Chat(auctionId, participant); CurrentChat.AddIMessageListener(messageListener); Chats.Add(CurrentChat); OnChatCreated(EventArgs.Empty); return CurrentChat; }
public void Awake() { if (instance == null) { instance = this; return; } Destroy(this.gameObject); }
void Start() { moveL.x = Resolution.width; moveR.y = Resolution.height; multiPlayer = GetComponent<MultiPlayer>(); multiPlayer.Refresh(); chat = GetComponent<Chat>(); multiPlayer.playerName = "Player"+Random.Range(1,255); }
public UserJoinedChatEvent( User user, Chat chat, DomainModel sender) : base(user, sender) { Chat = chat; }
public void SendMessageToRoom(Chat chat, string message, string[] rooms) { string msg = string.Format("{0}: {1}", chat.Context.ConnectionId, message); for (int i = 0; i < rooms.Length; i++) { chat.Clients.Group(rooms[i]).addMessage(msg); } }
public void OnSay(EC.ISession session, Chat.Say e) { e.Name = session.Channel.Name; e.From = session.Channel.EndPoint.ToString(); foreach (Beetle.Express.IChannel other in session.Application.Server.GetOnlines()) { if (other != session.Channel) session.Application.Server.Send(e, other); } }
public static Chat getNewChat() { lock (typeof(Chat)) { Chat chat = new Chat(); List<Chat> chats = ((List<Chat>)HttpContext.Current.Application["Chats"]); chats.Add(chat); HttpContext.Current.Application["Chats"] = chats; return chat; } }
public void SetChat(Chat chat) { this.chat = chat; if (ChangeEvent != null) ChangeEvent(); OnPropertyChanged("Title"); OnPropertyChanged("Status"); OnPropertyChanged("AvatarPath"); }
public static void removeChat(Chat chat) { lock (typeof(Chat)) { List<Chat> chats = ((List<Chat>)HttpContext.Current.Application["Chats"]); if (!chat.Equals(chats[0])) { chats.Remove(chat); HttpContext.Current.Application["Chats"] = chats; } } }
public void send_message(string username, string message) { var user = new User(); var users = new UserCollection {user}; var chat = new Chat(); // chat.AddMembers(users); chat.SendMessage(message); }
/// <summary> /// When we join a chatroom add a new tab. /// </summary> /// <param name="chatroomName">Chatroom name.</param> /// <param name="chat">Chat to add.</param> public override void Add(string chatroomName, Chat chat) { base.Add(chatroomName, chat); // add to main window MainWindow.Dispatcher.Invoke((Action)delegate { MainWindow.AddChatTab((UIChat)chat); }); }
/// <summary> /// Initializes a new instance of the <see cref="MultiplayerMessagingAdapter"/> class. /// </summary> /// <param name="netAdapter">The net adapter.</param> /// <param name="context">The context.</param> /// <param name="username">The username.</param> /// <param name="teamId">The team identifier.</param> /// <param name="teamSpawners">The team spawners.</param> /// <param name="enemies">The enemies.</param> /// <param name="chat">The chat.</param> public MultiplayerMessagingAdapter(MessagingNetworkAdapter netAdapter, MonoBehaviour context, string username, int teamId, ArrayList[] teamSpawners, ArrayList enemies, Chat chat) { this.netAdapter = netAdapter; this.context = context; this.teamSpawners = teamSpawners; gcEnemies = enemies; this.username = username; this.teamId = teamId; this.chatInstance = chat; }
public Chat CreateChat(string auctionId, IMessageListener messageListener) { CurrentChat = new Chat(auctionId, XMPPConnection.UserName); if (messageListener != null) { CurrentChat.AddIMessageListener(messageListener); } Chats.Add(CurrentChat); OnChatCreated(EventArgs.Empty); return CurrentChat; }
public void Verify_Add_Should_AddTheEntityToTheContext() { // Arrange Mock<IDbSet<Chat>> mockSetChats; var mockContext = ChatsMockingSetup.DoMockingSetupForContext(false, out mockSetChats); var repository = new ChatsRepository(mockContext.Object); var chats = new Chat { Active = true, CustomKey = "SALVATORE-RAA", }; // Act repository.Add(chats); // Assert mockSetChats.Verify(x => x.Add(chats), Times.Once); }
public static string ToChatString(Chat tag) { if (tag.Name == null || tag.Id == null) return null; try { return tag.Name + " - " + NetworkConverter.ToBase64UrlString(tag.Id); } catch (Exception e) { throw new ArgumentException("ArgumentException", e); } }
void Awake() { window = new Rect(Screen.width / 2 - width / 2, Screen.height - height + 5, width, height); SP = this; //We get the name from the masterserver example, if you entered your name there ;). string playerName = PlayerPrefs.GetString("playerName"+Application.platform, ""); if (playerName == null || playerName == "") { playerName = "RandomName" + Random.Range(1, 999); } PhotonNetwork.playerName = playerName; }
private static void Initialize(EventArgs args) { Notifications.Show(new SimpleNotification("PortAIO", "Welcome to PortAIO, this is a complete AIO made for every single champion. If you experience bugs or have suggestions or just have something to report please go to the github and view the instructions to post a new issue. Enjoy using PortAIO and GLHF!"), 10000); Loader.Menu(); if (Loader.intro) { Intro = new Render.Sprite(LoadImg("PortLogo"), new Vector2((Drawing.Width / 2) - 175, (Drawing.Height / 2) - 300)); Intro.Add(0); Intro.OnDraw(); LeagueSharp.Common.Utility.DelayAction.Add(5000, () => Intro.Remove()); } if (!Loader.champOnly) { if (Loader.useActivator) { ElUtilitySuite.Entry.OnLoad(); } if (Loader.useRecall) { UniversalRecallTracker.Program.Main(); } if (Loader.useSkin) { SDK_SkinChanger.Program.Load(); } if (Loader.useTracker) { NabbTracker.Program.Game_OnGameLoad(); } if (Loader.godTracker) { GodJungleTracker.Program.OnGameLoad(); Chat.Print("Berb : Depending on whether packets are updated or not will this work."); } if (Loader.ping) { new UniversalPings.Program(); } if (Loader.human) { Humanizer.Program.Game_OnGameLoad(); } if (Loader.gank) { UniversalGankAlerter.Program.Main(); } if (Loader.evade) { new ezEvade.Evade(); } if (Loader.cheat) { new TheCheater.TheCheater().Load(); } if (Loader.banwards) { Sebby_Ban_War.Program.Game_OnGameLoad(); } /* * if (Loader.stream) * { * StreamBuddy.Program.Main(); * } * * if (RandomUltChampsList.Contains(ObjectManager.Player.ChampionName)) * { * if (Loader.randomUlt) * { * RandomUlt.Program.Game_OnGameLoad(); * } * } * * if (BaseUltList.Contains(ObjectManager.Player.ChampionName)) * { * if (Loader.baseUlt) * { * new BaseUlt3.BaseUlt(); * } * } */ } if (!Loader.utilOnly) { switch (ObjectManager.Player.ChampionName.ToLower()) { case "aatrox": // BrianSharp's Aatrox PortAIO.Champion.Aatrox.Program.Main(); break; case "akali": // Akali by xQx PortAIO.Champion.Akali.Program.Main(); break; case "alistar": // El Alistar PortAIO.Champion.Alistar.Program.OnGameLoad(); break; case "amumu": // Shine# PortAIO.Champion.Amumu.Program.OnLoad(); break; case "caitlyn": switch (Loader.cait) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: ExorAIO.Core.Bootstrap.BuildMenu(); ExorAIO.Core.Bootstrap.LoadChampion(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "twitch": switch (Loader.twitch) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: Nechrito_Twitch.Program.OnGameLoad(); break; case 2: iTwitch.Twitch.OnGameLoad(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "ashe": switch (Loader.ashe) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: Challenger_Series.Program.Main(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "jayce": switch (Loader.jayce) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: Jayce.Jayce.OnLoad(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "xerath": switch (Loader.xerath) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: ElXerath.Xerath.Game_OnGameLoad(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "ezreal": switch (Loader.ezreal) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: iDZEzreal.EzrealBootstrap.OnGameLoad(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "ekko": // OKTW & ElEkko switch (Loader.ekko) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: ElEkko.ElEkko.OnLoad(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "graves": // OKTW Graves & D-Graves switch (Loader.graves) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: D_Graves.Program.Game_OnGameLoad(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "ahri": switch (Loader.ahri) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: AhriSharp.Ahri.Ahri_Load(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "anivia": switch (Loader.anivia) { case 0: SebbyLib.Program.GameOnOnGameLoad(); break; case 1: ExorAIO.Core.Bootstrap.BuildMenu(); ExorAIO.Core.Bootstrap.LoadChampion(); break; default: SebbyLib.Program.GameOnOnGameLoad(); break; } break; case "thresh": // OKTW - Sebby - All Seeby champs go down here case "annie": case "braum": case "jinx": case "karthus": case "missfortune": case "malzahar": case "orianna": case "sivir": case "syndra": case "velkoz": case "swain": case "urgot": SebbyLib.Program.GameOnOnGameLoad(); break; case "azir": // Synx Auto Carry HeavenStrikeAzir.Program.Game_OnGameLoad(); break; case "bard": // Dreamless Wanderer PortAIO.Champion.Bard.Program.OnLoad(); break; case "blitzcrank": // Fresh Booster & OKTW switch (Loader.blitzcrank) { case 0: PortAIO.Champion.Blitzcrank.Program.OnLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; case 2: KurisuBlitzcrank.Program.Game_OnGameLoad(); break; default: PortAIO.Champion.Blitzcrank.Program.OnLoad(); break; } break; case "brand": // TheBrand (or OKTWBrand) switch (Loader.brand) { case 0: PortAIO.Champion.Brand.Program.Load(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: PortAIO.Champion.Brand.Program.Load(); break; } break; case "cassiopeia": // Synx Auto Carry Champion = new SAutoCarry.Champions.Cassiopeia(); break; case "chogath": // Underrated Cho'Gath UnderratedAIO.Champions.Chogath.Load(); break; case "corki": // ElCorki & OKTW switch (Loader.corki) { case 0: ElCorki.Corki.Game_OnGameLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; case 2: D_Corki.Program.Game_OnGameLoad(); break; default: ElCorki.Corki.Game_OnGameLoad(); break; } break; case "darius": // Exory & OKTW switch (Loader.darius) { case 0: ExorAIO.Core.Bootstrap.BuildMenu(); ExorAIO.Core.Bootstrap.LoadChampion(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: ExorAIO.Core.Bootstrap.BuildMenu(); ExorAIO.Core.Bootstrap.LoadChampion(); break; } break; case "nautilus": case "nunu": case "olaf": case "pantheon": case "renekton": case "tryndamere": ExorAIO.Core.Bootstrap.BuildMenu(); ExorAIO.Core.Bootstrap.LoadChampion(); break; case "ryze": switch (Loader.ryze) { case 0: ExorAIO.Core.Bootstrap.BuildMenu(); ExorAIO.Core.Bootstrap.LoadChampion(); break; case 1: ElEasy.Plugins.Ryze f = new ElEasy.Plugins.Ryze(); f.Load(); break; default: ExorAIO.Core.Bootstrap.BuildMenu(); ExorAIO.Core.Bootstrap.LoadChampion(); break; } break; case "diana": switch (Loader.diana) { case 0: ElDiana.Diana.OnLoad(); break; case 1: Nechrito_Diana.Program.Game_OnGameLoad(); break; default: ElDiana.Diana.OnLoad(); break; } break; case "drmundo": // Hestia's Mundo Mundo.Mundo.OnLoad(); break; case "draven": // UltimaDraven switch (Loader.draven) { case 0: RevampedDraven.Program.OnLoad(); break; case 1: Tyler1.Program.Load(); break; default: RevampedDraven.Program.OnLoad(); break; } break; case "elise": switch (Loader.elise) { case 0: GFUELElise.Elise.OnGameLoad(); break; case 1: D_Elise.Program.Game_OnGameLoad(); break; default: GFUELElise.Elise.OnGameLoad(); break; } break; case "evelynn": // Evelynn# switch (Loader.evelynn) { case 0: Evelynn.Program.Game_OnGameLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: Evelynn.Program.Game_OnGameLoad(); break; } break; case "fiddlesticks": // Feedlesticks Feedlesticks.Program.Game_OnGameLoad(); break; case "fiora": // Underrated AIO FioraProject.Program.Game_OnGameLoad(); break; case "fizz": // Math Fizz MathFizz.Program.Game_OnGameLoad(); break; case "galio": // Underrated AIO UnderratedAIO.Champions.Galio.OnLoad(); break; case "gangplank": // Underrated AIO & BadaoKingdom switch (Loader.gangplank) { case 0: UnderratedAIO.Champions.Gangplank.OnLoad(); break; default: UnderratedAIO.Champions.Gangplank.OnLoad(); break; } break; case "garen": // Underrated AIO UnderratedAIO.Champions.Garen.OnLoad(); break; case "gnar": // Slutty Gnar Slutty_Gnar_Reworked.Gnar.OnLoad(); break; case "gragas": // Gragas - Drunk Carry switch (Loader.gragas) { case 0: GragasTheDrunkCarry.Gragas.Game_OnGameLoad(); break; case 1: Nechrito_Gragas.Program.OnGameLoad(); break; default: GragasTheDrunkCarry.Gragas.Game_OnGameLoad(); break; } break; case "hecarim": // JustyHecarim JustHecarim.Program.OnLoad(); break; case "heimerdinger": // 2 Girls 1 Dong Two_Girls_One_Donger.Program.Game_OnGameLoad(); break; case "illaoi": // Tentacle Kitty Illaoi___Tentacle_Kitty.Program.Game_OnGameLoad(); break; case "irelia": // Challenger Series Irelia Challenger_Series.Irelia.OnLoad(); break; case "janna": // LCS Janna LCS_Janna.Program.OnGameLoad(); break; case "jarvaniv": // BrianSharp BrianSharp.Plugin.JarvanIV.OnLoad(); break; case "jax": // xqx switch (Loader.jax) { case 0: JaxQx.Program.Game_OnGameLoad(); break; case 1: NoobJaxReloaded.Program.Game_OnGameLoad(); break; default: JaxQx.Program.Game_OnGameLoad(); break; } break; case "jhin": // Jhin The Virtuoso & OKTW switch (Loader.jhin) { case 0: Jhin___The_Virtuoso.Jhin.JhinOnLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: Jhin___The_Virtuoso.Jhin.JhinOnLoad(); break; } break; case "kalista": // iKalista switch (Loader.kalista) { case 0: new IKalista.Kalista(); break; case 1: new iKalistaReborn.Kalista(); break; case 2: Challenger_Series.Program.Main(); break; default: new iKalistaReborn.Kalista(); break; } break; case "karma": // Karma by Eskor Karma.Program.Game_OnGameLoad(); break; case "kassadin": // Kassawin Kassawin.Kassadin.OnLoad(); break; case "katarina": // Staberina switch (Loader.katarina) { case 0: new Staberina.Katarina(); break; case 1: e.Motion_Katarina.Program.Game_OnGameLoad(); break; default: new Staberina.Katarina(); break; } break; case "kayle": // SephKayle switch (Loader.kayle) { case 0: SephKayle.Program.OnGameLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: SephKayle.Program.OnGameLoad(); break; } break; case "aurelionsol": // El Aurelion Sol ElAurelion_Sol.AurelionSol.OnGameLoad(); break; case "kennen": // Underrated AIO new UnderratedAIO.Champions.Kennen(); break; case "khazix": // SephKhaZix new SephKhazix.Khazix(); break; case "kindred": // Yin Yang Kindred & OKTW switch (Loader.kindred) { case 0: Kindred___YinYang.Program.Game_OnGameLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: Kindred___YinYang.Program.Game_OnGameLoad(); break; } break; case "kogmaw": switch (Loader.kogmaw) { case 0: KogMaw.Program.OnLoad(); break; case 1: Challenger_Series.Program.Main(); break; case 2: SebbyLib.Program.GameOnOnGameLoad(); break; default: Challenger_Series.Program.Main(); break; } break; case "leblanc": // PopBlanc switch (Loader.leblanc) { case 0: PopBlanc.Program.OnLoad(); break; case 1: Leblanc.Program.Game_OnGameLoad(); break; default: PopBlanc.Program.OnLoad(); break; } break; case "leesin": // El Lee Sin switch (Loader.leesin) { case 0: Valvrave_Sharp.Program.MainA(); break; case 1: ElLeeSin.Program.Game_OnGameLoad(); break; case 2: new FreshBooster.Champion.LeeSin(); break; default: Valvrave_Sharp.Program.MainA(); break; } break; case "leona": // El Easy new ElEasy.Plugins.Leona(); break; case "lissandra": // SephLissandra SephLissandra.Lissandra.OnLoad(); break; case "lucian": // LCS Lucian switch (Loader.lucian) { case 0: LCS_Lucian.Program.OnLoad(); break; case 1: Challenger_Series.Program.Main(); break; case 2: var lucian = new Lucian(); lucian.OnLoad(); break; default: LCS_Lucian.Program.OnLoad(); break; } break; case "lulu": // LuluLicious new LuluLicious.Lulu(); break; case "lux": // MoonLux switch (Loader.lux) { case 0: MoonLux.Program.GameOnOnGameLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: MoonLux.Program.GameOnOnGameLoad(); break; } break; case "malphite": // eleasy new ElEasy.Plugins.Malphite(); break; case "vayne": switch (Loader.vayne) { case 0: Vayne.Program.OnLoad(); break; case 1: VayneHunter_Reborn.Program.Game_OnGameLoad(); break; case 2: hi_im_gosu.Vayne.Game_OnGameLoad(); break; default: Vayne.Program.OnLoad(); break; } break; case "quinn": // GFuel Quinn & OKTW switch (Loader.quinn) { case 0: GFUELQuinn.Quinn.OnGameLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: GFUELQuinn.Quinn.OnGameLoad(); break; } break; case "tristana": // ElTristana ElTristana.Tristana.OnLoad(); break; case "riven": // Nechrito Riven & Badao Riven switch (Loader.riven) { case 0: NechritoRiven.Program.OnGameLoad(); break; case 1: HeavenStrikeRiven.Program.OnStart(); break; default: NechritoRiven.Program.OnGameLoad(); break; } break; case "talon": // GFuel Talon GFUELTalon.Talon.OnGameLoad(); break; case "zed": // iZed switch (Loader.zed) { case 0: Valvrave_Sharp.Program.MainA(); break; case 1: Zed.Program.Game_OnGameLoad(); break; case 2: iDZed.Zed.OnLoad(); break; default: Valvrave_Sharp.Program.MainA(); break; } break; case "udyr": // D_Udyr D_Udyr.Program.Game_OnGameLoad(); break; case "maokai": // Underrated AIO new UnderratedAIO.Champions.Maokai(); break; case "masteryi": // MasterSharp MasterSharp.MasterSharp.OnLoad(); break; case "mordekaiser": // How to Train your dragon Mordekaiser.Program.Game_OnGameLoad(); break; case "morgana": // Kurisu Morg & OKTW switch (Loader.morgana) { case 0: new KurisuMorgana.KurisuMorgana(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: new KurisuMorgana.KurisuMorgana(); break; } break; case "nami": // vSupport Series new vSupport_Series.Champions.Nami(); break; case "nasus": // Underrated AIO new UnderratedAIO.Champions.Nasus(); break; case "nidalee": switch (Loader.nidalee) { case 0: KurisuNidalee.KurisuNidalee.Game_OnGameLoad(); break; case 1: Nechrito_Nidalee.Program.OnLoad(); break; default: KurisuNidalee.KurisuNidalee.Game_OnGameLoad(); break; } break; case "yasuo": // YasuPro switch (Loader.yasuo) { case 0: Valvrave_Sharp.Program.MainA(); break; case 1: YasuoPro.Initalization.Main(); break; case 2: GosuMechanicsYasuo.Program.Game_OnGameLoad(); break; default: Valvrave_Sharp.Program.MainA(); break; } break; case "nocturne": // Underrated AIO new UnderratedAIO.Champions.Nocturne(); break; case "poppy": // Underrated AIO switch (Loader.poppy) { case 0: new UnderratedAIO.Champions.Poppy(); break; case 1: BadaoKingdom.BadaoChampion.BadaoPoppy.BadaoPoppy.BadaoActivate(); break; default: new UnderratedAIO.Champions.Poppy(); break; } break; case "rammus": // BrianSharp new BrianSharp.Plugin.Rammus(); break; case "rengar": // ElRengar && D-Rengar switch (Loader.rengar) { case 0: ElRengarRevamped.Rengar.OnLoad(); break; case 1: D_Rengar.Program.Game_OnGameLoad(); break; default: ElRengarRevamped.Rengar.OnLoad(); break; } break; case "soraka": // Sophie's Soraka switch (Loader.soraka) { case 0: Sophies_Soraka.SophiesSoraka.OnGameLoad(); break; case 1: Challenger_Series.Program.Main(); break; default: Challenger_Series.Program.Main(); break; } break; case "twistedfate": // Twisted Fate by Kortatu & OKTW switch (Loader.twistedfate) { case 0: TwistedFate.Program.Game_OnGameLoad(); break; case 1: SebbyLib.Program.GameOnOnGameLoad(); break; default: TwistedFate.Program.Game_OnGameLoad(); break; } break; case "varus": // ElVarus Elvarus.Varus.Game_OnGameLoad(); break; case "veigar": // FreshBooster new FreshBooster.Champion.Veigar(); break; case "reksai": // D-Reksai && HeavenStrikeReksaj switch (Loader.reksai) { case 0: D_RekSai.Program.Game_OnGameLoad(); break; case 1: HeavenStrikeReksaj.Program.Game_OnGameLoad(); break; default: D_RekSai.Program.Game_OnGameLoad(); break; } break; case "rumble": // Underrated AIO & ElRumble switch (Loader.rumble) { case 0: new UnderratedAIO.Champions.Rumble(); break; case 1: ElRumble.Rumble.OnLoad(); break; default: ElRumble.Rumble.OnLoad(); break; } break; case "sejuani": // ElSejuani ElSejuani.Sejuani.OnLoad(); break; case "shaco": // Underrated AIO & ChewyMoon's Shaco switch (Loader.shaco) { case 0: new UnderratedAIO.Champions.Shaco(); break; case 1: ChewyMoonsShaco.ChewyMoonShaco.OnGameLoad(); break; default: new UnderratedAIO.Champions.Shaco(); break; } break; case "shen": // Underrated AIO new UnderratedAIO.Champions.Shen(); break; case "skarner": // Underrated AIO new UnderratedAIO.Champions.Skarner(); break; case "sona": // vSeries Support & ElEasy Sona switch (Loader.sona) { case 0: new vSupport_Series.Champions.Sona(); break; case 1: ElEasy.Plugins.Sona f = new ElEasy.Plugins.Sona(); f.Load(); break; default: new vSupport_Series.Champions.Sona(); break; } break; case "teemo": // Sharpshooter new SharpShooter.Plugins.Teemo(); break; case "viktor": // Trus In my Viktor Viktor.Program.Game_OnGameLoad(); break; case "vladimir": // ElVlad ElVladimirReborn.Vladimir.OnLoad(); break; case "warwick": // Warwick - Mirin Warwick.Program.Game_OnGameLoad(); break; case "monkeyking": // Wukong - xQx Wukong.Program.Game_OnGameLoad(); break; case "xinzhao": // Xin xQx XinZhao.Program.Game_OnGameLoad(); break; case "ziggs": // Ziggs# Ziggs.Program.Game_OnGameLoad(); break; case "yorick": // UnderratedAIO new UnderratedAIO.Champions.Yorick(); break; case "zyra": // D-Zyra D_Zyra.Program.Game_OnGameLoad(); break; case "zilean": // ElZilean ElZilean.Zilean.Game_OnGameLoad(); break; case "shyvana": // D-Shyvana D_Shyvana.Program.Game_OnGameLoad(); break; case "singed": // ElSinged ElSinged.Singed.Game_OnGameLoad(); break; case "zac": // Underrated AIO new UnderratedAIO.Champions.Zac(); break; case "tahmkench": // Underrated AIO new UnderratedAIO.Champions.TahmKench(); break; case "sion": // Underrated AIO switch (Loader.sion) { case 0: new UnderratedAIO.Champions.Sion(); break; case 1: Sion.Program.Game_OnGameLoad(); break; default: new UnderratedAIO.Champions.Sion(); break; } break; case "vi": //ElVi ElVi.Vi.OnLoad(); break; case "volibear": // Underrated AIO && VoliPower switch (Loader.volibear) { case 0: new UnderratedAIO.Champions.Volibear(); break; case 1: VoliPower.Program.Game_OnLoad(); break; default: new UnderratedAIO.Champions.Volibear(); break; } break; case "trundle": // ElTrundle switch (Loader.trundle) { case 0: ElTrundle.Trundle.OnLoad(); break; case 1: FastTrundle.Trundle.Game_OnGameLoad(); break; default: ElTrundle.Trundle.OnLoad(); break; } break; case "taric": // SkyLv_Taric new SkyLv_Taric.SkyLv_Taric(); break; default: Chat.Print("This champion is not supported yet but the utilities will still load! - Berb"); break; } } }
private void GenerateActivationMessage(PlayerScript player, ItemSlot slot) { if (player == null || slot == null) { return; } var playerName = player.gameObject.ExpensiveName(); var lighterName = gameObject.ExpensiveName(); // generate message for chat if (isLit) { if (isFancy) { // edgy smoker Chat.AddActionMsgToChat(player.gameObject, $"Without even breaking stride, you flip open and light {lighterName} in one smooth movement.", $"Without even breaking stride, {playerName} flips open and lights {lighterName} in one smooth movement."); } else { var protection = CheckGlovesProtection(player); var random = Random.value; if (protection || random <= 0.75f) { Chat.AddActionMsgToChat(player.gameObject, $"After a few attempts, you manage to light {lighterName}.", $"After a few attempts, {playerName} manages to light {lighterName}."); } else { // burn user hand var isLeftHand = slot.SlotIdentifier.NamedSlot == NamedSlot.leftHand; var bodyPart = isLeftHand ? BodyPartType.LeftArm : BodyPartType.RightArm; // AttackType.Fire will set character on fire player.playerHealth?. ApplyDamageToBodyPart(gameObject, 5f, AttackType.Energy, DamageType.Burn, bodyPart); var they = player.characterSettings.TheyPronoun(player); var their = player.characterSettings.TheirPronoun(player); Chat.AddActionMsgToChat(player.gameObject, $"You burn yourself while lighting the lighter!", $"After a few attempts, {playerName} manages to light {lighterName} - however, {they} burn {their} finger in the process."); } } } else { if (isFancy) { var theyre = player.characterSettings.TheyrePronoun(player); Chat.AddActionMsgToChat(player.gameObject, $"You quietly shut off {lighterName} without even looking at what you're doing. Wow.", $"You hear a quiet click, as {playerName} shuts off {lighterName} without even looking at what {theyre} doing. Wow."); } else { Chat.AddActionMsgToChat(player.gameObject, $"You quietly shut off {lighterName}.", $"{playerName} quietly shuts off {lighterName}."); } } }
/// <summary> /// Checks if the indicated item can fit in this slot. /// </summary> /// <param name="toStore"></param> /// <param name="ignoreOccupied">if true, does not check if an item is already in the slot</param> /// <param name="examineRecipient">if not null, when validation fails, will output an appropriate examine message to this recipient</param> /// <returns></returns> public bool CanFit(Pickupable toStore, bool ignoreOccupied = false, GameObject examineRecipient = null) { if (toStore == null) { return(false); } ItemStorage storageToCheck = itemStorage; StorageIdentifier storeIdentifier = toStore.GetComponent <StorageIdentifier>(); //Check if there is a deny entry for this toStore item if (storageToCheck != null && storeIdentifier != null) { InteractableStorage interactiveStorage = storageToCheck.GetComponent <InteractableStorage>(); if (interactiveStorage != null) { if (interactiveStorage.denyStorageOfStorageItems.HasFlag(storeIdentifier.StorageItemName)) { if (examineRecipient) { Chat.AddExamineMsg(examineRecipient, $"{toStore.gameObject.ExpensiveName()} can't be placed there!"); } return(false); } } } //go through this slot's ancestors and make sure none of them ARE toStore, //as that would create a loop in the inventory hierarchy int count = 0; while (storageToCheck != null) { if (storageToCheck.gameObject == toStore.gameObject) { Logger.LogTraceFormat( "Cannot fit {0} in slot {1}, this would create an inventory hierarchy loop (putting the" + " storage inside itself)", Category.Inventory, toStore, ToString()); if (examineRecipient) { Chat.AddExamineMsg(examineRecipient, $"{toStore.gameObject.ExpensiveName()} can't go inside itself!"); } return(false); } //get parent item storage if it exists var pickupable = storageToCheck.GetComponent <Pickupable>(); if (pickupable != null && pickupable.ItemSlot != null) { storageToCheck = pickupable.ItemSlot.ItemStorage; } else { storageToCheck = null; } count++; if (count > 5) { Logger.LogTraceFormat( "Something went wrong when adding {0} in slot {1}, aborting!", Category.Inventory, toStore, ToString()); return(false); } } //if the slot already has an item, it's allowed to stack only if the item to add can stack with //the existing item. if (!ignoreOccupied && item != null) { var thisStackable = item.GetComponent <Stackable>(); var otherStackable = toStore.GetComponent <Stackable>(); var stackResult = thisStackable != null && otherStackable != null && thisStackable.CanAccommodate(otherStackable); if (!stackResult) { Logger.LogTraceFormat( "Cannot stack {0} in slot {1}", Category.Inventory, toStore, ToString()); } else { Logger.LogTraceFormat( "Can stack {0} in slot {1}", Category.Inventory, toStore, ToString()); } return(stackResult); } //no item in slot and no inventory loop created, //check if this storage can fit this according to its specific capacity logic var canFit = itemStorage.ItemStorageCapacity.CanFit(toStore, this.slotIdentifier); if (canFit) { return(true); } if (examineRecipient) { //if this is going in a player's inventory, use a more appropriate message. var targetPlayerScript = ItemStorage.GetComponent <PlayerScript>(); if (targetPlayerScript != null) { //going into a top-level inventory slot of a player Chat.AddExamineMsg(examineRecipient, $"{toStore.gameObject.ExpensiveName()} can't go in that slot."); } else { //going into something else Chat.AddExamineMsg(examineRecipient, $"{toStore.gameObject.ExpensiveName()} doesn't fit in the {ItemStorage.gameObject.ExpensiveName()}."); } } return(false); }
/// <summary> /// Server: /// Allow items to be stored by clicking on bags with item in hand /// and clicking items with bag in hand if CanClickPickup is enabled /// /// </summary> public void ServerPerformInteraction(PositionalHandApply interaction) { if (!allowedToInteract) { return; } // See which item needs to be stored if (Validations.IsTarget(gameObject, interaction)) { // Add hand item to this storage Inventory.ServerTransfer(interaction.HandSlot, itemStorage.GetBestSlotFor(interaction.HandObject)); } // See if this item can click pickup else if (canClickPickup) { bool pickedUpSomething = false; Pickupable pickup; switch (pickupMode) { case PickupMode.Single: // Don't pick up items which aren't set as CanPickup pickup = interaction.TargetObject.GetComponent <Pickupable>(); if (pickup == null || pickup.CanPickup == false) { Chat.AddExamineMsgFromServer(interaction.Performer, "There's nothing to pickup!"); return; } // Store the clicked item var slot = itemStorage.GetBestSlotFor(interaction.TargetObject); if (slot == null) { Chat.AddExamineMsgFromServer(interaction.Performer, $"The {interaction.TargetObject.ExpensiveName()} doesn't fit!"); return; } Inventory.ServerAdd(interaction.TargetObject, slot); break; case PickupMode.Same: if (interaction.TargetObject == null || interaction.TargetObject.Item() == null) { Chat.AddExamineMsgFromServer(interaction.Performer, "There's nothing to pickup!"); return; } // Get all items of the same type on the tile and try to store them var itemsOnTileSame = MatrixManager.GetAt <ItemAttributesV2>(interaction.WorldPositionTarget.To2Int().To3Int(), true); if (itemsOnTileSame.Count == 0) { Chat.AddExamineMsgFromServer(interaction.Performer, "There's nothing to pickup!"); return; } foreach (var item in itemsOnTileSame) { // Don't pick up items which aren't set as CanPickup pickup = item.gameObject.GetComponent <Pickupable>(); if (pickup == null || pickup.CanPickup == false) { continue; } // Only try to add it if it matches the target object's traits if (item.HasAllTraits(interaction.TargetObject.Item().GetTraits())) { // Try to add each item to the storage // Can't break this loop when it fails because some items might not fit and // there might be stacks with space still if (Inventory.ServerAdd(item.gameObject, itemStorage.GetBestSlotFor(item.gameObject))) { pickedUpSomething = true; } } } Chat.AddExamineMsgFromServer(interaction.Performer, $"You put everything you could in the {gameObject.ExpensiveName()}."); break; case PickupMode.All: // Get all items on the tile and try to store them var itemsOnTileAll = MatrixManager.GetAt <ItemAttributesV2>(interaction.WorldPositionTarget.To2Int().To3Int(), true); if (itemsOnTileAll.Count == 0) { Chat.AddExamineMsgFromServer(interaction.Performer, "There's nothing to pickup!"); return; } foreach (var item in itemsOnTileAll) { // Don't pick up items which aren't set as CanPickup pickup = item.gameObject.GetComponent <Pickupable>(); if (pickup == null || pickup.CanPickup == false) { continue; } // Try to add each item to the storage // Can't break this loop when it fails because some items might not fit and // there might be stacks with space still if (Inventory.ServerAdd(item.gameObject, itemStorage.GetBestSlotFor(item.gameObject))) { pickedUpSomething = true; } } if (pickedUpSomething) { Chat.AddExamineMsgFromServer(interaction.Performer, $"You put everything you could in the {gameObject.ExpensiveName()}."); } else { Chat.AddExamineMsgFromServer(interaction.Performer, "There's nothing to pickup!"); } break; case PickupMode.DropClick: if (canQuickEmpty) { // Drop all items that are inside this storage var slots = itemStorage.GetItemSlots(); if (slots == null) { Chat.AddExamineMsgFromServer(interaction.Performer, "It's already empty!"); return; } if (PlayerManager.PlayerScript == null) { return; } if (Validations.IsInReach(PlayerManager.PlayerScript.registerTile.WorldPosition, interaction.WorldPositionTarget) == false) { return; } if (MatrixManager.IsPassableAt(interaction.WorldPositionTarget.RoundToInt(), CustomNetworkManager.Instance._isServer) == false) { return; } PlayerManager.PlayerScript.playerNetworkActions.CmdDropAllItems(itemStorage.GetIndexedItemSlot(0) .ItemStorageNetID, interaction.WorldPositionTarget); Chat.AddExamineMsgFromServer(interaction.Performer, $"You start dumping out the {gameObject.ExpensiveName()}."); } break; } } }
public static void PrintChat(string msg) { Chat.Print("<font color = \"#b30cef\">[FOXY.lab Ashe]:</font> <font color = \"#ffffff\">" + msg + "</font>"); }
public bool LoadGrid(string GridName, MyCharacter Player, long TargetPlayerID, bool keepOriginalLocation, Chat chat, Hangar Plugin, Vector3D GridSaveLocation, bool force = false, bool Admin = false) { string path = Path.Combine(FolderPath, GridName + ".sbc"); if (!File.Exists(path)) { Chat?.Respond("Grid doesnt exist! Admin should check logs for more information."); Log.Fatal("Grid doesnt exsist @" + path); return(false); } try { if (MyObjectBuilderSerializer.DeserializeXML(path, out MyObjectBuilder_Definitions myObjectBuilder_Definitions)) { MyObjectBuilder_ShipBlueprintDefinition[] shipBlueprints = myObjectBuilder_Definitions.ShipBlueprints; if (shipBlueprints == null) { Log.Warn("No ShipBlueprints in File '" + path + "'"); Chat?.Respond("There arent any Grids in your file to import!"); return(false); } /* * if (!HangarChecker.BlockLimitChecker(shipBlueprints)) * { * Log.Warn("Block Limiter Checker Failed"); * return false; * } */ if (Config.OnLoadTransfer) { Log.Warn("Transfering grid to: " + TargetPlayerID); //Will transfer pcu to new player foreach (MyObjectBuilder_ShipBlueprintDefinition definition in shipBlueprints) { foreach (MyObjectBuilder_CubeGrid CubeGridDef in definition.CubeGrids) { foreach (MyObjectBuilder_CubeBlock block in CubeGridDef.CubeBlocks) { block.Owner = TargetPlayerID; block.BuiltBy = TargetPlayerID; } } } } Vector3D PlayerPosition = Player?.PositionComp.GetPosition() ?? Vector3D.Zero; foreach (var shipBlueprint in shipBlueprints) { if (!LoadShipBlueprint(shipBlueprint, GridSaveLocation, PlayerPosition, keepOriginalLocation, chat)) { //Hangar.Debug("Error Loading ShipBlueprints from File '" + path + "'"); return(false); } } File.Delete(path); return(true); } } catch (Exception ex) { Chat?.Respond("This ship failed to load. Contact staff & Check logs!"); Log.Error(ex, "Failed to deserialize grid: " + path + " from file! Is this a shipblueprint?"); } return(false); }
private bool LoadShipBlueprint(MyObjectBuilder_ShipBlueprintDefinition shipBlueprint, Vector3D GridSaveLocation, Vector3D SpawningPlayerLocation, bool keepOriginalLocation, Chat chat) { var grids = shipBlueprint.CubeGrids; if (grids == null || grids.Length == 0) { Chat?.Respond("No grids in blueprint!"); return(false); } MyIdentity Identity = MySession.Static.Players.TryGetPlayerIdentity(new MyPlayer.PlayerId(SteamID)); if (Identity != null) { PluginDependencies.BackupGrid(grids.ToList(), Identity.IdentityId); } Vector3D TargetLocation; bool AlignToGravity = false; if (keepOriginalLocation || SpawningPlayerLocation == Vector3D.Zero) { TargetLocation = GridSaveLocation; } else { AlignToGravity = true; TargetLocation = SpawningPlayerLocation; } ParallelSpawner Spawner = new ParallelSpawner(grids, chat, AlignToGravity); Log.Info("Attempting Grid Spawning @" + TargetLocation.ToString()); return(Spawner.Start(keepOriginalLocation, TargetLocation)); }
private static void Game_OnGameLoad() { if (Player.ChampionName != "Garen") { return; } Q = new Spell(SpellSlot.Q); W = new Spell(SpellSlot.W); E = new Spell(SpellSlot.E, 325f); R = new Spell(SpellSlot.R, 400f); Menu = new Menu(Player.ChampionName, Player.ChampionName, true); Menu orbwalkerMenu = Menu.AddSubMenu(new Menu("Orbwalker", "Orbwalker")); Orbwalker = new Orbwalking.Orbwalker(orbwalkerMenu); Menu spellMenu = Menu.AddSubMenu(new Menu("Combo", "Combo")); spellMenu.AddItem(new MenuItem("comQ", "Use Q").SetValue(true)); spellMenu.AddItem(new MenuItem("comW", "Use W").SetValue(true)); spellMenu.AddItem(new MenuItem("comE", "Use E").SetValue(true)); spellMenu.AddItem(new MenuItem("comR", "Check Misc Menu for R Options").SetValue(false)); var harass = new Menu("Harass", "Harass"); Menu.AddSubMenu(harass); harass.AddItem(new MenuItem("harassQ", "Use Q to harass").SetValue(true)); harass.AddItem(new MenuItem("harassE", "Use E to harass").SetValue(true)); Menu.AddSubMenu(new Menu("Drawings", "Drawings")); Menu.SubMenu("Drawings").AddItem(new MenuItem("Draw_Disabled", "Disable all Drawings").SetValue(false)); Menu.SubMenu("Drawings").AddItem(new MenuItem("Qdraw", "Draw Q Range").SetValue(true)); Menu.SubMenu("Drawings").AddItem(new MenuItem("Wdraw", "Draw W Range").SetValue(true)); Menu.SubMenu("Drawings").AddItem(new MenuItem("Edraw", "Draw E Range").SetValue(true)); Menu.SubMenu("Drawings").AddItem(new MenuItem("Rdraw", "Draw R Range").SetValue(true)); Menu.AddSubMenu(new Menu("laneclear", "laneclear")); Menu.SubMenu("laneclear").AddItem(new MenuItem("lQ", "use Q to Laneclear").SetValue(true)); Menu.SubMenu("laneclear").AddItem(new MenuItem("lE", "use E to Laneclear").SetValue(true)); Menu.SubMenu("laneclear").AddItem(new MenuItem("tQ", "use Q to Autoattack Tower").SetValue(true)); Menu.AddSubMenu(new Menu("Jungleclear", "Jungleclear")); Menu.SubMenu("Jungleclear").AddItem(new MenuItem("jQ", "use Q to Jungleclear").SetValue(true)); Menu.SubMenu("Jungleclear").AddItem(new MenuItem("jE", "use E to Jungleclear").SetValue(true)); Menu.AddSubMenu(new Menu("Misc", "Misc")); Menu.SubMenu("Misc").AddItem(new MenuItem("rKS", "use R to KS").SetValue(true)); Menu.SubMenu("Misc").AddItem(new MenuItem("QGap", "use Q to gapclose").SetValue(true)); Menu.SubMenu("Misc").AddItem(new MenuItem("QInt", "use Q to Interrupt").SetValue(true)); Menu.SubMenu("Misc").AddItem(new MenuItem("EHyd", "use Hydra for E Swag").SetValue(true)); Menu.SubMenu("Misc").AddItem(new MenuItem("Randuins", "use Randuins to Slow").SetValue(true)); Menu.AddItem(new MenuItem("Credits", "Assembly created by trooperhdx")); ; Tiamat = new Items.Item(3077, 185); botrk = new Items.Item(3153, 450); Randuins = new Items.Item(3143, 500); Hydra = new Items.Item(3074, 185); Menu.AddToMainMenu(); OnSpellCast(); Drawing.OnDraw += OnDraw; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; Orbwalking.BeforeAttack += BeforeAA; Orbwalking.AfterAttack += AfterAA; Orbwalking.OnAttack += OnAa; Game.OnUpdate += OnUpdate; Chat.Print( "<font color='#00CC83'>trooperhdx:</font> <font color='#B6250B'>" + Player.ChampionName + " Loaded<font color='#00B4D2'> Dont forget to Upvote this Assembly on the Assembly Database! </font>"); }
// Use this for initialization void Start() { chat = GetComponent <Chat>(); }
/// <summary> /// Client: /// Allow items to be stored by clicking on bags with item in hand /// and clicking items with bag in hand if CanClickPickup is enabled /// </summary> public bool WillInteract(PositionalHandApply interaction, NetworkSide side) { if (!allowedToInteract) { return(false); } // Use default interaction checks if (!DefaultWillInteract.Default(interaction, side)) { return(false); } // See which item needs to be stored if (Validations.IsTarget(gameObject, interaction)) { // We're the target // If player's hands are empty let Pickupable handle the interaction if (interaction.HandObject == null) { return(false); } // There's something in the player's hands // Check if item from the hand slot fits in this storage sitting in the world if (!Validations.CanPutItemToStorage(interaction.PerformerPlayerScript, itemStorage, interaction.HandObject, side, examineRecipient: interaction.Performer)) { Chat.AddExamineMsgToClient($"The {interaction.HandObject.ExpensiveName()} doesn't fit!"); return(false); } return(true); } else if (canClickPickup) { // If we can click pickup then try to store the target object switch (pickupMode) { case PickupMode.Single: // See if there's an item to pickup if (interaction.TargetObject == null || interaction.TargetObject.Item() == null) { Chat.AddExamineMsgToClient("There's nothing to pickup!"); return(false); } if (!Validations.CanPutItemToStorage(interaction.PerformerPlayerScript, itemStorage, interaction.TargetObject, side, examineRecipient: interaction.Performer)) { // In Single pickup mode if the target item doesn't // fit then don't interact Chat.AddExamineMsgToClient($"The {interaction.TargetObject.ExpensiveName()} doesn't fit!"); return(false); } break; case PickupMode.Same: if (interaction.TargetObject == null) { // If there's nothing to compare then don't interact Chat.AddExamineMsgToClient("There's nothing to pickup!"); return(false); } break; } // In Same and All pickup modes other items on the // tile could still be picked up, so we interact return(true); } else { // We're not the target and we can't click pickup so don't do anything return(false); } }
private static void OnLoadingComplete(EventArgs args) { if (!_Player.ChampionName.Contains("Tristana")) { return; } Chat.Print("Bristana Loaded!", Color.GreenYellow); Chat.Print("Good Luck!", Color.GreenYellow); Bootstrap.Init(null); Q = new Spell.Active(SpellSlot.Q); W = new Spell.Skillshot(SpellSlot.W, 900, SkillShotType.Circular, 450, int.MaxValue, 180); E = new Spell.Targeted(SpellSlot.E, 550); R = new Spell.Targeted(SpellSlot.R, 550); Botrk = new Item(ItemId.Blade_of_the_Ruined_King); Bil = new Item(3144, 475f); Menu = MainMenu.AddMenu("Bristana", "Bristana"); Menu.AddGroupLabel("Bristana"); Menu.AddLabel(" Please Select E Before Play ! "); SpellMenu = Menu.AddSubMenu("Combo Settings", "Combo"); SpellMenu.AddGroupLabel("Combo Settings"); SpellMenu.Add("ComboQ", new CheckBox("Spell [Q]")); SpellMenu.Add("ComboR", new CheckBox("Spell [R]")); SpellMenu.Add("ComboER", new CheckBox("Spell [ER]")); SpellMenu.AddGroupLabel("Combo [E] On"); foreach (var target in EntityManager.Heroes.Enemies) { SpellMenu.Add("useECombo" + target.ChampionName, new CheckBox("" + target.ChampionName)); } HarassMenu = Menu.AddSubMenu("Harass Settings", "Harass"); HarassMenu.AddGroupLabel("Harass Settings"); HarassMenu.Add("HarassQ", new CheckBox("Spell [Q]", false)); HarassMenu.AddGroupLabel("Spell [E] on"); foreach (var target in EntityManager.Heroes.Enemies) { HarassMenu.Add("HarassE" + target.ChampionName, new CheckBox("" + target.ChampionName)); } HarassMenu.Add("manaHarass", new Slider("Min Mana For Harass", 50, 0, 100)); LaneMenu = Menu.AddSubMenu("Laneclear Settings", "Clear"); LaneMenu.AddGroupLabel("Laneclear Settings"); LaneMenu.Add("ClearQ", new CheckBox("Spell [Q]", false)); LaneMenu.Add("ClearE", new CheckBox("Spell [E]", false)); LaneMenu.Add("ClearTower", new CheckBox("Spell [E] Turret", false)); LaneMenu.Add("manaFarm", new Slider("Min Mana For LaneClear", 50, 0, 100)); JungleMenu = Menu.AddSubMenu("JungleClear Settings", "JungleClear"); JungleMenu.AddGroupLabel("JungleClear Settings"); JungleMenu.Add("jungleQ", new CheckBox("Spell [Q]")); JungleMenu.Add("jungleE", new CheckBox("Spell [E]")); JungleMenu.Add("jungleW", new CheckBox("Spell [W]", false)); JungleMenu.Add("manaJung", new Slider("Min Mana For JungleClear", 50, 0, 100)); StealMenu = Menu.AddSubMenu("KillSteal Settings", "KS"); StealMenu.AddGroupLabel("Killsteal Settings"); StealMenu.Add("RKs", new CheckBox("Spell [R]")); Items = Menu.AddSubMenu("Items Settings", "Items"); Items.AddGroupLabel("Items Settings"); Items.Add("BOTRK", new CheckBox("Use [Botrk]")); Items.Add("ihp", new Slider("My HP Use BOTRK <=", 50)); Items.Add("ihpp", new Slider("Enemy HP Use BOTRK <=", 50)); Misc = Menu.AddSubMenu("Misc Settings", "Draw"); Misc.AddGroupLabel("Anti Gapcloser"); Misc.Add("antiGap", new CheckBox("Anti Gapcloser")); Misc.Add("antiRengar", new CheckBox("Anti Rengar")); Misc.Add("antiKZ", new CheckBox("Anti Kha'Zix")); Misc.AddGroupLabel("Drawings Settings"); Misc.Add("drawAA", new CheckBox("Draw E")); Misc.Add("drawW", new CheckBox("Draw W", false)); Skin = Menu.AddSubMenu("Skin Changer", "SkinChanger"); Skin.Add("checkSkin", new CheckBox("Use Skin Changer")); Skin.Add("skin.Id", new ComboBox("Skin Mode", 0, "Classic", "Riot Tristana", "Earnest Elf Tristana", "Firefighter Tristana", "Guerilla Tristana", "Rocket Tristana", "Color Tristana", "Color Tristana", "Color Tristana", "Color Tristana", "Dragon Trainer Tristana")); Game.OnTick += Game_OnTick; Drawing.OnDraw += Drawing_OnDraw; Gapcloser.OnGapcloser += Gapcloser_OnGapCloser; GameObject.OnCreate += GameObject_OnCreate; }
public async Task ExecuteAsync(User sender, Chat chat) { await telegramBotClient.SendTextMessageAsync(chat.TelegramId, gooseService.GetRandomGoose()); }
public override void OnNPCAtJob(ref NPCBase.NPCState state) { state.JobIsDone = true; usedNPC.LookAt(position.Vector); if (!state.Inventory.IsEmpty) { state.Inventory.Dump(BlockInventory); } if (Todoblocks.Count < 1) { BlockInventory.Dump(usedNPC.Inventory); ShouldTakeItems = true; } else { bool placed = false; if (!ItemTypes.IndexLookup.TryGetIndex(Fullname, out ushort bluetype)) { string msg = $"Bob here from site at {position}, the blueprint '{Fullname}' does not exist, stopped work here"; Log.WriteError(msg); Chat.Send(usedNPC.Colony.Owner, msg); Todoblocks.Clear(); return; } ushort scaffoldType = ItemTypes.IndexLookup.GetIndex(ScaffoldsModEntries.SCAFFOLD_ITEM_TYPE); string jobname = TypeHelper.RotatableToBasetype(Fullname); for (int i = Todoblocks.Count - 1; i >= 0; i--) { BlueprintTodoBlock todoblock = Todoblocks [i]; Vector3Int realPosition = todoblock.GetWorldPosition(jobname, position, bluetype); if (realPosition.y <= 0) { Todoblocks.RemoveAt(i); continue; } string todoblockBaseTypename = TypeHelper.RotatableToBasetype(todoblock.Typename); string todoblockRotatedTypename = todoblock.Typename; if (!todoblockBaseTypename.Equals(todoblock.Typename)) { Vector3Int jobVec = TypeHelper.RotatableToVector(Fullname); Vector3Int blockVec = TypeHelper.RotatableToVector(todoblock.Typename); Vector3Int combinedVec = new Vector3Int(-jobVec.z * blockVec.x + jobVec.x * blockVec.z, 0, jobVec.x * blockVec.x + jobVec.z * blockVec.z); todoblockRotatedTypename = todoblockBaseTypename + TypeHelper.VectorToXZ(combinedVec); } if (!LookupAndWarnItemIndex(todoblockRotatedTypename, out ushort todoblockRotatedType)) { Todoblocks.RemoveAt(i); } else if (!World.TryGetTypeAt(realPosition, out ushort actualType) || actualType == todoblockRotatedType) { Todoblocks.RemoveAt(i); } else { if (!LookupAndWarnItemIndex(todoblockBaseTypename, out ushort todoblockBaseType)) { Todoblocks.RemoveAt(i); } else if (todoblockRotatedType == BuiltinBlocks.Air || BlockInventory.TryGetOneItem(todoblockBaseType)) { Todoblocks.RemoveAt(i); if (ServerManager.TryChangeBlock(realPosition, todoblockRotatedType, owner)) { state.JobIsDone = true; if (todoblockRotatedType == BuiltinBlocks.Air) { state.SetCooldown(ConstructionModEntries.EXCAVATION_DELAY); state.SetIndicator(new Shared.IndicatorState(ConstructionModEntries.EXCAVATION_DELAY, actualType)); } else if (!BlockInventory.IsEmpty && i > 0) { state.SetIndicator(new Shared.IndicatorState(0.5f, todoblockRotatedType)); } if (actualType != BuiltinBlocks.Air && actualType != BuiltinBlocks.Water && actualType != scaffoldType) { usedNPC.Inventory.Add(ItemTypes.GetType(actualType).OnRemoveItems); } placed = true; break; } } } } if (!placed) { BlockInventory.Dump(usedNPC.Inventory); ShouldTakeItems = true; } } }
public static void MessageInGame(string srcNick, string message) { Chat.Message(ChatScope.Global, message, srcNick, filterIRC); }
/// <inheritdoc /> protected override async Task HandleMonitorWakeup(MonitorActivationReason reason, MonitorState monitorState, CancellationToken cancellationToken) { switch (reason) { case MonitorActivationReason.ActiveServerCrashed: string exitWord = Server.TerminationWasRequested ? "exited" : "crashed"; if (Server.RebootState == Session.RebootState.Shutdown) { // the time for graceful shutdown is now await Chat.SendWatchdogMessage( String.Format( CultureInfo.InvariantCulture, "Server {0}! Shutting down due to graceful termination request...", exitWord), false, cancellationToken) .ConfigureAwait(false); monitorState.NextAction = MonitorAction.Exit; } else { await Chat.SendWatchdogMessage( String.Format( CultureInfo.InvariantCulture, "Server {0}! Rebooting...", exitWord), false, cancellationToken) .ConfigureAwait(false); monitorState.NextAction = MonitorAction.Restart; } break; case MonitorActivationReason.ActiveServerRebooted: var rebootState = Server.RebootState; if (gracefulRebootRequired && rebootState == Session.RebootState.Normal) { Logger.LogError("Watchdog reached normal reboot state with gracefulRebootRequired set!"); rebootState = Session.RebootState.Restart; } gracefulRebootRequired = false; Server.ResetRebootState(); switch (rebootState) { case Session.RebootState.Normal: monitorState.NextAction = HandleNormalReboot(); break; case Session.RebootState.Restart: monitorState.NextAction = MonitorAction.Restart; break; case Session.RebootState.Shutdown: // graceful shutdown time await Chat.SendWatchdogMessage( "Active server rebooted! Shutting down due to graceful termination request...", false, cancellationToken) .ConfigureAwait(false); monitorState.NextAction = MonitorAction.Exit; break; default: throw new InvalidOperationException($"Invalid reboot state: {rebootState}"); } break; case MonitorActivationReason.ActiveLaunchParametersUpdated: await Server.SetRebootState(Session.RebootState.Restart, cancellationToken).ConfigureAwait(false); gracefulRebootRequired = true; break; case MonitorActivationReason.NewDmbAvailable: await HandleNewDmbAvailable(cancellationToken).ConfigureAwait(false); break; case MonitorActivationReason.InactiveServerCrashed: case MonitorActivationReason.InactiveServerRebooted: case MonitorActivationReason.InactiveServerStartupComplete: throw new NotSupportedException($"Unsupported activation reason: {reason}"); case MonitorActivationReason.Heartbeat: default: throw new InvalidOperationException($"Invalid activation reason: {reason}"); } }
public Zed() { try { _q = new Spell(SpellSlot.Q, 900f); _w = new Spell(SpellSlot.W, 700f); _e = new Spell(SpellSlot.E, 270f); _r = new Spell(SpellSlot.R, 650f); _q.SetSkillshot(0.25f, 50f, 1700f, false, false, SkillshotType.Line); _bilge = new Items.Item(3144, 475f); _blade = new Items.Item(3153, 425f); _hydra = new Items.Item(3074, 250f); _tiamat = new Items.Item(3077, 250f); _rand = new Items.Item(3143, 490f); _lotis = new Items.Item(3190, 590f); _youmuu = new Items.Item(3142, 10); _titanic = new Items.Item((int)ItemId.Titanic_Hydra, 250f); _igniteSlot = _player.GetSpellSlot("SummonerDot"); var enemy = from hero in ObjectManager.Get <AIHeroClient>() where hero.IsEnemy == true select hero; // Just menu things test _config = new Menu("Zed", "DH.Zed", true); //Combo _config.Add(new Menu("Combo", "Combo")); ((Menu)_config["Combo"]).Add(new MenuBool("UseWC", "Use W (also gap close)")); ((Menu)_config["Combo"]).Add(new MenuBool("UseIgnitecombo", "Use Ignite(rush for it)")); ((Menu)_config["Combo"]).Add(new MenuBool("UseUlt", "Use Ultimate")); ((Menu)_config["Combo"]).Add(new MenuKeyBind("ActiveCombo", "Combo!", Keys.Space, KeyBindType.Press)); ((Menu)_config["Combo"]) .Add(new MenuKeyBind("TheLine", "The Line Combo", Keys.T, KeyBindType.Press)); //Harass _config.Add(new Menu("Harass", "Harass")); ((Menu)_config["Harass"]).Add(new MenuKeyBind("longhar", "Long Poke (toggle)", Keys.U, KeyBindType.Toggle)); ((Menu)_config["Harass"]).Add(new MenuBool("UseItemsharass", "Use Tiamat/Hydra")); ((Menu)_config["Harass"]).Add(new MenuBool("UseWH", "Use W")); ((Menu)_config["Harass"]) .Add( new MenuKeyBind("ActiveHarass", "Harass!", Keys.C, KeyBindType.Press)); //items _config.Add(new Menu("items", "items")); ((Menu)_config["items"]).Add(new Menu("Offensive", "Offensive")); ((Menu)_config["items"]["Offensive"]).Add(new MenuBool("Youmuu", "Use Youmuu's")); ((Menu)_config["items"]["Offensive"]).Add(new MenuBool("Tiamat", "Use Tiamat")); ((Menu)_config["items"]["Offensive"]).Add(new MenuBool("Hydra", "Use Hydra")); ((Menu)_config["items"]["Offensive"]).Add(new MenuBool("Bilge", "Use Bilge")); ((Menu)_config["items"]["Offensive"]) .Add(new MenuSlider("BilgeEnemyhp", "If Enemy Hp <", 85, 1, 100)); ((Menu)_config["items"]["Offensive"]) .Add(new MenuSlider("Bilgemyhp", "Or your Hp < ", 85, 1, 100)); ((Menu)_config["items"]["Offensive"]).Add(new MenuBool("Blade", "Use Blade")); ((Menu)_config["items"]["Offensive"]) .Add(new MenuSlider("BladeEnemyhp", "If Enemy Hp <", 85, 1, 100)); ((Menu)_config["items"]["Offensive"]) .Add(new MenuSlider("Blademyhp", "Or Your Hp <", 85, 1, 100)); ((Menu)_config["items"]).Add(new Menu("Deffensive", "Deffensive")); ((Menu)_config["items"]["Deffensive"]) .Add(new MenuBool("Omen", "Use Randuin Omen")) ; ((Menu)_config["items"]["Deffensive"]) .Add(new MenuSlider("Omenenemys", "Randuin if enemys>", 2, 1, 5)); ((Menu)_config["items"]["Deffensive"]) .Add(new MenuBool("lotis", "Use Iron Solari")) ; ((Menu)_config["items"]["Deffensive"]) .Add(new MenuSlider("lotisminhp", "Solari if Ally Hp<", 35, 1, 100)); //Farm _config.Add(new Menu("Farm", "Farm")); ((Menu)_config["Farm"]).Add(new Menu("LaneFarm", "LaneFarm")); ((Menu)_config["Farm"]["LaneFarm"]) .Add(new MenuBool("UseItemslane", "Use Hydra/Tiamat")) ; ((Menu)_config["Farm"]["LaneFarm"]).Add(new MenuBool("UseQL", "Q LaneClear")); ((Menu)_config["Farm"]["LaneFarm"]).Add(new MenuBool("UseEL", "E LaneClear")); ((Menu)_config["Farm"]["LaneFarm"]) .Add(new MenuSlider("Energylane", "Energy Lane% >", 45, 1, 100)); ((Menu)_config["Farm"]["LaneFarm"]) .Add( new MenuKeyBind("Activelane", "Lane clear!", Keys.S, KeyBindType.Press)); ((Menu)_config["Farm"]).Add(new Menu("LastHit", "LastHit")); ((Menu)_config["Farm"]["LastHit"]).Add(new MenuBool("UseQLH", "Q LastHit")); ((Menu)_config["Farm"]["LastHit"]).Add(new MenuBool("UseELH", "E LastHit")); ((Menu)_config["Farm"]["LastHit"]) .Add(new MenuSlider("Energylast", "Energy lasthit% >", 85, 1, 100)); ((Menu)_config["Farm"]["LastHit"]) .Add( new MenuKeyBind("ActiveLast", "LastHit!", Keys.X, KeyBindType.Press)); ((Menu)_config["Farm"]).Add(new Menu("Jungle", "Jungle")); ((Menu)_config["Farm"]["Jungle"]) .Add(new MenuBool("UseItemsjungle", "Use Hydra/Tiamat")) ; ((Menu)_config["Farm"]["Jungle"]).Add(new MenuBool("UseQJ", "Q Jungle")); ((Menu)_config["Farm"]["Jungle"]).Add(new MenuBool("UseWJ", "W Jungle")); ((Menu)_config["Farm"]["Jungle"]).Add(new MenuBool("UseEJ", "E Jungle")); ((Menu)_config["Farm"]["Jungle"]) .Add(new MenuSlider("Energyjungle", "Energy Jungle% >", 85, 1, 100)); ((Menu)_config["Farm"]["Jungle"]) .Add( new MenuKeyBind("Activejungle", "Jungle!", Keys.S, KeyBindType.Press)); //Misc _config.Add(new Menu("Misc", "Misc")); ((Menu)_config["Misc"]).Add(new MenuBool("UseIgnitekill", "Use Ignite KillSteal")); ((Menu)_config["Misc"]).Add(new MenuBool("UseQM", "Use Q KillSteal")); ((Menu)_config["Misc"]).Add(new MenuBool("UseEM", "Use E KillSteal")); ((Menu)_config["Misc"]).Add(new MenuBool("AutoE", "Auto E")); ((Menu)_config["Misc"]).Add(new MenuBool("rdodge", "R Dodge Dangerous")); foreach (var e in enemy) { SpellDataInstClient rdata = e.Spellbook.GetSpell(SpellSlot.R); if (DangerDB.DangerousList.Any(spell => spell.Contains(rdata.SData.Name))) { ((Menu)_config["Misc"]).Add(new MenuBool("ds" + e.CharacterName, rdata.SData.Name)); } } //Drawings _config.Add(new Menu("Drawings", "Drawings")); ((Menu)_config["Drawings"]).Add(new MenuBool("DrawQ", "Draw Q")); ((Menu)_config["Drawings"]).Add(new MenuBool("DrawE", "Draw E")); ((Menu)_config["Drawings"]).Add(new MenuBool("DrawQW", "Draw long harras")); ((Menu)_config["Drawings"]).Add(new MenuBool("DrawR", "Draw R")); ((Menu)_config["Drawings"]).Add(new MenuBool("DrawHP", "Draw HP bar")); ((Menu)_config["Drawings"]).Add(new MenuBool("shadowd", "Shadow Position")); ((Menu)_config["Drawings"]).Add(new MenuBool("damagetest", "Damage Text")); ((Menu)_config["Drawings"]).Add(new MenuBool("CircleLag", "Lag Free Circles")); ((Menu)_config["Drawings"]) .Add(new MenuSlider("CircleQuality", "Circles Quality", 100, 10, 100)); ((Menu)_config["Drawings"]) .Add(new MenuSlider("CircleThickness", "Circles Thickness", 1, 1, 10)); _config.Attach(); //new AssassinManager(); //new DamageIndicator(); //DamageIndicator.DamageToUnit = ComboDamage; //Game.PrintChat("<font color='#881df2'>Zed is Back by jackisback</font> Loaded."); //Game.PrintChat("<font color='#f2881d'>if you wanna help me to pay my internet bills^^ paypal= [email protected]</font>"); Drawing.OnDraw += Drawing_OnDraw; Game.OnTick += Game_OnUpdate; AIBaseClient.OnDoCast += OnProcessSpell; } catch (Exception e) { Console.WriteLine(e); Chat.Print("Error something went wrong"); } }
public static bool ValidateGridOwnership(IEnumerable <MyCubeGrid> grids, long IdentityID, Chat Chat) { foreach (var grid in grids) { if (!grid.BigOwners.Contains(IdentityID)) { Chat?.Respond("You are not the owner of " + grid.DisplayName); return(false); } } return(true); }
public void UpdateSupergroup(Chat chat, Supergroup group) { Subtitle.Text = Locale.Declension(group.IsChannel ? "Subscribers" : "Members", group.MemberCount); DescriptionTitle.Text = Strings.Resources.DescriptionPlaceholder; Automation.SetToolTip(Edit, group.IsChannel ? Strings.Resources.ManageChannelMenu : Strings.Resources.ManageGroupMenu); Call.Visibility = Visibility.Collapsed; Edit.Visibility = group.Status is ChatMemberStatusCreator || group.Status is ChatMemberStatusAdministrator ? Visibility.Visible : Visibility.Collapsed; Edit.Glyph = Icons.Edit; Verified.Visibility = group.IsVerified ? Visibility.Visible : Visibility.Collapsed; Username.Badge = $"{group.Username}"; Username.Visibility = string.IsNullOrEmpty(group.Username) ? Visibility.Collapsed : Visibility.Visible; Location.Visibility = group.HasLocation ? Visibility.Visible : Visibility.Collapsed; if (group.IsChannel && !(group.Status is ChatMemberStatusCreator) && !(group.Status is ChatMemberStatusLeft) && !(group.Status is ChatMemberStatusBanned)) { MiscPanel.Visibility = Visibility.Visible; GroupLeave.Visibility = Visibility.Visible; } else { MiscPanel.Visibility = Visibility.Collapsed; GroupLeave.Visibility = Visibility.Collapsed; } GroupInvite.Visibility = !group.IsChannel && group.CanInviteUsers() ? Visibility.Visible : Visibility.Collapsed; ChannelMembersPanel.Visibility = group.IsChannel && (group.Status is ChatMemberStatusCreator || group.Status is ChatMemberStatusAdministrator) ? Visibility.Visible : Visibility.Collapsed; MembersPanel.Visibility = group.IsChannel ? Visibility.Collapsed : Visibility.Collapsed; //Admins.Visibility = Visibility.Collapsed; //Banned.Visibility = Visibility.Collapsed; //Restricted.Visibility = Visibility.Collapsed; //Members.Visibility = Visibility.Collapsed; if (!group.IsChannel && (ViewModel.Members == null || group.MemberCount < 200 && group.MemberCount != ViewModel.Members.Count)) { ViewModel.Members = ViewModel.CreateMembers(group.Id); } // Unused: UserPhone.Visibility = Visibility.Collapsed; //UserCommonChats.Visibility = Visibility.Collapsed; UserStartSecret.Visibility = Visibility.Collapsed; SecretLifetime.Visibility = Visibility.Collapsed; SecretHashKey.Visibility = Visibility.Collapsed; if (group.IsChannel) { SharedMedia.Tab = null; } else { SharedMedia.Tab = new SupergroupMembersView { DataContext = ViewModel.SupergroupMembers, IsEmbedded = true }; } }
public async void UpdateChat(Chat chat) { string name = chat.User1.Username + "-" + chat.User2.Username; await client.SetAsync("chats/" + name, chat); }
static void AnnounceOps(Player p, string msg) { ItemPerms perms = new ItemPerms(p.hideRank); Chat.MessageFrom(ChatScope.Perms, p, msg, perms, null, true); }
public void ServerPerformInteraction(HandApply interaction) { if (stateSync == MountedMonitorState.OpenCabled || stateSync == MountedMonitorState.OpenEmpty) { if (!hasCables && Validations.HasUsedItemTrait(interaction, CommonTraits.Instance.Cable) && Validations.HasUsedAtLeast(interaction, 5)) { //add 5 cables ToolUtils.ServerUseToolWithActionMessages(interaction, 2f, "You start adding cables to the frame...", $"{interaction.Performer.ExpensiveName()} starts adding cables to the frame...", "You add cables to the frame.", $"{interaction.Performer.ExpensiveName()} adds cables to the frame.", () => { Inventory.ServerConsume(interaction.HandSlot, 5); hasCables = true; stateSync = MountedMonitorState.OpenCabled; }); } else if (Validations.HasUsedItemTrait(interaction, CommonTraits.Instance.GlassSheet) && Validations.HasUsedAtLeast(interaction, 2)) { //add 2 glass ToolUtils.ServerUseToolWithActionMessages(interaction, 2f, "You start to put in the glass panel...", $"{interaction.Performer.ExpensiveName()} starts to put in the glass panel...", "You put in the glass panel.", $"{interaction.Performer.ExpensiveName()} puts in the glass panel.", () => { Inventory.ServerConsume(interaction.HandSlot, 2); stateSync = MountedMonitorState.NonScrewedPanel; }); } else if (hasCables && Validations.HasUsedItemTrait(interaction, CommonTraits.Instance.Wirecutter)) { //cut out cables Chat.AddActionMsgToChat(interaction, $"You remove the cables.", $"{interaction.Performer.ExpensiveName()} removes the cables."); ToolUtils.ServerPlayToolSound(interaction); Spawn.ServerPrefab(CommonPrefabs.Instance.SingleCableCoil, SpawnDestination.At(gameObject), 5); stateSync = MountedMonitorState.OpenEmpty; hasCables = false; currentTimerSeconds = 0; doorControllers.Clear(); } } else if (stateSync == MountedMonitorState.NonScrewedPanel) { if (Validations.HasUsedItemTrait(interaction, CommonTraits.Instance.Crowbar)) { //remove glass Chat.AddActionMsgToChat(interaction, $"You remove the glass panel.", $"{interaction.Performer.ExpensiveName()} removes the glass panel."); ToolUtils.ServerPlayToolSound(interaction); Spawn.ServerPrefab(CommonPrefabs.Instance.GlassSheet, SpawnDestination.At(gameObject), 2); if (hasCables) { stateSync = MountedMonitorState.OpenCabled; } else { stateSync = MountedMonitorState.OpenEmpty; } } else if (Validations.HasUsedItemTrait(interaction, CommonTraits.Instance.Screwdriver)) { //screw in monitor, completing construction Chat.AddActionMsgToChat(interaction, $"You connect the monitor.", $"{interaction.Performer.ExpensiveName()} connects the monitor."); ToolUtils.ServerPlayToolSound(interaction); if (hasCables) { stateSync = MountedMonitorState.StatusText; } } } else { if (Validations.HasUsedItemTrait(interaction, CommonTraits.Instance.Screwdriver)) { //disconnect the monitor Chat.AddActionMsgToChat(interaction, $"You disconnect the monitor.", $"{interaction.Performer.ExpensiveName()} disconnect the monitor."); ToolUtils.ServerPlayToolSound(interaction); stateSync = MountedMonitorState.NonScrewedPanel; } else if (stateSync == MountedMonitorState.Image) { ChangeChannelMessage(interaction); stateSync = MountedMonitorState.StatusText; } else if (stateSync == MountedMonitorState.StatusText) { if (channel == StatusDisplayChannel.DoorTimer) { if (AccessRestrictions == null || AccessRestrictions.CheckAccess(interaction.Performer)) { currentTimerSeconds += 60; if (currentTimerSeconds > 600) { currentTimerSeconds = 1; } if (countingDown == false) { StartCoroutine(TickTimer()); } else { OnTextBroadcastReceived(StatusDisplayChannel.DoorTimer); } } else { Chat.AddExamineMsg(interaction.Performer, $"Access Denied."); // Play sound SoundManager.PlayNetworkedAtPos(SingletonSOSounds.Instance.AccessDenied, gameObject.AssumedWorldPosServer(), sourceObj: gameObject); } } else { ChangeChannelMessage(interaction); stateSync = MountedMonitorState.Image; } } } }
public override void Use(Player p, string message, CommandData data) { if (message.Length > 0 && p.possess.Length > 0) { p.Message("Stop your current possession first."); return; } bool silent = false; if (message.CaselessEq("silent")) { if (!CheckExtraPerm(p, data, 1)) { return; } silent = true; } Command adminchat = Command.Find("AdminChat"); Command opchat = Command.Find("OpChat"); Entities.GlobalDespawn(p, false); p.hidden = !p.hidden; if (p.hidden) { p.hideRank = data.Rank; AnnounceOps(p, "To Ops -λNICK&S- is now &finvisible"); if (!silent) { string leaveMsg = "&c- λFULL &S" + PlayerDB.GetLogoutMessage(p); Chat.MessageFrom(ChatScope.All, p, leaveMsg, null, null, true); } if (!p.opchat) { opchat.Use(p, "", data); } Server.hidden.Add(p.name); OnPlayerActionEvent.Call(p, PlayerAction.Hide); } else { AnnounceOps(p, "To Ops -λNICK&S- is now &fvisible"); p.hideRank = LevelPermission.Banned; if (!silent) { string joinMsg = "&a+ λFULL &S" + PlayerDB.GetLoginMessage(p); Chat.MessageFrom(ChatScope.All, p, joinMsg, null, null, true); } if (p.opchat) { opchat.Use(p, "", data); } if (p.adminchat) { adminchat.Use(p, "", data); } Server.hidden.Remove(p.name); OnPlayerActionEvent.Call(p, PlayerAction.Unhide); } Entities.GlobalSpawn(p, false); TabList.Add(p, p, Entities.SelfID); Server.hidden.Save(false); }
private void ChangeChannelMessage(HandApply interaction) { Chat.AddActionMsgToChat(interaction, $"You change the channel of the monitor.", $"{interaction.Performer.ExpensiveName()} changes the channel of the monitor."); }
/// <summary> /// Remove chat from DB /// </summary> /// <param name="chat"></param> public void DeleteChat(Chat chat) { _context.Chats.Remove(chat); _context.SaveChanges(); }
public void UpdateUserStatus(Chat chat, User user) { Subtitle.Text = LastSeenConverter.GetLabel(user, true); }
static void Game_OnGameLoad() { _player = ObjectManager.Player; if (_player.ChampionName != ChampionName) return; _q = new Spell(SpellSlot.Q, 675); _q1 = new Spell(SpellSlot.Q, 900); _w = new Spell(SpellSlot.W, 900, TargetSelector.DamageType.Magical); _w2 = new Spell(SpellSlot.W, 900, TargetSelector.DamageType.Magical); _e = new Spell(SpellSlot.E, 475f); _r = new Spell(SpellSlot.R, 1200); _q.SetTargetted(0.25f, 1400f); _q1.SetSkillshot(0.5f, 50, float.MaxValue, false, SkillshotType.SkillshotLine); _w.SetSkillshot(0.30f, 80f, 1600f, true, SkillshotType.SkillshotLine); _w2.SetSkillshot(0.30f, 80f, 1600f, false, SkillshotType.SkillshotCircle); _r.SetSkillshot(0.2f, 110f, 2500, true, SkillshotType.SkillshotLine); _youmuu = new Items.Item(3142, 10); _bilge = new Items.Item(3144, 450f); _blade = new Items.Item(3153, 450f); //D Graves _config = new Menu("D-Lucian", "D-Lucian", true); //TargetSelector var targetSelectorMenu = new Menu("Target Selector", "Target Selector"); TargetSelector.AddToMenu(targetSelectorMenu); _config.AddSubMenu(targetSelectorMenu); //Orbwalker _config.AddSubMenu(new Menu("Orbwalking", "Orbwalking")); Orbwalker = new Orbwalking.Orbwalker(_config.SubMenu("Orbwalking")); //Combo _config.AddSubMenu(new Menu("Combo", "Combo")); _config.SubMenu("Combo").AddItem(new MenuItem("UseQC", "Use Q")).SetValue(true); _config.SubMenu("Combo").AddItem(new MenuItem("UseWC", "Use W")).SetValue(true); _config.SubMenu("Combo").AddItem(new MenuItem("UseEC", "Use E")).SetValue(true); _config.SubMenu("Combo") .AddItem( new MenuItem("useRaim", "Use R(Semi-Manual)").SetValue( new KeyBind("T".ToCharArray()[0], KeyBindType.Press))); _config.SubMenu("Combo") .AddItem(new MenuItem("ActiveCombo", "Combo!").SetValue(new KeyBind(32, KeyBindType.Press))); //Harass _config.AddSubMenu(new Menu("Harass", "Harass")); _config.SubMenu("Harass").AddItem(new MenuItem("UseQH", "Use Q")).SetValue(true); _config.SubMenu("Harass").AddItem(new MenuItem("UseWH", "Use W")).SetValue(false); _config.SubMenu("Harass") .AddItem( new MenuItem("harasstoggle", "AutoHarass (toggle)").SetValue( new KeyBind("G".ToCharArray()[0], KeyBindType.Toggle))); _config.SubMenu("Harass") .AddItem(new MenuItem("Harrasmana", "Minimum Mana").SetValue(new Slider(70, 1, 100))); _config.SubMenu("Harass") .AddItem( new MenuItem("ActiveHarass", "Harass!").SetValue( new KeyBind("C".ToCharArray()[0], KeyBindType.Press))); //Farm _config.AddSubMenu(new Menu("Farm", "Farm")); //Last Hit _config.SubMenu("Farm").AddSubMenu(new Menu("LastHit", "LastHit")); _config.SubMenu("Farm").SubMenu("LastHit").AddItem(new MenuItem("UseQLH", "Q LastHit")).SetValue(true); _config.SubMenu("Farm").SubMenu("LastHit").AddItem(new MenuItem("UseWLH", "W LastHit")).SetValue(false); _config.SubMenu("Farm") .SubMenu("LastHit") .AddItem(new MenuItem("Lastmana", "Minimum Mana").SetValue(new Slider(70, 1, 100))); _config.SubMenu("Farm") .SubMenu("LastHit") .AddItem( new MenuItem("ActiveLast", "LastHit!").SetValue( new KeyBind("X".ToCharArray()[0], KeyBindType.Press))); //Lane Clear _config.SubMenu("Farm").AddSubMenu(new Menu("LaneClear", "LaneClear")); _config.SubMenu("Farm").SubMenu("LaneClear").AddItem(new MenuItem("UseQLP", "Q To Harass")).SetValue(true); _config.SubMenu("Farm").SubMenu("LaneClear").AddItem(new MenuItem("UseQL", "Q LaneClear")).SetValue(true); _config.SubMenu("Farm") .SubMenu("LaneClear") .AddItem(new MenuItem("minminions", "Minimum minions to use Q").SetValue(new Slider(3, 1, 6))); _config.SubMenu("Farm").SubMenu("LaneClear").AddItem(new MenuItem("UseWL", "W LaneClear")).SetValue(false); _config.SubMenu("Farm") .SubMenu("LaneClear") .AddItem(new MenuItem("minminionsw", "Minimum minions to use W").SetValue(new Slider(3, 1, 5))); _config.SubMenu("Farm") .SubMenu("LaneClear") .AddItem(new MenuItem("Lanemana", "Minimum Mana").SetValue(new Slider(70, 1, 100))); _config.SubMenu("Farm") .SubMenu("LaneClear") .AddItem( new MenuItem("ActiveLane", "LaneClear!").SetValue( new KeyBind("V".ToCharArray()[0], KeyBindType.Press))); //Jungle clear _config.SubMenu("Farm").AddSubMenu(new Menu("JungleClear", "JungleClear")); _config.SubMenu("Farm").SubMenu("JungleClear").AddItem(new MenuItem("UseQJ", "Q Jungle")).SetValue(true); _config.SubMenu("Farm").SubMenu("JungleClear").AddItem(new MenuItem("UseWJ", "W Jungle")).SetValue(true); _config.SubMenu("Farm") .SubMenu("JungleClear") .AddItem(new MenuItem("Junglemana", "Minimum Mana").SetValue(new Slider(35, 1, 100))); _config.SubMenu("Farm") .SubMenu("JungleClear") .AddItem( new MenuItem("ActiveJungle", "Jungle key").SetValue( new KeyBind("V".ToCharArray()[0], KeyBindType.Press))); //items //Offensive _config.AddSubMenu(new Menu("items", "items")); _config.SubMenu("items").AddSubMenu(new Menu("Offensive", "Offensive")); _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Youmuu", "Use Youmuu's")).SetValue(true); _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Bilge", "Use Bilge")).SetValue(true); _config.SubMenu("items") .SubMenu("Offensive") .AddItem(new MenuItem("BilgeEnemyhp", "If Enemy Hp <").SetValue(new Slider(60, 1, 100))); _config.SubMenu("items") .SubMenu("Offensive") .AddItem(new MenuItem("Bilgemyhp", "Or your Hp < ").SetValue(new Slider(60, 1, 100))); _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Blade", "Use Blade")).SetValue(true); _config.SubMenu("items") .SubMenu("Offensive") .AddItem(new MenuItem("BladeEnemyhp", "If Enemy Hp <").SetValue(new Slider(60, 1, 100))); _config.SubMenu("items") .SubMenu("Offensive") .AddItem(new MenuItem("Blademyhp", "Or Your Hp <").SetValue(new Slider(60, 1, 100))); //Deffensive _config.SubMenu("items").AddSubMenu(new Menu("Deffensive", "Deffensive")); _config.SubMenu("items").SubMenu("Deffensive").AddSubMenu(new Menu("Cleanse", "Cleanse")); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("useqss", "Use QSS/Mercurial Scimitar/Dervish Blade")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("blind", "Blind")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("charm", "Charm")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("fear", "Fear")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("flee", "Flee")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("snare", "Snare")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("taunt", "Taunt")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("suppression", "Suppression")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("stun", "Stun")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("polymorph", "Polymorph")) .SetValue(false); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("silence", "Silence")) .SetValue(false); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("zedultexecute", "Zed Ult")) .SetValue(true); _config.SubMenu("items") .SubMenu("Deffensive") .SubMenu("Cleanse") .AddItem(new MenuItem("Cleansemode", "Use Cleanse")) .SetValue(new StringList(new string[2] { "Always", "In Combo" })); //potions _config.SubMenu("items").AddSubMenu(new Menu("Potions", "Potions")); _config.SubMenu("items") .SubMenu("Potions") .AddItem(new MenuItem("usehppotions", "Use Healt potion/Refillable/Hunters/Corrupting/Biscuit")) .SetValue(true); _config.SubMenu("items") .SubMenu("Potions") .AddItem(new MenuItem("usepotionhp", "If Health % <").SetValue(new Slider(35, 1, 100))); _config.SubMenu("items") .SubMenu("Potions") .AddItem(new MenuItem("usemppotions", "Use Hunters/Corrupting/Biscuit")) .SetValue(true); _config.SubMenu("items") .SubMenu("Potions") .AddItem(new MenuItem("usepotionmp", "If Mana % <").SetValue(new Slider(35, 1, 100))); //Misc _config.AddSubMenu(new Menu("Misc", "Misc")); _config.SubMenu("Misc").AddItem(new MenuItem("UseQM", "Use Q KillSteal")).SetValue(true); _config.SubMenu("Misc").AddItem(new MenuItem("UseWM", "Use W KillSteal")).SetValue(true); _config.SubMenu("Misc").AddItem(new MenuItem("Gap_E", "GapClosers E")).SetValue(true); //Drawings _config.AddSubMenu(new Menu("Drawings", "Drawings")); _config.SubMenu("Drawings").AddItem(new MenuItem("DrawQ", "Draw Q")).SetValue(true); _config.SubMenu("Drawings").AddItem(new MenuItem("DrawW", "Draw W")).SetValue(false); _config.SubMenu("Drawings").AddItem(new MenuItem("DrawE", "Draw E")).SetValue(false); _config.SubMenu("Drawings").AddItem(new MenuItem("DrawR", "Draw R")).SetValue(false); _config.SubMenu("Drawings").AddItem(new MenuItem("Drawharass", "Draw Auto Harass").SetValue(true)); _config.AddToMainMenu(); Chat.Print("<font color='#881df2'>D-Lucian by Diabaths</font> Loaded."); Game.OnUpdate += Game_OnGameUpdate; Drawing.OnDraw += Drawing_OnDraw; AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Spellbook.OnCastSpell += OnCastSpell; Obj_AI_Base.OnPlayAnimation += Obj_AI_Base_OnPlayAnimation; Chat.Print( "<font color='#f2f21d'>Do you like it??? </font> <font color='#ff1900'>Drop 1 Upvote in Database </font>"); Chat.Print( "<font color='#f2f21d'>Buy me cigars </font> <font color='#ff1900'>[email protected]</font> (10) S"); }
public void UpdateUser(Chat chat, User user, bool secret) { Subtitle.Text = LastSeenConverter.GetLabel(user, true); SubtitleInfo.Text = Subtitle.Text; Verified.Visibility = user.IsVerified ? Visibility.Visible : Visibility.Collapsed; UserPhone.Badge = PhoneNumber.Format(user.PhoneNumber); UserPhone.Visibility = string.IsNullOrEmpty(user.PhoneNumber) ? Visibility.Collapsed : Visibility.Visible; Username.Badge = $"{user.Username}"; Username.Visibility = string.IsNullOrEmpty(user.Username) ? Visibility.Collapsed : Visibility.Visible; DescriptionTitle.Text = user.Type is UserTypeBot ? Strings.Resources.DescriptionPlaceholder : Strings.Resources.UserBio; if (user.Id == ViewModel.CacheService.Options.MyId) { NotificationsPanel.Visibility = Visibility.Collapsed; } else { NotificationsPanel.Visibility = Visibility.Visible; } if (secret) { UserStartSecret.Visibility = Visibility.Collapsed; } else { if (user.Type is UserTypeBot || user.Id == ViewModel.CacheService.Options.MyId || LastSeenConverter.IsServiceUser(user) || LastSeenConverter.IsSupportUser(user)) { MiscPanel.Visibility = Visibility.Collapsed; UserStartSecret.Visibility = Visibility.Collapsed; } else { MiscPanel.Visibility = Visibility.Visible; UserStartSecret.Visibility = Visibility.Visible; } SecretLifetime.Visibility = Visibility.Collapsed; SecretHashKey.Visibility = Visibility.Collapsed; } // Unused: Location.Visibility = Visibility.Collapsed; GroupLeave.Visibility = Visibility.Collapsed; GroupInvite.Visibility = Visibility.Collapsed; ChannelMembersPanel.Visibility = Visibility.Collapsed; MembersPanel.Visibility = Visibility.Collapsed; //Admins.Visibility = Visibility.Collapsed; //Banned.Visibility = Visibility.Collapsed; //Restricted.Visibility = Visibility.Collapsed; //Members.Visibility = Visibility.Collapsed; }
public void Run() { var allStrategies = _strategyFactory.GetAllRobots().ToArray(); var totalTurns = BergerTables.GetRounds(allStrategies.Length); int[] allScores = new int[allStrategies.Length]; Chat.GetUI().Strong(" HA INIZIO IL GRANDE TORNEO DEI ROBOT!"); Chat.GetUI().Strong(" Sono previsti: " + totalTurns + " scontri"); for (int i = 0; i < totalTurns; i++) { Chat.GetUI().Strong(" >>>>>>>> TURNO " + (i + 1) + " <<<<<<<<<"); var games = BergerTables.GetRoundMatches(allStrategies.Length, i); foreach (var game in games) { // Vittorie a Forfait con numero dispari di giocatori if (allStrategies.Length <= game.Visitor) { allScores[game.Home] += 2; Chat.GetUI().Strong(string.Format(" => {0} vince a forfait", allStrategies.ElementAt(game.Home))); continue; } if (allStrategies.Length <= game.Home) { allScores[game.Visitor] += 2; // Vittoria a Forfait Chat.GetUI().Strong(string.Format(" => {0} vince a forfait", allStrategies.ElementAt(game.Visitor))); continue; } // ----- var homeStrategy = allStrategies.ElementAt(game.Home); var visitorStrategy = allStrategies.ElementAt(game.Visitor); Chat.GetUI().Strong(string.Format(" => {0} vs. {1}", homeStrategy.Name, visitorStrategy.Name)); int partialHome = 0, partialVisitor = 0; for (int j = 0; j < SingleRounds; j++) { var outcome = DoSingleMatch(Chat.GetUI(), j, homeStrategy, visitorStrategy); switch (outcome) { case 0: partialVisitor += 1; partialHome += 1; break; case 1: partialHome += 2; break; case 2: partialVisitor += 2; break; } } var allGamesOutcome = GetOutcome(partialHome, partialVisitor); Chat.GetUI().Strong(string.Format(" => RISULTATO: {0} ({1}-{2})", allGamesOutcome, partialHome, partialVisitor)); switch (allGamesOutcome) { case 0: allScores[game.Home] += 1; allScores[game.Visitor] += 1; break; case 1: allScores[game.Home] += 2; break; case 2: allScores[game.Visitor] += 2; break; } } } Chat.GetUI().Strong(" >>>>>>>> CLASSIFICA FINALE <<<<<<<<<"); for (int i = 0; i < allStrategies.Length; i++) { Chat.GetUI().Send(string.Format(" {0} | {1}", allScores.ElementAt(i), allStrategies.ElementAt(i).Name)); } }
public ChatPhotosViewModel(IProtoService protoService, IStorageService storageService, IEventAggregator aggregator, Chat chat, ChatPhoto photo) : base(protoService, storageService, aggregator) { _chat = chat; Items = new MvxObservableCollection <GalleryContent> { new GalleryChatPhoto(protoService, chat, photo, 0) }; SelectedItem = Items[0]; FirstItem = Items[0]; Initialize(photo.GetBig().Photo.Id, photo.GetSmall().Photo.Id); }
private int OnUOAssistMessage(uint msg, int wParam, int lParam) { switch ((UOAMessage)msg) { case UOAMessage.REGISTER: if (_wndRegs.ContainsKey(wParam)) { _wndRegs.Remove(wParam); return(2); } _wndRegs.Add(wParam, new WndRegEnt(wParam, lParam == 1 ? 1 : 0)); if (lParam == 1 && World.InGame) { foreach (Item item in World.Items.Where(s => s.IsMulti)) { PostMessage((IntPtr)wParam, (uint)UOAMessage.ADD_MULTI, (IntPtr)((item.X & 0xFFFF) | ((item.Y & 0xFFFF) << 16)), (IntPtr)item.Graphic); } } return(1); case UOAMessage.COUNT_RESOURCES: break; case UOAMessage.GET_COORDS: if (World.Player != null) { return((World.Player.X & 0xFFFF) | ((World.Player.Y & 0xFFFF) << 16)); } break; case UOAMessage.GET_SKILL: break; case UOAMessage.GET_STAT: if (World.Player == null || wParam < 0 || wParam > 5) { return(0); } switch (wParam) { case 0: return(World.Player.Strength); case 1: return(World.Player.Intelligence); case 2: return(World.Player.Dexterity); case 3: return(World.Player.Weight); case 4: return(World.Player.HitsMax); case 5: return((int)World.Player.TithingPoints); } return(0); case UOAMessage.SET_MACRO: break; case UOAMessage.PLAY_MACRO: break; case UOAMessage.DISPLAY_TEXT: if (World.Player != null) { ushort hue = (ushort)(wParam & 0xFFFF); StringBuilder sb = new StringBuilder(256); if (GlobalGetAtomName((ushort)lParam, sb, 256) == 0) { return(0); } if ((wParam & 0x00010000) != 0) { Chat.HandleMessage(null, sb.ToString(), "System", hue, MessageType.Regular, 3, true); } else { World.Player.AddMessage(MessageType.Regular, sb.ToString(), 3, hue, true); } return(1); } break; case UOAMessage.REQUEST_MULTIS: return(World.Player != null ? 1 : 0); case UOAMessage.ADD_CMD: { var sb = new StringBuilder(256); if (GlobalGetAtomName((ushort)lParam, sb, 256) == 0) { return(0); } if (wParam == 0) { CommandManager.UnRegister(sb.ToString()); return(0); } new WndCmd(_cmdID, (IntPtr)wParam, sb.ToString()); return((int)_cmdID++); } case UOAMessage.GET_UID: return(World.Player != null ? (int)World.Player.Serial : 0); case UOAMessage.GET_SHARDNAME: break; case UOAMessage.ADD_USER_2_PARTY: break; case UOAMessage.GET_UO_HWND: SDL.SDL_SysWMinfo info = new SDL.SDL_SysWMinfo(); SDL.SDL_VERSION(out info.version); SDL.SDL_GetWindowWMInfo(SDL.SDL_GL_GetCurrentWindow(), ref info); IntPtr hwnd = IntPtr.Zero; if (info.subsystem == SDL.SDL_SYSWM_TYPE.SDL_SYSWM_WINDOWS) { hwnd = info.info.win.window; } return((int)hwnd); case UOAMessage.GET_POISON: return(World.Player != null && World.Player.IsPoisoned ? 1 : 0); case UOAMessage.SET_SKILL_LOCK: break; case UOAMessage.GET_ACCT_ID: break; case UOAMessage.RES_COUNT_DONE: break; case UOAMessage.CAST_SPELL: break; case UOAMessage.LOGIN: break; case UOAMessage.MAGERY_LEVEL: break; case UOAMessage.INT_STATUS: break; case UOAMessage.SKILL_LEVEL: break; case UOAMessage.MACRO_DONE: break; case UOAMessage.LOGOUT: break; case UOAMessage.STR_STATUS: break; case UOAMessage.DEX_STATUS: break; case UOAMessage.ADD_MULTI: break; case UOAMessage.REM_MULTI: break; case UOAMessage.MAP_INFO: break; case UOAMessage.POWERHOUR: break; } return(0); }