9
3

skeletonscript.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SpawnScripts/Generic/skeletonscript.lua
  3. Script Purpose : PlayFavors for SkeletonMobs
  4. Script Author : premierio015
  5. Script Date : 2020.04.10
  6. Script Notes : Makes skeletons use voices and text commands on aggro and death
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function respawn(NPC)
  11. spawn(NPC)
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. end
  16. function aggro(NPC, Spawn)
  17. math.randomseed(os.time())
  18. local choice = math.random (1,3)
  19. if choice == 1 then
  20. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_c77d7bff.mp3", "Your eyes are so pretty.", "", 1412152942, 873988632, Spawn)
  21. elseif choice == 2 then
  22. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_2168c5.mp3", "Seek death and it finds you.", "", 2988489621, 1045543573, Spawn)
  23. else
  24. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_8bc7a2cc.mp3", "Your blood calls to me.", "", 1242322025, 1154999668, Spawn)
  25. end
  26. end
  27. function death(NPC, Spawn)
  28. if GetSpawnID(NPC) == 2530041 or GetSpawnID(NPC) == 2530040 then
  29. if IsPlayer(Spawn) then
  30. local chance = math.random(1, 100)
  31. if chance <= 33 then
  32. local skull = SpawnMob(GetZone(Spawn), 2530192, false, GetX(NPC), GetY(NPC), GetZ(NPC))
  33. if skull ~= nil then
  34. SpawnSet(skull, "expire", "1000")
  35. end
  36. end
  37. end
  38. end
  39. math.randomseed(os.time())
  40. local choice = math.random(1,2)
  41. if choice == 1 then
  42. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_death_ff39f327.mp3", "Final death comes at last.", "", 3768284332, 62777040, Spawn)
  43. else
  44. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_death_fbcb503b.mp3", "Rest in peace.", "", 3591309093, 1423656405, Spawn)
  45. end
  46. end