Hier bitte
Gib mir den Code, damit ich ihn dir umschreibe.
Code
case 97:
try
{
RoomUser class6_001;
GameClient User2 = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1].ToString());
class6_001 = Session.GetHabbo().CurrentRoom.method_56(Session.GetHabbo().Username);
RoomUser class4 = class2.GetRoomUserByHabbo(User2.GetHabbo().Id);
if (User2.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId)
{
if (User2.GetHabbo().Id == Session.GetHabbo().Id)
{
return false;
}
else
{
bool AreFriends = false;
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
DataTable dt1 = @class.ReadDataTable("SELECT * FROM messenger_friendships");
foreach (DataRow dr1 in dt1.Rows)
{
if (Convert.ToInt32(dr1["user_one_id"].ToString()) == User2.GetHabbo().Id && Convert.ToInt32(dr1["user_two_id"]) == Session.GetHabbo().Id || Convert.ToInt32(dr1["user_one_id"].ToString()) == Session.GetHabbo().Id && Convert.ToInt32(dr1["user_two_id"]) == User2.GetHabbo().Id)
{
AreFriends = true;
}
}
}
if (AreFriends == false)
{
class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
RoomUser Aktuelleruser = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
RoomUser Usr2 = class2.GetRoomUserByHabbo(User2.GetHabbo().Id);
if (Math.Abs(Aktuelleruser.int_3 - Usr2.int_3) < 3 && Math.Abs(Aktuelleruser.int_4 - Usr2.int_4) < 3)
{
Aktuelleruser.method_1(Session, "*küsst " + User2.GetHabbo().Username + " *", false);
Session.GetHabbo().method_24().method_2(9, true);
User2.GetHabbo().method_24().method_2(9, true);
System.Threading.Thread thrd = new System.Threading.Thread(delegate()
{
try
{
System.Threading.Thread.Sleep(100);
Session.GetHabbo().method_24().method_2(0, true);
User2.GetHabbo().method_24().method_2(0, true);
}
catch
{
}
});
thrd.Start();
return true;
}
else
{
Session.GetHabbo().method_28("Ihr seid zu weit weg voneinander");
return true;
}
}
else
{
Session.GetHabbo().method_28("Ihr müsst Freunde sein, um euch zu küssen");
return true;
}
}
}
else
{
return false;
}
}
catch
{
return false;
}
Alles anzeigen