-- This script is run whenever a day ticks over whilst the ship is at sea.
-- Remind player that time is running out roughly two months from end of game
if (GetDaysLeft() < 60) and (not GetBoolFlag(0)) then
ShowPopup("One of your crew pipes up to politely remind you that everything in your ship must be sold before year's end to count towards the wager. You have the man flogged.");
SetBoolFlag(0, true);
end
-- If a crewman has a disease and the player has a surgeon, there's a chance he'll be cured.
if (HasDisease()) and (HasUpgrade("{surgeon}")) then
if (math.random(0, 100) <= 1) then
ShowPopup("Your ship's surgeon deploys a radical new treatment upon " .. GetCrewName(DiseaseCrewID()) .. " which leaves him totally cured!");
CureDisease();
end
end
-- Make Monkey Thief Work Right
if ((PlayerCash >= 2000) and (not GetBoolFlag(1))) then
SetStartingEvent("[23]", True);
else
SetStartingEvent("[23]", False);
end
-- Only allow cannibal event when player has bigger ship
if (HasUpgrade("{shipmed}") and (not GetBoolFlag(2))) then
SetStartingEvent("[48]", True);
else
SetStartingEvent("[48]", False);
end
-- Only unlock reef when cash is enough
if ((PlayerCash >= 1000) and (not GetBoolFlag(3))) then
SetStartingEvent("[78]", True);
else
SetStartingEvent("[78]", False);
end
-- Stuff for diseased
if (GetIntFlag(10) >= 1) then
SetIntFlag(10, GetIntFlag(10) + 1);
if (GetIntFlag(10) >= 7) then
ShowPopup('Your crew seem to be complaining more than usual about feeling ill. You wonder what it could be...');
SetIntFlag(10, -1);
end
end
if (GetIntFlag(11) >= 1) then
SetIntFlag(11, GetIntFlag(11) + 1);
if (GetIntFlag(11) >= 7) then
ShowPopup("The crew seem to be feeling a lot better since you sold the doubloon. You wonder if you ought to warn the shopkeeper but... no, it's probably nothing.");
SetIntFlag(11, -1);
end
end
if (GetIntFlag(10) == -1) and (not InInventory("{29}")) then