9
3

Crucibletablewithsmoke.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Crucibletablewithsmoke.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.20 12:05:10
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5841
  9. function spawn(NPC)
  10. end
  11. function casted_on(NPC, Spawn, SpellName)
  12. if SpellName == 'inspect' then
  13. local con = CreateConversation()
  14. if IsInCombat(Spawn)== true then
  15. SendMessage(Spawn,"You are in combat!","red")
  16. else
  17. if GetQuestStep(Spawn,Quest)==4 or GetQuestStep(Spawn,Quest)==5 then
  18. Dialog1(NPC,Spawn)
  19. else
  20. AddConversationOption(con, "[Leave the table and trinkets alone...]")
  21. StartDialogConversation(con, 1, NPC, Spawn, "Foul smelling concotions and small trinkets litter the table. The Darkpaw gnolls are obviously dabbling in magic you are unfamiliar with.")
  22. end
  23. end
  24. end
  25. end
  26. function Dialog1(NPC,Spawn)
  27. local con = CreateConversation()
  28. if not QuestStepIsComplete(Spawn,Quest,5) then
  29. AddConversationOption(con, "[Look for something to dispell enchantments.]", "Dialog2")
  30. end
  31. AddConversationOption(con, "[Leave the table and trinkets alone...]")
  32. StartDialogConversation(con, 1, NPC, Spawn, "Foul smelling concotions and small trinkets litter the table. The Darkpaw gnolls are obviously dabbling in magic you are unfamiliar with.")
  33. end
  34. function Dialog2(NPC,Spawn)
  35. local con = CreateConversation()
  36. AddConversationOption(con, "[Grab the wand.]","offer")
  37. AddConversationOption(con, "[Leave the table and trinkets alone...]")
  38. StartDialogConversation(con, 1, NPC, Spawn, "You spot a crude wand next to some twitching hay. Perhaps this is one of the devices used by the Darkpaw to enchant scarecrows that terrorize local farmlands. It might work to disenchant something as well...")
  39. end
  40. function offer(NPC, Spawn)
  41. local con = CreateConversation()
  42. if not QuestStepIsComplete(Spawn,Quest,5) then
  43. SetStepComplete(Spawn,Quest,5)
  44. end
  45. AddConversationOption(con, "[Leave the rest of the trinkets alone.]")
  46. StartDialogConversation(con, 1, NPC, Spawn, "An audible ZAP can be heard as you lift the wand off the table.")
  47. PlaySound(Spawn,"sounds/spells/lightning_burst/lb_volt_03.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  48. ApplySpellVisual(NPC,18)
  49. end