AncientStatue.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/DownBelow/AncientStatue.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.01.08 04:01:07
  5. Script Purpose :
  6. :
  7. --]]
  8. --You begin to place the scepter in the statue's hand, but meet some resistance. A ring of filth and decay has built over the ages underneath the palm. As you push the scepter into the open hand of the statue, a small golden object drops from the finger of the semi-closed palm. You bend down to discover a tiny, dirty ring.
  9. local Scepter = 5369 -- An Ancient Scepter
  10. function spawn(NPC)
  11. SetRequiredQuest(NPC, Scepter, 1, 1)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
  13. end
  14. function casted_on(NPC, Spawn, SpellName)
  15. if SpellName == 'Replace scepter' then
  16. local con = CreateConversation()
  17. AddConversationOption(con, "What could this be...","Success")
  18. StartDialogConversation(con, 1, NPC, Spawn, "You begin to place the scepter in the statue's hand, but meet some resistance. A ring of filth and decay has built over the ages underneath the palm. As you push the scepter into the open hand of the statue, a small golden object drops from the finger of the semi-closed palm. You bend down to discover a tiny, dirty ring.")
  19. end
  20. end
  21. function Success(NPC,Spawn)
  22. PlayFlavor(Spawn,"","","gathering_success",0,0)
  23. SetStepComplete(Spawn, Scepter, 1)
  24. CloseItemConversation(NPC,Spawn)
  25. end
  26. function InRange(NPC, Spawn)
  27. if HasQuest(Spawn, Scepter) and GetQuestStep(Spawn,Scepter)==1 then
  28. SendMessage(Spawn,"The ancient scepter thrums as you near the old statue in the nearby alcove.","yellow")
  29. SendPopUpMessage(Spawn,"The ancient scepter thrums as you near the old statue in the nearby alcove.",225,225,0)
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end