9
3

HawkBait.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : ItemScripts/HawkBait.lua
  3. Script Purpose : Hawk Bait used in Preventative Maintenance Quest
  4. Script Author : Cynnar
  5. Script Date : 10/15/2018
  6. Script Notes :
  7. --]]
  8. local Hawk_Bait = 8060
  9. local Preventative_Maintenance = 365
  10. local a_mole_rat = 2780089
  11. function examined(Item, Player)
  12. if HasQuest(Player, Preventative_Maintenance) then
  13. if GetQuestStep(Player, Preventative_Maintenance) == 4 then
  14. conversation = CreateConversation()
  15. AddConversationOption(conversation, "Release the mole rat.", "ReleaseRat")
  16. AddConversationOption(conversation, "Let him be for now.", "LetHimBe")
  17. StartDialogConversation(conversation, 2, Item, Player, "This cute little guy would be perfect as bait to lure down the cliffdiver hawks.")
  18. end
  19. end
  20. end
  21. function ReleaseRat(Item, Player)
  22. CloseItemConversation(Item, Player)
  23. SpawnMob(GetZone(Player), a_mole_rat, false, GetX(Player), GetY(Player), GetZ(Player), GetHeading(Player))
  24. RemoveItem(Player, Hawk_Bait)
  25. end
  26. function LetHimBe(Item, Player)
  27. CloseItemConversation(Item, Player)
  28. end