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. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. math.randomseed(os.time())
  19. local voice = math.random (1,3)
  20. str = tostring(voice)
  21. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1062.mp3", "", "", 0, 0, Spawn)
  22. text = math.random(1,3)
  23. if text == 1 then
  24. Say(NPC, "The Sapswill stout that we used to get from the goblins has all but disappeared. We need to fix this problem immediately.")
  25. elseif text == 2 then
  26. Say(NPC, "I hear there's a giant octopus out there in the bay.")
  27. else
  28. Say(NPC, "I hear there's a cave on the north of the island. I wonder if there is any good gems in there?")
  29. end
  30. end
  31. function EmoteLoop (NPC)
  32. math.randomseed(os.time())
  33. choice = math.random(1,5)
  34. str = tostring(choice)
  35. if choice == 1 then
  36. PlayAnimation(NPC, 184)
  37. elseif choice == 2 then
  38. PlayAnimation(NPC, 174)
  39. elseif choice == 3 then
  40. PlayAnimation(NPC, 183)
  41. elseif choice == 4 then
  42. PlayAnimation(NPC, 187)
  43. else
  44. PlayAnimation(NPC, 186)
  45. end
  46. AddTimer(NPC, 10000, "EmoteLoop")
  47. end