DrawingRay.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : ItemScripts/DrawingRay.lua
  3. Script Purpose : Drawing Ray
  4. Script Author : Shatou
  5. Script Date : 1/5/2020
  6. Script Notes :
  7. --]]
  8. local CAVES_CONSUL_BREE_QUEST_3 = 494
  9. local RIVER_BEHEMOTH_REMAINS_ID = 1970101
  10. local RIVER_STONE_ID = 11599
  11. function used(Item, Player)
  12. quest = GetQuest(Player, CAVES_CONSUL_BREE_QUEST_3)
  13. --Say(Player, "RAY HAS BEEN USED")
  14. if HasQuest(Player, CAVES_CONSUL_BREE_QUEST_3) then
  15. spawn = GetTarget(Player)
  16. -- Say(Player, "PLAYER HAS QUEST")
  17. if spawn ~= nil then
  18. --Say(Player, "SPAWN IS NOT NIL")
  19. -- river behemoth remains
  20. if GetSpawnID(spawn) == RIVER_BEHEMOTH_REMAINS_ID then
  21. CastSpell(Player, 5104, 1)
  22. GiveQuestItem(quest, Player, "", RIVER_STONE_ID)
  23. -- Say(Player, "ITEM OBTAINED")
  24. else
  25. SendMessage(Player, "The Drawing Ray has no effect. Emma said it must be used on the remains of a river behemoth.")
  26. end
  27. else --Say(Player, "SPAWN IS NIL")
  28. end
  29. else --Say(Player, "PLAYER DOES NOT HAVE QUEST")
  30. end
  31. end