qstbellofvhalen.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/Antonica/qstbellofvhalen.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.07 07:05:38
  5. Script Purpose : Copied technique from Jester_Coffin_Widget - not perfect, but does the job.
  6. :
  7. --]]
  8. local FallenBell = 5811
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 20, "InRange", Spawn)
  11. end
  12. function casted_on(NPC, Spawn, SpellName)
  13. if SpellName == 'Touch the bell' then
  14. local con = CreateConversation()
  15. if not HasQuest(Spawn, FallenBell) and not HasCompletedQuest(Spawn, FallenBell) then
  16. AddConversationOption(con, "Embrace the images.", "offer")
  17. AddConversationOption(con, "Leave the bell.")
  18. StartDialogConversation(con, 1, NPC, Spawn, "As your hand brushes across the cool surface of the fallen bell your mind is flooded with images... \n\nRinging!... \nRinging to warn the others... \nThe sky is buring... \nThe moon torn asunder... \nCrashing and toppling this very tower! \nGnolls... \nGnolls everywhere! \nTaking advantage of the chaos... \nStriking down those trying to flee...")
  19. elseif HasCompletedQuest(Spawn, FallenBell) then
  20. AddConversationOption(con, "I hope my actions were enough to avenge the fallen.")
  21. StartDialogConversation(con, 1, NPC, Spawn, "The cold bell lies unresponsive to your touch. The solace of this crumbled tower is peaceful compared to the turmoil it has endured.")
  22. elseif HasQuest(Spawn, FallenBell) and not HasCompletedQuest(Spawn, FallenBell) then
  23. AddConversationOption(con, "I must kill more gnolls!")
  24. StartDialogConversation(con, 1, NPC, Spawn, "As your hand brushes across the cool surface of the fallen bell your mind is flooded with images... \n\nRinging!... \nRinging to warn the others... \nThe sky is buring... \nThe moon torn asunder... \nCrashing and toppling this very tower! \nGnolls... \nGnolls everywhere! \nTaking advantage of the chaos... \nStriking down those trying to flee...")
  25. end
  26. end
  27. end
  28. function offer(NPC, Spawn)
  29. OfferQuest(NPC, Spawn, FallenBell)
  30. PlaySound(Spawn,"sounds/widgets/alarms_clues_traps/alarm_bell_qeynos002.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  31. PlaySound(Spawn,"sounds/widgets/triggered_environmental/enviro_rockcrack001.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  32. PlaySound(Spawn,"sounds/objectsandparticlesounds/amb_marinersbell_005.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  33. AddTimer(NPC,2000,"Rocks2",1,Spawn)
  34. CloseConversation(NPC,Spawn)
  35. PerformCameraShake(Spawn, 0.699999988079071)
  36. PerformCameraShake(Spawn, 0.5)
  37. PerformCameraShake(Spawn, 0.30000001192092896)
  38. PerformCameraShake(Spawn, 0.10000000149011612)
  39. end
  40. function Rocks2(NPC,Spawn)
  41. PerformCameraShake(Spawn, 0.10000001192092896)
  42. PlaySound(Spawn,"sounds/widgets/triggered_environmental/enviro_rockcrack001.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  43. end
  44. function respawn(NPC)
  45. spawn(NPC)
  46. end