9
3

anargumentativepatron.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --[[
  2. Script Name : SpawnScripts/WayfarersRest/anargumentativepatron.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.14 05:11:40
  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. SpawnSet(NPC,"name","an argumentative patron")
  22. choice = MakeRandomInt(1,5)
  23. if choice ==1 then
  24. PlayFlavor(NPC,"","","threaten",0,0)
  25. elseif choice ==2 then
  26. PlayFlavor(NPC,"","","taunt",0,0)
  27. elseif choice ==3 then
  28. PlayFlavor(NPC,"","","grumble",0,0)
  29. elseif choice ==4 then
  30. PlayFlavor(NPC,"","","swear",0,0)
  31. elseif choice ==5 then
  32. PlayFlavor(NPC,"","","frustrated",0,0)
  33. end
  34. AddTimer(NPC,4000,"EmoteLoop")
  35. elseif not IsAlive(Darkelf) then
  36. SpawnSet(NPC, "attackable", 0)
  37. SpawnSet(NPC, "show_level", 0)
  38. AddTimer(NPC,7000,"EmoteLoop")
  39. SpawnSet(NPC,"mood_state",0)
  40. SpawnSet(NPC,"name","a recovered patron")
  41. choice = MakeRandomInt(1,6)
  42. if choice ==1 then
  43. PlayFlavor(NPC,"","","confused",0,0)
  44. elseif choice ==2 then
  45. PlayFlavor(NPC,"","","doh",0,0)
  46. elseif choice ==3 then
  47. PlayFlavor(NPC,"","","sigh",0,0)
  48. elseif choice ==4 then
  49. PlayFlavor(NPC,"","","wince",0,0)
  50. elseif choice ==5 then
  51. PlayFlavor(NPC,"","","whome",0,0)
  52. elseif choice ==6 then
  53. PlayFlavor(NPC,"","","beg",0,0)
  54. end
  55. end
  56. end
  57. end
  58. function respawn(NPC)
  59. spawn(NPC)
  60. end
  61. function aggro(NPC,Spawn)
  62. local zone = GetZone(NPC)
  63. local Darkelf = GetSpawnByLocationID(zone, 133780688)
  64. if IsAlive(Darkelf) and not HasLanguage(Spawn,3) then
  65. PlayFlavor(NPC, "voiceover/english/barbarian_eco_good_1/ft/barbarian/barbarian_eco_good_1_garbled_gm_1cfda4cd.mp3", "I wonder, do I owe you any coin? I sure hope not!", "", 2853459229, 77062894, Spawn,3)
  66. else
  67. PlayFlavor(NPC, "voiceover/english/dwarf_base_1/ft/dwarf/dwarf_base_1_1_aggro_gm_23b35126.mp3", "Where do ya think you're goin'?", "", 706272128, 909565004, Spawn, 3)
  68. end
  69. end
  70. function victory(NPC,Spawn)
  71. PlayFlavor(NPC, "voiceover/english/dwarf_base_1/ft/dwarf/dwarf_base_1_1_victory_gm_4a1ceaef.mp3", "Hah! I'm not done yet! Get back up!", "", 458619926, 239663782, Spawn)
  72. end