Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
Ok thanks I will reinstall the game and install the 2.0 GOF.But I want to know how the shipyards works in this game more in depth(in code).I want to allow them(or just single of them)to sell me the movie ships.How it is defined?Every island has its own list of ships which can sell me?Can I add the movie ships to it?It is hard to do it?I´m an amateur programmer but I understand the code a little.
void SetShipyardStore(ref NPChar)
{
int iTest_ship, i;
string attrName;
if (CheckAttribute(NPChar, "shipyard")) return; // åùå åñòü êîðàáëè ñ òîãî ðàçà
SaveCurrentNpcQuestDateParam(npchar, "shipyardDate"); // äàòà çàïîëíåíèÿ âåðôè
if (bBettaTestMode)
{
for (i = 1; i <=SHIP_TYPES_QUANTITY; i++)
{
attrName = "ship" + i;
FillShipParamShipyard(NPChar, GenerateStoreShip(i-1), attrName);
}
return;
}
FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_TARTANE), "ship1");
iTest_ship = rand(5);
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship3");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship3");
iTest_ship = rand(6);
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship3");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship3");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship3");
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(12);
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship4");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship4");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship4");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_KETCH), "ship4");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUNTY), "ship4");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship4");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_EMPRESS), "ship4");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(6);
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship4");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship4");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship4");
}
if (sti(PChar.rank) > 1)
{
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(28); //50% chance to get a ship here
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship5");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship5");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship5");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_KETCH), "ship5");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUNTY), "ship5");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship5");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship5");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "ship5");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_EMPRESS), "ship5");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(10); //50%
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship5");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship5");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_KETCH), "ship5");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUNTY), "ship5");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(46); //50%
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_EMPRESS), "ship6");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship6");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship6");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "ship6");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIGANTINE), "ship6");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship6");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FLEUT), "ship6");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CARAVELR), "ship6");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(10); //50%
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship6");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship6");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_KETCH), "ship6");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUNTY), "ship6");
}
}
if (sti(PChar.rank) > 3)
{
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(60); //33% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship8");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FLEUT), "ship8");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER_H), "ship8");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEOTH_H), "ship8");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_YACHT), "ship8");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SPEEDY), "ship8");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PINNACE), "ship8");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CARAVELR), "ship8");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(12); //33% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship8");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_KETCH), "ship8");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUNTY), "ship8");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship8");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(48); //33% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SPEEDY), "ship9");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PINNACE), "ship9");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SOPHIE), "ship9");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CASTELF), "ship9");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_INTERCEPTOR), "ship9");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_DERFFLINGER), "ship9");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER), "ship9");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(12); //33% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_KETCH), "ship9");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUNTY), "ship9");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship9");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship9");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(48); //33% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_INTERCEPTOR), "ship10");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_DERFFLINGER), "ship10");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER), "ship10");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_L), "ship10");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_DUTCHPINNACE), "ship10");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PINNACEBERLIN), "ship10");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(12); //33% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUNTY), "ship10");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship10");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship10");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "ship10");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIGANTINE), "ship10");
}
}
if (sti(PChar.rank) > 5)
{
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(88); //20% chance of a ship here
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_L), "ship11");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_DUTCHPINNACE), "ship11");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PINNACEBERLIN), "ship11");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNUS ), "ship11");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GREYHOUND), "ship11");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_28GUNFRIGATE), "ship11");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PDN), "ship11");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PACKET_BRIG), "ship11");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ENTERPRISE), "ship11");
if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG_20_GUN1_18), "ship11");
if (iTest_ship == 11) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER_L), "ship11");
if (iTest_ship == 12) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SHNYAVA), "ship11");
if (iTest_ship == 13) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOOKER1), "ship11");
if (iTest_ship == 14) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG3), "ship11");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(20); //20%
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship11");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship11");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "ship11");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIGANTINE), "ship11");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship11");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP purchase is NOT enabled
{
iTest_ship = rand(100); //20%
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNUS ), "ship12");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GREYHOUND), "ship12");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_28GUNFRIGATE), "ship12");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PDN), "ship12");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PACKET_BRIG), "ship12");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ENTERPRISE), "ship12");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOPOFWAR), "ship12");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG_20_GUN1_18), "ship12");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER_L), "ship12");
if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SHNYAVA), "ship12");
if (iTest_ship == 11) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOOKER1), "ship12");
if (iTest_ship == 12) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG3), "ship12");
if (iTest_ship == 13) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CARAVEL), "ship12");
if (iTest_ship == 14) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_H), "ship12");
if (iTest_ship == 15) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVETTE), "ship12");
if (iTest_ship == 16) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FELIPE), "ship12");
if (iTest_ship == 17) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SURPRISE), "ship12");
if (iTest_ship == 18) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVFRIG2_50), "ship12");
if (iTest_ship == 19) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_RaaFrigate), "ship12");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(20); //20%
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship12");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "ship12");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIGANTINE), "ship12");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship12");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER_H), "ship12");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEOTH_H), "ship12");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(95); //20% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BLACKPEARL), "ship13");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NIGHTMARE), "ship13");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_UNICORN), "ship13");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_H), "ship13");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVETTE), "ship13");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FELIPE), "ship13");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SURPRISE), "ship13");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVFRIG2_50), "ship13");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_RaaFrigate), "ship13");
if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON1), "ship13");
if (iTest_ship == 11) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PO_FLEUT50), "ship13");
if (iTest_ship == 12) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_THEBLACKPEARL), "ship13");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(20); //20%
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIGANTINE), "ship13");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship13");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER_H), "ship13");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEOTH_H), "ship13");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_YACHT), "ship13");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SPEEDY), "ship13");
}
}
if (sti(PChar.rank) > 8)
{
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(525); //4% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVETTE), "ship14");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FELIPE), "ship14");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SURPRISE), "ship14");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVFRIG2_50), "ship14");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_RaaFrigate), "ship14");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_H), "ship14");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_QueenAnnesRevenge), "ship14");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FRIGATE), "ship14");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LINESHIP), "ship14");
if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ARABELLA), "ship14");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(100); //4% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEOTH_H), "ship14");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_YACHT), "ship14");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SPEEDY), "ship14");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SOPHIE), "ship14");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_INTERCEPTOR), "ship14");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER), "ship14");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNUS), "ship14");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG_20_GUN1_18), "ship14");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER_L), "ship14");
if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SHNYAVA), "ship14");
if (iTest_ship == 11) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOOKER1), "ship14");
if (iTest_ship == 12) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG3), "ship14");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(700); // 2.8% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_QueenAnnesRevenge), "ship14");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FRIGATE), "ship15");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LINESHIP), "ship15");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ARABELLA), "ship15");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_QueenAnnesRevenge), "ship15");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_Revenge), "ship15");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUSSOLE), "ship15");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SALAMANDER), "ship15");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LINEFRIGATE), "ship15");
if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_TWODECKER1_47), "ship15");
if (iTest_ship == 11) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_USS_CONSTITUTION), "ship15");
if (iTest_ship == 12) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LA_LICORNE), "ship15");
if (iTest_ship == 13) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BATTLEFRIGATE), "ship15");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(140); //2.8% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SPEEDY), "ship15");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SOPHIE), "ship15");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_INTERCEPTOR), "ship15");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER), "ship15");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNUS), "ship15");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG_20_GUN1_18), "ship15");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER_L), "ship15");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SHNYAVA), "ship15");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOOKER1), "ship15");
if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG3), "ship15");
}
}
if (sti(PChar.rank) > 12)
{
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(425); //4% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LINEFRIGATE), "ship141");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_TWODECKER1_47), "ship141");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_USS_CONSTITUTION), "ship141");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LA_LICORNE), "ship141");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CURSEDDUTCHMAN), "ship141");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_RN_BATTLEFRIGATE), "ship141");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FASTGALLEON1), "ship141");
if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_WARSHIP), "ship141");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(175); //4% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_INTERCEPTOR), "ship141");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER), "ship141");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNUS), "ship141");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SHNYAVA), "ship141");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOOKER1), "ship141");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG3), "ship141");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GREYHOUND), "ship141");
if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PDN), "ship141");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(595); //2.8% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CURSEDDUTCHMAN), "ship151");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_RN_BATTLEFRIGATE), "ship151");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FASTGALLEON1), "ship151");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_WARSHIP), "ship151");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BATTLESHIP), "ship151");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BELLONA), "ship151");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_POSEIDON), "ship151");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(280); //2.8% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNUS), "ship151");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GREYHOUND), "ship151");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PDN), "ship151");
}
}
if (sti(PChar.rank) > 18)
{
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(480); //2.5% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BELLONA), "ship16");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_POSEIDON), "ship16");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_COURONNE), "ship16");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNE), "ship16");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FR_SUPERIORWARSHIP1), "ship16");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(280); //2.5% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GREYHOUND), "ship16");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PDN), "ship16");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PACKET_BRIG), "ship16");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ENTERPRISE), "ship16");
}
if(!REALISTIC_SHIP_PURCHASE) // = If Realistic SHIP PURCHASE is NOT enabled
{
iTest_ship = rand(400); //2.5% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_NEPTUNE), "ship17");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FR_SUPERIORWARSHIP1), "ship17");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SUPERBE), "ship17");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LINK), "ship17");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_MANOWAR), "ship17");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HMS_VICTORY), "ship17");
if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BATTLEMANOWAR), "ship17");
}
else // = If Realistic SHIP PURCHASE IS enabled
{
iTest_ship = rand(280); //2.5% chance
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PDN), "ship17");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PACKET_BRIG), "ship17");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ENTERPRISE), "ship17");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOPOFWAR), "ship17");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_28GUNFRIGATE), "ship17");
}
}
}
void FreeShipFromShipyard(ref NPChar)
iTest_ship = rand(5);
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship3");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship3");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BERMSLOOP), "ship3");
///////////////////////////////////////////////////////////////////////////
/// TheBlackPearl - Wicked Wench
///////////////////////////////////////////////////////////////////////////
makeref(refShip,ShipsTypes[SHIP_THEBLACKPEARL]);
refShip.Name = "TheBlackPearl";
refship.Soundtype = "frigate";
refShip.Class = 4;
refShip.Cannon = CANNON_TYPE_CANNON_LBS4;
refShip.MaxCaliber = 16;
refShip.Weight = Tonnes2CWT(1000);
refShip.Capacity = 5800;
refShip.CannonsQuantity = 36;
refShip.rcannon = 16;
refShip.lcannon = 16;
refShip.fcannon = 2;
refShip.bcannon = 2;
refShip.MaxCrew = 190;
refShip.MinCrew = 20;
refShip.BoardingCrew = 26;
refShip.GunnerCrew = 36;
refShip.CannonerCrew = 72;
refShip.SailorCrew = 60;
refShip.SpeedRate = 8.6;
refShip.TurnRate = 6.0;
refShip.Price = 70000;
refShip.HP = 3900;
refShip.SP = 250;
refship.EmblemedSails.normalTex = "ships\sail_BlackPearl.tga";
refShip.AbordageLocation = "Boarding Deck_01";
refship.CanEncounter = false;
refship.Type.Merchant = true;
refship.Type.War = true;
refShip.fWindAgainstSpeed = 4.0;
refShip.sea_enchantment = 1.2;
refShip.lowpolycrew = 20;
refShip.buildtime = 100;
refship.Rocking.y = 0.45;
refship.Rocking.az = 0.35;
refship.WaterLine = -0.7;
refship.SpeedDependWeight = 0.3;
refship.SubSeaDependWeight = 1.0;
refship.TurnDependWeight = 0.3;
refship.WindAgainstSpeed = 3.6;//boal
refship.CabinType = "Cabin"; // boal 28.03.05
refship.DeckType = "Big";
refship.InertiaAccelerationX = 5.0; refship.InertiaBrakingX = 5.0;
refship.InertiaAccelerationY = 4; refship.InertiaBrakingY = 4;
refship.InertiaAccelerationZ = 5.0; refship.InertiaBrakingZ = 5.0;
refShip.Height.Bombs.Y = 1.0; refShip.Height.Bombs.DY = 0.5;
refShip.Height.Grapes.Y = 2.0; refShip.Height.Grapes.DY = 1.0;
refShip.Height.Knippels.Y = 10.0; refShip.Height.Knippels.DY = 8.0;
refShip.Height.Balls.Y = 1.0; refShip.Height.Balls.DY = 0.5;
refShip.GeraldSails.rey_b1 = 1;
refShip.GeraldSails.rey_b2 = 1;
refShip.GeraldSails.rey_b3 = 1;
refShip.GeraldSails.rey_b1.vscale = 0.9;
refShip.GeraldSails.rey_b2.vscale = 0.7;
refShip.GeraldSails.rey_b3.vscale = 0.7;
refship.Track.Enable = true;
refship.Track1.ZStart = 0.20;
refship.Track1.LifeTime = 14.5;
refship.Track1.Width = "3.7, 3.9";
refship.Track1.Speed = "7.0, 8.0";
refship.Track2.ZStart = -0.15;
refship.Track2.LifeTime = 8.5;
refship.Track2.Width = "8.0, 9.0";
refship.Track2.Speed = "0.15, 0.25";
//Nation
refShip.england = 1.0; //
refShip.france = 0.0; //
refShip.holland = 0.0; //
refShip.pirate = 1.0; //
refShip.spain = 0.0; //
///////////////////////////////////////////////////////////////////////////
/// BlackPearl
///////////////////////////////////////////////////////////////////////////
makeref(refShip,ShipsTypes[SHIP_BLACKPEARL]);
refShip.Name = "BlackPearl";
refship.Soundtype = "frigate";
refShip.Class = 4;
refShip.Cannon = CANNON_TYPE_CANNON_LBS4;
refShip.MaxCaliber = 16;
refShip.Weight = Tonnes2CWT(1000);
refShip.Capacity = 4800;
refShip.CannonsQuantity = 36;
refShip.rcannon = 16;
refShip.lcannon = 16;
refShip.fcannon = 2;
refShip.bcannon = 2;
refShip.MaxCrew = 190;
refShip.MinCrew = 20;
refShip.BoardingCrew = 26;
refShip.GunnerCrew = 36;
refShip.CannonerCrew = 72;
refShip.SailorCrew = 60;
refShip.SpeedRate = 13.5;
refShip.TurnRate = 8.0;
refShip.Price = 70000;
refShip.HP = 4800;
refShip.SP = 250;
refship.EmblemedSails.normalTex = "ships\sail_BlackPearl.tga";
refShip.AbordageLocation = "Boarding Deck_01";
refship.CanEncounter = false;
refship.Type.Merchant = true;
refship.Type.War = true;
refShip.fWindAgainstSpeed = 4.0;
refShip.sea_enchantment = 1.2;
refShip.lowpolycrew = 20;
refShip.buildtime = 100;
refship.Rocking.y = 0.45;
refship.Rocking.az = 0.35;
refship.WaterLine = -0.7;
refship.SpeedDependWeight = 0.3;
refship.SubSeaDependWeight = 1.0;
refship.TurnDependWeight = 0.3;
refship.WindAgainstSpeed = 3.6;//boal
refship.CabinType = "Cabin"; // boal 28.03.05
refship.DeckType = "Big";
refship.InertiaAccelerationX = 5.0; refship.InertiaBrakingX = 5.0;
refship.InertiaAccelerationY = 4; refship.InertiaBrakingY = 4;
refship.InertiaAccelerationZ = 5.0; refship.InertiaBrakingZ = 5.0;
refShip.Height.Bombs.Y = 1.0; refShip.Height.Bombs.DY = 0.5;
refShip.Height.Grapes.Y = 2.0; refShip.Height.Grapes.DY = 1.0;
refShip.Height.Knippels.Y = 10.0; refShip.Height.Knippels.DY = 8.0;
refShip.Height.Balls.Y = 1.0; refShip.Height.Balls.DY = 0.5;
refShip.GeraldSails.rey_b1 = 1;
refShip.GeraldSails.rey_b2 = 1;
refShip.GeraldSails.rey_b3 = 1;
refShip.GeraldSails.rey_b1.vscale = 0.9;
refShip.GeraldSails.rey_b2.vscale = 0.7;
refShip.GeraldSails.rey_b3.vscale = 0.7;
refship.Track.Enable = true;
refship.Track1.ZStart = 0.20;
refship.Track1.LifeTime = 14.5;
refship.Track1.Width = "3.7, 3.9";
refship.Track1.Speed = "7.0, 8.0";
refship.Track2.ZStart = -0.15;
refship.Track2.LifeTime = 8.5;
refship.Track2.Width = "8.0, 9.0";
refship.Track2.Speed = "0.15, 0.25";
//Nation
refShip.england = 0.0; //
refShip.france = 0.0; //
refShip.holland = 0.0; //
refShip.pirate = 1.0; //
refShip.spain = 0.0; //
///////////////////////////////////////////////////////////////////////////
/// TheBlackPearl - Wicked Wench
///////////////////////////////////////////////////////////////////////////
makeref(refShip,ShipsTypes[SHIP_BLACKPEARL]);
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BLACKPEARL), "ship3");
if (iTest_ship == 2
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BLACKPEARL), "ship3");