Created
February 13, 2015 02:04
-
-
Save ImEmil/90fb1bbe025f259a913d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal void roomkek() | |
{ | |
if (Session.GetHabbo().Rank > 6) | |
{ | |
Room currentRoom = this.Session.GetHabbo().CurrentRoom; | |
currentRoom = ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().CurrentRoomId); | |
if (currentRoom != null) | |
{ | |
List<RoomUser> roomUsers = currentRoom.GetRoomUserManager().GetRoomUsers(); | |
int count; | |
int randKey; | |
int randKey2; | |
string username; | |
string[] bodyParts = | |
{ | |
"huvudet", | |
"min vänstra axel", | |
"min högra arm", | |
"min vänstra arm", | |
"min högra hand", | |
"min vänstra hand", | |
"mitt knä", | |
"min fot" | |
}; | |
Random rnd = new Random(); | |
foreach (RoomUser user in roomUsers) | |
{ | |
username = user.GetUsername(); | |
GameClient clientByUsername = ButterflyEnvironment.GetGame().GetClientManager().GetClientByUsername(username); | |
Habbo habbo = clientByUsername.GetHabbo(); | |
Room room = habbo.CurrentRoom; | |
RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(username); | |
RoomUser User = room.GetRoomUserManager().GetRoomUserByHabbo(username); | |
if (Session.GetHabbo().Username != roomUserByHabbo.GetUsername()) | |
{ | |
if (roomUserByHabbo.sentadoBol) | |
{ | |
roomUserByHabbo.sentadoBol = false; | |
roomUserByHabbo.RemoveStatus("sit"); | |
} | |
if (!roomUserByHabbo.Statusses.ContainsKey("lay")) | |
{ | |
roomUserByHabbo.AddStatus("lay", Convert.ToString((double)(currentRoom.GetGameMap().Model.SqFloorHeight[roomUserByHabbo.X, roomUserByHabbo.Y] + 0.55)).Replace(",", ".")); | |
roomUserByHabbo.acostadoBol = true; | |
roomUserByHabbo.UpdateNeeded = true; | |
/* | |
// Kommentera bort ovan ^ och ersätt med nedan för att användare som står på snedden inte ska ligga ner | |
if ((roomUserByHabbo.RotBody % 2) == 0) | |
{ | |
roomUserByHabbo.AddStatus("lay", Convert.ToString((double)(currentRoom.GetGameMap().Model.SqFloorHeight[roomUserByHabbo.X, roomUserByHabbo.Y] + 0.55)).Replace(",", ".")); | |
roomUserByHabbo.acostadoBol = true; | |
roomUserByHabbo.UpdateNeeded = true; | |
} | |
else | |
{ | |
return; | |
//this.Session.SendNotif(LanguageLocale.GetValue("diag.noaction")); | |
} | |
*/ | |
randKey = rnd.Next(0, 3); | |
randKey2 = rnd.Next(4, 7); | |
count = rnd.Next(randKey, randKey2); // Random nyckel från kroppsdelarna | |
roomUserByHabbo.Chat(Session, "* Blir skjuten i " + bodyParts[count] + "*", true, 0); | |
if (bodyParts[count] == "huvudet") | |
{ | |
if (roomUserByHabbo.acostadoBol) | |
{ | |
roomUserByHabbo.acostadoBol = false; | |
roomUserByHabbo.RemoveStatus("lay"); | |
} | |
// HEADSHOT :'D | |
roomUserByHabbo.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(93); | |
roomUserByHabbo.GetClient().GetHabbo().RemoveEffect(6000, User, roomUserByHabbo); | |
} | |
else | |
{ | |
// Crosshair enable | |
roomUserByHabbo.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(98); | |
roomUserByHabbo.GetClient().GetHabbo().RemoveEffect(5000, User, roomUserByHabbo); | |
roomUserByHabbo.AddStatus("lay", Convert.ToString((double)(currentRoom.GetGameMap().Model.SqFloorHeight[roomUserByHabbo.X, roomUserByHabbo.Y] + 0.55)).Replace(",", ".")); | |
roomUserByHabbo.acostadoBol = true; | |
roomUserByHabbo.UpdateNeeded = true; | |
} | |
roomUserByHabbo.CarryItem(0); | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment