Advertisement
Guest User

ChatCommandHandler

a guest
Nov 24th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 196.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Data;
  5. using System.Text;
  6. using System.Text.RegularExpressions;
  7. using System.Threading.Tasks;
  8. using GoldTree.Core;
  9. using GoldTree.HabboHotel.GameClients;
  10. using GoldTree.HabboHotel.Achievements;
  11. using GoldTree.HabboHotel.Users;
  12. using GoldTree.Util;
  13. using GoldTree.Messages;
  14. using GoldTree.HabboHotel.Users.Authenticator;
  15. using GoldTree.HabboHotel.Items;
  16. using GoldTree.HabboHotel.Rooms;
  17. using GoldTree.Storage;
  18. using System.Threading;
  19. using GoldTree.HabboHotel.Pathfinding;
  20. namespace GoldTree.HabboHotel.Misc
  21. {
  22. internal sealed class ChatCommandHandler
  23. {
  24. private static List<string> list_0;
  25. private static List<string> list_1;
  26. private static List<int> list_2;
  27. private static List<string> list_3;
  28. public static void smethod_0(DatabaseClient class6_0)
  29. {
  30. Logging.Write("Loading Chat Filter..");
  31. ChatCommandHandler.list_0 = new List<string>();
  32. ChatCommandHandler.list_1 = new List<string>();
  33. ChatCommandHandler.list_2 = new List<int>();
  34. ChatCommandHandler.list_3 = new List<string>();
  35. ChatCommandHandler.InitWords(class6_0);
  36. Logging.WriteLine("completed!", ConsoleColor.Green);
  37. }
  38. public static void InitWords(DatabaseClient dbClient)
  39. {
  40. ChatCommandHandler.list_0.Clear();
  41. ChatCommandHandler.list_1.Clear();
  42. ChatCommandHandler.list_2.Clear();
  43. ChatCommandHandler.list_3.Clear();
  44. DataTable dataTable = dbClient.ReadDataTable("SELECT * FROM wordfilter ORDER BY word ASC;");
  45. if (dataTable != null)
  46. {
  47. foreach (DataRow dataRow in dataTable.Rows)
  48. {
  49. ChatCommandHandler.list_0.Add(dataRow["word"].ToString());
  50. ChatCommandHandler.list_1.Add(dataRow["replacement"].ToString());
  51. ChatCommandHandler.list_2.Add(GoldTree.StringToInt(dataRow["strict"].ToString()));
  52. }
  53. }
  54. DataTable dataTable2 = dbClient.ReadDataTable("SELECT * FROM linkfilter;");
  55. if (dataTable2 != null)
  56. {
  57. foreach (DataRow dataRow in dataTable2.Rows)
  58. {
  59. ChatCommandHandler.list_3.Add(dataRow["externalsite"].ToString());
  60. }
  61. }
  62. }
  63. public static bool InitLinks(string URLs)
  64. {
  65. if (ServerConfiguration.EnableExternalLinks == "disabled")
  66. {
  67. return false;
  68. }
  69. else
  70. {
  71. if ((URLs.StartsWith("http://") || URLs.StartsWith("www.") || URLs.StartsWith("https://")) && ChatCommandHandler.list_3 != null && ChatCommandHandler.list_3.Count > 0)
  72. {
  73. foreach (string current in ChatCommandHandler.list_3)
  74. {
  75. if (URLs.Contains(current))
  76. {
  77. if (ServerConfiguration.EnableExternalLinks == "whitelist")
  78. {
  79. return true;
  80. }
  81. if (!(ServerConfiguration.EnableExternalLinks == "blacklist"))
  82. {
  83. }
  84. }
  85. }
  86. }
  87. return (URLs.StartsWith("http://") || URLs.StartsWith("www.") || (URLs.StartsWith("https://") && ServerConfiguration.EnableExternalLinks == "blacklist") || (ServerConfiguration.EnableExternalLinks == "whitelist" && false));
  88. }
  89. }
  90. public static string smethod_3(string string_0)
  91. {
  92. try
  93. {
  94. }
  95. catch
  96. {
  97. }
  98. return string_0;
  99. }
  100. public static string smethod_4(string string_0)
  101. {
  102. if (ChatCommandHandler.list_0 != null && ChatCommandHandler.list_0.Count > 0)
  103. {
  104. int num = -1;
  105. foreach (string current in ChatCommandHandler.list_0)
  106. {
  107. num++;
  108. if (string_0.ToLower().Contains(current.ToLower()) && ChatCommandHandler.list_2[num] == 1)
  109. {
  110. string_0 = Regex.Replace(string_0, current, ChatCommandHandler.list_1[num], RegexOptions.IgnoreCase);
  111. }
  112. else if (ChatCommandHandler.list_2[num] == 2)
  113. {
  114. string cheaters = @"\s*";
  115. var re = new Regex(
  116. @"\b("
  117. + string.Join("|", list_0.Select(word =>
  118. string.Join(cheaters, word.ToCharArray())))
  119. + @")\b", RegexOptions.IgnoreCase);
  120. return re.Replace(string_0, match =>
  121. {
  122. //return new string('*', match.Length);
  123. return ChatCommandHandler.list_1[num];
  124. });
  125. }
  126. else
  127. {
  128. if (string_0.ToLower().Contains(" " + current.ToLower() + " "))
  129. {
  130. string_0 = Regex.Replace(string_0, current, ChatCommandHandler.list_1[num], RegexOptions.IgnoreCase);
  131. }
  132. }
  133. }
  134. }
  135. return string_0;
  136. }
  137.  
  138. public static bool smethod_5(GameClient Session, string Input)
  139. {
  140. string[] Params = Input.Split(new char[]
  141. {
  142. ' '
  143. });
  144. GameClient TargetClient = null;
  145. Room class2 = Session.GetHabbo().CurrentRoom;
  146. if (!GoldTree.GetGame().GetRoleManager().dictionary_4.ContainsKey(Params[0]))
  147. {
  148. return false;
  149. }
  150. else
  151. {
  152. try
  153. {
  154. int num;
  155. if (class2 != null && class2.CheckRights(Session, true))
  156. {
  157. num = GoldTree.GetGame().GetRoleManager().dictionary_4[Params[0]];
  158. if (num <= 33)
  159. {
  160. if (num == 8)
  161. {
  162. class2 = Session.GetHabbo().CurrentRoom;
  163. if (class2.bool_5)
  164. {
  165. class2.bool_5 = false;
  166. }
  167. else
  168. {
  169. class2.bool_5 = true;
  170. }
  171. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  172. return true;
  173. }
  174. if (num == 33)
  175. {
  176. class2 = Session.GetHabbo().CurrentRoom;
  177. if (class2 != null && class2.CheckRights(Session, true))
  178. {
  179. List<RoomItem> list = class2.method_24(Session);
  180. Session.GetHabbo().GetInventoryComponent().method_17(list);
  181. Session.GetHabbo().GetInventoryComponent().method_9(true);
  182. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input + " " + Session.GetHabbo().CurrentRoomId);
  183. return true;
  184. }
  185. return false;
  186. }
  187. }
  188. else
  189. {
  190. if (num == 46)
  191. {
  192. class2 = Session.GetHabbo().CurrentRoom;
  193. try
  194. {
  195. int num2 = int.Parse(Params[1]);
  196. if (Session.GetHabbo().Rank >= 6u)
  197. {
  198. class2.UsersMax = num2;
  199. }
  200. else
  201. {
  202. if (num2 > 100 || num2 < 5)
  203. {
  204. Session.SendNotification("ERROR: Use a number between 5 and 100");
  205. }
  206. else
  207. {
  208. class2.UsersMax = num2;
  209. }
  210. }
  211. }
  212. catch
  213. {
  214. return false;
  215. }
  216. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  217. return true;
  218. }
  219. if (num == 53)
  220. {
  221. class2 = Session.GetHabbo().CurrentRoom;
  222. GoldTree.GetGame().GetRoomManager().method_16(class2);
  223. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  224. return true;
  225. }
  226. }
  227. }
  228. switch (GoldTree.GetGame().GetRoleManager().dictionary_4[Params[0]])
  229. {
  230. case 2:
  231. {
  232. if (!Session.GetHabbo().HasFuse("cmd_alert"))
  233. {
  234. return false;
  235. }
  236. string TargetUser = Params[1];
  237. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(TargetUser);
  238. if (TargetClient == null)
  239. {
  240. Session.SendNotification("Could not find user: " + TargetUser);
  241. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  242. return true;
  243. }
  244. TargetClient.SendNotification(ChatCommandHandler.MergeParams(Params, 2), 0);
  245. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  246. return true;
  247. }
  248. case 3:
  249. {
  250. if (!Session.GetHabbo().HasFuse("cmd_award"))
  251. {
  252. return false;
  253. }
  254. string text = Params[1];
  255. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  256. if (TargetClient == null)
  257. {
  258. Session.SendNotification("Could not find user: " + text);
  259. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  260. return true;
  261. }
  262. GoldTree.GetGame().GetAchievementManager().addAchievement(TargetClient, Convert.ToUInt32(ChatCommandHandler.MergeParams(Params, 2)));
  263. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  264. return true;
  265. }
  266. case 4:
  267. {
  268. if (!Session.GetHabbo().HasFuse("cmd_ban"))
  269. {
  270. return false;
  271. }
  272. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  273. if (TargetClient == null)
  274. {
  275. Session.SendNotification("User not found.");
  276. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  277. return true;
  278. }
  279. if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank && !Session.GetHabbo().IsJuniori)
  280. {
  281. Session.SendNotification("You are not allowed to ban that user.");
  282. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  283. return true;
  284. }
  285.  
  286. string banlenght = "0";
  287. try
  288. {
  289. banlenght = Params[2];
  290. }
  291. catch (FormatException)
  292. {
  293. Console.ForegroundColor = ConsoleColor.Red;
  294. Console.WriteLine("OOPS! Something went wrong when trying format ban length! Report this and your date format!");
  295. Console.ForegroundColor = ConsoleColor.Gray;
  296. }
  297.  
  298. banlenght = banlenght.Replace("m", "");
  299. banlenght = banlenght.Replace("h", "");
  300. banlenght = banlenght.Replace("d", "");
  301.  
  302. Console.WriteLine(banlenght);
  303. int num3 = 0;
  304.  
  305. try
  306. {
  307. num3 = int.Parse(banlenght);
  308. }
  309. catch (FormatException)
  310. {
  311. Console.ForegroundColor = ConsoleColor.Red;
  312. Console.WriteLine("OOPS! Something went wrong when trying format ban length! Report this and your date format!");
  313. Console.ForegroundColor = ConsoleColor.Gray;
  314. }
  315.  
  316. if (Params[2].Contains("m"))
  317. {
  318. num3 *= 60;
  319. }
  320.  
  321. if (Params[2].Contains("h"))
  322. {
  323. num3 *= 3600;
  324. }
  325.  
  326. if (Params[2].Contains("d"))
  327. {
  328. num3 *= 86400;
  329. }
  330.  
  331. Console.WriteLine(num3);
  332.  
  333. int laskettupaivia = 0;
  334. int laskettutunteja = 0;
  335. int laskettuminuutteja = 0;
  336. int laskettavaa = num3;
  337.  
  338. for (int i = 0; laskettavaa >= 86400; i++)
  339. {
  340. laskettupaivia += 1;
  341. laskettavaa -= 86400;
  342. }
  343. for (int i = 0; laskettavaa >= 3600; i++)
  344. {
  345. laskettutunteja += 1;
  346. laskettavaa -= 3600;
  347. }
  348. for (int i = 0; laskettavaa >= 60; i++)
  349. {
  350. laskettuminuutteja += 1;
  351. laskettavaa -= 60;
  352. }
  353. if (num3 < 600)
  354. {
  355. Session.SendNotification("Ban time is in seconds and must be at least 600 seconds (ten minutes). For more specific preset ban times, use the mod tool.");
  356. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  357. return true;
  358. }
  359. Session.SendNotification("You banned user: " + TargetClient.GetHabbo().Username + " Ban lenght is: " + laskettupaivia + " day " + laskettutunteja + " hour " + laskettuminuutteja + " minute " + laskettavaa + " second");
  360. GoldTree.GetGame().GetBanManager().BanUser(TargetClient, Session.GetHabbo().Username, (double)num3, ChatCommandHandler.MergeParams(Params, 3), false);
  361. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  362. return true;
  363. }
  364. case 6:
  365. {
  366. if (!Session.GetHabbo().HasFuse("cmd_coins"))
  367. {
  368. return false;
  369. }
  370. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  371. if (TargetClient == null)
  372. {
  373. Session.SendNotification("User could not be found.");
  374. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  375. return true;
  376. }
  377. int num4;
  378. if (int.TryParse(Params[2], out num4))
  379. {
  380. long NoBug = 0;
  381. NoBug += TargetClient.GetHabbo().Credits;
  382. NoBug += num4;
  383. Console.WriteLine(NoBug);
  384. if (NoBug <= 2147483647 || -2147483648 >= NoBug)
  385. {
  386. TargetClient.GetHabbo().Credits = TargetClient.GetHabbo().Credits + num4;
  387. TargetClient.GetHabbo().UpdateCredits(true);
  388. TargetClient.SendNotification(Session.GetHabbo().Username + " has awarded you " + num4.ToString() + " credits!");
  389. Session.SendNotification("Credit balance updated successfully.");
  390. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  391. }
  392. else
  393. {
  394. if (num4 > 0)
  395. {
  396. TargetClient.GetHabbo().Credits = 2147483647;
  397. TargetClient.GetHabbo().UpdateCredits(true);
  398. TargetClient.SendNotification("You just received max credits from staff!");
  399. }
  400. else if (num4 < 0)
  401. {
  402. TargetClient.GetHabbo().Credits = -2147483648;
  403. TargetClient.GetHabbo().UpdateCredits(true);
  404. TargetClient.SendNotification("You just received max negative credits from staff!");
  405. }
  406. }
  407. return true;
  408. }
  409. Session.SendNotification("Please send a valid amount of credits.");
  410. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  411. return true;
  412. }
  413. case 7:
  414. {
  415. if (!Session.GetHabbo().HasFuse("cmd_coords"))
  416. {
  417. return false;
  418. }
  419. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  420. if (class2 == null)
  421. {
  422. return false;
  423. }
  424. RoomUser class3 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  425. if (class3 == null)
  426. {
  427. return false;
  428. }
  429. Session.SendNotification(string.Concat(new object[]
  430. {
  431. "X: ",
  432. class3.int_3,
  433. " - Y: ",
  434. class3.int_4,
  435. " - Z: ",
  436. class3.double_0,
  437. " - Rot: ",
  438. class3.int_8,
  439. ", sqState: ",
  440. class2.Byte_0[class3.int_3, class3.int_4].ToString()
  441. }));
  442. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  443. return true;
  444. }
  445. case 11:
  446. if (Session.GetHabbo().HasFuse("cmd_enable"))
  447. {
  448. int int_ = int.Parse(Params[1]);
  449. Session.GetHabbo().GetEffectsInventoryComponent().method_2(int_, true);
  450. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  451. return true;
  452. }
  453. return false;
  454. case 14:
  455. if (Session.GetHabbo().HasFuse("cmd_freeze"))
  456. {
  457. RoomUser class4 = Session.GetHabbo().CurrentRoom.method_56(Params[1]);
  458. if (class4 != null)
  459. {
  460. class4.bool_5 = !class4.bool_5;
  461. }
  462. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  463. return true;
  464. }
  465. return false;
  466. case 15:
  467. if (Session.GetHabbo().HasFuse("cmd_givebadge"))
  468. {
  469. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  470. if (TargetClient != null)
  471. {
  472. TargetClient.GetHabbo().GetBadgeComponent().SendBadge(TargetClient, GoldTree.FilterString(Params[2]), true);
  473. }
  474. else
  475. {
  476. Session.SendNotification("User: " + Params[1] + " could not be found in the database.\rPlease try your request again.");
  477. }
  478. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  479. return true;
  480. }
  481. return false;
  482. case 16:
  483. if (Session.GetHabbo().HasFuse("cmd_globalcredits"))
  484. {
  485. try
  486. {
  487. int num5 = int.Parse(Params[1]);
  488. GoldTree.GetGame().GetClientManager().method_18(num5);
  489. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  490. {
  491. dbClient.ExecuteQuery("UPDATE users SET credits = credits + " + num5);
  492. }
  493. }
  494. catch
  495. {
  496. Session.SendNotification("Input must be a number");
  497. }
  498. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  499. return true;
  500. }
  501. return false;
  502. case 17:
  503. if (Session.GetHabbo().HasFuse("cmd_globalpixels"))
  504. {
  505. try
  506. {
  507. int num5 = int.Parse(Params[1]);
  508. GoldTree.GetGame().GetClientManager().method_19(num5, false);
  509. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  510. {
  511. dbClient.ExecuteQuery("UPDATE users SET activity_points = activity_points + " + num5);
  512. }
  513. }
  514. catch
  515. {
  516. Session.SendNotification("Input must be a number");
  517. }
  518. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  519. return true;
  520. }
  521. return false;
  522. case 18:
  523. if (Session.GetHabbo().HasFuse("cmd_globalpoints"))
  524. {
  525. try
  526. {
  527. int num5 = int.Parse(Params[1]);
  528. GoldTree.GetGame().GetClientManager().method_20(num5, false);
  529. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  530. {
  531. dbClient.ExecuteQuery("UPDATE users SET vip_points = vip_points + " + num5);
  532. }
  533. }
  534. catch
  535. {
  536. Session.SendNotification("Input must be a number");
  537. }
  538. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  539. return true;
  540. }
  541. return false;
  542. case 19:
  543. if (Session.GetHabbo().HasFuse("cmd_hal"))
  544. {
  545. string text2 = Params[1];
  546. Input = Input.Substring(4).Replace(text2, "");
  547. string text3 = Input.Substring(1);
  548. ServerMessage Message = new ServerMessage(161u);
  549. Message.AppendStringWithBreak(string.Concat(new string[]
  550. {
  551. GoldTreeEnvironment.GetExternalText("cmd_hal_title"),
  552. "\r\n",
  553. text3,
  554. "\r\n-",
  555. Session.GetHabbo().Username
  556. }));
  557. Message.AppendStringWithBreak(text2);
  558. GoldTree.GetGame().GetClientManager().BroadcastMessage(Message);
  559. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  560. return true;
  561. }
  562. return false;
  563. case 20:
  564. if (Session.GetHabbo().HasFuse("cmd_ha"))
  565. {
  566. string str = Input.Substring(3);
  567. ServerMessage Message2 = new ServerMessage(808u);
  568. Message2.AppendStringWithBreak(GoldTreeEnvironment.GetExternalText("cmd_ha_title"));
  569. Message2.AppendStringWithBreak(str + "\r\n- " + Session.GetHabbo().Username);
  570. ServerMessage Message3 = new ServerMessage(161u);
  571. Message3.AppendStringWithBreak(str + "\r\n- " + Session.GetHabbo().Username);
  572. GoldTree.GetGame().GetClientManager().method_15(Message2, Message3);
  573. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  574. return true;
  575. }
  576. return false;
  577. case 21:
  578. if (Session.GetHabbo().HasFuse("cmd_invisible"))
  579. {
  580. Session.GetHabbo().IsVisible = !Session.GetHabbo().IsVisible;
  581. Session.SendNotification("You are now " + (Session.GetHabbo().IsVisible ? "visible" : "invisible") + "\nTo apply the changes reload the room ;D");
  582. return true;
  583. }
  584. return false;
  585. case 22:
  586. if (!Session.GetHabbo().HasFuse("cmd_ipban"))
  587. {
  588. return false;
  589. }
  590. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  591. if (TargetClient == null)
  592. {
  593. Session.SendNotification("User not found.");
  594. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  595. return true;
  596. }
  597. if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank && !Session.GetHabbo().IsJuniori)
  598. {
  599. Session.SendNotification("You are not allowed to ban that user.");
  600. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  601. return true;
  602. }
  603. GoldTree.GetGame().GetBanManager().BanUser(TargetClient, Session.GetHabbo().Username, 360000000.0, ChatCommandHandler.MergeParams(Params, 2), true);
  604. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  605. return true;
  606. case 23:
  607. {
  608. if (!Session.GetHabbo().HasFuse("cmd_kick"))
  609. {
  610. return false;
  611. }
  612. string text = Params[1];
  613. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  614. if (TargetClient == null)
  615. {
  616. Session.SendNotification("Could not find user: " + text);
  617. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  618. return true;
  619. }
  620. if (Session.GetHabbo().Rank <= TargetClient.GetHabbo().Rank && !Session.GetHabbo().IsJuniori)
  621. {
  622. Session.SendNotification("You are not allowed to kick that user.");
  623. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  624. return true;
  625. }
  626. if (TargetClient.GetHabbo().CurrentRoomId < 1u)
  627. {
  628. Session.SendNotification("That user is not in a room and can not be kicked.");
  629. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  630. return true;
  631. }
  632. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(TargetClient.GetHabbo().CurrentRoomId);
  633. if (class2 == null)
  634. {
  635. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  636. return true;
  637. }
  638. class2.method_47(TargetClient, true, false);
  639. if (Params.Length > 2)
  640. {
  641. TargetClient.SendNotification("A moderator has kicked you from the room for the following reason: " + ChatCommandHandler.MergeParams(Params, 2));
  642. }
  643. else
  644. {
  645. TargetClient.SendNotification("A moderator has kicked you from the room.");
  646. }
  647. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  648. return true;
  649. }
  650. case 24:
  651. if (Session.GetHabbo().HasFuse("cmd_massbadge"))
  652. {
  653. GoldTree.GetGame().GetClientManager().method_21(Params[1]);
  654. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  655. return true;
  656. }
  657. return false;
  658. case 25:
  659. if (Session.GetHabbo().HasFuse("cmd_masscredits"))
  660. {
  661. try
  662. {
  663. int num5 = int.Parse(Params[1]);
  664. GoldTree.GetGame().GetClientManager().method_18(num5);
  665. }
  666. catch
  667. {
  668. Session.SendNotification("Input must be a number");
  669. }
  670. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  671. return true;
  672. }
  673. return false;
  674. case 26:
  675. if (Session.GetHabbo().HasFuse("cmd_masspixels"))
  676. {
  677. try
  678. {
  679. int num5 = int.Parse(Params[1]);
  680. GoldTree.GetGame().GetClientManager().method_19(num5, true);
  681. }
  682. catch
  683. {
  684. Session.SendNotification("Input must be a number");
  685. }
  686. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  687. return true;
  688. }
  689. return false;
  690. case 27:
  691. if (Session.GetHabbo().HasFuse("cmd_masspoints"))
  692. {
  693. try
  694. {
  695. int num5 = int.Parse(Params[1]);
  696. GoldTree.GetGame().GetClientManager().method_20(num5, true);
  697. }
  698. catch
  699. {
  700. Session.SendNotification("Input must be a number");
  701. }
  702. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  703. return true;
  704. }
  705. return false;
  706. case 30:
  707. {
  708. if (!Session.GetHabbo().HasFuse("cmd_motd"))
  709. {
  710. return false;
  711. }
  712. string text = Params[1];
  713. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  714. if (TargetClient == null)
  715. {
  716. Session.SendNotification("Could not find user: " + text);
  717. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  718. return true;
  719. }
  720. TargetClient.SendNotification(ChatCommandHandler.MergeParams(Params, 2), 2);
  721. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  722. return true;
  723. }
  724. case 31:
  725. {
  726. if (!Session.GetHabbo().HasFuse("cmd_mute"))
  727. {
  728. return false;
  729. }
  730. string text = Params[1];
  731. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  732. if (TargetClient == null || TargetClient.GetHabbo() == null)
  733. {
  734. Session.SendNotification("Could not find user: " + text);
  735. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  736. return true;
  737. }
  738. if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank && !Session.GetHabbo().IsJuniori)
  739. {
  740. Session.SendNotification("You are not allowed to (un)mute that user.");
  741. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  742. return true;
  743. }
  744. TargetClient.GetHabbo().Mute();
  745. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  746. return true;
  747. }
  748. case 32:
  749. {
  750. if (!Session.GetHabbo().HasFuse("cmd_override"))
  751. {
  752. return false;
  753. }
  754. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  755. if (class2 == null)
  756. {
  757. return false;
  758. }
  759. RoomUser class3 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  760. if (class3 == null)
  761. {
  762. return false;
  763. }
  764. if (class3.bool_1)
  765. {
  766. class3.bool_1 = false;
  767. Session.SendNotification("Walking override disabled.");
  768. }
  769. else
  770. {
  771. class3.bool_1 = true;
  772. Session.SendNotification("Walking override enabled.");
  773. }
  774. class2.method_22();
  775. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  776. return true;
  777. }
  778. case 34:
  779. {
  780. if (!Session.GetHabbo().HasFuse("cmd_pixels"))
  781. {
  782. return false;
  783. }
  784. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  785. if (TargetClient == null)
  786. {
  787. Session.SendNotification("User could not be found.");
  788. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  789. return true;
  790. }
  791. int num4;
  792. if (int.TryParse(Params[2], out num4))
  793. {
  794. long NoBug = 0;
  795. NoBug += TargetClient.GetHabbo().ActivityPoints;
  796. NoBug += num4;
  797. if (NoBug <= 2147483647 || -2147483648 >= NoBug)
  798. {
  799. TargetClient.GetHabbo().ActivityPoints = TargetClient.GetHabbo().ActivityPoints + num4;
  800. TargetClient.GetHabbo().UpdateActivityPoints(true);
  801. TargetClient.SendNotification(Session.GetHabbo().Username + " has awarded you " + num4.ToString() + " Pixels!");
  802. Session.SendNotification("Pixels balance updated successfully.");
  803. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  804. }
  805. else
  806. {
  807. if (num4 > 0)
  808. {
  809. TargetClient.GetHabbo().Credits = 2147483647;
  810. TargetClient.GetHabbo().UpdateCredits(true);
  811. TargetClient.SendNotification("You just received max pixels from staff!");
  812. }
  813. else if (num4 < 0)
  814. {
  815. TargetClient.GetHabbo().Credits = -2147483648;
  816. TargetClient.GetHabbo().UpdateCredits(true);
  817. TargetClient.SendNotification("You just received max negative pixels from staff!");
  818. }
  819. }
  820. return true;
  821. }
  822. Session.SendNotification("Please send a valid amount of pixels.");
  823. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  824. return true;
  825. }
  826. case 35:
  827. {
  828. if (!Session.GetHabbo().HasFuse("cmd_points"))
  829. {
  830. return false;
  831. }
  832. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  833. if (TargetClient == null)
  834. {
  835. Session.SendNotification("User could not be found.");
  836. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  837. return true;
  838. }
  839. int num4;
  840. if (int.TryParse(Params[2], out num4))
  841. {
  842. long NoBug = 0;
  843. NoBug += TargetClient.GetHabbo().VipPoints;
  844. NoBug += num4;
  845. if (NoBug <= 2147483647 || -2147483648 >= NoBug)
  846. {
  847. TargetClient.GetHabbo().VipPoints = TargetClient.GetHabbo().VipPoints + num4;
  848. TargetClient.GetHabbo().UpdateVipPoints(false, true);
  849. TargetClient.SendNotification(Session.GetHabbo().Username + " has awarded you " + num4.ToString() + " Points!");
  850. Session.SendNotification("Points balance updated successfully.");
  851. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  852. }
  853. else
  854. {
  855. if (num4 > 0)
  856. {
  857. TargetClient.GetHabbo().Credits = 2147483647;
  858. TargetClient.GetHabbo().UpdateCredits(true);
  859. TargetClient.SendNotification("You just received max points from staff!");
  860. }
  861. else if (num4 < 0)
  862. {
  863. TargetClient.GetHabbo().Credits = -2147483648;
  864. TargetClient.GetHabbo().UpdateCredits(true);
  865. TargetClient.SendNotification("You just received max negative points from staff!");
  866. }
  867. }
  868. return true;
  869. }
  870. Session.SendNotification("Please send a valid amount of points.");
  871. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  872. return true;
  873. }
  874. case 39:
  875. if (Session.GetHabbo().HasFuse("cmd_removebadge"))
  876. {
  877. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  878. if (TargetClient != null)
  879. {
  880. TargetClient.GetHabbo().GetBadgeComponent().RemoveBadge(GoldTree.FilterString(Params[2]));
  881. }
  882. else
  883. {
  884. Session.SendNotification("User: " + Params[1] + " could not be found in the database.\rPlease try your request again.");
  885. }
  886. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  887. return true;
  888. }
  889. return false;
  890. case 41:
  891. {
  892. if (!Session.GetHabbo().HasFuse("cmd_roomalert"))
  893. {
  894. return false;
  895. }
  896. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  897. if (class2 == null)
  898. {
  899. return false;
  900. }
  901. string string_ = ChatCommandHandler.MergeParams(Params, 1);
  902. for (int i = 0; i < class2.RoomUsers.Length; i++)
  903. {
  904. RoomUser class6 = class2.RoomUsers[i];
  905. if (class6 != null)
  906. {
  907. class6.GetClient().SendNotification(string_);
  908. }
  909. }
  910. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  911. return true;
  912. }
  913. case 42:
  914. if (!Session.GetHabbo().HasFuse("cmd_roombadge"))
  915. {
  916. return false;
  917. }
  918. if (Session.GetHabbo().CurrentRoom == null)
  919. {
  920. return false;
  921. }
  922. for (int i = 0; i < Session.GetHabbo().CurrentRoom.RoomUsers.Length; i++)
  923. {
  924. try
  925. {
  926. RoomUser class6 = Session.GetHabbo().CurrentRoom.RoomUsers[i];
  927. if (class6 != null)
  928. {
  929. if (!class6.IsBot)
  930. {
  931. if (class6.GetClient() != null)
  932. {
  933. if (class6.GetClient().GetHabbo() != null)
  934. {
  935. class6.GetClient().GetHabbo().GetBadgeComponent().SendBadge(class6.GetClient(), Params[1], true);
  936. }
  937. }
  938. }
  939. }
  940. }
  941. catch (Exception ex)
  942. {
  943. Session.SendNotification("Error: " + ex.ToString());
  944. }
  945. }
  946. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  947. return true;
  948. case 43:
  949. {
  950. if (!Session.GetHabbo().HasFuse("cmd_roomkick"))
  951. {
  952. return false;
  953. }
  954. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  955. if (class2 == null)
  956. {
  957. return false;
  958. }
  959. bool flag = true;
  960. string text4 = ChatCommandHandler.MergeParams(Params, 1);
  961. if (text4.Length > 0)
  962. {
  963. flag = false;
  964. }
  965. for (int i = 0; i < class2.RoomUsers.Length; i++)
  966. {
  967. RoomUser class7 = class2.RoomUsers[i];
  968. if (class7 != null && class7.GetClient().GetHabbo().Rank < Session.GetHabbo().Rank)
  969. {
  970. if (!flag)
  971. {
  972. class7.GetClient().SendNotification("You have been kicked by an moderator: " + text4);
  973. }
  974. class2.method_47(class7.GetClient(), true, flag);
  975. }
  976. }
  977. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  978. return true;
  979. }
  980. case 44:
  981. if (Session.GetHabbo().HasFuse("cmd_roommute"))
  982. {
  983. if (Session.GetHabbo().CurrentRoom.bool_4)
  984. {
  985. Session.GetHabbo().CurrentRoom.bool_4 = false;
  986. }
  987. else
  988. {
  989. Session.GetHabbo().CurrentRoom.bool_4 = true;
  990. }
  991. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  992. return true;
  993. }
  994. return false;
  995. case 45:
  996. if (Session.GetHabbo().HasFuse("cmd_sa"))
  997. {
  998. ServerMessage Logging = new ServerMessage(134u);
  999. Logging.AppendUInt(0u);
  1000. Logging.AppendString(Session.GetHabbo().Username + ": " + Input.Substring(3));
  1001. GoldTree.GetGame().GetClientManager().method_16(Logging, Logging);
  1002. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1003. return true;
  1004. }
  1005. return false;
  1006. case 47:
  1007. if (Session.GetHabbo().HasFuse("cmd_setspeed"))
  1008. {
  1009. int.Parse(Params[1]);
  1010. Session.GetHabbo().CurrentRoom.method_102(int.Parse(Params[1]));
  1011. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1012. return true;
  1013. }
  1014. return false;
  1015. case 48:
  1016. if (Session.GetHabbo().HasFuse("cmd_shutdown"))
  1017. {
  1018. Logging.LogCriticalException("User " + Session.GetHabbo().Username + " shut down the server " + DateTime.Now.ToString());
  1019. Task task = new Task(new Action(GoldTree.Close));
  1020. task.Start();
  1021. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1022. return true;
  1023. }
  1024. return false;
  1025. case 49:
  1026. if (Session.GetHabbo().HasFuse("cmd_spull"))
  1027. {
  1028. try
  1029. {
  1030. string a = "down";
  1031. string text = Params[1];
  1032. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  1033. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  1034. if (Session == null || TargetClient == null)
  1035. {
  1036. return false;
  1037. }
  1038. RoomUser class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  1039. RoomUser class4 = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
  1040. if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
  1041. {
  1042. Session.GetHabbo().Whisper("You cannot pull yourself");
  1043. return true;
  1044. }
  1045. class6.HandleSpeech(Session, "*pulls " + TargetClient.GetHabbo().Username + " to them*", false);
  1046. if (class6.int_8 == 0)
  1047. {
  1048. a = "up";
  1049. }
  1050. if (class6.int_8 == 2)
  1051. {
  1052. a = "right";
  1053. }
  1054. if (class6.int_8 == 4)
  1055. {
  1056. a = "down";
  1057. }
  1058. if (class6.int_8 == 6)
  1059. {
  1060. a = "left";
  1061. }
  1062. if (a == "up")
  1063. {
  1064. if (ServerConfiguration.PreventDoorPush)
  1065. {
  1066. if (!(class6.int_3 == class2.RoomModel.int_0 && class6.int_4 - 1 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1067. class4.MoveTo(class6.int_3, class6.int_4 - 1);
  1068. else
  1069. class4.MoveTo(class6.int_3, class6.int_4 + 1);
  1070. }
  1071. else
  1072. {
  1073. class4.MoveTo(class6.int_3, class6.int_4 - 1);
  1074. }
  1075. }
  1076. if (a == "right")
  1077. {
  1078. if (ServerConfiguration.PreventDoorPush)
  1079. {
  1080. if (!(class6.int_3 + 1 == class2.RoomModel.int_0 && class6.int_4 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1081. class4.MoveTo(class6.int_3 + 1, class6.int_4);
  1082. else
  1083. class4.MoveTo(class6.int_3 - 1, class6.int_4);
  1084. }
  1085. else
  1086. {
  1087. class4.MoveTo(class6.int_3 + 1, class6.int_4);
  1088. }
  1089. }
  1090. if (a == "down")
  1091. {
  1092. if (ServerConfiguration.PreventDoorPush)
  1093. {
  1094. if (!(class6.int_3 == class2.RoomModel.int_0 && class6.int_4 + 1 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1095. class4.MoveTo(class6.int_3, class6.int_4 + 1);
  1096. else
  1097. class4.MoveTo(class6.int_3, class6.int_4 - 1);
  1098. }
  1099. else
  1100. {
  1101. class4.MoveTo(class6.int_3, class6.int_4 + 1);
  1102. }
  1103. }
  1104. if (a == "left")
  1105. {
  1106. if (ServerConfiguration.PreventDoorPush)
  1107. {
  1108. if (!(class6.int_3 - 1 == class2.RoomModel.int_0 && class6.int_4 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1109. class4.MoveTo(class6.int_3 - 1, class6.int_4);
  1110. else
  1111. class4.MoveTo(class6.int_3 + 1, class6.int_4);
  1112. }
  1113. else
  1114. {
  1115. class4.MoveTo(class6.int_3 - 1, class6.int_4);
  1116. }
  1117. }
  1118. return true;
  1119. }
  1120. catch
  1121. {
  1122. return false;
  1123. }
  1124. }
  1125. return false;
  1126. case 50:
  1127. if (Session.GetHabbo().HasFuse("cmd_summon"))
  1128. {
  1129. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  1130. if (TargetClient != null && TargetClient.GetHabbo().CurrentRoom != Session.GetHabbo().CurrentRoom)
  1131. {
  1132. ServerMessage Message5 = new ServerMessage(286u);
  1133. Message5.AppendBoolean(Session.GetHabbo().CurrentRoom.IsPublic);
  1134. Message5.AppendUInt(Session.GetHabbo().CurrentRoomId);
  1135. TargetClient.SendMessage(Message5);
  1136. TargetClient.SendNotification(Session.GetHabbo().Username + " has summoned you to them");
  1137. }
  1138. else
  1139. {
  1140. Session.GetHabbo().Whisper("User: " + Params[1] + " could not be found - Maybe they're not online anymore :(");
  1141. }
  1142. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1143. return true;
  1144. }
  1145. return false;
  1146. case 51:
  1147. if (!Session.GetHabbo().HasFuse("cmd_superban"))
  1148. {
  1149. return false;
  1150. }
  1151. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  1152. if (TargetClient == null)
  1153. {
  1154. Session.SendNotification("User not found.");
  1155. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1156. return true;
  1157. }
  1158. if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank && !Session.GetHabbo().IsJuniori)
  1159. {
  1160. Session.SendNotification("You are not allowed to ban that user.");
  1161. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1162. return true;
  1163. }
  1164. GoldTree.GetGame().GetBanManager().BanUser(TargetClient, Session.GetHabbo().Username, 360000000.0, ChatCommandHandler.MergeParams(Params, 2), false);
  1165. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1166. return true;
  1167. case 52:
  1168. {
  1169. if (!Session.GetHabbo().HasFuse("cmd_teleport"))
  1170. {
  1171. return false;
  1172. }
  1173. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  1174. if (class2 == null)
  1175. {
  1176. return false;
  1177. }
  1178. RoomUser class3 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  1179. if (class3 == null)
  1180. {
  1181. return false;
  1182. }
  1183. if (class3.TeleportMode)
  1184. {
  1185. class3.TeleportMode = false;
  1186. Session.SendNotification("Teleporting disabled.");
  1187. }
  1188. else
  1189. {
  1190. class3.TeleportMode = true;
  1191. Session.SendNotification("Teleporting enabled.");
  1192. }
  1193. class2.method_22();
  1194. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1195. return true;
  1196. }
  1197. case 54:
  1198. {
  1199. if (!Session.GetHabbo().HasFuse("cmd_unmute"))
  1200. {
  1201. return false;
  1202. }
  1203. string text = Params[1];
  1204. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  1205. if (TargetClient == null || TargetClient.GetHabbo() == null)
  1206. {
  1207. Session.SendNotification("Could not find user: " + text);
  1208. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1209. return true;
  1210. }
  1211. TargetClient.GetHabbo().UnMute();
  1212. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1213. return true;
  1214. }
  1215. case 55:
  1216. if (Session.GetHabbo().HasFuse("cmd_update_achievements"))
  1217. {
  1218. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1219. {
  1220. AchievementManager.smethod_0(dbClient);
  1221. }
  1222. return true;
  1223. }
  1224. return false;
  1225. case 56:
  1226. if (Session.GetHabbo().HasFuse("cmd_update_bans"))
  1227. {
  1228. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1229. {
  1230. GoldTree.GetGame().GetBanManager().Initialise(dbClient);
  1231. }
  1232. GoldTree.GetGame().GetClientManager().method_28();
  1233. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1234. return true;
  1235. }
  1236. return false;
  1237. case 57:
  1238. if (Session.GetHabbo().HasFuse("cmd_update_bots"))
  1239. {
  1240. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1241. {
  1242. GoldTree.GetGame().GetBotManager().method_0(dbClient);
  1243. }
  1244. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1245. return true;
  1246. }
  1247. return false;
  1248. case 58:
  1249. if (Session.GetHabbo().HasFuse("cmd_update_catalogue"))
  1250. {
  1251. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1252. {
  1253. GoldTree.GetGame().GetCatalog().method_0(dbClient);
  1254. }
  1255. GoldTree.GetGame().GetCatalog().method_1();
  1256. GoldTree.GetGame().GetClientManager().BroadcastMessage(new ServerMessage(441u));
  1257. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1258. return true;
  1259. }
  1260. return false;
  1261. case 59:
  1262. if (Session.GetHabbo().HasFuse("cmd_update_filter"))
  1263. {
  1264. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1265. {
  1266. ChatCommandHandler.InitWords(dbClient);
  1267. }
  1268. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1269. return true;
  1270. }
  1271. return false;
  1272. case 60:
  1273. if (Session.GetHabbo().HasFuse("cmd_update_items"))
  1274. {
  1275. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1276. {
  1277. GoldTree.GetGame().GetItemManager().method_0(dbClient);
  1278. }
  1279. Session.SendNotification("Item defenitions reloaded successfully.");
  1280. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1281. return true;
  1282. }
  1283. return false;
  1284. case 61:
  1285. if (Session.GetHabbo().HasFuse("cmd_update_navigator"))
  1286. {
  1287. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1288. {
  1289. GoldTree.GetGame().GetNavigator().method_0(dbClient);
  1290. GoldTree.GetGame().GetRoomManager().method_8(dbClient);
  1291. }
  1292. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1293. return true;
  1294. }
  1295. return false;
  1296. case 62:
  1297. if (Session.GetHabbo().HasFuse("cmd_update_permissions"))
  1298. {
  1299. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1300. {
  1301. GoldTree.GetGame().GetRoleManager().method_0(dbClient);
  1302. }
  1303. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1304. return true;
  1305. }
  1306. return false;
  1307. case 63:
  1308. if (Session.GetHabbo().HasFuse("cmd_update_settings"))
  1309. {
  1310. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1311. {
  1312. GoldTree.GetGame().LoadServerSettings(dbClient);
  1313. }
  1314. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1315. return true;
  1316. }
  1317. return false;
  1318. case 64:
  1319. {
  1320. if (!Session.GetHabbo().HasFuse("cmd_userinfo"))
  1321. {
  1322. return false;
  1323. }
  1324. string text5 = Params[1];
  1325. bool flag2 = true;
  1326. if (string.IsNullOrEmpty(text5))
  1327. {
  1328. Session.SendNotification("Please enter a username");
  1329. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1330. return true;
  1331. }
  1332. GameClient class8 = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text5);
  1333. Habbo class9;
  1334. if (class8 == null)
  1335. {
  1336. flag2 = false;
  1337. class9 = Authenticator.CreateHabbo(text5);
  1338. }
  1339. else
  1340. {
  1341. class9 = class8.GetHabbo();
  1342. }
  1343. if (class9 == null)
  1344. {
  1345. Session.SendNotification("Unable to find user " + Params[1]);
  1346. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1347. return true;
  1348. }
  1349. StringBuilder stringBuilder = new StringBuilder();
  1350. if (class9.CurrentRoom != null)
  1351. {
  1352. stringBuilder.Append(" - ROOM INFORMATION FOR ROOMID: " + class9.CurrentRoom.Id + " - \r");
  1353. stringBuilder.Append("Owner: " + class9.CurrentRoom.Owner + "\r");
  1354. stringBuilder.Append("Room name: " + class9.CurrentRoom.Name + "\r");
  1355. stringBuilder.Append(string.Concat(new object[]
  1356. {
  1357. "Users in room: ",
  1358. class9.CurrentRoom.UserCount,
  1359. "/",
  1360. class9.CurrentRoom.UsersMax
  1361. }));
  1362. }
  1363. uint num6 = class9.Rank;
  1364. //if (class9.isAaronble)
  1365. //{
  1366. // num6 = 1u;
  1367. //}
  1368. string text6 = "";
  1369. if (Session.GetHabbo().HasFuse("cmd_userinfo_viewip"))
  1370. {
  1371. text6 = "UserIP: " + class9.LastIp + " \r";
  1372. }
  1373. Session.SendNotification(string.Concat(new object[]
  1374. {
  1375. "User information for user: ",
  1376. text5,
  1377. ":\rRank: ",
  1378. num6,
  1379. " \rUser online: ",
  1380. flag2.ToString(),
  1381. " \rUserID: ",
  1382. class9.Id,
  1383. " \r",
  1384. text6,
  1385. "Visiting room: ",
  1386. class9.CurrentRoomId,
  1387. " \rUser motto: ",
  1388. class9.Motto,
  1389. " \rUser credits: ",
  1390. class9.Credits,
  1391. " \rUser pixels: ",
  1392. class9.ActivityPoints,
  1393. " \rUser points: ",
  1394. class9.VipPoints,
  1395. " \rUser muted: ",
  1396. class9.IsMuted.ToString(),
  1397. "\r\r\r",
  1398. stringBuilder.ToString()
  1399. }));
  1400. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1401. return true;
  1402. }
  1403. case 65:
  1404. if (Session.GetHabbo().HasFuse("cmd_update_texts"))
  1405. {
  1406. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1407. {
  1408. GoldTreeEnvironment.LoadExternalTexts(dbClient);
  1409. }
  1410. return true;
  1411. }
  1412. return false;
  1413. case 66:
  1414. {
  1415. if (!Session.GetHabbo().HasFuse("cmd_disconnect"))
  1416. {
  1417. return false;
  1418. }
  1419. string text = Params[1];
  1420. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  1421. if (TargetClient == null)
  1422. {
  1423. Session.SendNotification("Could not find user: " + text);
  1424. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1425. return true;
  1426. }
  1427. if (Session.GetHabbo().Rank <= TargetClient.GetHabbo().Rank && !Session.GetHabbo().IsJuniori)
  1428. {
  1429. Session.SendNotification("You are not allowed to kick that user.");
  1430. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1431. return true;
  1432. }
  1433. if (!TargetClient.GetHabbo().IsJuniori)
  1434. {
  1435. TargetClient.method_12();
  1436. }
  1437. return true;
  1438. }
  1439. case 87:
  1440. if (Session.GetHabbo().HasFuse("cmd_vipha"))
  1441. {
  1442. if (GoldTree.GetUnixTimestamp() - Session.GetHabbo().LastVipAlert >= ServerConfiguration.VIPHotelAlertInterval)
  1443. {
  1444. Session.GetHabbo().LastVipAlert = GoldTree.GetUnixTimestamp();
  1445. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1446. {
  1447. dbClient.AddParamWithValue("sessionid", Session.GetHabbo().Id);
  1448. dbClient.ExecuteQuery("UPDATE users SET vipha_last = UNIX_TIMESTAMP() WHERE id = @sessionid");
  1449. }
  1450. string str = Input.Substring(6);
  1451. ServerMessage Message2 = new ServerMessage(808u);
  1452. Message2.AppendStringWithBreak(GoldTreeEnvironment.GetExternalText("cmd_vipha_title"));
  1453. Message2.AppendStringWithBreak(str + "\r\n- " + Session.GetHabbo().Username);
  1454. ServerMessage Message3 = new ServerMessage(161u);
  1455. Message3.AppendStringWithBreak(str + "\r\n- " + Session.GetHabbo().Username);
  1456. GoldTree.GetGame().GetClientManager().method_15(Message2, Message3);
  1457. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1458. return true;
  1459. }
  1460. else
  1461. {
  1462. Session.SendNotification("You need wait: " + (int)((Session.GetHabbo().LastVipAlert - GoldTree.GetUnixTimestamp() + ServerConfiguration.VIPHotelAlertInterval) / 60) + " minute!");
  1463. return true;
  1464. }
  1465. }
  1466. return false;
  1467. case 91:
  1468. if (!Session.GetHabbo().HasFuse("cmd_roomeffect"))
  1469. {
  1470. return false;
  1471. }
  1472. if (Session.GetHabbo().CurrentRoom == null)
  1473. {
  1474. return false;
  1475. }
  1476. for (int i = 0; i < Session.GetHabbo().CurrentRoom.RoomUsers.Length; i++)
  1477. {
  1478. try
  1479. {
  1480. RoomUser class6 = Session.GetHabbo().CurrentRoom.RoomUsers[i];
  1481. if (class6 != null)
  1482. {
  1483. if (!class6.IsBot)
  1484. {
  1485. if (class6.GetClient() != null)
  1486. {
  1487. if (class6.GetClient().GetHabbo() != null)
  1488. {
  1489. int int_ = int.Parse(Params[1]);
  1490. class6.GetClient().GetHabbo().GetEffectsInventoryComponent().method_2(int_, true);
  1491. }
  1492. }
  1493. }
  1494. }
  1495. }
  1496. catch (Exception ex)
  1497. {
  1498. Session.SendNotification("Error: " + ex.ToString());
  1499. }
  1500. }
  1501. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1502. return true;
  1503. case 97:
  1504. if (Session.GetHabbo().HasFuse("cmd_viphal"))
  1505. {
  1506. if (GoldTree.GetUnixTimestamp() - Session.GetHabbo().LastVipAlertLink >= ServerConfiguration.VIPHotelAlertLinkInterval)
  1507. {
  1508. Session.GetHabbo().LastVipAlertLink = GoldTree.GetUnixTimestamp();
  1509. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1510. {
  1511. dbClient.AddParamWithValue("sessionid", Session.GetHabbo().Id);
  1512. dbClient.ExecuteQuery("UPDATE users SET viphal_last = UNIX_TIMESTAMP() WHERE id = @sessionid");
  1513. }
  1514.  
  1515. string text2 = Params[1];
  1516. Input = Input.Substring(4).Replace(text2, "");
  1517. string text3 = Input.Substring(1);
  1518. ServerMessage Message = new ServerMessage(161u);
  1519. Message.AppendStringWithBreak(string.Concat(new string[]
  1520. {
  1521. GoldTreeEnvironment.GetExternalText("cmd_viphal_title"),
  1522. "\r\n",
  1523. text3,
  1524. "\r\n-",
  1525. Session.GetHabbo().Username
  1526. }));
  1527. Message.AppendStringWithBreak(text2);
  1528. GoldTree.GetGame().GetClientManager().BroadcastMessage(Message);
  1529. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1530. return true;
  1531. }
  1532.  
  1533. else
  1534. {
  1535. Session.SendNotification("You need wait: " + (int)((Session.GetHabbo().LastVipAlertLink - GoldTree.GetUnixTimestamp() + ServerConfiguration.VIPHotelAlertLinkInterval) / 60) + " minute!");
  1536. return true;
  1537. }
  1538. }
  1539. return false;
  1540. }
  1541. num = GoldTree.GetGame().GetRoleManager().dictionary_4[Params[0]];
  1542. if (num <= 13)
  1543. {
  1544. if (num != 1)
  1545. {
  1546. switch (num)
  1547. {
  1548. case 5:
  1549. {
  1550. int num7 = (int)Convert.ToInt16(Params[1]);
  1551. if (num7 > 0 && num7 < 101)
  1552. {
  1553. Session.GetHabbo().int_24 = (int)Convert.ToInt16(Params[1]);
  1554. }
  1555. else
  1556. {
  1557. Session.GetHabbo().Whisper("Please choose a value between 1 - 100");
  1558. }
  1559. return true;
  1560. }
  1561. case 6:
  1562. case 7:
  1563. case 8:
  1564. case 11:
  1565. goto IL_3F91;
  1566. case 9:
  1567. Session.GetHabbo().GetInventoryComponent().ClearInventory();
  1568. Session.SendNotification(GoldTreeEnvironment.GetExternalText("cmd_emptyitems_success"));
  1569. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1570. return true;
  1571. case 10:
  1572. if (Session.GetHabbo().HasFuse("cmd_empty") && Params[1] != null)
  1573. {
  1574. GameClient class10 = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  1575. if (class10 != null && class10.GetHabbo() != null)
  1576. {
  1577. class10.GetHabbo().GetInventoryComponent().ClearInventory();
  1578. Session.SendNotification("Inventory cleared! (Database and cache)");
  1579. }
  1580. else
  1581. {
  1582. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  1583. {
  1584. dbClient.AddParamWithValue("usrname", Params[1]);
  1585. int num8 = int.Parse(dbClient.ReadString("SELECT Id FROM users WHERE username = @usrname LIMIT 1;"));
  1586. dbClient.ExecuteQuery("DELETE FROM items WHERE user_id = '" + num8 + "' AND room_id = 0;");
  1587. Session.SendNotification("Inventory cleared! (Database)");
  1588. }
  1589. }
  1590. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1591. return true;
  1592. }
  1593. return false;
  1594. case 12:
  1595. {
  1596. if (!(ServerConfiguration.UnknownBoolean3 || Session.GetHabbo().HasFuse("cmd_flagme")))
  1597. {
  1598. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_disabled"));
  1599. return true;
  1600. }
  1601. if (!(Session.GetHabbo().IsVIP || Session.GetHabbo().HasFuse("cmd_flagme")))
  1602. {
  1603. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_permission_vip"));
  1604. return true;
  1605. }
  1606. ServerMessage Message5_ = new ServerMessage(573u);
  1607. Session.SendMessage(Message5_);
  1608. return true;
  1609. }
  1610. case 13:
  1611. if (!(ServerConfiguration.UnknownBoolean9 || Session.GetHabbo().HasFuse("cmd_follow")))
  1612. {
  1613. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_disabled"));
  1614. return true;
  1615. }
  1616. if (!(Session.GetHabbo().IsVIP || Session.GetHabbo().HasFuse("cmd_follow")))
  1617. {
  1618. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_permission_vip"));
  1619. return true;
  1620. }
  1621. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  1622. if (TargetClient != null && TargetClient.GetHabbo().InRoom && Session.GetHabbo().CurrentRoom != TargetClient.GetHabbo().CurrentRoom && !TargetClient.GetHabbo().HideInRom)
  1623. {
  1624. ServerMessage Message5 = new ServerMessage(286u);
  1625. Message5.AppendBoolean(TargetClient.GetHabbo().CurrentRoom.IsPublic);
  1626. Message5.AppendUInt(TargetClient.GetHabbo().CurrentRoomId);
  1627. Session.SendMessage(Message5);
  1628. }
  1629. else
  1630. {
  1631. Session.GetHabbo().Whisper("User: " + Params[1] + " could not be found - Maybe they're not online or not in a room anymore (or maybe they're a ninja)");
  1632. }
  1633. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  1634. return true;
  1635. default:
  1636. goto IL_3F91;
  1637. }
  1638. }
  1639. }
  1640. else
  1641. {
  1642. switch (num)
  1643. {
  1644. case 28:
  1645. {
  1646. if (!(ServerConfiguration.UnknownBoolean7 || Session.GetHabbo().HasFuse("cmd_mimic")))
  1647. {
  1648. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_disabled"));
  1649. return true;
  1650. }
  1651. if (!(Session.GetHabbo().IsVIP || Session.GetHabbo().HasFuse("cmd_mimic")))
  1652. {
  1653. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_permission_vip"));
  1654. return true;
  1655. }
  1656. string text = Params[1];
  1657. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  1658. if (TargetClient == null)
  1659. {
  1660. Session.GetHabbo().Whisper("Could not find user: " + text);
  1661. return true;
  1662. }
  1663. Session.GetHabbo().Figure = TargetClient.GetHabbo().Figure;
  1664. Session.GetHabbo().UpdateLook(false, Session);
  1665. return true;
  1666. }
  1667. case 29:
  1668. {
  1669. if (!(ServerConfiguration.UnknownBoolean8 || Session.GetHabbo().HasFuse("cmd_moonwalk")))
  1670. {
  1671. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_disabled"));
  1672. return true;
  1673. }
  1674. if (!(Session.GetHabbo().IsVIP || Session.GetHabbo().HasFuse("cmd_moonwalk")))
  1675. {
  1676. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_permission_vip"));
  1677. return true;
  1678. }
  1679. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  1680. if (class2 == null)
  1681. {
  1682. return false;
  1683. }
  1684. RoomUser class3 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  1685. if (class3 == null)
  1686. {
  1687. return false;
  1688. }
  1689. if (class3.bool_3)
  1690. {
  1691. class3.bool_3 = false;
  1692. Session.GetHabbo().Whisper("Your moonwalk has been disabled.");
  1693. return true;
  1694. }
  1695. class3.bool_3 = true;
  1696. Session.GetHabbo().Whisper("Your moonwalk has been enabled.");
  1697. return true;
  1698. }
  1699. default:
  1700. {
  1701. RoomUser class6;
  1702. switch (num)
  1703. {
  1704. case 36:
  1705. try
  1706. {
  1707. if (!(ServerConfiguration.UnknownBoolean2 || Session.GetHabbo().HasFuse("cmd_pull")))
  1708. {
  1709. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_disabled"));
  1710. return true;
  1711. }
  1712. if (!(Session.GetHabbo().IsVIP || Session.GetHabbo().HasFuse("cmd_pull")))
  1713. {
  1714. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_permission_vip"));
  1715. return true;
  1716. }
  1717. string a = "down";
  1718. string text = Params[1];
  1719. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  1720. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  1721. if (Session == null || TargetClient == null)
  1722. {
  1723. return false;
  1724. }
  1725. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  1726. RoomUser class4 = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
  1727. if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
  1728. {
  1729. Session.GetHabbo().Whisper("You cannot pull yourself");
  1730. return true;
  1731. }
  1732. if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId && Math.Abs(class6.int_3 - class4.int_3) < 3 && Math.Abs(class6.int_4 - class4.int_4) < 3)
  1733. {
  1734. class6.HandleSpeech(Session, "*pulls " + TargetClient.GetHabbo().Username + " to them*", false);
  1735. if (class6.int_8 == 0)
  1736. {
  1737. a = "up";
  1738. }
  1739. if (class6.int_8 == 2)
  1740. {
  1741. a = "right";
  1742. }
  1743. if (class6.int_8 == 4)
  1744. {
  1745. a = "down";
  1746. }
  1747. if (class6.int_8 == 6)
  1748. {
  1749. a = "left";
  1750. }
  1751. if (a == "up")
  1752. {
  1753. if (ServerConfiguration.PreventDoorPush)
  1754. {
  1755. if (!(class6.int_3 == class2.RoomModel.int_0 && class6.int_4 - 1 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1756. class4.MoveTo(class6.int_3, class6.int_4 - 1);
  1757. else
  1758. class4.MoveTo(class6.int_3, class6.int_4 + 1);
  1759. }
  1760. else
  1761. {
  1762. class4.MoveTo(class6.int_3, class6.int_4 - 1);
  1763. }
  1764. }
  1765. if (a == "right")
  1766. {
  1767. if (ServerConfiguration.PreventDoorPush)
  1768. {
  1769. if (!(class6.int_3 + 1 == class2.RoomModel.int_0 && class6.int_4 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1770. class4.MoveTo(class6.int_3 + 1, class6.int_4);
  1771. else
  1772. class4.MoveTo(class6.int_3 - 1, class6.int_4);
  1773. }
  1774. else
  1775. {
  1776. class4.MoveTo(class6.int_3 + 1, class6.int_4);
  1777. }
  1778. }
  1779. if (a == "down")
  1780. {
  1781. if (ServerConfiguration.PreventDoorPush)
  1782. {
  1783. if (!(class6.int_3 == class2.RoomModel.int_0 && class6.int_4 + 1 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1784. class4.MoveTo(class6.int_3, class6.int_4 + 1);
  1785. else
  1786. class4.MoveTo(class6.int_3, class6.int_4 - 1);
  1787. }
  1788. else
  1789. {
  1790. class4.MoveTo(class6.int_3, class6.int_4 + 1);
  1791. }
  1792. }
  1793. if (a == "left")
  1794. {
  1795. if (ServerConfiguration.PreventDoorPush)
  1796. {
  1797. if (!(class6.int_3 - 1 == class2.RoomModel.int_0 && class6.int_4 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1798. class4.MoveTo(class6.int_3 - 1, class6.int_4);
  1799. else
  1800. class4.MoveTo(class6.int_3 + 1, class6.int_4);
  1801. }
  1802. else
  1803. {
  1804. class4.MoveTo(class6.int_3 - 1, class6.int_4);
  1805. }
  1806. }
  1807. return true;
  1808. }
  1809. Session.GetHabbo().Whisper("That user is not close enough to you to be pulled, try getting closer");
  1810. return true;
  1811. }
  1812. catch
  1813. {
  1814. return false;
  1815. }
  1816. case 37:
  1817. break;
  1818. case 38:
  1819. goto IL_3F03;
  1820. case 39:
  1821. goto IL_3F91;
  1822. case 40:
  1823. {
  1824. string text = Params[1];
  1825. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  1826. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  1827. RoomUser class4 = class2.method_57(text);
  1828. if (class6.class34_1 != null)
  1829. {
  1830. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_ride_err_riding"));
  1831. return true;
  1832. }
  1833. if (!class4.IsBot || class4.PetData.Type != 13u)
  1834. {
  1835. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_ride_err_nothorse"));
  1836. return true;
  1837. }
  1838. bool arg_40EB_0;
  1839. if ((class6.int_3 + 1 != class4.int_3 || class6.int_4 != class4.int_4) && (class6.int_3 - 1 != class4.int_3 || class6.int_4 != class4.int_4) && (class6.int_4 + 1 != class4.int_4 || class6.int_3 != class4.int_3))
  1840. {
  1841. if (class6.int_4 - 1 == class4.int_4)
  1842. {
  1843. if (class6.int_3 == class4.int_3)
  1844. {
  1845. goto IL_40C2;
  1846. }
  1847. }
  1848. arg_40EB_0 = (class6.int_3 != class4.int_3 || class6.int_4 != class4.int_4);
  1849. goto IL_40EB;
  1850. }
  1851. IL_40C2:
  1852. arg_40EB_0 = false;
  1853. IL_40EB:
  1854. if (arg_40EB_0)
  1855. {
  1856. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_ride_err_toofar"));
  1857. return true;
  1858. }
  1859. if (class4.RoomBot.RoomUser_0 == null)
  1860. {
  1861. class4.RoomBot.RoomUser_0 = class6;
  1862. class6.class34_1 = class4.RoomBot;
  1863. class6.int_3 = class4.int_3;
  1864. class6.int_4 = class4.int_4;
  1865. class6.double_0 = class4.double_0 + 1.0;
  1866. class6.int_8 = class4.int_8;
  1867. class6.int_7 = class4.int_7;
  1868. class6.UpdateNeeded = true;
  1869. class2.method_87(class6, false, false);
  1870. class6.RoomUser_0 = class4;
  1871. class6.Statusses.Clear();
  1872. class4.Statusses.Clear();
  1873. Session.GetHabbo().GetEffectsInventoryComponent().method_2(77, true);
  1874. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_ride_instr_getoff"));
  1875. class2.method_22();
  1876. return true;
  1877. }
  1878. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_ride_err_tooslow"));
  1879. return true;
  1880. }
  1881. case 88:
  1882. try
  1883. {
  1884. if (!Session.GetHabbo().HasFuse("cmd_spush"))
  1885. {
  1886. return false;
  1887. }
  1888. string a = "down";
  1889. string text = Params[1];
  1890. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  1891. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  1892. if (Session == null || TargetClient == null)
  1893. {
  1894. return false;
  1895. }
  1896. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  1897. RoomUser class4 = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
  1898. if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
  1899. {
  1900. Session.GetHabbo().Whisper("It can't be that bad mate, no need to push yourself!");
  1901. return true;
  1902. }
  1903. bool arg_3DD2_0;
  1904. if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId)
  1905. {
  1906. if ((class6.int_3 + 1 != class4.int_3 || class6.int_4 != class4.int_4) && (class6.int_3 - 1 != class4.int_3 || class6.int_4 != class4.int_4) && (class6.int_4 + 1 != class4.int_4 || class6.int_3 != class4.int_3))
  1907. {
  1908. if (class6.int_4 - 1 == class4.int_4)
  1909. {
  1910. if (class6.int_3 == class4.int_3)
  1911. {
  1912. goto IL_3DA6;
  1913. }
  1914. }
  1915. arg_3DD2_0 = (class6.int_3 != class4.int_3 || class6.int_4 != class4.int_4);
  1916. goto IL_3DD2;
  1917. }
  1918. IL_3DA6:
  1919. arg_3DD2_0 = false;
  1920. }
  1921. else
  1922. {
  1923. arg_3DD2_0 = true;
  1924. }
  1925. IL_3DD2:
  1926. if (!arg_3DD2_0)
  1927. {
  1928. class6.HandleSpeech(Session, "*pushes " + TargetClient.GetHabbo().Username + "*", false);
  1929. if (class6.int_8 == 0)
  1930. {
  1931. a = "up";
  1932. }
  1933. if (class6.int_8 == 2)
  1934. {
  1935. a = "right";
  1936. }
  1937. if (class6.int_8 == 4)
  1938. {
  1939. a = "down";
  1940. }
  1941. if (class6.int_8 == 6)
  1942. {
  1943. a = "left";
  1944. }
  1945. if (a == "up")
  1946. {
  1947. if (ServerConfiguration.PreventDoorPush)
  1948. {
  1949. if (Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1950. {
  1951. class4.MoveTo(class4.int_3, class4.int_4 - 1);
  1952. class4.MoveTo(class4.int_3, class4.int_4 - 2);
  1953. class4.MoveTo(class4.int_3, class4.int_4 - 3);
  1954. class4.MoveTo(class4.int_3, class4.int_4 - 4);
  1955. class4.MoveTo(class4.int_3, class4.int_4 - 5);
  1956. }
  1957. else
  1958. {
  1959. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 - 1 == class2.RoomModel.int_1))
  1960. class4.MoveTo(class4.int_3, class4.int_4 - 1);
  1961. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 - 2 == class2.RoomModel.int_1))
  1962. class4.MoveTo(class4.int_3, class4.int_4 - 2);
  1963. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 - 3 == class2.RoomModel.int_1))
  1964. class4.MoveTo(class4.int_3, class4.int_4 - 3);
  1965. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 - 4 == class2.RoomModel.int_1))
  1966. class4.MoveTo(class4.int_3, class4.int_4 - 4);
  1967. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 - 5 == class2.RoomModel.int_1))
  1968. class4.MoveTo(class4.int_3, class4.int_4 - 5);
  1969. }
  1970. }
  1971. else
  1972. {
  1973. class4.MoveTo(class4.int_3, class4.int_4 - 1);
  1974. class4.MoveTo(class4.int_3, class4.int_4 - 2);
  1975. class4.MoveTo(class4.int_3, class4.int_4 - 3);
  1976. class4.MoveTo(class4.int_3, class4.int_4 - 4);
  1977. class4.MoveTo(class4.int_3, class4.int_4 - 5);
  1978. }
  1979. }
  1980. if (a == "right")
  1981. {
  1982. if (ServerConfiguration.PreventDoorPush)
  1983. {
  1984. if (Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  1985. {
  1986. class4.MoveTo(class4.int_3 + 1, class4.int_4);
  1987. class4.MoveTo(class4.int_3 + 2, class4.int_4);
  1988. class4.MoveTo(class4.int_3 + 3, class4.int_4);
  1989. class4.MoveTo(class4.int_3 + 4, class4.int_4);
  1990. class4.MoveTo(class4.int_3 + 5, class4.int_4);
  1991. }
  1992. else
  1993. {
  1994. if (!(class4.int_3 + 1 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  1995. class4.MoveTo(class4.int_3 + 1, class4.int_4);
  1996. if (!(class4.int_3 + 2 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  1997. class4.MoveTo(class4.int_3 + 2, class4.int_4);
  1998. if (!(class4.int_3 + 3 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  1999. class4.MoveTo(class4.int_3 + 3, class4.int_4);
  2000. if (!(class4.int_3 + 4 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  2001. class4.MoveTo(class4.int_3 + 4, class4.int_4);
  2002. if (!(class4.int_3 + 5 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  2003. class4.MoveTo(class4.int_3 + 5, class4.int_4);
  2004. }
  2005. }
  2006. else
  2007. {
  2008. class4.MoveTo(class4.int_3 + 1, class4.int_4);
  2009. class4.MoveTo(class4.int_3 + 2, class4.int_4);
  2010. class4.MoveTo(class4.int_3 + 3, class4.int_4);
  2011. class4.MoveTo(class4.int_3 + 4, class4.int_4);
  2012. class4.MoveTo(class4.int_3 + 5, class4.int_4);
  2013. }
  2014. }
  2015. if (a == "down")
  2016. {
  2017. if (ServerConfiguration.PreventDoorPush)
  2018. {
  2019. if (Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  2020. {
  2021. class4.MoveTo(class4.int_3, class4.int_4 + 1);
  2022. class4.MoveTo(class4.int_3, class4.int_4 + 2);
  2023. class4.MoveTo(class4.int_3, class4.int_4 + 3);
  2024. class4.MoveTo(class4.int_3, class4.int_4 + 4);
  2025. class4.MoveTo(class4.int_3, class4.int_4 + 5);
  2026. }
  2027. else
  2028. {
  2029. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 + 1 == class2.RoomModel.int_1))
  2030. class4.MoveTo(class4.int_3, class4.int_4 + 1);
  2031. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 + 2 == class2.RoomModel.int_1))
  2032. class4.MoveTo(class4.int_3, class4.int_4 + 2);
  2033. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 + 3 == class2.RoomModel.int_1))
  2034. class4.MoveTo(class4.int_3, class4.int_4 + 3);
  2035. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 + 4 == class2.RoomModel.int_1))
  2036. class4.MoveTo(class4.int_3, class4.int_4 + 4);
  2037. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 + 5 == class2.RoomModel.int_1))
  2038. class4.MoveTo(class4.int_3, class4.int_4 + 5);
  2039. }
  2040. }
  2041. else
  2042. {
  2043. class4.MoveTo(class4.int_3, class4.int_4 + 1);
  2044. class4.MoveTo(class4.int_3, class4.int_4 + 2);
  2045. class4.MoveTo(class4.int_3, class4.int_4 + 3);
  2046. class4.MoveTo(class4.int_3, class4.int_4 + 4);
  2047. class4.MoveTo(class4.int_3, class4.int_4 + 5);
  2048. }
  2049. }
  2050. if (a == "left")
  2051. {
  2052. if (ServerConfiguration.PreventDoorPush)
  2053. {
  2054. if (Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  2055. {
  2056. class4.MoveTo(class4.int_3 - 1, class4.int_4);
  2057. class4.MoveTo(class4.int_3 - 2, class4.int_4);
  2058. class4.MoveTo(class4.int_3 - 3, class4.int_4);
  2059. class4.MoveTo(class4.int_3 - 4, class4.int_4);
  2060. class4.MoveTo(class4.int_3 - 5, class4.int_4);
  2061. }
  2062. else
  2063. {
  2064. if (!(class4.int_3 - 1 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  2065. class4.MoveTo(class4.int_3 - 1, class4.int_4);
  2066. if (!(class4.int_3 - 2 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  2067. class4.MoveTo(class4.int_3 - 2, class4.int_4);
  2068. if (!(class4.int_3 - 3 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  2069. class4.MoveTo(class4.int_3 - 3, class4.int_4);
  2070. if (!(class4.int_3 - 4 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  2071. class4.MoveTo(class4.int_3 - 4, class4.int_4);
  2072. if (!(class4.int_3 - 5 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1))
  2073. class4.MoveTo(class4.int_3 - 5, class4.int_4);
  2074. }
  2075. }
  2076. else
  2077. {
  2078. class4.MoveTo(class4.int_3 - 1, class4.int_4);
  2079. class4.MoveTo(class4.int_3 - 2, class4.int_4);
  2080. class4.MoveTo(class4.int_3 - 3, class4.int_4);
  2081. class4.MoveTo(class4.int_3 - 4, class4.int_4);
  2082. class4.MoveTo(class4.int_3 - 5, class4.int_4);
  2083. }
  2084. }
  2085. }
  2086. return true;
  2087. }
  2088. catch
  2089. {
  2090. return false;
  2091. }
  2092. default:
  2093. switch (num)
  2094. {
  2095. case 67:
  2096. {
  2097. string text7 = "Your Commands:\r\r";
  2098. if (Session.GetHabbo().HasFuse("cmd_update_settings"))
  2099. {
  2100. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_settings_desc") + "\r\r";
  2101. }
  2102. if (Session.GetHabbo().HasFuse("cmd_update_bans"))
  2103. {
  2104. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_bans_desc") + "\r\r";
  2105. }
  2106. if (Session.GetHabbo().HasFuse("cmd_update_permissions"))
  2107. {
  2108. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_permissions_desc") + "\r\r";
  2109. }
  2110. if (Session.GetHabbo().HasFuse("cmd_update_filter"))
  2111. {
  2112. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_filter_desc") + "\r\r";
  2113. }
  2114. if (Session.GetHabbo().HasFuse("cmd_update_bots"))
  2115. {
  2116. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_bots_desc") + "\r\r";
  2117. }
  2118. if (Session.GetHabbo().HasFuse("cmd_update_catalogue"))
  2119. {
  2120. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_catalogue_desc") + "\r\r";
  2121. }
  2122. if (Session.GetHabbo().HasFuse("cmd_update_items"))
  2123. {
  2124. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_items_desc") + "\r\r";
  2125. }
  2126. if (Session.GetHabbo().HasFuse("cmd_update_navigator"))
  2127. {
  2128. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_navigator_desc") + "\r\r";
  2129. }
  2130. if (Session.GetHabbo().HasFuse("cmd_update_achievements"))
  2131. {
  2132. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_achievements_desc") + "\r\r";
  2133. }
  2134. if (Session.GetHabbo().HasFuse("cmd_award"))
  2135. {
  2136. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_award_desc") + "\r\r";
  2137. }
  2138. if (Session.GetHabbo().HasFuse("cmd_coords"))
  2139. {
  2140. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_coords_desc") + "\r\r";
  2141. }
  2142. if (Session.GetHabbo().HasFuse("cmd_override"))
  2143. {
  2144. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_override_desc") + "\r\r";
  2145. }
  2146. if (Session.GetHabbo().HasFuse("cmd_teleport"))
  2147. {
  2148. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_teleport_desc") + "\r\r";
  2149. }
  2150. if (Session.GetHabbo().HasFuse("cmd_coins"))
  2151. {
  2152. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_coins_desc") + "\r\r";
  2153. }
  2154. if (Session.GetHabbo().HasFuse("cmd_pixels"))
  2155. {
  2156. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_pixels_desc") + "\r\r";
  2157. }
  2158. if (Session.GetHabbo().HasFuse("cmd_points"))
  2159. {
  2160. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_points_desc") + "\r\r";
  2161. }
  2162. if (Session.GetHabbo().HasFuse("cmd_alert"))
  2163. {
  2164. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_alert_desc") + "\r\r";
  2165. }
  2166. if (Session.GetHabbo().HasFuse("cmd_motd"))
  2167. {
  2168. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_motd_desc") + "\r\r";
  2169. }
  2170. if (Session.GetHabbo().HasFuse("cmd_roomalert"))
  2171. {
  2172. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_roomalert_desc") + "\r\r";
  2173. }
  2174. if (Session.GetHabbo().HasFuse("cmd_ha"))
  2175. {
  2176. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_ha_desc") + "\r\r";
  2177. }
  2178. if (Session.GetHabbo().HasFuse("cmd_hal"))
  2179. {
  2180. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_hal_desc") + "\r\r";
  2181. }
  2182. if (Session.GetHabbo().HasFuse("cmd_freeze"))
  2183. {
  2184. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_freeze_desc") + "\r\r";
  2185. }
  2186. if (Session.GetHabbo().HasFuse("cmd_enable"))
  2187. {
  2188. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_enable_desc") + "\r\r";
  2189. }
  2190. if (Session.GetHabbo().HasFuse("cmd_roommute"))
  2191. {
  2192. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_roommute_desc") + "\r\r";
  2193. }
  2194. if (Session.GetHabbo().HasFuse("cmd_setspeed"))
  2195. {
  2196. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_setspeed_desc") + "\r\r";
  2197. }
  2198. if (Session.GetHabbo().HasFuse("cmd_globalcredits"))
  2199. {
  2200. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_globalcredits_desc") + "\r\r";
  2201. }
  2202. if (Session.GetHabbo().HasFuse("cmd_globalpixels"))
  2203. {
  2204. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_globalpixels_desc") + "\r\r";
  2205. }
  2206. if (Session.GetHabbo().HasFuse("cmd_globalpoints"))
  2207. {
  2208. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_globalpoints_desc") + "\r\r";
  2209. }
  2210. if (Session.GetHabbo().HasFuse("cmd_masscredits"))
  2211. {
  2212. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_masscredits_desc") + "\r\r";
  2213. }
  2214. if (Session.GetHabbo().HasFuse("cmd_masspixels"))
  2215. {
  2216. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_masspixels_desc") + "\r\r";
  2217. }
  2218. if (Session.GetHabbo().HasFuse("cmd_masspoints"))
  2219. {
  2220. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_masspoints_desc") + "\r\r";
  2221. }
  2222. if (Session.GetHabbo().HasFuse("cmd_givebadge"))
  2223. {
  2224. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_givebadge_desc") + "\r\r";
  2225. }
  2226. if (Session.GetHabbo().HasFuse("cmd_removebadge"))
  2227. {
  2228. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_removebadge_desc") + "\r\r";
  2229. }
  2230. if (Session.GetHabbo().HasFuse("cmd_summon"))
  2231. {
  2232. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_summon_desc") + "\r\r";
  2233. }
  2234. if (Session.GetHabbo().HasFuse("cmd_roombadge"))
  2235. {
  2236. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_roombadge_desc") + "\r\r";
  2237. }
  2238. if (Session.GetHabbo().HasFuse("cmd_massbadge"))
  2239. {
  2240. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_massbadge_desc") + "\r\r";
  2241. }
  2242. if (Session.GetHabbo().HasFuse("cmd_userinfo"))
  2243. {
  2244. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_userinfo_desc") + "\r\r";
  2245. }
  2246. if (Session.GetHabbo().HasFuse("cmd_shutdown"))
  2247. {
  2248. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_shutdown_desc") + "\r\r";
  2249. }
  2250. if (Session.GetHabbo().HasFuse("cmd_invisible"))
  2251. {
  2252. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_invisible_desc") + "\r\r";
  2253. }
  2254. if (Session.GetHabbo().HasFuse("cmd_ban"))
  2255. {
  2256. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_ban_desc") + "\r\r";
  2257. }
  2258. if (Session.GetHabbo().HasFuse("cmd_superban"))
  2259. {
  2260. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_superban_desc") + "\r\r";
  2261. }
  2262. if (Session.GetHabbo().HasFuse("cmd_ipban"))
  2263. {
  2264. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_ipban_desc") + "\r\r";
  2265. }
  2266. if (Session.GetHabbo().HasFuse("cmd_kick"))
  2267. {
  2268. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_kick_desc") + "\r\r";
  2269. }
  2270. if (Session.GetHabbo().HasFuse("cmd_roomkick"))
  2271. {
  2272. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_roomkick_desc") + "\r\r";
  2273. }
  2274. if (Session.GetHabbo().HasFuse("cmd_mute"))
  2275. {
  2276. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_mute_desc") + "\r\r";
  2277. }
  2278. if (Session.GetHabbo().HasFuse("cmd_unmute"))
  2279. {
  2280. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_unmute_desc") + "\r\r";
  2281. }
  2282. if (Session.GetHabbo().HasFuse("cmd_sa"))
  2283. {
  2284. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_sa_desc") + "\r\r";
  2285. }
  2286. if (Session.GetHabbo().HasFuse("cmd_spull"))
  2287. {
  2288. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_spull_desc") + "\r\r";
  2289. }
  2290. if (Session.GetHabbo().HasFuse("cmd_empty"))
  2291. {
  2292. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_empty_desc") + "\r\r";
  2293. }
  2294. if (Session.GetHabbo().HasFuse("cmd_update_texts"))
  2295. {
  2296. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_update_texts_desc") + "\r\r";
  2297. }
  2298. if (Session.GetHabbo().HasFuse("cmd_dance"))
  2299. {
  2300. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_dance_desc") + "\r\r";
  2301. }
  2302. if (Session.GetHabbo().HasFuse("cmd_rave"))
  2303. {
  2304. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_rave_desc") + "\r\r";
  2305. }
  2306. if (Session.GetHabbo().HasFuse("cmd_roll"))
  2307. {
  2308. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_roll_desc") + "\r\r";
  2309. }
  2310. if (Session.GetHabbo().HasFuse("cmd_control"))
  2311. {
  2312. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_control_desc") + "\r\r";
  2313. }
  2314. if (Session.GetHabbo().HasFuse("cmd_makesay"))
  2315. {
  2316. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_makesay_desc") + "\r\r";
  2317. }
  2318. if (Session.GetHabbo().HasFuse("cmd_sitdown"))
  2319. {
  2320. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_sitdown_desc") + "\r\r";
  2321. }
  2322. if (Session.GetHabbo().HasFuse("cmd_lay"))
  2323. {
  2324. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_lay_desc") + "\r\r";
  2325. }
  2326. if (Session.GetHabbo().HasFuse("cmd_startquestion"))
  2327. {
  2328. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_startquestion_desc") + "\r\r";
  2329. }
  2330. if (Session.GetHabbo().HasFuse("cmd_handitem"))
  2331. {
  2332. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_handitem_desc") + "\r\r";
  2333. }
  2334. if (Session.GetHabbo().HasFuse("cmd_vipha"))
  2335. {
  2336. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_vipha_desc") + "\r\r";
  2337. }
  2338. if (Session.GetHabbo().HasFuse("cmd_spush"))
  2339. {
  2340. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_spush_desc") + "\r\r";
  2341. }
  2342. if (Session.GetHabbo().HasFuse("cmd_roomeffect"))
  2343. {
  2344. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_roomeffect_desc") + "\r\r";
  2345. }
  2346. if (Session.GetHabbo().IsVIP)
  2347. {
  2348. if (ServerConfiguration.UnknownBoolean8 || Session.GetHabbo().HasFuse("cmd_moonwalk"))
  2349. {
  2350. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_moonwalk_desc") + "\r\r";
  2351. }
  2352. if (ServerConfiguration.UnknownBoolean7 || Session.GetHabbo().HasFuse("cmd_mimi"))
  2353. {
  2354. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_mimic_desc") + "\r\r";
  2355. }
  2356. if (ServerConfiguration.UnknownBoolean9 || Session.GetHabbo().HasFuse("cmd_follow"))
  2357. {
  2358. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_follow_desc") + "\r\r";
  2359. }
  2360. if (ServerConfiguration.UnknownBoolean1 || Session.GetHabbo().HasFuse("cmd_push"))
  2361. {
  2362. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_push_desc") + "\r\r";
  2363. }
  2364. if (ServerConfiguration.UnknownBoolean2 || Session.GetHabbo().HasFuse("cmd_pull"))
  2365. {
  2366. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_pull_desc") + "\r\r";
  2367. }
  2368. if (ServerConfiguration.UnknownBoolean3 || Session.GetHabbo().HasFuse("cmd_flagme"))
  2369. {
  2370. text7 = text7 + GoldTreeEnvironment.GetExternalText("cmd_flagme_desc") + "\r\r";
  2371. }
  2372. }
  2373. string text8 = "";
  2374. if (ServerConfiguration.EnableRedeemCredits)
  2375. {
  2376. text8 = text8 + GoldTreeEnvironment.GetExternalText("cmd_redeemcreds_desc") + "\r\r";
  2377. }
  2378. string text9 = "";
  2379. if (ServerConfiguration.EnableRedeemPixels)
  2380. {
  2381. text9 = text9 + GoldTreeEnvironment.GetExternalText("cmd_redeempixel_desc") + "\r\r";
  2382. }
  2383. string redeemshell = "";
  2384. if (ServerConfiguration.EnableRedeemShells)
  2385. {
  2386. redeemshell = redeemshell + GoldTreeEnvironment.GetExternalText("cmd_redeemshell_desc") + "\r\r";
  2387. }
  2388. string text11 = text7;
  2389. text7 = string.Concat(new string[]
  2390. {
  2391. text11,
  2392. "- - - - - - - - - - - \r\r",
  2393. GoldTreeEnvironment.GetExternalText("cmd_about_desc"),
  2394. "\r\r",
  2395. GoldTreeEnvironment.GetExternalText("cmd_pickall_desc"),
  2396. "\r\r",
  2397. GoldTreeEnvironment.GetExternalText("cmd_unload_desc"),
  2398. "\r\r",
  2399. GoldTreeEnvironment.GetExternalText("cmd_disablediagonal_desc"),
  2400. "\r\r",
  2401. GoldTreeEnvironment.GetExternalText("cmd_setmax_desc"),
  2402. "\r\r",
  2403. text8,
  2404. text9,
  2405. redeemshell,
  2406. GoldTreeEnvironment.GetExternalText("cmd_ride_desc"),
  2407. "\r\r",
  2408. GoldTreeEnvironment.GetExternalText("cmd_buy_desc"),
  2409. "\r\r",
  2410. GoldTreeEnvironment.GetExternalText("cmd_emptypets_desc"),
  2411. "\r\r",
  2412. GoldTreeEnvironment.GetExternalText("cmd_emptyitems_desc")
  2413. });
  2414. Session.SendNotification(text7, 2);
  2415. return true;
  2416. }
  2417. case 68:
  2418. goto IL_2F05;
  2419. case 69:
  2420. {
  2421. StringBuilder stringBuilder2 = new StringBuilder();
  2422. for (int i = 0; i < Session.GetHabbo().CurrentRoom.RoomUsers.Length; i++)
  2423. {
  2424. class6 = Session.GetHabbo().CurrentRoom.RoomUsers[i];
  2425. if (class6 != null)
  2426. {
  2427. stringBuilder2.Append(string.Concat(new object[]
  2428. {
  2429. "UserID: ",
  2430. class6.UId,
  2431. " RoomUID: ",
  2432. class6.int_20,
  2433. " VirtualID: ",
  2434. class6.VirtualId,
  2435. " IsBot:",
  2436. class6.IsBot.ToString(),
  2437. " X: ",
  2438. class6.int_3,
  2439. " Y: ",
  2440. class6.int_4,
  2441. " Z: ",
  2442. class6.double_0,
  2443. " \r\r"
  2444. }));
  2445. }
  2446. }
  2447. Session.SendNotification(stringBuilder2.ToString());
  2448. Session.SendNotification("RoomID: " + Session.GetHabbo().CurrentRoomId);
  2449. return true;
  2450. }
  2451. case 70:
  2452. {
  2453. return false;
  2454. }
  2455. case 71:
  2456. if (Session.GetHabbo().IsJuniori || Session.GetHabbo().HasFuse("cmd_dance"))
  2457. {
  2458. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2459. GameClient class10 = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  2460. RoomUser class3 = class2.GetRoomUserByHabbo(class10.GetHabbo().Id);
  2461. class3.DanceId = 1;
  2462. ServerMessage Message6 = new ServerMessage(480u);
  2463. Message6.AppendInt32(class3.VirtualId);
  2464. Message6.AppendInt32(1);
  2465. class2.SendMessage(Message6, null);
  2466. return true;
  2467. }
  2468. return false;
  2469. case 72:
  2470. if (Session.GetHabbo().IsJuniori || Session.GetHabbo().HasFuse("cmd_rave"))
  2471. {
  2472. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2473. class2.Rave();
  2474. return true;
  2475. }
  2476. return false;
  2477. case 73:
  2478. if (Session.GetHabbo().IsJuniori || Session.GetHabbo().HasFuse("cmd_roll"))
  2479. {
  2480. GameClient class10 = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
  2481. class10.GetHabbo().int_1 = (int)Convert.ToInt16(Params[2]);
  2482. return true;
  2483. }
  2484. return false;
  2485. case 74:
  2486. if (Session.GetHabbo().IsJuniori || Session.GetHabbo().HasFuse("cmd_control"))
  2487. {
  2488. string text = Params[1];
  2489. try
  2490. {
  2491. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  2492. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2493. if (Session == null || TargetClient == null)
  2494. {
  2495. return false;
  2496. }
  2497. RoomUser class4 = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
  2498. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2499. class6.RoomUser_0 = class4;
  2500. }
  2501. catch
  2502. {
  2503. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2504. if (Session == null || TargetClient == null)
  2505. {
  2506. return false;
  2507. }
  2508. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2509. class6.RoomUser_0 = null;
  2510. }
  2511. return true;
  2512. }
  2513. return false;
  2514. case 75:
  2515. {
  2516. if (Session.GetHabbo().IsJuniori || Session.GetHabbo().HasFuse("cmd_makesay"))
  2517. {
  2518. string text2 = Params[1];
  2519. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text2);
  2520. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2521. if (Session == null || TargetClient == null)
  2522. {
  2523. return false;
  2524. }
  2525. RoomUser roomUser = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
  2526. roomUser.HandleSpeech(TargetClient, Input.Substring(9 + text2.Length), false);
  2527. return true;
  2528. }
  2529. return false;
  2530. }
  2531. case 76:
  2532. if (Session.GetHabbo().IsJuniori || Session.GetHabbo().HasFuse("cmd_sitdown"))
  2533. {
  2534. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2535. class2.method_55();
  2536. return true;
  2537. }
  2538. return false;
  2539. case 77:
  2540. {
  2541. return false;
  2542. }
  2543. case 78:
  2544. goto IL_3F91;
  2545. case 79:
  2546. {
  2547. if (!Session.GetHabbo().InRoom)
  2548. {
  2549. return false;
  2550. }
  2551. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2552. int int_2 = class2.method_56(Session.GetHabbo().Username).CarryItemID;
  2553. if (int_2 <= 0)
  2554. {
  2555. Session.GetHabbo().Whisper("You're not holding anything, pick something up first!");
  2556. return true;
  2557. }
  2558. string text = Params[1];
  2559. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  2560. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2561. RoomUser class4 = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
  2562. if (Session == null || TargetClient == null)
  2563. {
  2564. return false;
  2565. }
  2566. if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
  2567. {
  2568. return true;
  2569. }
  2570. if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId && Math.Abs(class6.int_3 - class4.int_3) < 3 && Math.Abs(class6.int_4 - class4.int_4) < 3)
  2571. {
  2572. try
  2573. {
  2574. class2.method_56(Params[1]).CarryItem(int_2);
  2575. class2.method_56(Session.GetHabbo().Username).CarryItem(0);
  2576. }
  2577. catch
  2578. {
  2579. }
  2580. return true;
  2581. }
  2582. Session.GetHabbo().Whisper("You are too far away from " + Params[1] + ", try getting closer");
  2583. return true;
  2584. }
  2585. case 80:
  2586. if (!Session.GetHabbo().InRoom)
  2587. {
  2588. return false;
  2589. }
  2590. class6 = Session.GetHabbo().CurrentRoom.method_56(Session.GetHabbo().Username);
  2591. if (class6.Statusses.ContainsKey("sit") || class6.Statusses.ContainsKey("lay") || class6.int_8 == 1 || class6.int_8 == 3 || class6.int_8 == 5 || class6.int_8 == 7)
  2592. {
  2593. return true;
  2594. }
  2595. if (class6.byte_1 > 0 || class6.class34_1 != null)
  2596. {
  2597. return true;
  2598. }
  2599. class6.AddStatus("sit", ((class6.double_0 + 1.0) / 2.0 - class6.double_0 * 0.5).ToString().Replace(",", "."));
  2600. class6.UpdateNeeded = true;
  2601. return true;
  2602. case 81:
  2603. case 82:
  2604. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2605. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2606. if (class6.class34_1 != null)
  2607. {
  2608. Session.GetHabbo().GetEffectsInventoryComponent().method_2(-1, true);
  2609. class6.class34_1.RoomUser_0 = null;
  2610. class6.class34_1 = null;
  2611. class6.double_0 -= 1.0;
  2612. class6.Statusses.Clear();
  2613. class6.UpdateNeeded = true;
  2614. int int_3 = GoldTree.smethod_5(0, class2.RoomModel.int_4);
  2615. int int_4 = GoldTree.smethod_5(0, class2.RoomModel.int_5);
  2616. class6.RoomUser_0.MoveTo(int_3, int_4);
  2617. class6.RoomUser_0 = null;
  2618. class2.method_87(class6, false, false);
  2619. }
  2620. return true;
  2621. case 83:
  2622. Session.GetHabbo().GetInventoryComponent().RemovePetsFromInventory();
  2623. Session.SendNotification(GoldTreeEnvironment.GetExternalText("cmd_emptypets_success"));
  2624. GoldTree.GetGame().GetClientManager().method_31(Session, Params[0].ToLower(), Input);
  2625. return true;
  2626. case 85:
  2627. if (!Session.GetHabbo().HasFuse("cmd_handitem"))
  2628. {
  2629. return false;
  2630. }
  2631. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2632. if (class2 == null)
  2633. {
  2634. return false;
  2635. }
  2636. class2.method_56(Session.GetHabbo().Username).CarryItem(int.Parse(Params[1]));
  2637. return true;
  2638. case 86:
  2639. {
  2640. if (!Session.GetHabbo().HasFuse("cmd_lay"))
  2641. {
  2642. return false;
  2643. }
  2644. Room currentRoom = Session.GetHabbo().CurrentRoom;
  2645. if (currentRoom == null)
  2646. {
  2647. return false;
  2648. }
  2649. RoomUser roomUserByHabbo2 = currentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2650. if (roomUserByHabbo2 == null)
  2651. {
  2652. return false;
  2653. }
  2654. if (!roomUserByHabbo2.Statusses.ContainsKey("lay"))
  2655. {
  2656. if (roomUserByHabbo2.int_8 % 2 == 0)
  2657. {
  2658. roomUserByHabbo2.Statusses.Add("lay", Convert.ToString((double)Session.GetHabbo().CurrentRoom.Byte_0[roomUserByHabbo2.int_3, roomUserByHabbo2.int_4] + 0.55).ToString().Replace(",", "."));
  2659. roomUserByHabbo2.UpdateNeeded = true;
  2660. }
  2661. else
  2662. {
  2663. Session.GetHabbo().Whisper("You cant lay if you are diagonal!");
  2664. }
  2665. }
  2666. else
  2667. {
  2668. roomUserByHabbo2.Statusses.Remove("lay");
  2669. roomUserByHabbo2.UpdateNeeded = true;
  2670. }
  2671. return true;
  2672. }
  2673. /*case 93:
  2674. // V3.11.0
  2675. // R63
  2676. // OS: Any?
  2677. // PURPOSE: Run retros
  2678. // XD
  2679. return true;*/
  2680. case 94:
  2681. if (Session.GetHabbo().HasFuse("cmd_startquestion"))
  2682. {
  2683. if (Params[1] != null)
  2684. {
  2685. Room Room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2686. DataTable Data = null;
  2687. int QuestionId = int.Parse(Params[1]);
  2688. Room.CurrentPollId = QuestionId;
  2689. string Question;
  2690.  
  2691. using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
  2692. {
  2693. Question = dbClient.ReadString("SELECT question FROM infobus_questions WHERE id = '" + QuestionId + "' LIMIT 1");
  2694. Data = dbClient.ReadDataTable("SELECT * FROM infobus_answers WHERE question_id = '" + QuestionId + "'");
  2695. }
  2696.  
  2697. ServerMessage InfobusQuestion = new ServerMessage(79);
  2698. InfobusQuestion.AppendStringWithBreak(Question);
  2699. InfobusQuestion.AppendInt32(Data.Rows.Count);
  2700. if (Data != null)
  2701. {
  2702. foreach (DataRow Row in Data.Rows)
  2703. {
  2704. InfobusQuestion.AppendInt32((int)Row["id"]);
  2705. InfobusQuestion.AppendStringWithBreak((string)Row["answer_text"]);
  2706. }
  2707. }
  2708. Room.SendMessage(InfobusQuestion, null);
  2709.  
  2710. Thread Infobus = new Thread(delegate() { Room.ShowResults(Room, QuestionId, Session); });
  2711. Infobus.Start();
  2712. return true;
  2713. }
  2714. }
  2715. return false;
  2716. case 95:
  2717. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2718. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2719. if (class6.Boolean_3)
  2720. {
  2721. Session.GetHabbo().Whisper("Command unavailable while trading!");
  2722. return true;
  2723. }
  2724. if (ServerConfiguration.EnableRedeemPixels)
  2725. {
  2726. Session.GetHabbo().GetInventoryComponent().RedeemPixel(Session);
  2727. }
  2728. else
  2729. {
  2730. Session.GetHabbo().Whisper(GoldTree.smethod_1("cmd_error_disabled"));
  2731. }
  2732. return true;
  2733. case 96:
  2734. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2735. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2736. if (class6.Boolean_3)
  2737. {
  2738. Session.GetHabbo().Whisper("Command unavailable while trading!");
  2739. return true;
  2740. }
  2741. if (ServerConfiguration.EnableRedeemShells)
  2742. {
  2743. Session.GetHabbo().GetInventoryComponent().RedeemShell(Session);
  2744. }
  2745. else
  2746. {
  2747. Session.GetHabbo().Whisper(GoldTree.smethod_1("cmd_error_disabled"));
  2748. }
  2749. return true;
  2750. default:
  2751. goto IL_3F91;
  2752. }
  2753. }
  2754. try
  2755. {
  2756. if (!(ServerConfiguration.UnknownBoolean1 || Session.GetHabbo().HasFuse("cmd_push")))
  2757. {
  2758. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_disabled"));
  2759. return true;
  2760. }
  2761. if (!(Session.GetHabbo().IsVIP || Session.GetHabbo().HasFuse("cmd_push")))
  2762. {
  2763. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_permission_vip"));
  2764. return true;
  2765. }
  2766. string a = "down";
  2767. string text = Params[1];
  2768. TargetClient = GoldTree.GetGame().GetClientManager().GetClientByHabbo(text);
  2769. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2770. if (Session == null || TargetClient == null)
  2771. {
  2772. return false;
  2773. }
  2774. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2775. RoomUser class4 = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
  2776. if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
  2777. {
  2778. Session.GetHabbo().Whisper("It can't be that bad mate, no need to push yourself!");
  2779. return true;
  2780. }
  2781. bool arg_3DD2_0;
  2782. if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId)
  2783. {
  2784. if ((class6.int_3 + 1 != class4.int_3 || class6.int_4 != class4.int_4) && (class6.int_3 - 1 != class4.int_3 || class6.int_4 != class4.int_4) && (class6.int_4 + 1 != class4.int_4 || class6.int_3 != class4.int_3))
  2785. {
  2786. if (class6.int_4 - 1 == class4.int_4)
  2787. {
  2788. if (class6.int_3 == class4.int_3)
  2789. {
  2790. goto IL_3DA6;
  2791. }
  2792. }
  2793. arg_3DD2_0 = (class6.int_3 != class4.int_3 || class6.int_4 != class4.int_4);
  2794. goto IL_3DD2;
  2795. }
  2796. IL_3DA6:
  2797. arg_3DD2_0 = false;
  2798. }
  2799. else
  2800. {
  2801. arg_3DD2_0 = true;
  2802. }
  2803. IL_3DD2:
  2804. if (!arg_3DD2_0)
  2805. {
  2806. class6.HandleSpeech(Session, "*pushes " + TargetClient.GetHabbo().Username + "*", false);
  2807. if (class6.int_8 == 0)
  2808. {
  2809. a = "up";
  2810. }
  2811. if (class6.int_8 == 2)
  2812. {
  2813. a = "right";
  2814. }
  2815. if (class6.int_8 == 4)
  2816. {
  2817. a = "down";
  2818. }
  2819. if (class6.int_8 == 6)
  2820. {
  2821. a = "left";
  2822. }
  2823. if (a == "up")
  2824. {
  2825. if (ServerConfiguration.PreventDoorPush)
  2826. {
  2827. if ((!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 - 1 == class2.RoomModel.int_1)) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  2828. {
  2829. class4.MoveTo(class4.int_3, class4.int_4 - 1);
  2830. }
  2831. }
  2832. else
  2833. {
  2834. class4.MoveTo(class4.int_3, class4.int_4 - 1);
  2835. }
  2836. }
  2837. if (a == "right")
  2838. {
  2839. if (ServerConfiguration.PreventDoorPush)
  2840. {
  2841. if (!(class4.int_3 + 1 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  2842. class4.MoveTo(class4.int_3 + 1, class4.int_4);
  2843. }
  2844. else
  2845. {
  2846. class4.MoveTo(class4.int_3 + 1, class4.int_4);
  2847. }
  2848. }
  2849. if (a == "down")
  2850. {
  2851. if (ServerConfiguration.PreventDoorPush)
  2852. {
  2853. if (!(class4.int_3 == class2.RoomModel.int_0 && class4.int_4 + 1 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  2854. class4.MoveTo(class4.int_3, class4.int_4 + 1);
  2855. }
  2856. else
  2857. {
  2858. class4.MoveTo(class4.int_3, class4.int_4 + 1);
  2859. }
  2860. }
  2861. if (a == "left")
  2862. {
  2863. if (ServerConfiguration.PreventDoorPush)
  2864. {
  2865. if (!(class4.int_3 - 1 == class2.RoomModel.int_0 && class4.int_4 == class2.RoomModel.int_1) || Session.GetHabbo().HasFuse("acc_moveotheruserstodoor"))
  2866. class4.MoveTo(class4.int_3 - 1, class4.int_4);
  2867. }
  2868. else
  2869. {
  2870. class4.MoveTo(class4.int_3 - 1, class4.int_4);
  2871. }
  2872. }
  2873. }
  2874. return true;
  2875. }
  2876. catch
  2877. {
  2878. return false;
  2879. }
  2880. IL_3F03:
  2881. class2 = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
  2882. class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
  2883. if (class6.Boolean_3)
  2884. {
  2885. Session.GetHabbo().Whisper("Command unavailable while trading");
  2886. return true;
  2887. }
  2888. if (ServerConfiguration.EnableRedeemCredits)
  2889. {
  2890. Session.GetHabbo().GetInventoryComponent().ConvertCoinsToCredits();
  2891. }
  2892. else
  2893. {
  2894. Session.GetHabbo().Whisper(GoldTreeEnvironment.GetExternalText("cmd_error_disabled"));
  2895. }
  2896. return true;
  2897. }
  2898. }
  2899. }
  2900. IL_2F05:
  2901. DateTime now = DateTime.Now;
  2902. TimeSpan timeSpan = now - GoldTree.ServerStarted;
  2903.  
  2904. int clients = GoldTree.GetGame().GetClientManager().ClientCount;
  2905. int rooms = GoldTree.GetGame().GetRoomManager().LoadedRoomsCount;
  2906.  
  2907. string text10 = "";
  2908.  
  2909. if (ServerConfiguration.ShowUsersAndRoomsInAbout)
  2910. {
  2911. text10 = string.Concat(new object[]
  2912. {
  2913. "\nUsers Online: ",
  2914. clients,
  2915. "\nRooms Loaded: ",
  2916. rooms
  2917. });
  2918. }
  2919. Session.method_10(string.Concat(new object[]
  2920. {
  2921. "Gold Tree Emulator 3.0\n\nThanks/Credits;\nJuniori [Project Leader] \nBustanity [Code cleanup]\nSojobo [Phoenix Emu]\nMatty [Phoenix Emu]\nRoy [Uber Emu]\n\n",
  2922. GoldTree.PrettyVersion,
  2923. "\nUptime: ",
  2924. timeSpan.Days,
  2925. " days, ",
  2926. timeSpan.Hours,
  2927. " hours and ",
  2928. timeSpan.Minutes,
  2929. " minutes",
  2930. text10,
  2931. }), "");
  2932. return true;
  2933. IL_3F91: ;
  2934. }
  2935. catch
  2936. {
  2937. }
  2938. return false;
  2939. }
  2940. }
  2941. public static string MergeParams(string[] Params, int Start)
  2942. {
  2943. StringBuilder stringBuilder = new StringBuilder();
  2944. for (int i = 0; i < Params.Length; i++)
  2945. {
  2946. if (i >= Start)
  2947. {
  2948. if (i > Start)
  2949. {
  2950. stringBuilder.Append(" ");
  2951. }
  2952. stringBuilder.Append(Params[i]);
  2953. }
  2954. }
  2955. return stringBuilder.ToString();
  2956. }
  2957. }
  2958. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement