KarrieClayton.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/KarrieClayton.lua
  3. Script Purpose : Karrie Clayton
  4. Script Author : Scatman
  5. Script Date : 2009.08.08
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local HailCheck = false
  10. function spawn(NPC)
  11. AddTimer(NPC, 5000, "EmoteLoop")
  12. AddTimer(NPC, 12000,"Swooning")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if GetFactionAmount(Spawn,11)<0 then
  20. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  21. else
  22. Dialog1(NPC, Spawn)
  23. end
  24. end
  25. function Dialog1(NPC, Spawn)
  26. HailCheck = true
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC, Spawn)
  29. Dialog.AddDialog("Oh my! Yet another overzealous admirer. Please wait till after the show for autographs.")
  30. Dialog.AddVoiceover("voiceover/english/karrie_clayton/qey_village01/karrieclayton.mp3", 1984155043, 1707628406)
  31. if GetQuestStep(Spawn,239)==1 then
  32. Dialog.AddOption("I've actually got a letter for you from your sister, Angelia.","Delivered")
  33. end
  34. Dialog.AddOption("I'm sorry. Excuse me for interrupting your performance. ")
  35. Dialog.Start()
  36. AddTimer(NPC,26000,"HailReset")
  37. end
  38. function Delivered(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. SetStepComplete(Spawn, 239, 1)
  42. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  43. Dialog.AddDialog("Oh, my loving sister worries about me! Her note says her performances in Starcrest are not going well. Now I feel guilty going home with such a full coin purse every night. Hmm, let me add a message to this note. You can bring it back to her!")
  44. Dialog.AddVoiceover("voiceover/english/karrie_clayton/qey_village01/karrieclayton000.mp3", 2793000860, 2260935074)
  45. Dialog.AddOption("I'll see Angelia get's your reply.")
  46. Dialog.Start()
  47. end
  48. function HailReset(NPC)
  49. HailCheck = false
  50. end
  51. function EmoteLoop(NPC)
  52. if HailCheck == true then
  53. AddTimer(NPC,26100,"EmoteLoop")
  54. else
  55. local emoteChoice = MakeRandomInt(1,4)
  56. if emoteChoice == 1 then
  57. -- flourish
  58. PlayAnimation(NPC, 11557)
  59. AddTimer(NPC, MakeRandomInt(21000), "EmoteLoop")
  60. elseif emoteChoice == 2 then
  61. -- kiss
  62. PlayAnimation(NPC, 11762)
  63. AddTimer(NPC, MakeRandomInt(5000,8000), "EmoteLoop")
  64. elseif emoteChoice == 3 then
  65. -- dance
  66. PlayAnimation(NPC, 11298)
  67. AddTimer(NPC, MakeRandomInt(10000,12000), "EmoteLoop")
  68. elseif emoteChoice == 4 then
  69. -- full curtsey
  70. PlayAnimation(NPC, 11633)
  71. AddTimer(NPC, MakeRandomInt(7000,8000), "EmoteLoop")
  72. end
  73. end
  74. end
  75. function Swooning(NPC,Spawn)
  76. local Logan = GetSpawn(NPC, 2330018)
  77. local Duncan = GetSpawn(NPC, 2330142)
  78. if HailCheck == false then --WATCHER RESPOSNES IF KIMBERLY IS PERFORMING
  79. if Logan ~= nil then
  80. FaceTarget(Logan,NPC)
  81. SetTarget(Logan,NPC)
  82. choice = math.random(1,3)
  83. if choice == 1 then
  84. PlayFlavor(Logan, "","", "flirt", 0, 0)
  85. elseif choice == 2 then
  86. PlayFlavor(Logan, "","", "cheer", 0, 0)
  87. elseif choice == 3 then
  88. PlayAnimation(Logan,13310)
  89. --PlayFlavor(Logan, "","", "woowoo", 0, 0)
  90. elseif choice == 4 then
  91. PlayFlavor(Logan, "","", "flex", 0, 0)
  92. end
  93. end
  94. if Duncan ~=nil then
  95. FaceTarget(Duncan,NPC)
  96. SetTarget(Duncan,NPC)
  97. choice = math.random(1,4)
  98. if choice == 1 then
  99. PlayFlavor(Duncan, "","", "happy", 0, 0)
  100. elseif choice == 2 then
  101. PlayFlavor(Duncan, "","", "flirt", 0, 0)
  102. elseif choice == 3 then
  103. PlayFlavor(Duncan, "","", "wink", 0, 0)
  104. elseif choice == 4 then
  105. PlayAnimation(Duncan,10760)
  106. end
  107. end
  108. else --WATCHER RESPOSNES IF KIMBERLY IS HAILED/SHOW INTERRUPTED
  109. if Logan ~= nil then
  110. FaceTarget(Logan,NPC)
  111. SetTarget(Logan,NPC)
  112. choice = math.random(1,2)
  113. if choice == 1 then
  114. PlayFlavor(Logan, "","", "grumble", 0, 0)
  115. elseif choice == 2 then
  116. PlayFlavor(Logan, "","", "tapfoot", 0, 0)
  117. end
  118. end
  119. if Duncan ~=nil then
  120. FaceTarget(Duncan,NPC)
  121. SetTarget(Duncan,NPC)
  122. choice = math.random(1,2)
  123. if choice == 1 then
  124. PlayFlavor(Duncan, "","", "tapfoot", 0, 0)
  125. elseif choice == 2 then
  126. PlayFlavor(Duncan, "","", "sigh", 0, 0)
  127. end
  128. end
  129. end
  130. AddTimer(NPC, MakeRandomInt(23000,25000), "Swooning")
  131. end