GatekeeperMalren.lua 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. --[[
  2. Script Name : SpawnScripts/Sprawl/GatekeeperMalren.lua
  3. Script Purpose : Gatekeeper Malren <Freeport Militia>
  4. Script Author : Scatman
  5. Script Date : 2009.07.26
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. if GetLevel(Spawn) < 12 then
  16. local choice = math.random(1,2)
  17. if choice == 1 then
  18. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/gatekeeper_malren/fprt_adv03_sprawl/quest/warning_malren_warning_6607638a.mp3", "Beyond this gate lies a warzone! Beware!", "brandish", 3114668751, 2889688375, Spawn)
  19. elseif choice == 2 then
  20. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/gatekeeper_malren/fprt_adv03_sprawl/quest/warning_malren_warning_2d5ced43.mp3", "Heed my warning! Beware the danger ahead, adventurer!", "no", 1710591431, 2684761663, Spawn)
  21. end
  22. end
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. conversation = CreateConversation()
  27. if GetLevel(Spawn) < 12 then
  28. AddConversationOption(conversation, "What do you mean?", "WhatDoYouMean")
  29. AddConversationOption(conversation, "Thanks for the warning.")
  30. StartConversation(conversation, NPC, Spawn, "Be wary, adventurer. Great danger lies beyond this gate!")
  31. else
  32. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/gatekeeper_malora/fprt_adv03_sprawl/quests/protector_malora004.mp3", "", "", 1115741315, 3103270743, Spawn)
  33. AddConversationOption(conversation, "Be well, Malren.")
  34. StartConversation(conversation, NPC, Spawn, "It is my duty to ensure the safety of less-experienced adventurers. Someone of your skill need not worry about traveling beyond this gate.")
  35. end
  36. end
  37. function WhatDoYouMean(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. conversation = CreateConversation()
  40. AddConversationOption(conversation, "Where should I go once I get to a district?", "OnceGetDestrict")
  41. AddConversationOption(conversation, "I will do so.")
  42. StartConversation(conversation, NPC, Spawn, "This gate leads to the Freeport Ruins which is currently under attack. If you seek to travel there, I highly recommend you go back through Big Bend or Scale Yard instead.")
  43. end
  44. function OnceGetDestrict(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. conversation = CreateConversation()
  47. AddConversationOption(conversation, "Why is travel beyond this gate so dangerous?", "WhySoDangerous")
  48. AddConversationOption(conversation, "Thank you.")
  49. StartConversation(conversation, NPC, Spawn, "Make your way to the docks in either district, then use the bell to summon transport outside of freeport. You can select the Ruins as your destination.")
  50. end
  51. function WhySoDangerous(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. conversation = CreateConversation()
  54. AddConversationOption(conversation, "Thanks for the advice, Malren.")
  55. StartConversation(conversation, NPC, Spawn, "Traveling through this gate isn't very safe unless you bring a group of friends with you. Some very powerful orcs are clashing with the Freeport Militia just beyond it. Entering the Ruins by way of the docks is a much wiser approach.")
  56. end