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 -
if you upload it I can add it to the zip I already have if you wantIt's fixed but not uploaded.
// --> JRH
if (CharacterHasOfficerType(rPlayer, OFFIC_TYPE_CANNONEER) || AMMOMOD_ABLECAPTAIN)
{
SupplyAmmo(true);
}
// <-- JRH
SupplyAmmo(false); // JRH
void SupplyAmmo(bool bOverride)
{
if(ENABLE_AMMOMOD)
{
ref PChar = GetMainCharacter();
ref NPChar;
int i, iOfficer, cc;
string weaponID;
aref weapon;
bool tmpAbleRefill = false;
bool bGotAmmo = false;
if (bOverride) { tmpAbleRefill = true; }
if (CharacterHasOfficerType(pchar, OFFIC_TYPE_CANNONEER)) { tmpAbleRefill = true; }
if (AMMOMOD_ABLECAPTAIN) { tmpAbleRefill = true; }
if (tmpAbleRefill)
{
//PLAYER AND OFFICERS
for(i = 0; i < 4; i++)
{
iOfficer = GetOfficersIndex(PChar, i);
if(iOfficer < 0) continue;
NPChar = GetCharacter(iOfficer);
weaponID = GetCharacterEquipByGroup(NPChar,GUN_ITEM_TYPE);
if(weaponID != "")
{
Items_FindItem(weaponID, &weapon);
if(CheckAttribute(weapon, "shottype"))
{
if(weapon.shottype == "pg2" || weapon.shottype == "pg" || weapon.shottype == "mb" || weapon.shottype == "pb" || weapon.shottype == "pb2")
{
int OpriorGP = GetCharacterItem(NPChar,"gunpowder");
int OpriorPB = GetCharacterItem(NPChar,"pistolbullets");
int OpriorPG = GetCharacterItem(NPChar,"pistolgrapes");
int OpriorMB = GetCharacterItem(NPChar,"musketbullets");
DeleteAttribute(NPChar,"Items.gunpowder");
DeleteAttribute(NPChar,"Items.pistolbullets");
DeleteAttribute(NPChar,"Items.pistolgrapes");
DeleteAttribute(NPChar,"Items.musketbullets");
if(CheckCharacterItem(NPChar,"powderbarrel")) { TakeNItems(NPChar,"gunpowder", (4 * MAX_GUNPOWDER)); }
else
{
if(CheckCharacterItem(NPChar,"powderflask")) { TakeNItems(NPChar,"gunpowder", (2 * MAX_GUNPOWDER)); }
else { TakeNItems(NPChar,"gunpowder", MAX_GUNPOWDER); }
}
if(CheckCharacterItem(NPChar,"ammobag")) { cc = (4 * MAX_SHOTS); }
else
{
if(CheckCharacterItem(NPChar,"ammopouch")) { cc = (2 * MAX_SHOTS); }
else { cc = MAX_SHOTS; }
}
//LogIt("cc = " + cc);
if(cc > OpriorGP) { bGotAmmo = true; }
if(weapon.shottype == "pg2" || weapon.shottype == "pg") { TakeNItems(NPChar,"pistolgrapes" , cc); if (cc > OpriorPG) { bGotAmmo = true; } }
if(weapon.shottype == "mb") { TakeNItems(NPChar,"musketbullets", cc/2); if (cc > OpriorMB) { bGotAmmo = true; } }
if(weapon.shottype == "pb2" || weapon.shottype == "pb") { TakeNItems(NPChar,"pistolbullets", cc); if (cc > OpriorPB) { bGotAmmo = true; } }
}
}
}
}
if(bGotAmmo)
{
LogIt(TranslateString("","Your shore party has been resupplied with Ammunition!"));
PlaySound("INTERFACE\important_item.wav");
}
}
}
}
If you called SupplyAmmo(true), I can understand that. It should be false there.As I remember it I couldn't get everything to work and think this extra check was needed.
(In the way I did it).