widgetbox2.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity_Classic/widgetbox2.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.03 12:11:09
  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,2)==0 then --ShadowedMask
  19. SetStepComplete(Spawn, LukursAntiques, 2)
  20. SendMessage(Spawn,"You find a Shadowed Mask wrapped in old rags.")
  21. else
  22. SendMessage(Spawn,"You only find worthless rusted spears 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