GrennStiles.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : SpawnScripts/ThunderingSteppes/GrennStiles.lua
  3. Script Author : Patrick_Boyd
  4. Script Date : 2020.09.07
  5. Script Purpose : Grenn Stiles spawn script
  6. :
  7. --]]
  8. local RecycleTheOldFashionedWay = 111
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, RecycleTheOldFashionedWay)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. end
  17. function LeaveRange(NPC, Spawn)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. conversation = CreateConversation()
  22. if HasQuest(Spawn, RecycleTheOldFashionedWay) then
  23. -- Has the quest
  24. if GetQuestStep(Spawn, RecycleTheOldFashionedWay) == 1 then
  25. -- Has not completed the quest yet
  26. AddConversationOption(conversation, "Er, no, not quite. Just stopped by to say hello. I'll be back")
  27. StartConversation(conversation, NPC, Spawn, "Ah! Got the bones, eh? Let me see them.")
  28. else
  29. -- Has completed the quest
  30. AddConversationOption(conversation, "Er, no, not quite. Just stopped by to say hello. I'll be back")
  31. -- This is placeholder text, not in the dump. TODO replace with actual text...
  32. AddConversationOption(conversation, "Yes, right here!", "EndRecycling")
  33. StartConversation(conversation, NPC, Spawn, "Ah! Got the bones, eh? Let me see them.")
  34. end
  35. else
  36. AddConversationOption(conversation, "What kind of opportunity?", "Option1")
  37. AddConversationOption(conversation, "No, I look like someone who's heading the other way.")
  38. StartConversation(conversation, NPC, Spawn, "Hey! Don't miss out on this once-in-a-lifetime opportunity!")
  39. end
  40. end
  41. function Option1(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. AddConversationOption(conversation, "If the price is right", "Option2")
  45. AddConversationOption(conversation, "No, I'm not")
  46. StartConversation(conversation, NPC, Spawn, "Why, in farming of course. Lots of opportunity to grow in the farming industry--HA! Get it? Grow ... farming ... Oh, Never mind ... On any note, I've made a bundle selling fertilizer to the farmers in the Steppes. I'm looking for a business partner - no investment required. Yuo'd be silly to pass up this opportunity!")
  47. end
  48. function Option2(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. OfferQuest(NPC, Spawn, RecycleTheOldFashionedWay)
  51. end
  52. function EndRecycling(NPC, Spawn)
  53. SetStepComplete(Spawn, RecycleTheOldFashionedWay, 2)
  54. end