9
3

FosterGraham.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/FosterGraham.lua
  3. Script Purpose : Foster Graham
  4. Script Author : Scatman
  5. Script Date : 2009.08.08
  6. Script Notes :
  7. --]]
  8. local QUEST_1 = 309
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, QUEST_1)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  19. PlayFlavor(NPC, "voiceover/english/foster_graham/qey_village01/qey_village01_foster_graham_callout_127b0ec4.mp3", "Come to gaze upon me, have you?", "smirk", 918053570, 706207599, Spawn)
  20. end
  21. end
  22. function LeaveRange(NPC, Spawn)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. conversation = CreateConversation()
  27. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  28. AddConversationOption(conversation, "I see a few lines forming on that face of yours.", "dlg_22_1")
  29. elseif HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2 then
  30. AddConversationOption(conversation, "I have your toxic glands.", "dlg_5_1")
  31. end
  32. AddConversationOption(conversation, "I will leave you to yourself.")
  33. PlayFlavor(NPC, "voiceover/english/foster_graham/qey_village01/fostergraham000.mp3", "", "", 2810929799, 1251082764, Spawn)
  34. StartConversation(conversation, NPC, Spawn, "Ahh... my reflection in the water. How glorious! Nothing is more pleasurable than gazing upon my own beauty.")
  35. end
  36. function dlg_22_1(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. conversation = CreateConversation()
  39. PlayFlavor(NPC, "voiceover/english/foster_graham/qey_village01/fostergraham001.mp3", "", "", 716330203, 409660304, Spawn)
  40. AddConversationOption(conversation, "Stop the drama. I can get what you need.", "OfferQuest1")
  41. AddConversationOption(conversation, "That's your problem, not mine.")
  42. StartConversation(conversation, NPC, Spawn, "What! It cannot be! Nooooo... Where is my face cream? My 'Erollisi's Bane?' Have I run out? Its secret ingredient is rare; the local shops have all been depleted of it. Alas!")
  43. end
  44. function OfferQuest1(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. OfferQuest(NPC, Spawn, QUEST_1)
  47. end
  48. function dlg_5_1(NPC, Spawn)
  49. SetStepComplete(Spawn, QUEST_1, 2)
  50. FaceTarget(NPC, Spawn)
  51. conversation = CreateConversation()
  52. PlayFlavor(NPC, "voiceover/english/foster_graham/qey_village01/fostergraham003.mp3", "", "", 399908880, 4101526749, Spawn)
  53. AddConversationOption(conversation, "Farewell.")
  54. StartConversation(conversation, NPC, Spawn, "Many thanks, my homely friend. Take this payment for your service and use it to improve your looks. ")
  55. end