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
Comet emulator custom commands
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="JayC" data-source="post: 422548" data-attributes="member: 36373"><p>[CODE]public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (Session == null)</p><p> return;</p><p></p><p> GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);</p><p> if (TargetClient == null)</p><p> {</p><p> Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online.");</p><p> return;</p><p> }</p><p> string[] parts = Params[2].Split(',');</p><p> try</p><p> {</p><p> foreach (string part in parts)</p><p> {</p><p> try</p><p> {</p><p> int intPlaceHolder = int.Parse(part);</p><p> if (intPlaceHolder < 1 || intPlaceHolder > 6)</p><p> {</p><p> Session.SendWhisper("Wtf? " + intPlaceHolder + " is not a dice option");</p><p> return;</p><p> }</p><p> }</p><p> catch</p><p> {</p><p> Session.SendWhisper("Invalid Rig Sequence [1,2,3,4,5]", 3);</p><p> return;</p><p> }</p><p> }</p><p> }</p><p> catch</p><p> {</p><p> Session.SendWhisper("Invalid Rig Sequence [1,2,3,4,5]", 3);</p><p> return;</p><p> }</p><p></p><p></p><p> if (TargetClient.GetHabbo().blnRigDice)</p><p> {</p><p></p><p> }</p><p> else</p><p> {</p><p> TargetClient.GetHabbo().blnRigDice = true;</p><p> TargetClient.GetHabbo().strArrayDice = parts;</p><p> Session.SendWhisper("This Users Dice are now Rigged");</p><p> }</p><p></p><p> }[/CODE]</p><p></p><p>In Habbo.cs:</p><p></p><p>[CODE]//Rigging Dice</p><p> public string[] rigDice;</p><p> public bool diceRig = false;</p><p>[/CODE]</p><p></p><p>Item.cs</p><p>[CODE]#region Dice</p><p> case InteractionType.DICE:</p><p> {</p><p> //string[] numbers = new string[] { "1", "2", "3", "4", "5", "6" };</p><p> //if (ExtraData == "-1")</p><p> // ExtraData = RandomizeStrings(numbers)[0];</p><p> //UpdateState();</p><p></p><p> string[] numbers = new string[] { "1", "2", "3", "4", "5", "6" };</p><p> GameClient InteractingClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(InteractingUser);</p><p> if (InteractingClient.GetHabbo().blnRigDice)</p><p> {</p><p> if (ExtraData == "-1")</p><p> {</p><p> ExtraData = InteractingClient.GetHabbo().strArrayDice[0];</p><p> InteractingClient.GetHabbo().strArrayDice = InteractingClient.GetHabbo().strArrayDice.Skip(1).ToArray();</p><p> if (InteractingClient.GetHabbo().strArrayDice.Length == 0)</p><p> {</p><p> InteractingClient.GetHabbo().blnRigDice = false;</p><p> }</p><p> }</p><p> }</p><p> else</p><p> {</p><p> if (ExtraData == "-1")</p><p> ExtraData = RandomizeStrings(numbers)[0];</p><p> }</p><p> </p><p> UpdateState();</p><p> </p><p> }</p><p> break;</p><p> #endregion[/CODE]</p></blockquote><p></p>
[QUOTE="JayC, post: 422548, member: 36373"] [CODE]public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Session == null) return; GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online."); return; } string[] parts = Params[2].Split(','); try { foreach (string part in parts) { try { int intPlaceHolder = int.Parse(part); if (intPlaceHolder < 1 || intPlaceHolder > 6) { Session.SendWhisper("Wtf? " + intPlaceHolder + " is not a dice option"); return; } } catch { Session.SendWhisper("Invalid Rig Sequence [1,2,3,4,5]", 3); return; } } } catch { Session.SendWhisper("Invalid Rig Sequence [1,2,3,4,5]", 3); return; } if (TargetClient.GetHabbo().blnRigDice) { } else { TargetClient.GetHabbo().blnRigDice = true; TargetClient.GetHabbo().strArrayDice = parts; Session.SendWhisper("This Users Dice are now Rigged"); } }[/CODE] In Habbo.cs: [CODE]//Rigging Dice public string[] rigDice; public bool diceRig = false; [/CODE] Item.cs [CODE]#region Dice case InteractionType.DICE: { //string[] numbers = new string[] { "1", "2", "3", "4", "5", "6" }; //if (ExtraData == "-1") // ExtraData = RandomizeStrings(numbers)[0]; //UpdateState(); string[] numbers = new string[] { "1", "2", "3", "4", "5", "6" }; GameClient InteractingClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(InteractingUser); if (InteractingClient.GetHabbo().blnRigDice) { if (ExtraData == "-1") { ExtraData = InteractingClient.GetHabbo().strArrayDice[0]; InteractingClient.GetHabbo().strArrayDice = InteractingClient.GetHabbo().strArrayDice.Skip(1).ToArray(); if (InteractingClient.GetHabbo().strArrayDice.Length == 0) { InteractingClient.GetHabbo().blnRigDice = false; } } } else { if (ExtraData == "-1") ExtraData = RandomizeStrings(numbers)[0]; } UpdateState(); } break; #endregion[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Comet emulator custom commands
Top