widgetbox8.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity_Classic/widgetbox8.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.03 01:11:03
  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,3)==0 then --DawnMask
  19. SetStepComplete(Spawn, LukursAntiques, 3)
  20. SendMessage(Spawn,"You find a Dawn Mask at the bottom of the crate.")
  21. else
  22. SendMessage(Spawn,"You only find unusable rusted chains in this crate.")
  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 then
  31. SetTempVariable(NPC,"Mask","true")
  32. else
  33. end
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end