9
3

AnOrcEar.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : ItemScripts/AnOrcEar.lua
  3. Script Author : Premierio015//Dorbin
  4. Script Date : 2021.06.20 09:06:11
  5. Script Purpose : Item Script for Lore and Legend:Orc Quest
  6. :
  7. --]]
  8. local LoreAndLegendOrc = 5257
  9. function examined(Item, Player)
  10. local LnLAccept = GetRuleFlagFloat("R_World", "LoreAndLegendAccept")
  11. if LnLAccept > 0 and not HasQuest(Player, LoreAndLegendOrc) and not HasCompletedQuest(Player, LoreAndLegendOrc) then
  12. OfferQuest(nil, Player, LoreAndLegendOrc)
  13. else
  14. conversation = CreateConversation()
  15. if HasQuest(Player, LoreAndLegendOrc) and GetQuestStepProgress(Player, LoreAndLegendOrc, 8)==0 then
  16. AddConversationOption(conversation, "Begin to study...", "Step_Complete")
  17. end
  18. AddConversationOption(conversation, "No, put it away", "CloseItemConversation")
  19. StartDialogConversation(conversation, 2, Item, Player, "This item can be used to learn the secrets of the orc. Do you wish to study it?")
  20. end
  21. end
  22. function Step_Complete(Item, Player)
  23. if HasItem(Player,3797,1) then
  24. SetStepComplete(Player, LoreAndLegendOrc, 8)
  25. CloseItemConversation(Item, Player)
  26. RemoveItem(Player, 3797)
  27. end
  28. end
  29. function item_description(Item, Spawn)
  30. return "You have already examined this item."
  31. end