abelligerentpatron.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --[[
  2. Script Name : SpawnScripts/WayfarersRest/abelligerentpatron.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.14 05:11:45
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. function spawn(NPC, Spawn)
  10. combatModule(NPC, Spawn)
  11. AddTimer(NPC,MakeRandomInt(2000,5000),"EmoteLoop")
  12. end
  13. function EmoteLoop(NPC)
  14. local zone = GetZone(NPC)
  15. local Darkelf = GetSpawnByLocationID(zone, 133780688)
  16. if not IsInCombat(NPC) and IsAlive(NPC)then
  17. if IsAlive(Darkelf) then
  18. SpawnSet(NPC, "attackable", 1)
  19. SpawnSet(NPC, "show_level", 1)
  20. SpawnSet(NPC,"mood_state",11852)
  21. choice = MakeRandomInt(1,5)
  22. if choice ==1 then
  23. PlayFlavor(NPC,"","","threaten",0,0)
  24. elseif choice ==2 then
  25. PlayFlavor(NPC,"","","taunt",0,0)
  26. elseif choice ==3 then
  27. PlayFlavor(NPC,"","","neener",0,0)
  28. elseif choice ==4 then
  29. PlayFlavor(NPC,"","","swear",0,0)
  30. elseif choice ==5 then
  31. PlayFlavor(NPC,"","","frustrated",0,0)
  32. end
  33. AddTimer(NPC,4000,"EmoteLoop")
  34. elseif not IsAlive(Darkelf) then
  35. SpawnSet(NPC, "attackable", 0)
  36. SpawnSet(NPC, "show_level", 0)
  37. AddTimer(NPC,7000,"EmoteLoop")
  38. SpawnSet(NPC,"mood_state",0)
  39. SpawnSet(NPC,"name","a recovered patron")
  40. choice = MakeRandomInt(1,6)
  41. if choice ==1 then
  42. PlayFlavor(NPC,"","","confused",0,0)
  43. elseif choice ==2 then
  44. PlayFlavor(NPC,"","","doh",0,0)
  45. elseif choice ==3 then
  46. PlayFlavor(NPC,"","","sigh",0,0)
  47. elseif choice ==4 then
  48. PlayFlavor(NPC,"","","wince",0,0)
  49. elseif choice ==5 then
  50. PlayFlavor(NPC,"","","whome",0,0)
  51. elseif choice ==6 then
  52. PlayFlavor(NPC,"","","beg",0,0)
  53. end
  54. end
  55. end
  56. end
  57. function respawn(NPC)
  58. spawn(NPC)
  59. end
  60. function aggro(NPC,Spawn)
  61. local zone = GetZone(NPC)
  62. local Darkelf = GetSpawnByLocationID(zone, 133780688)
  63. if IsAlive(Darkelf) and not HasLanguage(Spawn,8) then
  64. PlayFlavor(NPC, "voiceover/english/halfling_crazed/ft/halfling/halfling_crazed_1_garbled_gm_823f1021.mp3", "Lilleee mabee tarrah roo sakdooo", "", 374813993, 4058118752, Spawn, 8)
  65. else
  66. PlayFlavor(NPC, "voiceover/english/halfling_crazed/ft/halfling/halfling_crazed_1_aggro_gm_37efc560.mp3", "This place will be your tomb!", "", 4006552847, 41198957, Spawn, 8)
  67. end
  68. end