FosterGraham.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. local Timer = false
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, QUEST_1)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if Timer == false then
  19. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  20. FaceTarget(NPC, Spawn)
  21. Timer = true
  22. 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)
  23. AddTimer(NPC,21000,"ResetTimer")
  24. end
  25. end
  26. end
  27. function ResetTimer(NPC, Spawn)
  28. Timer = false
  29. end
  30. function LeaveRange(NPC, Spawn)
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  36. AddConversationOption(conversation, "I see a few lines forming on that face of yours.", "dlg_22_1")
  37. elseif HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2 then
  38. AddConversationOption(conversation, "I have your toxic glands.", "dlg_5_1")
  39. end
  40. AddConversationOption(conversation, "I will leave you to yourself.")
  41. PlayFlavor(NPC, "voiceover/english/foster_graham/qey_village01/fostergraham000.mp3", "", "", 2810929799, 1251082764, Spawn)
  42. StartConversation(conversation, NPC, Spawn, "Ahh... my reflection in the water. How glorious! Nothing is more pleasurable than gazing upon my own beauty.")
  43. end
  44. function dlg_22_1(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. conversation = CreateConversation()
  47. PlayFlavor(NPC, "voiceover/english/foster_graham/qey_village01/fostergraham001.mp3", "", "scream", 716330203, 409660304, Spawn)
  48. AddConversationOption(conversation, "Stop the drama. I can get what you need.", "OfferQuest1")
  49. AddConversationOption(conversation, "That's your problem, not mine.")
  50. 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!")
  51. end
  52. function OfferQuest1(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. OfferQuest(NPC, Spawn, QUEST_1)
  55. end
  56. function dlg_5_1(NPC, Spawn)
  57. SetStepComplete(Spawn, QUEST_1, 2)
  58. FaceTarget(NPC, Spawn)
  59. conversation = CreateConversation()
  60. PlayFlavor(NPC, "voiceover/english/foster_graham/qey_village01/fostergraham003.mp3", "", "smile", 399908880, 4101526749, Spawn)
  61. AddConversationOption(conversation, "Farewell.")
  62. StartConversation(conversation, NPC, Spawn, "Many thanks, my homely friend. Take this payment for your service and use it to improve your looks.")
  63. end