PennyGoodhearth.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/PennyGoodhearth.lua
  3. Script Purpose : Penny Goodhearth
  4. Script Author : Dorbin
  5. Script Date : 2022.01.11
  6. Script Notes :
  7. --]]
  8. local muffins = 5524
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  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 GetFactionAmount(Spawn,11) <0 then
  23. FaceTarget(NPC, Spawn)
  24. choice = math.random(1,2)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  29. end
  30. else
  31. PlayFlavor(NPC, "voiceover/english/penny_goodhearth/qey_north/pennygoodhearth.mp3", "", "", 3200414666, 3603496424, Spawn)
  32. if GetQuestStep(Spawn,muffins)==1 then
  33. AddConversationOption(conversation, "Wait! Duvo sent me to talk with you!", "Pickup")
  34. end
  35. AddConversationOption(conversation, "I'm sorry, I'll just get out of your way then.")
  36. StartConversation(conversation, NPC, Spawn, "Shoo ... Shoo ... Out of my way. I'm so very late! If you keep pestering me, I'll never finish preparing Lord and Lady Ironforge's supper.")
  37. end
  38. end
  39. function Pickup(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. PlayFlavor(NPC, "voiceover/english/penny_goodhearth/qey_north/pennygoodhearth000.mp3", "", "swear", 2560859604, 248794504, Spawn)
  42. local conversation = CreateConversation()
  43. AddConversationOption(conversation, "Thanks. I'll just be going", "FinishQuest")
  44. StartConversation(conversation, NPC, Spawn, "Duvo? Blast that rascal! He was supposed to pick up my muffin recipe this morning! Here it is ... Now, be gone ... I don't have time for idle chatter.")
  45. end
  46. function FinishQuest(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. SetStepComplete(Spawn,muffins, 1)
  49. end