Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions butcher/Glisse_Bluesea.lua
Original file line number Diff line number Diff line change
@@ -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
61 changes: 61 additions & 0 deletions butcher/Shuttle_I.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
function event_spawn(e)
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

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, 877, -12, 65.27, true);
end
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)
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;
end
);
end
end
61 changes: 61 additions & 0 deletions butcher/Shuttle_II.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
function event_spawn(e)
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

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, 836, -13, 65.27, true);
end
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)
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;
end
);
end
end
61 changes: 61 additions & 0 deletions butcher/Shuttle_III.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
function event_spawn(e)
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

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, 836, -13, 65.27, true);
end
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)
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;
end
);
end
end
61 changes: 61 additions & 0 deletions butcher/Shuttle_IV.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
function event_spawn(e)
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

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, 877, -12, 65.27, true);
end
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)
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;
end
);
end
end
16 changes: 16 additions & 0 deletions butcher/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
13 changes: 12 additions & 1 deletion firiona/Maidens_Voyage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
2 changes: 1 addition & 1 deletion timorous/Captains_Skiff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 21 additions & 5 deletions timorous/Maidens_Voyage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,27 @@ 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 == 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(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(
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 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 valid_pos_check) then
return true;
end
return false;
Expand All @@ -44,3 +53,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
Loading