Code:
#region Pet Commands
#region :pet
case "pet": // pet transform command
{
if (rankManager.containsRight(this, "fuse_administrator_access", userID) == false)
return false;
else
{
if (Room != null) // In room?
{
try
{
if (args[1] == "cat")
{
_petType = "1";
}
else if (args[1] == "dog")
{
_petType = "0";
}
else if (args[1] == "croc")
{
_petType = "2";
}
else
{
_petType = "0";
}
}
catch { _petType = "1"; }
try
{
if (args[2] == "red")
{
_petColour = "FF0000";
}
else if (args[2] == "green")
{
_petColour = "00FF00";
}
else if (args[2] == "blue")
{
_petColour = "0025FF";
}
else if (args[2] == "black")
{
_petColour = "000000";
}
else if (args[2] == "white")
{
_petColour = "FFFFFF";
}
else if (args[2] == "random" || args[2] == "?")
{
Random rndInt = new Random();
_petColour = rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString() + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9) + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString();
}
}
catch
{
Random rndInt = new Random();
_petColour = rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString() + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9) + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString();
}
_isPet = !_isPet;
Room.sendData(@"@\" + roomUser.detailsString);
}
}
break;
}
#endregion
#region :pet_user
case "pet_user": // pet command
{
if (rankManager.containsRight(this, "fuse_administrator_access", userID) == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
if (Target.Room != null) // In room?
{
try
{
if (args[2] == "cat")
{
Target._petType = "1";
}
else if (args[2] == "dog")
{
Target._petType = "0";
}
else if (args[2] == "croc")
{
Target._petType = "2";
}
else
{
Target._petType = "0";
}
}
catch { Target._petType = "1"; }
try
{
if (args[3] == "red")
{
Target._petColour = "FF0000";
}
else if (args[3] == "green")
{
Target._petColour = "00FF00";
}
else if (args[3] == "blue")
{
Target._petColour = "0025FF";
}
else if (args[3] == "black")
{
Target._petColour = "000000";
}
else if (args[3] == "white")
{
Target._petColour = "FFFFFF";
}
else if (args[3] == "random" || args[3] == "?")
{
Random rndInt = new Random();
Target._petColour = rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString() + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9) + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString();
}
}
catch
{
Random rndInt = new Random();
Target._petColour = rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString() + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9) + rndInt.Next(5, 9).ToString() + rndInt.Next(0, 9).ToString();
}
Target._isPet = !Target._isPet;
Target.Room.sendData(@"@\" + Target.roomUser.detailsString);
}
}
break;
}
#endregion
#endregion
Should work for Handyandys Edit not sure for Dissis
---------- Post added at 03:13 PM ---------- Previous post was at 03:12 PM ----------
And Rep You Gonna Neeed Alot of stuff in emu And A Db Colum Ill Try Later