FoldingStand.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : ItemScripts/FoldingStand.lua
  3. Script Purpose :
  4. Script Author : Jabantiz
  5. Script Date : 6/15/2018
  6. Script Notes :
  7. --]]
  8. -- Quest ID's
  9. local CONFRONTATION = 321
  10. -- Item ID's
  11. local FOLDING_STAND = 7379
  12. function examined(Item, Player)
  13. if HasQuest(Player, CONFRONTATION) and GetQuestStep(Player, CONFRONTATION) == 2 then
  14. -- check distance to target location first
  15. local con = CreateConversation()
  16. AddConversationOption(con, "Place the stand.", "PlaceStand")
  17. StartDialogConversation(con, 2, Item, Player, "This is the folding stand on which you will place the Soul Spike in order to destroy it.")
  18. end
  19. end
  20. function PlaceStand(Item, Player)
  21. local con = CreateConversation()
  22. SpawnMob(GetZone(Player), 2340126, false, GetX(Player), GetY(Player), GetZ(Player), GetHeading(Player))
  23. AddConversationOption(con, "Step back from the stand.", "StepBack")
  24. StartDialogConversation(con, 2, Item, Player, "You place the stand on the ground.")
  25. end
  26. function StepBack(Item, Player)
  27. CloseItemConversation(Item, Player)
  28. while HasItem(Player, FOLDING_STAND, 1) do
  29. RemoveItem(Player, FOLDING_STAND)
  30. end
  31. end