Advertisement
Guest User

Untitled

a guest
May 4th, 2017
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Text;
  4. using System.Collections.Generic;
  5. using Plus.Communication.Packets.Outgoing.Nux;
  6. using Plus.Communication.Packets.Outgoing;
  7. using Plus.Communication.Packets.Outgoing.Inventory.Purse;
  8. using System.Data;
  9. using Plus.HabboHotel.Rooms.AI.Speech;
  10. using Plus.HabboHotel.Rooms;
  11. using Plus.HabboHotel.Rooms.AI;
  12.  
  13. namespace Plus.Communication.Packets.Incoming.Nux
  14. {
  15. class RoomNuxAlertEvent : IPacketEvent
  16. {
  17. public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
  18. {
  19. var habbo = Session.GetHabbo();
  20.  
  21. if (habbo == null)
  22. return;
  23.  
  24. if (!habbo.PassedNuxNavigator && !habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
  25. {
  26. Session.SendPacket(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_NAVIGATOR/" + PlusEnvironment.GetGame().GetLanguageLocale().TryGetValue("phrase_1_tutoriel").Replace("%nomduretro%", PlusEnvironment.GetGame().GetLanguageLocale().TryGetValue("hotelname")) + ""));
  27. habbo.PassedNuxNavigator = true;
  28. }
  29.  
  30. if (habbo.PassedNuxNavigator && !habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
  31. {
  32. Session.SendPacket(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_CATALOG/" + PlusEnvironment.GetGame().GetLanguageLocale().TryGetValue("phrase_2_tutoriel").Replace("%nomduretro%", PlusEnvironment.GetGame().GetLanguageLocale().TryGetValue("hotelname")) + ""));
  33. habbo.PassedNuxCatalog = true;
  34. }
  35. else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && !habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
  36. {
  37. Session.SendPacket(new NuxAlertComposer("helpBubble/add/CHAT_INPUT/" + PlusEnvironment.GetGame().GetLanguageLocale().TryGetValue("phrase_3_tutoriel") + ""));
  38. habbo.PassedNuxChat = true;
  39. }
  40. else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && !habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
  41. {
  42. Session.SendPacket(new NuxAlertComposer("helpBubble/add/DUCKETS_BUTTON/" + PlusEnvironment.GetGame().GetLanguageLocale().TryGetValue("phrase_4_tutoriel") + ""));
  43. habbo.PassedNuxDuckets = true;
  44. }
  45. else if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && habbo.PassedNuxDuckets && !habbo.PassedNuxItems)
  46. {
  47. Session.SendPacket(new NuxAlertComposer("helpBubble/add/BOTTOM_BAR_INVENTORY/" + PlusEnvironment.GetGame().GetLanguageLocale().TryGetValue("phrase_5_tutoriel") + ""));
  48. habbo.PassedNuxItems = true;
  49. }
  50.  
  51. if (habbo.PassedNuxNavigator && habbo.PassedNuxCatalog && habbo.PassedNuxChat && habbo.PassedNuxDuckets && habbo.PassedNuxItems)
  52. {
  53. Session.SendPacket(new NuxAlertComposer("nux/lobbyoffer/show"));
  54. habbo.NewUser = false;
  55. using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
  56. dbClient.RunFastQuery("UPDATE users SET nux_user = 'false' WHERE id = " + Session.GetHabbo().Id + ";");
  57. var nuxStatus = new ServerPacket(ServerPacketHeader.NuxUserStatus);
  58. nuxStatus.WriteInteger(0);
  59. Session.SendPacket(nuxStatus);
  60.  
  61. }
  62. }
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement