MasterArcherNightbow.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/MasterArcherNightbow.lua
  3. Script Author : Rylec
  4. Script Date : 2021.09.06 02:09:39
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 3000, "EmoteLoop")
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. local choice = MakeRandomInt(1, 3)
  14. if choice == 1 then
  15. PlayFlavor(NPC, "voiceover/english/master_archer_nightbow/qey_elddar/100_merchant_halfelf_nightbow_callout1_f29bf504.mp3", "Welcome to In-Range. How can I oblige you, traveler?", "", 514837561, 1511494370, Spawn)
  16. else
  17. PlayFlavor(NPC, "voiceover/english/master_archer_nightbow/qey_elddar/100_merchant_halfelf_nightbow_multhail2_8e9f4cb0.mp3", "What is it you need, traveler?", "", 4065639405, 4258763812, Spawn)
  18. end
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function EmoteLoop(NPC)
  24. local emoteChoice = MakeRandomInt(1,5)
  25. if emoteChoice == 1 then
  26. -- agree
  27. PlayAnimation(NPC, 10745)
  28. AddTimer(NPC, MakeRandomInt(4000,8000), "EmoteLoop")
  29. elseif emoteChoice == 2 then
  30. -- no
  31. PlayAnimation(NPC, 11881)
  32. AddTimer(NPC, MakeRandomInt(4000,8000), "EmoteLoop")
  33. elseif emoteChoice == 3 then
  34. -- nod
  35. PlayAnimation(NPC, 11882)
  36. AddTimer(NPC, MakeRandomInt(4000,8000), "EmoteLoop")
  37. elseif emoteChoice == 4 then
  38. -- ponder
  39. PlayAnimation(NPC, 12030)
  40. AddTimer(NPC, MakeRandomInt(15000,19000), "EmoteLoop")
  41. else
  42. -- sniff
  43. PlayAnimation(NPC, 12329)
  44. AddTimer(NPC, MakeRandomInt(6000,10000), "EmoteLoop")
  45. end
  46. end