BeggarsCourt.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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, 82.78, -7.08, 112.83, 10, "InRange", "LeaveRange")
  15. SetLocationProximityFunction(Zone, 70.43, 5.02, -22.17, 20, "InRangeQuest4", "LeaveRange")
  16. end
  17. function InRange(Zone, Spawn)
  18. if HasQuest(Spawn, HALFELF_MENTOR_QUEST_2) and GetQuestStep(Spawn, HALFELF_MENTOR_QUEST_2) == 2 then
  19. MuffledVoice = GetSpawn(Spawn, MUFFLED_VOICES)
  20. if MuffledVoice ~= nil then
  21. conversation = CreateConversation()
  22. PlayFlavor(MuffledVoice, "voiceover/english/tutorial_revamp/muffled_voices/fprt_hood04/quests/muffled_voice/voice000.mp3", "", "", 2566882511, 3306688521, Spawn)
  23. AddConversationOption(conversation, "[continue listening]", "dlg_18_1")
  24. StartConversation(conversation, MuffledVoice, Spawn, "Do you have him?")
  25. end
  26. end
  27. end
  28. function InRangeQuest4(Zone, Spawn)
  29. if HasQuest(Spawn, HALFELF_MENTOR_QUEST_4) and GetQuestStep(Spawn, HALFELF_MENTOR_QUEST_4) == 1 then
  30. if GetSpawn(Spawn, A_ROMMULS_LOYALIST) == nil then
  31. -- Two Rommuls loyalists
  32. choice = math.random(1, 2)
  33. if choice == 1 then
  34. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 82.29, 5.02, -10.46, 259)
  35. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 80.86, 5.02, -7.66, 276)
  36. SpawnByLocationID(GetZone(Spawn), 403036)
  37. SpawnByLocationID(GetZone(Spawn), 403037)
  38. elseif choice == 2 then
  39. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 82.29, 5.02, -10.46, 259)
  40. --SpawnMob(Zone, A_ROMMULS_LOYALIST, false, 80.86, 5.02, -7.66, 276)
  41. SpawnByLocationID(GetZone(Spawn), 403036)
  42. SpawnByLocationID(GetZone(Spawn), 403037)
  43. end
  44. -- Thaen Sevellos
  45. --SpawnMob(Zone, THAEN_SEVELLOS, false, 86.86, 5.02, -9.76, 81)
  46. SpawnByLocationID(GetZone(Spawn), 403035)
  47. end
  48. end
  49. end
  50. function LeaveRange(zone, Spawn)
  51. end