9
3

Deephathom.lua 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/Deephathom.lua
  3. Script Purpose : Deephathom <Banker>
  4. Script Author : Scatman
  5. Script Date : 2009.09.15
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. if HasQuest(Spawn,5760) and GetQuestStep(Spawn,5760)==4 then
  16. FaceTarget(NPC, Spawn)
  17. PlayFlavor(NPC, "voiceover/english/banker_deephathom/qey_village05/100_banker_halfelf_deephathom_housing_quest_1_53e2b5fb.mp3", "If you're opening a new account, I can help you over here.", "bye", 2132928459, 1021738095, Spawn)
  18. end
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. conversation = CreateConversation()
  23. PlayFlavor(NPC, "voiceover/english/banker_deephathom/qey_village05/banker_deephathom001.mp3", "", "", 1593106270, 3129539503, Spawn)
  24. AddConversationOption(conversation, "No, I'm not.")
  25. StartConversation(conversation, NPC, Spawn, "Please tell me you're not trying to get a loan with livestock collateral!")
  26. end
  27. function hailed(NPC, Spawn)
  28. if GetFactionAmount(Spawn,11) <0 then
  29. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  30. elseif HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==4 then
  31. Dialog2(NPC, Spawn)
  32. else
  33. Dialog1(NPC, Spawn)
  34. end
  35. end
  36. function Dialog1(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. Dialog.New(NPC, Spawn)
  39. Dialog.AddDialog("Please tell me you're not trying to get a loan with livestock collateral!")
  40. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom001.mp3", 1593106270, 3129539503)
  41. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  42. Dialog.AddOption("No, I'm not.")
  43. Dialog.Start()
  44. end
  45. function Dialog2(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. Dialog.AddDialog("I see the caretaker gave you my message. I'll help you open your account. First, I need some information from you. What's your name?")
  49. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom002.mp3", 568039140, 269795142)
  50. Dialog.AddOption(""..GetName(Spawn).."","Dialog2a")
  51. Dialog.Start()
  52. end
  53. function Dialog2a(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. Dialog.AddDialog("Occupation?")
  57. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom003.mp3", 3528419430, 537050664)
  58. Dialog.AddOption("Adventurer","Dialog2b")
  59. Dialog.AddOption("Crafter","Dialog2b")
  60. if GetRace(Spawn)==5 then
  61. Dialog.AddOption("Part-Adventurer, Part-Crafter","Dialog2b")
  62. elseif GetRace(Spawn)==15 then
  63. Dialog.AddOption("Well, I can tell you I'm NOT part tree.","Dialog2b")
  64. elseif GetRace(Spawn)==16 then
  65. Dialog.AddOption("If you put down sprite...","Dialog2b")
  66. end
  67. Dialog.Start()
  68. end
  69. function Dialog2b(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. Dialog.New(NPC, Spawn)
  72. Dialog.AddDialog("That works. Finally, will you follow the rule of not depositing in your account any poison plants, live animals or dangerous potions?")
  73. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom004.mp3", 1349974634, 2262781770)
  74. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  75. Dialog.AddOption("Hmmm... okay, I agree.","Dialog2c")
  76. Dialog.AddOption("Ugh, well that takes all the fun out of it. Fine.","Dialog2c")
  77. Dialog.AddOption("Yes... is that really a question?","Dialog2c")
  78. Dialog.Start()
  79. end
  80. function Dialog2c(NPC, Spawn)
  81. if HasQuest(Spawn,5761) and GetQuestStep(Spawn,5761)==4 then
  82. SetStepComplete(Spawn, 5761,4)
  83. end
  84. FaceTarget(NPC, Spawn)
  85. Dialog.New(NPC, Spawn)
  86. Dialog.AddDialog("Excellent! Your account is open, and a spot is reserved for you in the vaults. Please visit us anytime with your banking needs. Do you need anything else?")
  87. Dialog.AddVoiceover("voiceover/english/banker_deephathom/qey_village05/banker_deephathom005.mp3", 1554235105, 516416947)
  88. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  89. Dialog.AddOption("Not right now.")
  90. Dialog.AddOption("Yes, do you offer lines of credit?","Dialog1")
  91. Dialog.Start()
  92. end