9
3

aBlackshieldassassin.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/aBlackshieldassassin.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.11.17 06:11:14
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. local choice = math.random(1,2)
  10. if choice == 1 then
  11. SpawnSet(NPC, "model_type", 132)
  12. SpawnSet(NPC, "gender", 2)
  13. else
  14. SpawnSet(NPC, "model_type", 134)
  15. SpawnSet(NPC, "gender", 1)
  16. end
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end
  24. function healthchanged(NPC, Spawn)
  25. if GetGender(NPC) == 2 then
  26. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  27. if hp_percent <= 0.50 then
  28. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_halfhealth_gf_1babf022.mp3", "Is that all you have?", "", 2979351329, 4050238683, Spawn)
  29. end
  30. end
  31. end
  32. function death(NPC, Spawn)
  33. if GetGender(NPC) == 1 then
  34. local chance = math.random(1, 100)
  35. if chance <= 40 then
  36. local choice2 = math.random(1, 2)
  37. if choice2 == 1 then
  38. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_death_gm_3e24be0b.mp3", "Cover me while we regroup!", "", 144951462, 3922442401, Spawn)
  39. else
  40. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_death_gm_7612214f.mp3", "All hands retreat!", "", 3033325782, 1103449586, Spawn)
  41. end
  42. elseif GetGender(NPC) == 2 then
  43. local chance = math.random(1, 100)
  44. if chance <= 40 then
  45. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_death_gf_7612214f.mp3", "All hands retreat!", "", 3620177897, 757784861, Spawn)
  46. end
  47. end
  48. end
  49. end
  50. function aggro(NPC, Spawn)
  51. if GetGender(NPC) == 2 then
  52. local choice = math.random(1, 3)
  53. if choice == 1 then
  54. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_aggro_gf_583690dc.mp3" , "Summon help! We have invaders!", "", 1598905349, 2204481929, Spawn)
  55. elseif choice == 2 then
  56. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_aggro_gf_a30c4f9d.mp3", "To arms!", "", 2291750057, 1030180613, Spawn)
  57. else
  58. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_aggro_gf_a203c9ec.mp3", "Prepare to face your doom, meddler.", "", 1496819882, 365167432, Spawn)
  59. end
  60. elseif GetGender(NPC) == 1 then
  61. local choice = math.random(1, 3)
  62. if choice == 1 then
  63. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_a30c4f9d.mp3", "To Arms!", "", 1238020980, 748146443, Spawn)
  64. elseif choice == 2 then
  65. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_583690dc.mp3", "Summon help! We have invaders!", "", 3340212225, 279643307, Spawn)
  66. else
  67. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_a203c9ec.mp3", "Prepare to face your doom, meddler.", "", 1496819882, 365167432, Spawn)
  68. end
  69. end
  70. end