acaptiverefugee.lua 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/acaptiverefugee.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.08 03:09:34
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. MoodCheck(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC,Spawn)
  13. Speak(NPC,Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function MoodCheck(NPC)
  19. moodchoice = MakeRandomInt(1,3)
  20. if moodchoice == 1 then
  21. SpawnSet(NPC,"mood_state",11851) --afraid
  22. elseif moodchoice == 2 then
  23. SpawnSet(NPC,"mood_state",11852) --angry
  24. elseif moodchoice == 3 then
  25. SpawnSet(NPC,"mood_state",11856) --sad
  26. end
  27. end
  28. function Speak(NPC,Spawn)
  29. if GetRace(NPC)==5 then -- Gnome
  30. PlayFlavor(NPC, "voiceover/english/a_captured_refugee/tutorial_island02/003_gnome_refugee_hail1_d59b2e5d.mp3", "Thank the makers you've come along! These goblins have been tormenting us for hours!", "thanks", 290907476, 932956012,Spawn)
  31. elseif GetRace(NPC)==8 then --Highelf
  32. choice = MakeRandomInt(1,2)
  33. if choice==1 then
  34. PlayFlavor(NPC, "voiceover/english/a_captured_refugee/tutorial_island02/003_highelf_refugee_hail1_7fc3cad0.mp3", "Go about your business fellow refugee. I've got these goblins right where I want them.", "hello", 1080881647, 291476526,Spawn)
  35. else
  36. PlayFlavor(NPC, "", "Your help is appreciated. Were it only that all of the refugees stranded on this Isle were as skilled as you.", "nod", 0, 0,Spawn)
  37. end
  38. elseif GetRace(NPC)==9 then --Human
  39. choice = MakeRandomInt(1,2)
  40. if choice==1 then
  41. PlayFlavor(NPC, "voiceover/english/a_captured_refugee/tutorial_island02/003_human_refugee_hail2_72457d89.mp3", "I've never seen a goblin before. Are they always this...umm...excitable?", "confused", 3599089715, 3189955253,Spawn)
  42. else
  43. PlayFlavor(NPC, "", "You're timing is excellent stranger. I thought I was going to have to find my own way out of this.", "thanks", 0, 0,Spawn)
  44. end
  45. elseif GetRace(NPC)==11 then --Kerra
  46. PlayFlavor(NPC, "voiceover/english/a_captured_refugee/tutorial_island02/004_kerran_refugee_hail2_a8d13011.mp3", "Thank goodness you found us. These goblins may not be bright but they have us at an advantage in numbers.", "thanks", 1996349290, 3249018436,Spawn)
  47. elseif GetRace(NPC)==13 then --Ratonga
  48. PlayFlavor(NPC, "voiceover/english/a_captured_refugee/tutorial_island02/003_ratonga_refugee_hail2_f6cdb005.mp3", "First a Drakota, and now this! Why do the old gods hate me so?", "scream", 3567711464, 78154507,Spawn)
  49. elseif GetRace(NPC)==15 then --Woodelf
  50. choice = MakeRandomInt(1,2)
  51. if choice==1 then
  52. PlayFlavor(NPC, "voiceover/english/a_captured_refugee/tutorial_island02/003_woodelf_refugee_hail1_665582a4.mp3", "Please don't hurt them! These poor goblins are only acting out of fear.", "beg", 1038403057, 372639812,Spawn)
  53. else
  54. PlayFlavor(NPC, "voiceover/english/a_captured_refugee/tutorial_island02/003_woodelf_refugee_hail2_19c22530.mp3", "Thanks for nothing you bully! How would you like it if a bunch of scary men with swords invaded your island?", "shame", 3030530877, 3849447082,Spawn)
  55. end
  56. end
  57. end