soulspike.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/soulspike.lua
  3. Script Purpose : <purpose>
  4. Script Author : Jabantiz
  5. Script Date : 6/15/2018
  6. Script Notes : <special-instructions>
  7. --]]
  8. -- Quest ID's
  9. local CONFRONTATION = 321
  10. -- Item ID's
  11. local NULLIFICATION_STONE = 10087
  12. function spawn(NPC)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function casted_on(NPC, Spawn, Message)
  18. if HasItem(Spawn, NULLIFICATION_STONE) and HasQuest(Spawn, CONFRONTATION) and GetQuestStep(Spawn, CONFRONTATION) == 2 then
  19. while HasItem(Spawn, NULLIFICATION_STONE, 1) do
  20. RemoveItem(Spawn, NULLIFICATION_STONE)
  21. end
  22. PlaySound(NPC, "sounds/widgets/triggered_environmental/enviro_glassbreak_med001.wav", GetX(NPC), GetY(NPC), GetZ(NPC), Spawn)
  23. PlayAnimation(NPC, 2565)
  24. AddTimer(NPC,1600,"Update",Spawn)
  25. end
  26. end
  27. function Update(NPC, Spawn, Message)
  28. SetStepComplete(Spawn, CONFRONTATION, 2)
  29. local velderoth = GetSpawn(Spawn, 2340062)
  30. if velderoth ~= nil then
  31. FaceTarget(velderoth,Spawn)
  32. PlayFlavor(velderoth, "voiceover/english/tutorial_revamp/velderoth_malraen/qey_village02/qst_velderoth_howcould_ea37cf7d.mp3", "NO!!! How could you do such a thing?", "scream", 4138921089, 741301826, Spawn, 4)
  33. end
  34. local stand = GetSpawn(Spawn, 2340126)
  35. if stand ~= nil then
  36. Despawn(stand)
  37. end
  38. Despawn(NPC)
  39. end