Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Converting phoenix commands to goldtree
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="nathan22" data-source="post: 302205" data-attributes="member: 25405"><p>case 155:</p><p>TargetClient = Phoenix.GetGame().GetClientManager().GetClientByHabbo(Session.GetHabbo().Username);</p><p>if (!ChatCommandHandler.isBrb.ContainsKey((int) Session.GetHabbo().Id))</p><p>{</p><p>class2 = Phoenix.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);</p><p>RoomUser talk = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);</p><p>ChatCommandHandler.isBrb.Add((int) Session.GetHabbo().Id, true);</p><p>if (Params.Length >= 2)</p><p>talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back! (talk: " + ChatCommandHandler.MergeParams(Params, 1) + ")", false);</p><p>else</p><p>talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back!", false);</p><p>System.Timers.Timer st = new System.Timers.Timer();</p><p>st.Interval = TimeSpan.FromSeconds(120.0).TotalMilliseconds;</p><p>st.Elapsed += (ElapsedEventHandler) ((ss, ee) =></p><p>{</p><p>if (ChatCommandHandler.isBrb.ContainsKey((int) Session.GetHabbo().Id) && Enumerable.Contains<RoomUser>((IEnumerable<RoomUser>) class2.RoomUsers, class2.GetRoomUserByHabbo(Session.GetHabbo().Id)))</p><p>{</p><p>if (Params.Length >= 2)</p><p>talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back! (talk: " + ChatCommandHandler.MergeParams(Params, 1) + ")", false);</p><p>else</p><p>talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back!", false);</p><p>}</p><p>else</p><p>{</p><p>st.Stop();</p><p>if (Session.GetHabbo() != null)</p><p>ChatCommandHandler.isBrb.Remove((int) Session.GetHabbo().Id);</p><p>}</p><p>});</p><p>st.Enabled = true;</p><p>st.AutoReset = true;</p><p>st.Start();</p><p>return true;</p><p>}</p><p>else</p><p>{</p><p>Session.SendNotification("You are already absent, type the command: back 'to remove this status.");</p><p>return true;</p><p>}</p><p>case 156:</p><p>if (ChatCommandHandler.isBrb.ContainsKey((int) Session.GetHabbo().Id))</p><p>{</p><p>TargetClient = Phoenix.GetGame().GetClientManager().GetClientByHabbo(Session.GetHabbo().Username);</p><p>class2 = Phoenix.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);</p><p>class2.GetRoomUserByHabbo(Session.GetHabbo().Id).HandleSpeech(TargetClient, "Hey, I'm back <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" />!", false);</p><p>ChatCommandHandler.isBrb.Remove((int) Session.GetHabbo().Id);</p><p>return true;</p><p>}</p><p>else</p><p>{</p><p>Session.SendNotification("You're not absent, use the command: brb (OPTIONAL: reason) 'to your absent to report!");</p><p>return true;</p><p>}</p><p>:snippet of 2 of many commands i would like to add to GTE anybody interested ?</p></blockquote><p></p>
[QUOTE="nathan22, post: 302205, member: 25405"] case 155: TargetClient = Phoenix.GetGame().GetClientManager().GetClientByHabbo(Session.GetHabbo().Username); if (!ChatCommandHandler.isBrb.ContainsKey((int) Session.GetHabbo().Id)) { class2 = Phoenix.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); RoomUser talk = class2.GetRoomUserByHabbo(Session.GetHabbo().Id); ChatCommandHandler.isBrb.Add((int) Session.GetHabbo().Id, true); if (Params.Length >= 2) talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back! (talk: " + ChatCommandHandler.MergeParams(Params, 1) + ")", false); else talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back!", false); System.Timers.Timer st = new System.Timers.Timer(); st.Interval = TimeSpan.FromSeconds(120.0).TotalMilliseconds; st.Elapsed += (ElapsedEventHandler) ((ss, ee) => { if (ChatCommandHandler.isBrb.ContainsKey((int) Session.GetHabbo().Id) && Enumerable.Contains<RoomUser>((IEnumerable<RoomUser>) class2.RoomUsers, class2.GetRoomUserByHabbo(Session.GetHabbo().Id))) { if (Params.Length >= 2) talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back! (talk: " + ChatCommandHandler.MergeParams(Params, 1) + ")", false); else talk.HandleSpeech(TargetClient, "I am momentarily absent, I'll be back!", false); } else { st.Stop(); if (Session.GetHabbo() != null) ChatCommandHandler.isBrb.Remove((int) Session.GetHabbo().Id); } }); st.Enabled = true; st.AutoReset = true; st.Start(); return true; } else { Session.SendNotification("You are already absent, type the command: back 'to remove this status."); return true; } case 156: if (ChatCommandHandler.isBrb.ContainsKey((int) Session.GetHabbo().Id)) { TargetClient = Phoenix.GetGame().GetClientManager().GetClientByHabbo(Session.GetHabbo().Username); class2 = Phoenix.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); class2.GetRoomUserByHabbo(Session.GetHabbo().Id).HandleSpeech(TargetClient, "Hey, I'm back :)!", false); ChatCommandHandler.isBrb.Remove((int) Session.GetHabbo().Id); return true; } else { Session.SendNotification("You're not absent, use the command: brb (OPTIONAL: reason) 'to your absent to report!"); return true; } :snippet of 2 of many commands i would like to add to GTE anybody interested ? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Converting phoenix commands to goldtree
Top