ChannelingOrb.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : SpawnScripts/SorcerersTrial/ChannelingOrb.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.13 03:11:35
  5. Script Purpose :
  6. :
  7. --]]
  8. function casted_on(NPC, Spawn, SpellName)
  9. if SpellName == 'Channel ether' then
  10. local con = CreateConversation()
  11. AddConversationOption(con, "Begin the trial. Focus energies into the crystal.", "offer")
  12. AddConversationOption(con, "Leave the orb alone.","CloseConversation")
  13. StartDialogConversation(con, 1, NPC, Spawn, "The ether crackles around you as you focus on the channeling orb. Do you wish to begin the Sorcerer's trial?")
  14. end
  15. end
  16. function offer(NPC, Spawn)
  17. CloseConversation(NPC, Spawn)
  18. SpawnSet(NPC, "show_command_icon", 0)
  19. SpawnSet(NPC, "display_hand_icon", 0)
  20. ApplySpellVisual(NPC,18)
  21. AddTimer(NPC,1500,"Ring",1,Spawn)
  22. AddTimer(NPC,2000,"Ring2",1,Spawn)
  23. AddTimer(NPC,3500,"Ring3",1,Spawn)
  24. AddTimer(NPC,5000,"Ring4",1,Spawn)
  25. end
  26. function Ring(NPC, Spawn)
  27. local zone = GetZone(Spawn)
  28. SpawnSet(NPC,"model_type",2306)
  29. SpawnSet(NPC,"size",30)
  30. end
  31. function Ring2(NPC, Spawn)
  32. local zone = GetZone(Spawn)
  33. RingSpawn = SpawnByLocationID(zone,133780600)
  34. end
  35. function Ring3(NPC, Spawn)
  36. ApplySpellVisual(NPC,100)
  37. end
  38. function Ring4(NPC, Spawn)
  39. local zone = GetZone(Spawn)
  40. EnergyGuard = SpawnByLocationID(zone,133780631)
  41. end
  42. function respawn(NPC)
  43. spawn(NPC)
  44. end