LieutenantWestfall.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/LieutenantWestfall.lua
  3. Script Author : premierio015
  4. Script Date : 2015.07.30
  5. Script Purpose : Lieutenant Westfall dialog
  6. Notes : Script should be updated and spawn Moraks on hail instead of timer, also function should have restriction otherwise players would spawn 500 moraks when hail.,
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 40, "InRange", "LeaveRange", Spawn)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. local spawn2 = GetSpawnByGroupID(Zone,1044835)
  17. if spawn2 ~= nil then
  18. PlayFlavor(NPC, "", "What's that there! To arms, the Morak are coming!", "point", 1689589577, 4560189, Spawn)
  19. end
  20. end
  21. function LeaveRange(NPC, Spawn)
  22. end
  23. function hailed(NPC, Spawn)
  24. end
  25. function aggro(NPC)
  26. math.randomseed(os.time())
  27. local choice = math.random(1,3)
  28. if choice == 1 then
  29. 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)
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_a30c4f9d.mp3", "To arms!", "", 1238020980, 748146443)
  32. else
  33. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_4553e1e0.mp3", "Flee now or meet this one's fate.", "", 3032162747, 1359206304)
  34. end
  35. end
  36. function killed(NPC)
  37. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_ec0cd85a.mp3", "I hope they're all this easy.", "", 2687289628, 2303639320)
  38. end