Hi, someone can help me with sit command for uber/snowlight? i found an thread for phoenix ( https://forum.ragezone.com/f353/habb...and-r63-854886 )
someone can help?
Printable View
Hi, someone can help me with sit command for uber/snowlight? i found an thread for phoenix ( https://forum.ragezone.com/f353/habb...and-r63-854886 )
someone can help?
Here is one for Butterfly, which is based on UberEmulator. Shouldn't be hard to get working.Code:public void sit()
{
Room TargetRoom = Session.GetHabbo().CurrentRoom;
RoomUser TargetRoomUser = null;
int tries = 0;
TargetRoom = ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
TargetRoomUser = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (!TargetRoomUser.Statusses.ContainsKey("sit"))
{
if ((TargetRoomUser.RotBody % 2) == 0)
{
if (TargetRoomUser == null)
{
return;
}
try
{
TargetRoomUser.Statusses.Add("sit", "1.0");
TargetRoomUser.Z -= 0.35;
TargetRoomUser.isSitting = true;
TargetRoomUser.UpdateNeeded = true;
}
catch { }
return;
}
else
{
if (tries <= 1)
{
TargetRoomUser.RotBody--;
tries++;
sit();
}
else
{
Session.SendNotif("You cannot sit diagonally, try it again please");
tries = 0;
}
}
}
else if (TargetRoomUser.isSitting == true)
{
TargetRoomUser.Z += 0.35;
TargetRoomUser.Statusses.Remove("sit");
TargetRoomUser.isSitting = false;
TargetRoomUser.UpdateNeeded = true;
}
}
Yeah, i know, i tried with the phoenix code ( this: case "sit": TargetRoomUser = Session.GetHabbo().CurrentRoom.GetRoom - Pastebin.com ) with the hint of how to convert to uber, but i cant convert...
PS: i have added case "sit": (because is case "command": in uber)
Pls close the thread, thanks Jonteh :D
You're welcome!
@Jonteh , would be helpful to the community if you could post the fixed source here? :P Would prevent other threads with the same issue from being made and filling the help section.
Sure, I'll post just the command I did as I'm guessing this source is modified, as I've not seen Uber in use for a long time.
Code:case "sit":
{
RoomUser User = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Username);
if (User != null)
{
if (User.Statusses.ContainsKey("sit"))
{
User.RemoveStatus("sit");
User.Z += 0.35;
User.UpdateNeeded = true;
}
else
{
if ((User.RotBody % 2) == 0)
{
User.AddStatus("sit", "1.0");
User.Z -= 0.35;
User.UpdateNeeded = true;
}
else
{
Session.SendNotif("You cannot sit diagonally!");
}
}
}
break;
}