anawestruckQeynosresident.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/anawestruckQeynosresident.lua
  3. Script Author : Rylec
  4. Script Date : 2021.01.23 01:01:55
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. local model = MakeRandomInt(1,2)
  10. if model == 1 then
  11. SetModelType(NPC, "132")
  12. SpawnSet(NPC, "soga_model_type", "132")
  13. SpawnSet(NPC, "chest_type", "5529")
  14. SpawnSet(NPC, "legs_type", "5530")
  15. else
  16. SetModelType(NPC, "134")
  17. SpawnSet(NPC, "soga_model_type", "134")
  18. SpawnSet(NPC, "chest_type", "5533")
  19. SpawnSet(NPC, "legs_type", "5534")
  20. end
  21. local hair = MakeRandomInt(1121,1140)
  22. SpawnSet(NPC, "hair_type", hair)
  23. SpawnSet(NPC, "soga_hair_type", hair)
  24. local beard = MakeRandomInt(1164,1191)
  25. SpawnSet(NPC, "facial_hair_type", beard)
  26. SetPlayerProximityFunction(NPC, 15, "InRange")
  27. end
  28. function hailed(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. local type = GetModelType(NPC)
  31. local voice = MakeRandomInt(1,3)
  32. if type == 132 then
  33. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1033.mp3", "", "", 0, 0, Spawn)
  34. else
  35. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1004.mp3", "", "", 0, 0, Spawn)
  36. end
  37. InRange(NPC)
  38. end
  39. function respawn(NPC)
  40. spawn(NPC)
  41. end
  42. function InRange(NPC)
  43. local say = MakeRandomInt(1,19)
  44. if say == 1 then
  45. PlayFlavor(NPC, "", "Look upon our great city! Threatened time and time again, but Qeynos still stands.", "yeah", 0, 0, Spawn)
  46. elseif say == 2 then
  47. PlayFlavor(NPC, "", "Luclin is whole again... I never thought I'd see such a thing.", "shrug", 0, 0, Spawn)
  48. elseif say == 3 then
  49. PlayFlavor(NPC, "", "Luclin shines so bright...", "nod", 0, 0, Spawn)
  50. elseif say == 4 then
  51. PlayFlavor(NPC, "", "If we can make Luclin whole, then there is nothing that Qeynos can't accomplish!", "sigh", 0, 0, Spawn)
  52. elseif say == 5 then
  53. PlayFlavor(NPC, "", "We must not doubt Queen Antonia. We owe much to her leadership!", "yeah", 0, 0, Spawn)
  54. elseif say == 6 then
  55. PlayFlavor(NPC, "", "The night sky is so different now, I love it!", "yeah", 0, 0, Spawn)
  56. elseif say == 7 then
  57. PlayFlavor(NPC, "", "See! We never needed Freeport's help! Queen Antonia can do it all on her own!", "agree", 0, 0, Spawn)
  58. elseif say == 8 then
  59. PlayFlavor(NPC, "", "I heard some have found a way to Luclin. It is a new beginning for us now!", "yeah", 0, 0, Spawn)
  60. elseif say == 9 then
  61. PlayFlavor(NPC, "", "Freeportians will learn the errors of their ways, one day.", "crazy", 0, 0, Spawn)
  62. elseif say == 10 then
  63. PlayFlavor(NPC, "", "Kerafyrm is still up there... trapped, but for how long?", "scared", 0, 0, Spawn)
  64. elseif say == 11 then
  65. PlayFlavor(NPC, "", "I can look up at Luclin and know I will never see Kerafyrm's shadow again.", "agree", 0, 0, Spawn)
  66. elseif say == 12 then
  67. PlayFlavor(NPC, "", "Luclin... it kind of looks like an egg now, doesn't it? I hope Kerafyrm cannot get free...", "shakefist", 0, 0, Spawn)
  68. elseif say == 13 then
  69. PlayFlavor(NPC, "", "Luclin is so beautiful... but it's terrifying to know what she harbors within.", "cringe", 0, 0, Spawn)
  70. elseif say == 14 then
  71. PlayFlavor(NPC, "", "May the gods continue to bless us.", "agree", 0, 0, Spawn)
  72. elseif say == 15 then
  73. PlayFlavor(NPC, "", "Even if the shissar found a way off Luclin, Queen Antonia wouldn't let any harm come to us.", "scream", 0, 0, Spawn)
  74. elseif say == 16 then
  75. PlayFlavor(NPC, "", "I know there are those who wish harm upon Qeynos, but I just feel sorry for them.", "sad", 0, 0, Spawn)
  76. elseif say == 17 then
  77. PlayFlavor(NPC, "", "We can all breathe a sigh of relief. Norrath now has a new friend in the sky, and she keeps us safe from Kerafyrm's wrath.", "yes", 0, 0, Spawn)
  78. elseif say == 18 then
  79. PlayFlavor(NPC, "", "Luclin represents an end to the war, an end to the Awakened. We must thank her.", "bow", 0, 0, Spawn)
  80. else
  81. PlayFlavor(NPC, "", "I heard some have found a way to Luclin. It is a new beginning for us now!", "yeah", 0, 0, Spawn)
  82. end
  83. end