GruffinGoldtooth.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/GruffinGoldtooth.lua
  3. Script Author : Rylec
  4. Script Date : 2021.07.29 08:07:53
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 3000, "Animations")
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. PlayFlavor(NPC, "voiceover/english/gruffin_goldtooth/qey_village03/gruffingoldtooth001.mp3", "", "hello", 997482113, 2338709603, Spawn)
  14. conversation = CreateConversation()
  15. AddConversationOption(conversation, "I'll leave you to your work.")
  16. StartConversation(conversation, NPC, Spawn, [[Hey there, young 'in. Don't mind ol' Gruffin. I'm just inspecting these here mineral veins. This bedrock is going to be especially useful for building new homes for refugees and citizens alike.
  17. ]])
  18. end
  19. function Animations(NPC)
  20. local choice = MakeRandomInt(1,5)
  21. if choice == 1 then
  22. PlayAnimation(NPC, 11976)
  23. elseif choice == 2 then
  24. PlayAnimation(NPC, 12030)
  25. elseif choice == 3 then
  26. PlayAnimation(NPC, 12329)
  27. elseif choice == 4 then
  28. PlayAnimation(NPC, 12978)
  29. else
  30. PlayAnimation(NPC, 13056)
  31. end
  32. local time = math.random (15000,20000)
  33. AddTimer(NPC, time, "Animations")
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end