SapswillVillageMusician.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SapswillVillageMusician.lua
  3. Script Purpose : Spawn script for Sapswill musician.
  4. Script Author : Scatman
  5. Script Date : 2009.01.11
  6. Script Notes :
  7. --]]
  8. local ADiplomaticMission = 166
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. if HasCompletedQuest(Spawn, ADiplomaticMission) or HasQuest(Spawn, ADiplomaticMission) then
  16. QuestTalk(NPC, Spawn)
  17. else
  18. NormalTalk(NPC, Spawn)
  19. end
  20. end
  21. function NormalTalk(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. choice = math.random(1, 3)
  24. if choice == 1 then
  25. Say(NPC, "What you mean backwards? Expert I am!")
  26. else
  27. Say(NPC, "Course I know what I'm doing! What you mean backwards?")
  28. end
  29. end
  30. function QuestTalk(NPC, Spawn)
  31. if HasQuest(Spawn, ADiplomaticMission) and not QuestStepIsComplete(Spawn, ADiplomaticMission, 1) then
  32. SetStepComplete(Spawn, ADiplomaticMission, 1)
  33. end
  34. FaceTarget(NPC, Spawn)
  35. choice = math.random(1, 3)
  36. if choice == 1 then
  37. Say(NPC, "I play special tune for diplomats!")
  38. else
  39. Say(NPC, "Happy meeting, diplomat!")
  40. end
  41. end