From 04979b9f58d8d7a50fb00b6918d6f736d7390c29 Mon Sep 17 00:00:00 2001 From: chase Date: Thu, 28 Dec 2023 04:43:05 -0800 Subject: [PATCH 1/9] firiona: Maidens_Voyage signal BB shuttle announcement (departing soon) --- firiona/Maidens_Voyage.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/firiona/Maidens_Voyage.lua b/firiona/Maidens_Voyage.lua index 900975cb..70aabbc7 100644 --- a/firiona/Maidens_Voyage.lua +++ b/firiona/Maidens_Voyage.lua @@ -11,7 +11,7 @@ function event_waypoint_arrive(e) local minute = zone_time["zone_minute"]; if(e.wp == 12) then eq.debug("Boat to timorous (18) has reached the docks. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - elseif(e.wp == 17) then + elseif(e.wp == 17) then eq.debug("Boat to timorous (18) has reached waypoint 17. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); elseif(e.wp == 18) then eq.debug("Boat to timorous (18) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); @@ -27,4 +27,15 @@ function event_waypoint_arrive(e) end ); end +end + +function event_waypoint_depart(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.wp == 12) then + eq.debug("Boat to timorous (18) has departed the docks. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + -- signal BB shuttles are going to depart soon + eq.signal(68236,1); + end end \ No newline at end of file From a9a3e78f98de43e889df4aaed670f520b06ac6c4 Mon Sep 17 00:00:00 2001 From: chase Date: Thu, 28 Dec 2023 04:44:44 -0800 Subject: [PATCH 2/9] timorous: Maidens_Voyage signaling Shuttles to start moving --- timorous/Maidens_Voyage.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/timorous/Maidens_Voyage.lua b/timorous/Maidens_Voyage.lua index 7cdacd2b..8bccd4f0 100644 --- a/timorous/Maidens_Voyage.lua +++ b/timorous/Maidens_Voyage.lua @@ -14,9 +14,13 @@ function event_waypoint_arrive(e) eq.debug("Boat to firiona (2) has reached the Elf docks. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); elseif(e.wp == 5) then eq.signal(96075,2); -- NPC: Island_Shuttle - elseif(e.wp == 19) then + elseif(e.wp == 18) then -- signal one before 19 to allow them to move sooner eq.debug("Boat to firiona (2) has reached the shuttle. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.signal(842,1); -- NPC: Captains_Skiff + --eq.signal(842,1); -- NPC: Captains_Skiff + eq.signal(846,1); -- NPC: Shuttle_I + eq.signal(847,1); -- NPC: Shuttle_II + eq.signal(848,1); -- NPC: Shuttle_III + eq.signal(849,1); -- NPC: Shuttle_IV elseif(e.wp == 30) then eq.debug("Boat to firiona (2) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); eq.get_entity_list():ForeachClient( @@ -44,3 +48,10 @@ function event_waypoint_arrive(e) ); end end + +function event_waypoint_depart(e) + if(e.wp == 5) then + -- signal BB shuttles to depart + eq.signal(68236,2); + end +end From 6fa5f8c39c257f9db414d15a49c25c6dbafa9a8e Mon Sep 17 00:00:00 2001 From: chase Date: Thu, 28 Dec 2023 04:45:44 -0800 Subject: [PATCH 3/9] butcher: Glisse_Bluesea signal processing for Announcements & Shuttles --- butcher/Glisse_Bluesea.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 butcher/Glisse_Bluesea.lua diff --git a/butcher/Glisse_Bluesea.lua b/butcher/Glisse_Bluesea.lua new file mode 100644 index 00000000..1295342c --- /dev/null +++ b/butcher/Glisse_Bluesea.lua @@ -0,0 +1,21 @@ +function event_spawn(e) + -- enable Shuttles on initial zone start + eq.spawn_condition("butcher",3,1); + eq.spawn_condition("butcher",4,1); + eq.spawn_condition("butcher",5,1); + eq.spawn_condition("butcher",6,1); +end + +function event_signal(e) + if(e.signal == 1) then + e.self:Shout("The Maiden's Voyage has departed the outpost at Firiona Vie. Please be ready to board the shuttles shortly, if you desire to make the journey to Kunark."); + end + + if(e.signal == 2) then + e.self:Shout("The Maiden's Voyage is now ready to be boarded. Please form an orderly line to the shuttles, and remember, no pushing!"); + eq.signal(846, 1); + eq.signal(847, 1); + eq.signal(848, 1); + eq.signal(849, 1); + end + end \ No newline at end of file From 88b455044677ad836924b9895977290143b39d59 Mon Sep 17 00:00:00 2001 From: chase Date: Thu, 28 Dec 2023 04:46:17 -0800 Subject: [PATCH 4/9] butcher/timorous: initial scripts for Shuttle_I, Shuttle_II, Shuttle_III, Shuttle_IV --- butcher/Shuttle_I.lua | 39 +++++++++++++++++++++++++++++++++++++++ butcher/Shuttle_II.lua | 39 +++++++++++++++++++++++++++++++++++++++ butcher/Shuttle_III.lua | 39 +++++++++++++++++++++++++++++++++++++++ butcher/Shuttle_IV.lua | 39 +++++++++++++++++++++++++++++++++++++++ timorous/Shuttle_I.lua | 34 ++++++++++++++++++++++++++++++++++ timorous/Shuttle_II.lua | 34 ++++++++++++++++++++++++++++++++++ timorous/Shuttle_III.lua | 34 ++++++++++++++++++++++++++++++++++ timorous/Shuttle_IV.lua | 34 ++++++++++++++++++++++++++++++++++ 8 files changed, 292 insertions(+) create mode 100644 butcher/Shuttle_I.lua create mode 100644 butcher/Shuttle_II.lua create mode 100644 butcher/Shuttle_III.lua create mode 100644 butcher/Shuttle_IV.lua create mode 100644 timorous/Shuttle_I.lua create mode 100644 timorous/Shuttle_II.lua create mode 100644 timorous/Shuttle_III.lua create mode 100644 timorous/Shuttle_IV.lua diff --git a/butcher/Shuttle_I.lua b/butcher/Shuttle_I.lua new file mode 100644 index 00000000..9a4d76de --- /dev/null +++ b/butcher/Shuttle_I.lua @@ -0,0 +1,39 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.start(20); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(16); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 20 and e.wp == 11) then + eq.stop(); + eq.move_to(3157, 879, -12, 65.27, true); + end + if(e.gridid == 16 and e.wp == 11) then + eq.spawn_condition("butcher",3,0); + eq.spawn_condition("timorous",5,1); + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7580, 3620, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 846) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file diff --git a/butcher/Shuttle_II.lua b/butcher/Shuttle_II.lua new file mode 100644 index 00000000..dbae3548 --- /dev/null +++ b/butcher/Shuttle_II.lua @@ -0,0 +1,39 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.start(21); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(17); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 21 and e.wp == 11) then + eq.stop(); + eq.move_to(3158, 834, -13, 65.27, true); + end + if(e.gridid == 17 and e.wp == 11) then + eq.spawn_condition("butcher",4,0); + eq.spawn_condition("timorous",6,1); + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7580, 3580, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 847) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file diff --git a/butcher/Shuttle_III.lua b/butcher/Shuttle_III.lua new file mode 100644 index 00000000..ac52f6da --- /dev/null +++ b/butcher/Shuttle_III.lua @@ -0,0 +1,39 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.start(22); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(18); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 22 and e.wp == 11) then + eq.stop(); + eq.move_to(3067, 834, -13, 65.27, true); + end + if(e.gridid == 18 and e.wp == 11) then + eq.spawn_condition("butcher",5,0); + eq.spawn_condition("timorous",7,1); + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7665, 3580, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 848) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file diff --git a/butcher/Shuttle_IV.lua b/butcher/Shuttle_IV.lua new file mode 100644 index 00000000..01a9b9a3 --- /dev/null +++ b/butcher/Shuttle_IV.lua @@ -0,0 +1,39 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.start(23); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(19); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 23 and e.wp == 11) then + eq.stop(); + eq.move_to(3067, 879, -12, 65.27, true); + end + if(e.gridid == 19 and e.wp == 11) then + eq.spawn_condition("butcher",6,0); + eq.spawn_condition("timorous",8,1); + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7665, 3620, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 849) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file diff --git a/timorous/Shuttle_I.lua b/timorous/Shuttle_I.lua new file mode 100644 index 00000000..8dfd629c --- /dev/null +++ b/timorous/Shuttle_I.lua @@ -0,0 +1,34 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(16); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 16 and e.wp == 3) then + eq.spawn_condition("butcher",3,1); + eq.spawn_condition("timorous",5,0); + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3595, 530, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 846) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file diff --git a/timorous/Shuttle_II.lua b/timorous/Shuttle_II.lua new file mode 100644 index 00000000..ec163823 --- /dev/null +++ b/timorous/Shuttle_II.lua @@ -0,0 +1,34 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(17); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 17 and e.wp == 8) then + eq.spawn_condition("butcher",4,1); + eq.spawn_condition("timorous",6,0); + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3595, 491, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 847) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file diff --git a/timorous/Shuttle_III.lua b/timorous/Shuttle_III.lua new file mode 100644 index 00000000..283fffea --- /dev/null +++ b/timorous/Shuttle_III.lua @@ -0,0 +1,34 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(18); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 18 and e.wp == 9) then + eq.spawn_condition("butcher",5,1); + eq.spawn_condition("timorous",7,0); + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3529, 556, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 848) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file diff --git a/timorous/Shuttle_IV.lua b/timorous/Shuttle_IV.lua new file mode 100644 index 00000000..dad916ed --- /dev/null +++ b/timorous/Shuttle_IV.lua @@ -0,0 +1,34 @@ +function event_spawn(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); +end + +function event_signal(e) + if(e.signal == 1) then + eq.start(19); + end + end + +function event_waypoint_arrive(e) + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 19 and e.wp == 4) then + eq.spawn_condition("butcher",6,1); + eq.spawn_condition("timorous",8,0); + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3536, 589, 19, 0); + end, + function(ent) + if(ent:GetBoatID() == 849) then + return true; + end + return false; + end + ); + end +end \ No newline at end of file From 7eba840de62fca218b2c52ce8b95ab1a5dc232a2 Mon Sep 17 00:00:00 2001 From: chase Date: Fri, 29 Dec 2023 01:52:28 -0800 Subject: [PATCH 5/9] butcher/timorous: finalized Shuttle_I, Shuttle_II, Shuttle_III, Shuttle_IV, Maidens_Voyage, Glisse_Bluesea scripts --- butcher/Glisse_Bluesea.lua | 16 +++++------ butcher/Shuttle_I.lua | 52 +++++++++++++++++------------------ butcher/Shuttle_II.lua | 54 ++++++++++++++++++------------------- butcher/Shuttle_III.lua | 52 +++++++++++++++++------------------ butcher/Shuttle_IV.lua | 52 +++++++++++++++++------------------ timorous/Maidens_Voyage.lua | 1 - timorous/Shuttle_I.lua | 50 +++++++++++++++++----------------- timorous/Shuttle_II.lua | 48 ++++++++++++++++----------------- timorous/Shuttle_III.lua | 50 +++++++++++++++++----------------- timorous/Shuttle_IV.lua | 50 +++++++++++++++++----------------- 10 files changed, 212 insertions(+), 213 deletions(-) diff --git a/butcher/Glisse_Bluesea.lua b/butcher/Glisse_Bluesea.lua index 1295342c..ec7118b0 100644 --- a/butcher/Glisse_Bluesea.lua +++ b/butcher/Glisse_Bluesea.lua @@ -11,11 +11,11 @@ function event_signal(e) e.self:Shout("The Maiden's Voyage has departed the outpost at Firiona Vie. Please be ready to board the shuttles shortly, if you desire to make the journey to Kunark."); end - if(e.signal == 2) then - e.self:Shout("The Maiden's Voyage is now ready to be boarded. Please form an orderly line to the shuttles, and remember, no pushing!"); - eq.signal(846, 1); - eq.signal(847, 1); - eq.signal(848, 1); - eq.signal(849, 1); - end - end \ No newline at end of file + if(e.signal == 2) then + e.self:Shout("The Maiden's Voyage is now ready to be boarded. Please form an orderly line to the shuttles, and remember, no pushing!"); + eq.signal(846, 1); + eq.signal(847, 1); + eq.signal(848, 1); + eq.signal(849, 1); + end +end \ No newline at end of file diff --git a/butcher/Shuttle_I.lua b/butcher/Shuttle_I.lua index 9a4d76de..817fdcd1 100644 --- a/butcher/Shuttle_I.lua +++ b/butcher/Shuttle_I.lua @@ -1,39 +1,39 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); eq.start(20); end function event_signal(e) - if(e.signal == 1) then - eq.start(16); - end - end + if(e.signal == 1) then + eq.start(16); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; if(e.gridid == 20 and e.wp == 11) then eq.stop(); - eq.move_to(3157, 879, -12, 65.27, true); + eq.move_to(3157, 877, -12, 65.27, true); end - if(e.gridid == 16 and e.wp == 11) then + if(e.gridid == 16 and e.wp == 11) then eq.spawn_condition("butcher",3,0); eq.spawn_condition("timorous",5,1); - eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(96, -7580, 3620, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 846) then - return true; - end - return false; - end - ); - end + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7580, 3620, 19, 72); + end, + function(ent) + if(ent:GetBoatID() == 846) then + return true; + end + return false; + end + ); + end end \ No newline at end of file diff --git a/butcher/Shuttle_II.lua b/butcher/Shuttle_II.lua index dbae3548..ddca6015 100644 --- a/butcher/Shuttle_II.lua +++ b/butcher/Shuttle_II.lua @@ -1,39 +1,39 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); eq.start(21); end function event_signal(e) - if(e.signal == 1) then - eq.start(17); - end - end + if(e.signal == 1) then + eq.start(17); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; if(e.gridid == 21 and e.wp == 11) then eq.stop(); - eq.move_to(3158, 834, -13, 65.27, true); + eq.move_to(3158, 836, -13, 65.27, true); end - if(e.gridid == 17 and e.wp == 11) then + if(e.gridid == 17 and e.wp == 11) then eq.spawn_condition("butcher",4,0); - eq.spawn_condition("timorous",6,1); - eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(96, -7580, 3580, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 847) then - return true; - end - return false; - end - ); - end + eq.spawn_condition("timorous",6,1); + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7580, 3580, 19, 72); + end, + function(ent) + if(ent:GetBoatID() == 847) then + return true; + end + return false; + end + ); + end end \ No newline at end of file diff --git a/butcher/Shuttle_III.lua b/butcher/Shuttle_III.lua index ac52f6da..0011edcc 100644 --- a/butcher/Shuttle_III.lua +++ b/butcher/Shuttle_III.lua @@ -1,39 +1,39 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); eq.start(22); end function event_signal(e) - if(e.signal == 1) then - eq.start(18); - end - end + if(e.signal == 1) then + eq.start(18); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; if(e.gridid == 22 and e.wp == 11) then eq.stop(); - eq.move_to(3067, 834, -13, 65.27, true); + eq.move_to(3067, 836, -13, 65.27, true); end - if(e.gridid == 18 and e.wp == 11) then + if(e.gridid == 18 and e.wp == 11) then eq.spawn_condition("butcher",5,0); eq.spawn_condition("timorous",7,1); - eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(96, -7665, 3580, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 848) then - return true; - end - return false; - end - ); - end + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7665, 3580, 19, 72); + end, + function(ent) + if(ent:GetBoatID() == 848) then + return true; + end + return false; + end + ); + end end \ No newline at end of file diff --git a/butcher/Shuttle_IV.lua b/butcher/Shuttle_IV.lua index 01a9b9a3..5e0ebc89 100644 --- a/butcher/Shuttle_IV.lua +++ b/butcher/Shuttle_IV.lua @@ -1,39 +1,39 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); eq.start(23); end function event_signal(e) - if(e.signal == 1) then - eq.start(19); - end - end + if(e.signal == 1) then + eq.start(19); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; if(e.gridid == 23 and e.wp == 11) then eq.stop(); - eq.move_to(3067, 879, -12, 65.27, true); + eq.move_to(3067, 877, -12, 65.27, true); end - if(e.gridid == 19 and e.wp == 11) then + if(e.gridid == 19 and e.wp == 11) then eq.spawn_condition("butcher",6,0); eq.spawn_condition("timorous",8,1); - eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(96, -7665, 3620, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 849) then - return true; - end - return false; - end - ); - end + eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(96, -7665, 3620, 19, 72); + end, + function(ent) + if(ent:GetBoatID() == 849) then + return true; + end + return false; + end + ); + end end \ No newline at end of file diff --git a/timorous/Maidens_Voyage.lua b/timorous/Maidens_Voyage.lua index 8bccd4f0..f9b28a71 100644 --- a/timorous/Maidens_Voyage.lua +++ b/timorous/Maidens_Voyage.lua @@ -16,7 +16,6 @@ function event_waypoint_arrive(e) eq.signal(96075,2); -- NPC: Island_Shuttle elseif(e.wp == 18) then -- signal one before 19 to allow them to move sooner eq.debug("Boat to firiona (2) has reached the shuttle. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - --eq.signal(842,1); -- NPC: Captains_Skiff eq.signal(846,1); -- NPC: Shuttle_I eq.signal(847,1); -- NPC: Shuttle_II eq.signal(848,1); -- NPC: Shuttle_III diff --git a/timorous/Shuttle_I.lua b/timorous/Shuttle_I.lua index 8dfd629c..786ddf63 100644 --- a/timorous/Shuttle_I.lua +++ b/timorous/Shuttle_I.lua @@ -1,34 +1,34 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); end function event_signal(e) - if(e.signal == 1) then - eq.start(16); - end - end + if(e.signal == 1) then + eq.start(16); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - if(e.gridid == 16 and e.wp == 3) then + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 16 and e.wp == 3) then eq.spawn_condition("butcher",3,1); eq.spawn_condition("timorous",5,0); - eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(68, 3595, 530, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 846) then - return true; - end - return false; - end - ); - end + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3595, 491, 19, 224); + end, + function(ent) + if(ent:GetBoatID() == 846) then + return true; + end + return false; + end + ); + end end \ No newline at end of file diff --git a/timorous/Shuttle_II.lua b/timorous/Shuttle_II.lua index ec163823..01d5577d 100644 --- a/timorous/Shuttle_II.lua +++ b/timorous/Shuttle_II.lua @@ -1,34 +1,34 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); end function event_signal(e) - if(e.signal == 1) then - eq.start(17); - end - end + if(e.signal == 1) then + eq.start(17); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - if(e.gridid == 17 and e.wp == 8) then + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 17 and e.wp == 8) then eq.spawn_condition("butcher",4,1); eq.spawn_condition("timorous",6,0); - eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(68, 3595, 491, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 847) then - return true; - end - return false; - end - ); + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3595, 452, 19, 224); + end, + function(ent) + if(ent:GetBoatID() == 847) then + return true; + end + return false; + end + ); end end \ No newline at end of file diff --git a/timorous/Shuttle_III.lua b/timorous/Shuttle_III.lua index 283fffea..7981f285 100644 --- a/timorous/Shuttle_III.lua +++ b/timorous/Shuttle_III.lua @@ -1,34 +1,34 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); end function event_signal(e) - if(e.signal == 1) then - eq.start(18); - end - end + if(e.signal == 1) then + eq.start(18); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - if(e.gridid == 18 and e.wp == 9) then + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 18 and e.wp == 9) then eq.spawn_condition("butcher",5,1); eq.spawn_condition("timorous",7,0); - eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(68, 3529, 556, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 848) then - return true; - end - return false; - end - ); - end + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3595, 413, 19, 224); + end, + function(ent) + if(ent:GetBoatID() == 848) then + return true; + end + return false; + end + ); + end end \ No newline at end of file diff --git a/timorous/Shuttle_IV.lua b/timorous/Shuttle_IV.lua index dad916ed..1140f98e 100644 --- a/timorous/Shuttle_IV.lua +++ b/timorous/Shuttle_IV.lua @@ -1,34 +1,34 @@ function event_spawn(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - e.self:Say("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + eq.debug("Boat spawned! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); end function event_signal(e) - if(e.signal == 1) then - eq.start(19); - end - end + if(e.signal == 1) then + eq.start(19); + end +end function event_waypoint_arrive(e) - local zone_time = eq.get_zone_time(); - local hour = zone_time["zone_hour"]; - local minute = zone_time["zone_minute"]; - if(e.gridid == 19 and e.wp == 4) then + local zone_time = eq.get_zone_time(); + local hour = zone_time["zone_hour"]; + local minute = zone_time["zone_minute"]; + if(e.gridid == 19 and e.wp == 4) then eq.spawn_condition("butcher",6,1); eq.spawn_condition("timorous",8,0); - eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.get_entity_list():ForeachClient( - function(ent) - ent:MovePC(68, 3536, 589, 19, 0); - end, - function(ent) - if(ent:GetBoatID() == 849) then - return true; - end - return false; - end - ); - end + eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:MovePC(68, 3595, 530, 19, 224); + end, + function(ent) + if(ent:GetBoatID() == 849) then + return true; + end + return false; + end + ); + end end \ No newline at end of file From 6961005d930c427917941cf31731d25d41b30dfc Mon Sep 17 00:00:00 2001 From: chase Date: Sat, 30 Dec 2023 03:16:56 -0800 Subject: [PATCH 6/9] butcher: Shuttle_{I|II|III|IV} boatID validation based on bounding boxes, for the case where the player is moving around from Shuttle to Shuttle --- butcher/Shuttle_I.lua | 26 ++++++++++++++++++++++++-- butcher/Shuttle_II.lua | 26 ++++++++++++++++++++++++-- butcher/Shuttle_III.lua | 26 ++++++++++++++++++++++++-- butcher/Shuttle_IV.lua | 26 ++++++++++++++++++++++++-- butcher/player.lua | 16 ++++++++++++++++ 5 files changed, 112 insertions(+), 8 deletions(-) diff --git a/butcher/Shuttle_I.lua b/butcher/Shuttle_I.lua index 817fdcd1..258b156f 100644 --- a/butcher/Shuttle_I.lua +++ b/butcher/Shuttle_I.lua @@ -20,16 +20,38 @@ function event_waypoint_arrive(e) eq.stop(); eq.move_to(3157, 877, -12, 65.27, true); end - if(e.gridid == 16 and e.wp == 11) then + if(e.gridid == 16 and e.wp == 12) then eq.spawn_condition("butcher",3,0); eq.spawn_condition("timorous",5,1); eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(1); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 847 or boat_id == 848 or boat_id == 849; + -- bounding box of Shuttle_I + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 480 and py <= 504; + -- Server thinks we're on Shuttle_II, Shuttle_III or Shuttle_IV and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(96, -7580, 3620, 19, 72); end, function(ent) - if(ent:GetBoatID() == 846) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_I + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 480 and py <= 504; + if(ent:GetBoatID() == 846 and valid_pos_check) then return true; end return false; diff --git a/butcher/Shuttle_II.lua b/butcher/Shuttle_II.lua index ddca6015..ce341319 100644 --- a/butcher/Shuttle_II.lua +++ b/butcher/Shuttle_II.lua @@ -20,16 +20,38 @@ function event_waypoint_arrive(e) eq.stop(); eq.move_to(3158, 836, -13, 65.27, true); end - if(e.gridid == 17 and e.wp == 11) then + if(e.gridid == 17 and e.wp == 12) then eq.spawn_condition("butcher",4,0); eq.spawn_condition("timorous",6,1); eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(2); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 846 or boat_id == 848 or boat_id == 849; + -- bounding box of Shuttle_II + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 440 and py <= 464; + -- Server thinks we're on Shuttle_I, Shuttle_III or Shuttle_IV and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(96, -7580, 3580, 19, 72); end, function(ent) - if(ent:GetBoatID() == 847) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_II + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 440 and py <= 464; + if(ent:GetBoatID() == 847 and valid_pos_check) then return true; end return false; diff --git a/butcher/Shuttle_III.lua b/butcher/Shuttle_III.lua index 0011edcc..0fde46a8 100644 --- a/butcher/Shuttle_III.lua +++ b/butcher/Shuttle_III.lua @@ -20,16 +20,38 @@ function event_waypoint_arrive(e) eq.stop(); eq.move_to(3067, 836, -13, 65.27, true); end - if(e.gridid == 18 and e.wp == 11) then + if(e.gridid == 18 and e.wp == 12) then eq.spawn_condition("butcher",5,0); eq.spawn_condition("timorous",7,1); eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(3); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 846 or boat_id == 847 or boat_id == 849; + -- bounding box of Shuttle_III + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 400 and py <= 424; + -- Server thinks we're on Shuttle_I, Shuttle_II or Shuttle_IV and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(96, -7665, 3580, 19, 72); end, function(ent) - if(ent:GetBoatID() == 848) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_III + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 400 and py <= 424; + if(ent:GetBoatID() == 848 and valid_pos_check) then return true; end return false; diff --git a/butcher/Shuttle_IV.lua b/butcher/Shuttle_IV.lua index 5e0ebc89..1da7a730 100644 --- a/butcher/Shuttle_IV.lua +++ b/butcher/Shuttle_IV.lua @@ -20,16 +20,38 @@ function event_waypoint_arrive(e) eq.stop(); eq.move_to(3067, 877, -12, 65.27, true); end - if(e.gridid == 19 and e.wp == 11) then + if(e.gridid == 19 and e.wp == 12) then eq.spawn_condition("butcher",6,0); eq.spawn_condition("timorous",8,1); eq.debug("Shuttle to timorous (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(4); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 846 or boat_id == 847 or boat_id == 848; + -- bounding box of Shuttle_IV + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 520 and py <= 544; + -- Server thinks we're on Shuttle_I, Shuttle_II or Shuttle_III and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(96, -7665, 3620, 19, 72); end, function(ent) - if(ent:GetBoatID() == 849) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_IV + local valid_pos_check = px >= 3567 and px <= 3655 and py >= 520 and py <= 544; + if(ent:GetBoatID() == 849 and valid_pos_check) then return true; end return false; diff --git a/butcher/player.lua b/butcher/player.lua index 7a63c6df..2d49cd73 100644 --- a/butcher/player.lua +++ b/butcher/player.lua @@ -6,6 +6,22 @@ function event_enter_zone(e) end end +function event_signal(e) + if(e.signal == 1) then + e.self:SetBoatID(846); + e.self:SetBoatName("Shuttle_I000"); + elseif(e.signal == 2) then + e.self:SetBoatID(847); + e.self:SetBoatName("Shuttle_II000"); + elseif(e.signal == 3) then + e.self:SetBoatID(848); + e.self:SetBoatName("Shuttle_III000"); + elseif(e.signal == 4) then + e.self:SetBoatID(849); + e.self:SetBoatName("Shuttle_IV000"); + end +end + function event_board_boat(e) local zone_time = eq.get_zone_time(); local hour = zone_time["zone_hour"]; From 712c1ab150c270d6e2f512d44e55c3821a0d3520 Mon Sep 17 00:00:00 2001 From: chase Date: Sat, 30 Dec 2023 03:18:21 -0800 Subject: [PATCH 7/9] butcher: Shuttle_{I|II|III|IV} boatID validation based on bounding boxes, for the cases where boat->boat movements are encountered --- timorous/Captains_Skiff.lua | 2 +- timorous/Maidens_Voyage.lua | 26 ++++++++++++++------------ timorous/Shuttle_I.lua | 24 +++++++++++++++++++++++- timorous/Shuttle_II.lua | 24 +++++++++++++++++++++++- timorous/Shuttle_III.lua | 24 +++++++++++++++++++++++- timorous/Shuttle_IV.lua | 24 +++++++++++++++++++++++- timorous/player.lua | 13 +++++++++++-- 7 files changed, 118 insertions(+), 19 deletions(-) diff --git a/timorous/Captains_Skiff.lua b/timorous/Captains_Skiff.lua index bf60ec73..4dbb45a9 100644 --- a/timorous/Captains_Skiff.lua +++ b/timorous/Captains_Skiff.lua @@ -14,7 +14,7 @@ function event_signal(e) eq.get_entity_list():ForeachClient( function(ent) ent:Signal(2); - end, + end, function(ent) -- Server thinks we're on Maidens_Voyage and are about to zone. if(ent:GetBoatID() == 838 and ent:GetX() < -7100) then diff --git a/timorous/Maidens_Voyage.lua b/timorous/Maidens_Voyage.lua index f9b28a71..a1231eb1 100644 --- a/timorous/Maidens_Voyage.lua +++ b/timorous/Maidens_Voyage.lua @@ -14,21 +14,23 @@ function event_waypoint_arrive(e) eq.debug("Boat to firiona (2) has reached the Elf docks. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); elseif(e.wp == 5) then eq.signal(96075,2); -- NPC: Island_Shuttle - elseif(e.wp == 18) then -- signal one before 19 to allow them to move sooner + elseif(e.wp == 17) then -- signal before 19 to allow them to move sooner (we pause at 19) eq.debug("Boat to firiona (2) has reached the shuttle. Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); - eq.signal(846,1); -- NPC: Shuttle_I - eq.signal(847,1); -- NPC: Shuttle_II - eq.signal(848,1); -- NPC: Shuttle_III - eq.signal(849,1); -- NPC: Shuttle_IV + eq.signal(846,1); -- NPC: Shuttle_I + eq.signal(847,1); -- NPC: Shuttle_II + eq.signal(848,1); -- NPC: Shuttle_III + eq.signal(849,1); -- NPC: Shuttle_IV elseif(e.wp == 30) then eq.debug("Boat to firiona (2) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); eq.get_entity_list():ForeachClient( function(ent) ent:Signal(1); - end, + end, function(ent) - -- Server thinks we're on Island_Shuttle and are about to zone. - if(ent:GetBoatID() == 96075 and ent:GetX() < -2000 and ent:GetY() > 500) then + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 96075 or boat_id == 846 or boat_id == 847 or boat_id == 848 or boat_id == 849; + -- Server thinks we're on Island_Shuttle, Shuttle_I, Shuttle_II, Shuttle_III or Shuttle_IV and are about to zone. + if(diff_boat_check and ent:GetX() < -2000 and ent:GetY() > 500) then return true; end return false; @@ -49,8 +51,8 @@ function event_waypoint_arrive(e) end function event_waypoint_depart(e) - if(e.wp == 5) then - -- signal BB shuttles to depart - eq.signal(68236,2); - end + if(e.wp == 5) then + -- signal BB shuttles to depart + eq.signal(68236,2); + end end diff --git a/timorous/Shuttle_I.lua b/timorous/Shuttle_I.lua index 786ddf63..9441793d 100644 --- a/timorous/Shuttle_I.lua +++ b/timorous/Shuttle_I.lua @@ -19,12 +19,34 @@ function event_waypoint_arrive(e) eq.spawn_condition("butcher",3,1); eq.spawn_condition("timorous",5,0); eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(2); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 838 or boat_id == 847 or boat_id == 848 or boat_id == 849 or boat_id == 96075; + -- bounding box of Shuttle_I + local valid_pos_check = px >= -7616 and px <= -7546 and py >= 3598 and py <= 3645; + -- Server thinks we're on Maidens_Voyage, Shuttle_II, Shuttle_III, Shuttle_IV or Island_Shuttle and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(68, 3595, 491, 19, 224); end, function(ent) - if(ent:GetBoatID() == 846) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_I + local valid_pos_check = px >= -7616 and px <= -7546 and py >= 3598 and py <= 3645; + if(ent:GetBoatID() == 846 and valid_pos_check) then return true; end return false; diff --git a/timorous/Shuttle_II.lua b/timorous/Shuttle_II.lua index 01d5577d..7f65a17b 100644 --- a/timorous/Shuttle_II.lua +++ b/timorous/Shuttle_II.lua @@ -19,12 +19,34 @@ function event_waypoint_arrive(e) eq.spawn_condition("butcher",4,1); eq.spawn_condition("timorous",6,0); eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(3); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 838 or boat_id == 846 or boat_id == 848 or boat_id == 849 or boat_id == 96075; + -- bounding box of Shuttle_II + local valid_pos_check = px >= -7609 and px <= -7550 and py >= 3559 and py <= 3602; + -- Server thinks we're on Maidens_Voyage, Shuttle_I, Shuttle_III, Shuttle_IV or Island_Shuttle and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(68, 3595, 452, 19, 224); end, function(ent) - if(ent:GetBoatID() == 847) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_II + local valid_pos_check = px >= -7609 and px <= -7550 and py >= 3559 and py <= 3602; + if(ent:GetBoatID() == 847 and valid_pos_check) then return true; end return false; diff --git a/timorous/Shuttle_III.lua b/timorous/Shuttle_III.lua index 7981f285..b30f8606 100644 --- a/timorous/Shuttle_III.lua +++ b/timorous/Shuttle_III.lua @@ -19,12 +19,34 @@ function event_waypoint_arrive(e) eq.spawn_condition("butcher",5,1); eq.spawn_condition("timorous",7,0); eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(4); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 838 or boat_id == 846 or boat_id == 847 or boat_id == 849 or boat_id == 96075; + -- bounding box of Shuttle_III + local valid_pos_check = px >= -7695 and px <= -7633 and py >= 3562 and py <= 3598; + -- Server thinks we're on Maidens_Voyage, Shuttle_I, Shuttle_II, Shuttle_IV or Island_Shuttle and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(68, 3595, 413, 19, 224); end, function(ent) - if(ent:GetBoatID() == 848) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_III + local valid_pos_check = px >= -7695 and px <= -7633 and py >= 3562 and py <= 3598; + if(ent:GetBoatID() == 848 and valid_pos_check) then return true; end return false; diff --git a/timorous/Shuttle_IV.lua b/timorous/Shuttle_IV.lua index 1140f98e..81e8777c 100644 --- a/timorous/Shuttle_IV.lua +++ b/timorous/Shuttle_IV.lua @@ -19,12 +19,34 @@ function event_waypoint_arrive(e) eq.spawn_condition("butcher",6,1); eq.spawn_condition("timorous",8,0); eq.debug("Shuttle to butcher (4) has reached its destination! Name is: " .. e.self:GetName() .. " Time is: " .. hour ..":" .. minute .. "", 1); + eq.get_entity_list():ForeachClient( + function(ent) + ent:Signal(5); + end, + function(ent) + local px = ent:GetX(); + local py = ent:GetY(); + local boat_id = ent:GetBoatID(); + local diff_boat_check = boat_id == 838 or boat_id == 846 or boat_id == 847 or boat_id == 848 or boat_id == 96075; + -- bounding box of Shuttle_IV + local valid_pos_check = px >= -7696 and px <= -7634 and py >= 3602 and py <= 3640; + -- Server thinks we're on Maidens_Voyage, Shuttle_I, Shuttle_II, Shuttle_III or Island_Shuttle and are about to zone. + if(diff_boat_check and valid_pos_check) then + return true; + end + return false; + end + ); eq.get_entity_list():ForeachClient( function(ent) ent:MovePC(68, 3595, 530, 19, 224); end, function(ent) - if(ent:GetBoatID() == 849) then + local px = ent:GetX(); + local py = ent:GetY(); + -- bounding box of Shuttle_IV + local valid_pos_check = px >= -7696 and px <= -7634 and py >= 3602 and py <= 3640; + if(ent:GetBoatID() == 849 and valid_pos_check) then return true; end return false; diff --git a/timorous/player.lua b/timorous/player.lua index 6ac27c8a..869f897d 100644 --- a/timorous/player.lua +++ b/timorous/player.lua @@ -10,8 +10,17 @@ function event_signal(e) e.self:SetBoatID(838); e.self:SetBoatName("Maidens_Voyage000"); elseif(e.signal == 2) then - e.self:SetBoatID(842); - e.self:SetBoatName("Captains_Skiff000"); + e.self:SetBoatID(846); + e.self:SetBoatName("Shuttle_I000"); + elseif(e.signal == 3) then + e.self:SetBoatID(847); + e.self:SetBoatName("Shuttle_II000"); + elseif(e.signal == 4) then + e.self:SetBoatID(848); + e.self:SetBoatName("Shuttle_III000"); + elseif(e.signal == 5) then + e.self:SetBoatID(849); + e.self:SetBoatName("Shuttle_IV000"); end end From bd7faf9529a663f7818294b3e0026205a6942795 Mon Sep 17 00:00:00 2001 From: chase Date: Sun, 31 Dec 2023 03:19:08 -0800 Subject: [PATCH 8/9] timorous/Maidens_Voyage.lua: fix for Maiden_Voyage zoning process bounding box, this is now a large bounding box that encompasses the entire ship at waypoint 30 (there were areas on the ship wouldn't trigger the zone, such as above the stairs) --- timorous/Maidens_Voyage.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/timorous/Maidens_Voyage.lua b/timorous/Maidens_Voyage.lua index a1231eb1..c06f9007 100644 --- a/timorous/Maidens_Voyage.lua +++ b/timorous/Maidens_Voyage.lua @@ -27,10 +27,14 @@ function event_waypoint_arrive(e) ent:Signal(1); end, function(ent) + local px = ent:GetX(); + local py = ent:GetY(); local boat_id = ent:GetBoatID(); local diff_boat_check = boat_id == 96075 or boat_id == 846 or boat_id == 847 or boat_id == 848 or boat_id == 849; + -- bounding box of Maiden_Voyage at wp 30 + local valid_pos_check = px >= -3000 and px <= -1700 and py >= 0 and py <= 1800; -- Server thinks we're on Island_Shuttle, Shuttle_I, Shuttle_II, Shuttle_III or Shuttle_IV and are about to zone. - if(diff_boat_check and ent:GetX() < -2000 and ent:GetY() > 500) then + if(diff_boat_check and valid_pos_check) then return true; end return false; From 1f8686d5672fc5a1df9143a6e921dc87e20250af Mon Sep 17 00:00:00 2001 From: chase Date: Sun, 31 Dec 2023 03:19:29 -0800 Subject: [PATCH 9/9] timorous/Shuttle_*.lua: normalizing the bounding box of the Shuttles return point, this allows clients to stand on any location of the shuttle (shuttles are staggered enough on returning that this allows normalization to be okay & non-interfering) --- timorous/Shuttle_I.lua | 8 ++++---- timorous/Shuttle_II.lua | 8 ++++---- timorous/Shuttle_III.lua | 8 ++++---- timorous/Shuttle_IV.lua | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/timorous/Shuttle_I.lua b/timorous/Shuttle_I.lua index 9441793d..4bc26fff 100644 --- a/timorous/Shuttle_I.lua +++ b/timorous/Shuttle_I.lua @@ -28,8 +28,8 @@ function event_waypoint_arrive(e) local py = ent:GetY(); local boat_id = ent:GetBoatID(); local diff_boat_check = boat_id == 838 or boat_id == 847 or boat_id == 848 or boat_id == 849 or boat_id == 96075; - -- bounding box of Shuttle_I - local valid_pos_check = px >= -7616 and px <= -7546 and py >= 3598 and py <= 3645; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; -- Server thinks we're on Maidens_Voyage, Shuttle_II, Shuttle_III, Shuttle_IV or Island_Shuttle and are about to zone. if(diff_boat_check and valid_pos_check) then return true; @@ -44,8 +44,8 @@ function event_waypoint_arrive(e) function(ent) local px = ent:GetX(); local py = ent:GetY(); - -- bounding box of Shuttle_I - local valid_pos_check = px >= -7616 and px <= -7546 and py >= 3598 and py <= 3645; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; if(ent:GetBoatID() == 846 and valid_pos_check) then return true; end diff --git a/timorous/Shuttle_II.lua b/timorous/Shuttle_II.lua index 7f65a17b..ad944f2c 100644 --- a/timorous/Shuttle_II.lua +++ b/timorous/Shuttle_II.lua @@ -28,8 +28,8 @@ function event_waypoint_arrive(e) local py = ent:GetY(); local boat_id = ent:GetBoatID(); local diff_boat_check = boat_id == 838 or boat_id == 846 or boat_id == 848 or boat_id == 849 or boat_id == 96075; - -- bounding box of Shuttle_II - local valid_pos_check = px >= -7609 and px <= -7550 and py >= 3559 and py <= 3602; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; -- Server thinks we're on Maidens_Voyage, Shuttle_I, Shuttle_III, Shuttle_IV or Island_Shuttle and are about to zone. if(diff_boat_check and valid_pos_check) then return true; @@ -44,8 +44,8 @@ function event_waypoint_arrive(e) function(ent) local px = ent:GetX(); local py = ent:GetY(); - -- bounding box of Shuttle_II - local valid_pos_check = px >= -7609 and px <= -7550 and py >= 3559 and py <= 3602; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; if(ent:GetBoatID() == 847 and valid_pos_check) then return true; end diff --git a/timorous/Shuttle_III.lua b/timorous/Shuttle_III.lua index b30f8606..c8af826a 100644 --- a/timorous/Shuttle_III.lua +++ b/timorous/Shuttle_III.lua @@ -28,8 +28,8 @@ function event_waypoint_arrive(e) local py = ent:GetY(); local boat_id = ent:GetBoatID(); local diff_boat_check = boat_id == 838 or boat_id == 846 or boat_id == 847 or boat_id == 849 or boat_id == 96075; - -- bounding box of Shuttle_III - local valid_pos_check = px >= -7695 and px <= -7633 and py >= 3562 and py <= 3598; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; -- Server thinks we're on Maidens_Voyage, Shuttle_I, Shuttle_II, Shuttle_IV or Island_Shuttle and are about to zone. if(diff_boat_check and valid_pos_check) then return true; @@ -44,8 +44,8 @@ function event_waypoint_arrive(e) function(ent) local px = ent:GetX(); local py = ent:GetY(); - -- bounding box of Shuttle_III - local valid_pos_check = px >= -7695 and px <= -7633 and py >= 3562 and py <= 3598; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; if(ent:GetBoatID() == 848 and valid_pos_check) then return true; end diff --git a/timorous/Shuttle_IV.lua b/timorous/Shuttle_IV.lua index 81e8777c..fc1c2ba1 100644 --- a/timorous/Shuttle_IV.lua +++ b/timorous/Shuttle_IV.lua @@ -28,8 +28,8 @@ function event_waypoint_arrive(e) local py = ent:GetY(); local boat_id = ent:GetBoatID(); local diff_boat_check = boat_id == 838 or boat_id == 846 or boat_id == 847 or boat_id == 848 or boat_id == 96075; - -- bounding box of Shuttle_IV - local valid_pos_check = px >= -7696 and px <= -7634 and py >= 3602 and py <= 3640; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; -- Server thinks we're on Maidens_Voyage, Shuttle_I, Shuttle_II, Shuttle_III or Island_Shuttle and are about to zone. if(diff_boat_check and valid_pos_check) then return true; @@ -44,8 +44,8 @@ function event_waypoint_arrive(e) function(ent) local px = ent:GetX(); local py = ent:GetY(); - -- bounding box of Shuttle_IV - local valid_pos_check = px >= -7696 and px <= -7634 and py >= 3602 and py <= 3640; + -- bounding box of Shuttles + local valid_pos_check = px >= -7721 and px <= -7503 and py >= 3444 and py <= 3772; if(ent:GetBoatID() == 849 and valid_pos_check) then return true; end