Vertbridge.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/Vertbridge.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.03 08:09:10
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Fighter3 = 5735
  10. local Priest3 = 5734
  11. local Mage3 = 5736
  12. local Scout3 = 5737
  13. function spawn(NPC)
  14. SetRequiredQuest(NPC, Fighter3, 3, 1,1)
  15. SetRequiredQuest(NPC, Priest3, 3, 1,1)
  16. SetRequiredQuest(NPC, Mage3, 3, 1,1)
  17. SetRequiredQuest(NPC, Scout3, 3, 1,1)
  18. SetPlayerProximityFunction(NPC, 11, "InRange", "LeaveRange")
  19. end
  20. function InRange(NPC,Spawn)
  21. if GetQuestStep(Spawn, Fighter3)==3 or GetQuestStep(Spawn, Priest3)==3 or GetQuestStep(Spawn, Mage3)==3 or GetQuestStep(Spawn, Scout3)==3 then
  22. hailed(NPC, Spawn)
  23. end
  24. end
  25. function casted_on(NPC, Spawn, SpellName)
  26. if SpellName == 'bank' then
  27. hailed2(NPC, Spawn)
  28. end
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. Dialog.New(NPC, Spawn)
  33. Dialog.AddDialog("Ah, so you've found my little bank. If you are tired of carrying around any possessions, please feel free to deposit them into your account.")
  34. Dialog.AddVoiceover("voiceover/english/banker_vertbridge/tutorial_island02/bankervertbridge001.mp3", 677968905, 2264651259)
  35. PlayFlavor(NPC, "", "", "hello", 0,0, Spawn)
  36. Dialog.AddOption("Thank you.")
  37. Dialog.Start()
  38. if GetQuestStep(Spawn, Fighter3)==3 then
  39. SetStepComplete(Spawn,Fighter3,3)
  40. elseif GetQuestStep(Spawn, Priest3)==3 then
  41. SetStepComplete(Spawn,Priest3,3)
  42. elseif GetQuestStep(Spawn, Mage3)==3 then
  43. SetStepComplete(Spawn,Mage3,3)
  44. elseif GetQuestStep(Spawn, Scout3)==3 then
  45. SetStepComplete(Spawn,Scout3,3)
  46. end
  47. end
  48. function hailed2(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. Dialog.New(NPC, Spawn)
  51. Dialog.AddDialog("Ah, so you've found my little bank. If you are tired of carrying around any possessions, please feel free to deposit them into your account.")
  52. Dialog.AddVoiceover("voiceover/english/banker_vertbridge/tutorial_island02/bankervertbridge001.mp3", 677968905, 2264651259)
  53. PlayFlavor(NPC, "", "", "hello", 0,0, Spawn)
  54. Dialog.AddOption("I'm just picking up some footware that were left for me. Thanks.")
  55. Dialog.AddOption("Thank you.")
  56. Dialog.Start()
  57. if GetQuestStep(Spawn, Fighter3)==3 then
  58. SetStepComplete(Spawn,Fighter3,3)
  59. elseif GetQuestStep(Spawn, Priest3)==3 then
  60. SetStepComplete(Spawn,Priest3,3)
  61. elseif GetQuestStep(Spawn, Mage3)==3 then
  62. SetStepComplete(Spawn,Mage3,3)
  63. elseif GetQuestStep(Spawn, Scout3)==3 then
  64. SetStepComplete(Spawn,Scout3,3)
  65. end
  66. end
  67. function respawn(NPC)
  68. spawn(NPC)
  69. end