GrakusStonemallet.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/GrakusStonemallet.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.07.30
  5. Script Purpose : Grakus Stonemallet dialog
  6. Modified Date : 2020.09.04
  7. Modified by : premierio015
  8. Notes : Added all dialogues, voiceovers, anims.
  9. --]]
  10. function spawn(NPC)
  11. EmoteLoop(NPC)
  12. end
  13. function respawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. math.randomseed(os.time())
  18. local voice = math.random (1,3)
  19. str = tostring(voice)
  20. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1062.mp3", "", "", 0, 0, Spawn)
  21. text = math.random(1,3)
  22. if text == 1 then
  23. Say(NPC, "The Sapswill stout that we used to get from the goblins has all but disappeared. We need to fix this problem immediately.")
  24. elseif text == 2 then
  25. Say(NPC, "I hear there's a giant octopus out there in the bay.")
  26. else
  27. Say(NPC, "I hear there's a cave on the north of the island. I wonder if there is any good gems in there?")
  28. end
  29. end
  30. function EmoteLoop (NPC)
  31. math.randomseed(os.time())
  32. choice = math.random(1,5)
  33. str = tostring(choice)
  34. if choice == 1 then
  35. PlayAnimation(NPC, 184)
  36. elseif choice == 2 then
  37. PlayAnimation(NPC, 174)
  38. elseif choice == 3 then
  39. PlayAnimation(NPC, 183)
  40. elseif choice == 4 then
  41. PlayAnimation(NPC, 187)
  42. else
  43. PlayAnimation(NPC, 186)
  44. end
  45. AddTimer(NPC, 10000, "EmoteLoop")
  46. end