9
3

BackHallofSteeldoor.lua 863 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/BackHallofSteeldoor.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.24 08:10:46
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function casted_on(NPC, Spawn, SpellName)
  11. if SpellName == 'Open' then
  12. if HasItem(Spawn,1001032,1) then
  13. local widget = GetSpawn(Spawn, 2210362)
  14. OpenDoor(widget)
  15. UseWidget(2210362)
  16. RemoveItem(Spawn,1001032,1)
  17. SendMessage(Spawn,"Your old Halls of Steel key opens the door but crumbles in the lock.")
  18. AddTimer(NPC,11000,"CloseDoor")
  19. else
  20. SendMessage(Spawn,"The large door doesn't budge.")
  21. end
  22. end
  23. end
  24. function CloseDoor(NPC)
  25. local widget = GetSpawn(Spawn, 2210362)
  26. CloseDoor(widget)
  27. end
  28. function respawn(NPC)
  29. spawn(NPC)
  30. end