GrakusStonemallet.lua 1.7 KB

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