aSapswillvillager133771748.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aSapswillvillager133771748.lua
  3. Script Author : Rylec
  4. Script Date : 2021.01.08 04:01:17
  5. Script Purpose :
  6. :
  7. --]]
  8. local ADiplomaticMission = 166
  9. function spawn(NPC)
  10. EmoteLoop(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. if HasCompletedQuest(Spawn, ADiplomaticMission) or HasQuest(Spawn, ADiplomaticMission) then
  17. QuestTalk(NPC, Spawn)
  18. else
  19. NormalTalk(NPC, Spawn)
  20. end
  21. end
  22. function EmoteLoop(NPC)
  23. PlayAnimation(NPC, 20839)
  24. AddTimer(NPC, 1000, "EmoteLoop")
  25. end
  26. function NormalTalk(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. choice = math.random(1, 3)
  29. if choice == 1 then
  30. Say(NPC, "What you mean backwards? Expert I am!")
  31. else
  32. Say(NPC, "Course I know what I'm doing! What you mean backwards?")
  33. end
  34. end
  35. function QuestTalk(NPC, Spawn)
  36. if HasQuest(Spawn, ADiplomaticMission) and not QuestStepIsComplete(Spawn, ADiplomaticMission, 1) then
  37. SetStepComplete(Spawn, ADiplomaticMission, 1)
  38. end
  39. FaceTarget(NPC, Spawn)
  40. choice = math.random(1, 3)
  41. if choice == 1 then
  42. Say(NPC, "I play special tune for diplomats!")
  43. else
  44. Say(NPC, "Happy meeting, diplomat!")
  45. end
  46. end