9
3

widgetbox6.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity_Classic/widgetbox6.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.03 01:11:39
  5. Script Purpose :
  6. :
  7. --]]
  8. local LukursAntiques = 374
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, LukursAntiques, 1)
  11. SetRequiredQuest(NPC, LukursAntiques, 2)
  12. SetRequiredQuest(NPC, LukursAntiques, 3)
  13. SetTempVariable(NPC,"Mask","false")
  14. AddTimer(NPC,2000,"MaskCheck")
  15. end
  16. function casted_on(NPC, Spawn, SpellName)
  17. if SpellName == 'Search' then
  18. if GetTempVariable(NPC,"Mask")=="true" and GetQuestStepProgress(Spawn,LukursAntiques,1)==0 then --DawnMask
  19. SetStepComplete(Spawn, LukursAntiques, 1)
  20. SendMessage(Spawn,"You find a Blood Mask inside the barrel.")
  21. else
  22. SendMessage(Spawn,"You only find the remains of very old decayed fish in this barrel.")
  23. end
  24. end
  25. end
  26. function MaskCheck(NPC)
  27. local zone = GetZone(NPC)
  28. local Muck1 = GetSpawnByLocationID(zone, 133787343)
  29. local Muck2 = GetSpawnByLocationID(zone, 133787394)
  30. if Muck2 == nil and Muck1 == nil or
  31. Muck2 ~= nil and Muck1 == nil
  32. then
  33. SetTempVariable(NPC,"Mask","true")
  34. else
  35. end
  36. end
  37. function respawn(NPC)
  38. spawn(NPC)
  39. end