9
3

Dalonalis.lua 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : SpawnScripts/Castleview/Dalonalis.lua
  3. Script Purpose : Dalonalis <Banker>
  4. Script Author : Scatman
  5. Script Date : 2009.10.03
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  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. if HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==4 then
  17. FaceTarget(NPC, Spawn)
  18. PlayFlavor(NPC, "voiceover/english/banker_dalonalis/qey_village04/100_banker_dalonalis_housing_quest_1_53e2b5fb.mp3", "If you're opening a new account, I can help you over here.", "bye", 626240462, 2916710020, Spawn)
  19. end
  20. end
  21. function hailed(NPC, Spawn)
  22. if GetFactionAmount(Spawn,11) <0 then
  23. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  24. elseif HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==4 then
  25. Dialog2(NPC, Spawn)
  26. else
  27. Dialog1(NPC, Spawn)
  28. end
  29. end
  30. function Dialog1(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. Dialog.New(NPC, Spawn)
  33. Dialog.AddDialog("If you're opening a new account, I can help you over here.")
  34. Dialog.AddVoiceover("voiceover/english/banker_dalonalis/qey_village04/100_banker_dalonalis_housing_quest_1_53e2b5fb.mp3", 626240462, 2916710020)
  35. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  36. -- PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..MakeRandomInt(1,3).."_1022.mp3", "", "hello", 0, 0, Spawn)
  37. Dialog.AddOption("I'm just working with my current account today.")
  38. Dialog.Start()
  39. end
  40. function Dialog2(NPC, Spawn)
  41. FaceTarget(NPC, Spawn)
  42. Dialog.New(NPC, Spawn)
  43. 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?")
  44. Dialog.AddVoiceover("voiceover/english/banker_dalonalis/qey_village04/banker_dalonalis002.mp3", 3048971647, 529382564)
  45. Dialog.AddOption(""..GetName(Spawn).."","Dialog2a")
  46. Dialog.Start()
  47. end
  48. function Dialog2a(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. Dialog.New(NPC, Spawn)
  51. Dialog.AddDialog("Occupation?")
  52. Dialog.AddVoiceover("voiceover/english/banker_dalonalis/qey_village04/banker_dalonalis003.mp3", 84065886, 2587274709)
  53. Dialog.AddOption("Adventurer","Dialog2b")
  54. Dialog.AddOption("Crafter","Dialog2b")
  55. if GetRace(Spawn)==4 then
  56. Dialog.AddOption("Fly catcher doesn't seem right... Harvester?","Dialog2b")
  57. elseif GetRace(Spawn)==8 then
  58. Dialog.AddOption("How could I sum up living numerous lifetimes in one word?!... Let's say \"Many\"?","Dialog2b")
  59. end
  60. Dialog.Start()
  61. end
  62. function Dialog2b(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. Dialog.AddDialog("That works. Finally, will you follow the rule of not depositing in your account any poison plants, live animals or dangerous potions?")
  66. Dialog.AddVoiceover("voiceover/english/banker_dalonalis/qey_village04/banker_dalonalis004.mp3", 3855591766, 2694751634)
  67. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  68. Dialog.AddOption("Hmmm... okay, I agree.","Dialog2c")
  69. Dialog.AddOption("You mean I can't keep my... fine.","Dialog2c")
  70. Dialog.AddOption("Yes... is that really a question?","Dialog2c")
  71. Dialog.Start()
  72. end
  73. function Dialog2c(NPC, Spawn)
  74. if HasQuest(Spawn,5765) and GetQuestStep(Spawn,5765)==4 then
  75. SetStepComplete(Spawn, 5765,4)
  76. end
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. 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?")
  80. Dialog.AddVoiceover("voiceover/english/banker_dalonalis/qey_village04/banker_dalonalis005.mp3", 575209074, 1502962042)
  81. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  82. Dialog.AddOption("Not right now.")
  83. Dialog.Start()
  84. end