NektroposMountedBoarsHead.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/NektroposMountedBoarsHead.lua
  3. Script Purpose :
  4. Script Author : smash
  5. Script Date : 1/26/2016
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function respawn(NPC)
  11. spawn(NPC)
  12. end
  13. function casted_on(NPC, Spawn, Message)
  14. if Message == "inspect" then
  15. Dialog1(NPC, Spawn)
  16. end
  17. end
  18. function Dialog1(NPC, Spawn)
  19. local conversation = CreateConversation()
  20. local fun_name
  21. if not HasCompletedQuest(Spawn, 175) then
  22. fun_name = "Dialog1_1"
  23. else
  24. fun_name = "Dialog1_2"
  25. end
  26. AddConversationOption(conversation, "Inspect the eyes.", fun_name)
  27. AddConversationOption(conversation, "Stop examining the head.", "CloseConversation")
  28. StartDialogConversation(conversation, 1, NPC, Spawn, "This is a mounted boar's head. It appears decayed and smells horrid. It looks as though as taxidermist never preserved it. There is something odd about the eyes.")
  29. end
  30. function Dialog1_1(NPC, Spawn)
  31. local conversation = CreateConversation()
  32. if HasQuest(Spawn, 175) then
  33. AddConversationOption(conversation, "Place the black eye in the hollow socket.", "Dialog2")
  34. end
  35. AddConversationOption(conversation, "Stop examining the head.", "CloseConversation")
  36. StartDialogConversation(conversation, 1, NPC, Spawn, "There is only one black eye. The eye appears to be made of glass, like a marble. The second eye socket is hollow.")
  37. end
  38. function Dialog1_2(NPC, Spawn)
  39. local conversation = CreateConversation()
  40. AddConversationOption(conversation, "Stop examining the head.", "CloseConversation")
  41. StartDialogConversation(conversation, 1, NPC, Spawn, "There are two black marble-like eyes inset into the creature.")
  42. end
  43. function Dialog2(NPC, Spawn)
  44. local conversatoin = CreateConversation()
  45. AddConversationOption(conversation, "Stop examining the head.", "CloseConversation")
  46. StartDialogConversation(conversation, 1, NPC, Spawn, "You place the black marble-like eye in the hollow socket. A key falls from the mouth of the boar. This key appears to match the Barracks locks here in Nektropos.")
  47. SetStepComplete(Spawn, 175, 1)
  48. end