9
3

p47swordholder.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/p47swordholder.lua
  3. Script Author : smash
  4. Script Date : 2016.09.11 01:09:03
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetRequiredQuest(NPC, 177, 9, 0, 1)
  10. end
  11. function casted_on(NPC, Spawn, Message)
  12. if Message == "inspect" then
  13. SendMessage(Spawn, "There appears to be a shaft running down the middle of the stand, about the width of a thin blade.")
  14. else
  15. local zone = GetZone(NPC)
  16. --First unlock and open the 2 secret basement doors
  17. local door = GetSpawnByLocationID(zone, 619859)
  18. UseWidget(door)
  19. if GetTempVariable(NPC, "SwordSpawned") ~= "true" then
  20. local door2 = GetSpawnByLocationID(zone, 619860)
  21. SpawnSet(door, "show_command_icon", "1")
  22. SpawnSet(door2, "show_command_icon", "1")
  23. SpawnSet(door, "display_hand_icon", "1")
  24. SpawnSet(door2, "display_hand_icon", "1")
  25. --Now spawn the sword in this sword holder
  26. SpawnByLocationID(zone, 623147)
  27. SetTempVariable(NPC, "SwordSpawned", "true")
  28. end
  29. end
  30. end