Faydwer.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/Castleview/Faydwer.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.21 03:09:04
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function hailed(NPC, Spawn)
  11. end
  12. function casted_on(NPC, Spawn, SpellName)
  13. if SpellName == 'Nuzzle' then
  14. local choice = MakeRandomInt(1,4)
  15. if choice == 1 then
  16. FaceTarget(NPC,Spawn)
  17. PlaySound(NPC,"sounds/widgets/alarms_clues_traps/alarm_cat_meow1_02.wav",GetX(NPC), GetY(NPC), GetZ(NPC))
  18. elseif choice == 2 then
  19. FaceTarget(NPC,Spawn)
  20. PlaySound(NPC,"sounds/widgets/alarms_clues_traps/alarm_cat_meow1_01.wav",GetX(NPC), GetY(NPC), GetZ(NPC))
  21. elseif choice == 3 then
  22. FaceTarget(NPC,Spawn)
  23. PlaySound(NPC,"sounds/widgets/alarms_clues_traps/alarm_cat_meow1_03.wav",GetX(NPC), GetY(NPC), GetZ(NPC))
  24. elseif choice == 4 then
  25. PlaySound(NPC,"sounds/critters/cat/cat_happy001.wav",GetX(NPC), GetY(NPC), GetZ(NPC))
  26. end
  27. end
  28. end
  29. function respawn(NPC)
  30. spawn(NPC)
  31. end