aBloodsaberwatcher.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : SpawnScripts/PeatBog/aBloodsaberwatcher.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.27 05:05:41
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 5000, "EmoteLoop")
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function aggro(NPC,Spawn)
  18. if GetGender(NPC)==1 then
  19. local choice = MakeRandomInt(1,2)
  20. if choice == 1 then
  21. PlayFlavor(NPC,"voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_battle_gm_ee1e1a8.mp3","Attack!","",3180104139, 2926558993)
  22. else
  23. PlayFlavor(NPC,"voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_battle_cm_bbd7a8ed.mp3","Too many shiney things! Can't concentrate!","",445162395, 3277644756)
  24. end
  25. else
  26. PlayFlavor(NPC,"voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_aggro_gf_b7e0b3a.mp3","Me's gonna eat your kidney first!","",750980753, 3740010516)
  27. end
  28. end
  29. function death(NPC,Spawn)
  30. if GetGender(NPC)==1 then
  31. local choice = MakeRandomInt(1,2)
  32. if choice == 1 then
  33. PlayFlavor(NPC,"voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_death_gm_e1755f3f.mp3","Come at me coward. I'm not dead yet!...","",86111608, 3954832486)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_death_gm_e8c02d1e.mp3", "Feel kinda sleepy. Whacha do to me?", "", 3298938103, 1410551282, Spawn, 0)
  36. end
  37. else
  38. PlayFlavor(NPC,"voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_death_gf_e8c02d1e.mp3","Feel kinda sleepy. What'chyou do ta me?!","",3447489483, 4136415601)
  39. end
  40. end
  41. function healthchanged(NPC, Spawn)
  42. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 then
  43. if GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  44. if GetGender(NPC)==1 then
  45. local choice = MakeRandomInt(1,2)
  46. if choice == 1 then
  47. PlayFlavor(NPC, "voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_halfhealth_gm_f462f6ff.mp3", "Is this supposed to hurt?", "", 4202180867, 1393988988, Spawn, 0)
  48. elseif choice == 2 then
  49. PlayFlavor(NPC, "voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_halfhealth_gm_aa145f4d.mp3", "Neat, that'll leave a pretty scar", "", 675684950, 4088135432, Spawn, 0)
  50. end
  51. else
  52. local choice = MakeRandomInt(1,2)
  53. if choice == 1 then
  54. PlayFlavor(NPC, "voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_halfhealth_gf_aa145f4d.mp3", "Neat, that'll leave a pretty scar", "", 70455099, 2953679351, Spawn, 0)
  55. elseif choice == 2 then
  56. PlayFlavor(NPC, "voiceover/english/optional3/troll_base_1/ft/troll/troll_base_1_1_halfhealth_gf_f462f6ff.mp3", "Is this supposed to hurt?", "", 216769747, 692696120, Spawn, 0)
  57. end
  58. end
  59. end
  60. end
  61. end
  62. function EmoteLoop(NPC)
  63. local emoteChoice = MakeRandomInt(1,3)
  64. if emoteChoice == 1 then
  65. PlayFlavor(NPC, "","","peer",0,0)
  66. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  67. elseif emoteChoice == 2 then
  68. PlayFlavor(NPC, "","","doubletake",0,0)
  69. AddTimer(NPC, MakeRandomInt(10000,15000), "EmoteLoop")
  70. else
  71. PlayFlavor(NPC, "","", "sniff",0,0)
  72. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  73. end
  74. end