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");
}
}
//Rigging Dice
public string[] rigDice;
public bool diceRig = false;
#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
Assuming by the title of the thread being "Comet emulator custom commands" I would assume he wanted one for Comet and not Plus..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"); } }
In Habbo.cs:
Code://Rigging Dice public string[] rigDice; public bool diceRig = false;
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
Well I ain't going to spoon feed his ass. He asked for TIPS not for translation and me to do the dirty work lolAssuming by the title of the thread being "Comet emulator custom commands" I would assume he wanted one for Comet and not Plus..
The entire help section is basically spoon feeding to be fair..Well I ain't going to spoon feed his ass. He asked for TIPS not for translation and me to do the dirty work lol