BeggarsCourt.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --[[
  2. Script Name : ZoneScripts/BeggarsCourt.lua
  3. Script Purpose :
  4. Script Author : (unknown author) (Updated by Cynnar)
  5. Script Date :
  6. Script Notes :
  7. --]]
  8. local HALFELF_MENTOR_QUEST_2 = 308 -- Dirty Work
  9. local HALFELF_MENTOR_QUEST_4 = 317 -- Thaen Sevellos
  10. local MUFFLED_VOICES = 1370104
  11. local A_ROMMULS_LOYALIST = 1370067
  12. local THAEN_SEVELLOS = 1370066
  13. function init_zone_script(Zone)
  14. SetLocationProximityFunction(Zone,63.94, -6.18, 100.11, 12, "Shrine","LeaveLocation")
  15. SetLocationProximityFunction(Zone, 82.78, -7.08, 112.83, 10, "InRange", "LeaveRange")
  16. SetLocationProximityFunction(Zone, 70.43, 5.02, -22.17, 20, "InRangeQuest4", "LeaveRange")
  17. end
  18. function InRange(Zone, Spawn)
  19. if HasQuest(Spawn, HALFELF_MENTOR_QUEST_2) and GetQuestStep(Spawn, HALFELF_MENTOR_QUEST_2) == 2 then
  20. MuffledVoice = GetSpawn(Spawn, MUFFLED_VOICES)
  21. if MuffledVoice ~= nil then
  22. conversation = CreateConversation()
  23. PlayFlavor(MuffledVoice, "voiceover/english/tutorial_revamp/muffled_voices/fprt_hood04/quests/muffled_voice/voice000.mp3", "", "", 2566882511, 3306688521, Spawn)
  24. AddConversationOption(conversation, "[continue listening]", "dlg_18_1")
  25. StartConversation(conversation, MuffledVoice, Spawn, "Do you have him?")
  26. end
  27. end
  28. end
  29. function InRangeQuest4(Zone, Spawn)
  30. if HasQuest(Spawn, HALFELF_MENTOR_QUEST_4) and GetQuestStep(Spawn, HALFELF_MENTOR_QUEST_4) == 1 then
  31. if GetSpawn(Spawn, A_ROMMULS_LOYALIST) == nil then
  32. -- Two Rommuls loyalists
  33. choice = math.random(1, 2)
  34. if choice == 1 then
  35. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 82.29, 5.02, -10.46, 259)
  36. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 80.86, 5.02, -7.66, 276)
  37. SpawnByLocationID(GetZone(Spawn), 403036)
  38. SpawnByLocationID(GetZone(Spawn), 403037)
  39. elseif choice == 2 then
  40. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 82.29, 5.02, -10.46, 259)
  41. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 80.86, 5.02, -7.66, 276)
  42. SpawnByLocationID(GetZone(Spawn), 403036)
  43. SpawnByLocationID(GetZone(Spawn), 403037)
  44. end
  45. -- Thaen Sevellos
  46. --SpawnMob(Zone, THAEN_SEVELLOS, false, 86.86, 5.02, -9.76, 81)
  47. SpawnByLocationID(GetZone(Spawn), 403035)
  48. end
  49. end
  50. end
  51. function player_entry(Zone, Player)
  52. SendPopUpMessage(Player, "Beggar's Court", 255, 255, 255)
  53. end
  54. function Shrine(Zone,Player)
  55. SendPopUpMessage(Player, "Fountain of Divine Retribution", 255, 255, 0)
  56. end