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 -
case "Prepare Smuggling":
//Keep track of how many times we did this
if(!CheckAttribute(Pchar,"amount_smuggleruns")) Pchar.amount_smuggleruns = 0;
Pchar.amount_smuggleruns = sti(Pchar.amount_smuggleruns) + 1;
//Set the contraband stuff
lockIslandContraband(Islands[GetCharacterCurrentIsland(Pchar)]); //Make sure the contraband wont change
Pchar.quest.Contraband.islandindex = GetCharacterCurrentIsland(Pchar);
Pchar.quest.Contraband.active = true;
Pchar.quest.Contraband.scout = true;
Pchar.quest.Contraband.tavern = pchar.location; //Added so we know where to spawn the officer when he returns.
//Levis add smuggling questbook
Preprocessor_AddQuestData("island",Islands[GetCharacterCurrentIsland(Pchar)].name);
Preprocessor_AddQuestData("location",locations[FindLocation(Pchar.quest.contraband.CurrentPlace)].name);
//DeleteQuestHeader("smuggle&number=0"); //we dont have to delete anymore now
questbookname = "smuggle&number="+Pchar.amount_smuggleruns; //Set a questname
SetQuestHeader(questbookname);
AddQuestRecord(questbookname, 1);
Preprocessor_Remove("island");
Preprocessor_Remove("location");
//Give player the book the first time
if(!CheckAttribute(Pchar,"quest.smuggling_got_book"))
{
Lai_QuestDelay("Smugglers First Meeting",0.0);
}
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1 = "Timer";
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1.date.day = GetAddingDataDay(0,0,7);
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1.date.month = GetAddingDataMonth(0,0,7);
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1.date.year = GetAddingDataYear(0,0,7);
PChar.quest.Prepare_Smuggling_Fail.win_condition = "Prepare Smuggling Fail";
break;
case "Prepare Smuggling Fail": // DeathDaisy: this happens if you fail to get back to the smuggler agent with the patrol times within a week
questbookname = "smuggle&number="+Pchar.amount_smuggleruns;
AddQuestRecord(questbookname, 16);
CloseQuestHeader(questbookname);
ChangeSmugglerLiking(Pchar, -2); //Add liking
break;
PChar.quest.Prepare_Smuggling_Fail.over = "yes";
text.t16=The smugglers tired of waiting for me to procure the patrol times, so the deal is off. I will have to contact them anew if I want to set up a new deal.
it should work, its pretty much the same thing that happens if you dont show up for the trade itself. but Ill try it out!I think by doing it this way you won't be able to do another smuggling run later. Could you test this?
case "Prepare Smuggling Fail": // DeathDaisy: this happens if you fail to get back to the smuggler agent with the patrol times within a week
questbookname = "smuggle&number="+Pchar.amount_smuggleruns;
AddQuestRecord(questbookname, 16);
CloseQuestHeader(questbookname);
ChangeSmugglerLiking(Pchar, -2); //Add liking
RemoveSmugglersFromShore();
break;
case "Prepare Smuggling":
//Keep track of how many times we did this
if(!CheckAttribute(Pchar,"amount_smuggleruns")) Pchar.amount_smuggleruns = 0;
Pchar.amount_smuggleruns = sti(Pchar.amount_smuggleruns) + 1;
//Set the contraband stuff
lockIslandContraband(Islands[GetCharacterCurrentIsland(Pchar)]); //Make sure the contraband wont change
Pchar.quest.Contraband.islandindex = GetCharacterCurrentIsland(Pchar);
Pchar.quest.Contraband.active = true;
Pchar.quest.Contraband.scout = true;
Pchar.quest.Contraband.tavern = pchar.location; //Added so we know where to spawn the officer when he returns.
//Levis add smuggling questbook
Preprocessor_AddQuestData("island",Islands[GetCharacterCurrentIsland(Pchar)].name);
Preprocessor_AddQuestData("location",locations[FindLocation(Pchar.quest.contraband.CurrentPlace)].name);
//DeleteQuestHeader("smuggle&number=0"); //we dont have to delete anymore now
questbookname = "smuggle&number="+Pchar.amount_smuggleruns; //Set a questname
SetQuestHeader(questbookname);
AddQuestRecord(questbookname, 1);
Preprocessor_Remove("island");
Preprocessor_Remove("location");
//Give player the book the first time
if(!CheckAttribute(Pchar,"quest.smuggling_got_book"))
{
Lai_QuestDelay("Smugglers First Meeting",0.0);
}
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1 = "Timer";
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1.date.day = GetAddingDataDay(0,0,7);
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1.date.month = GetAddingDataMonth(0,0,7);
PChar.quest.Prepare_Smuggling_Fail.win_condition.l1.date.year = GetAddingDataYear(0,0,7);
PChar.quest.Prepare_Smuggling_Fail.win_condition = "Prepare Smuggling Fail";
break;
case "Prepare Smuggling Fail": // DeathDaisy: this happens if you fail to get back to the smuggler agent with the patrol times within a week
ref ch = characterFromID(PChar.quest.Contraband.contact);
ch.Dialog.CurrentNode = ch.Dialog.TempNode;
questbookname = "smuggle&number="+Pchar.amount_smuggleruns;
AddQuestRecord(questbookname, 16);
CloseQuestHeader(questbookname);
ChangeSmugglerLiking(Pchar, -2); //Add liking
RemoveSmugglersFromShore();
break;
entirely possible, I used cancel_smuggling as a mold, and that seems to be chaos. the only thing I can see that it would need here is it deletes some attributes other than the smugglers on the beach, but I dunno if thats vital. the cancelling overall seems a bit messyI don't think you need the "removesmugglersfromshore()" yet, I believe these are added one step later right?
I havnt checked if the RemoveSmugglers thing is reduntant, but it definitely works afaict!okay, so @DeathDaisy did you test this already? Can we call it fixed?
it's redundant but won't cause problems.I havnt checked if the RemoveSmugglers thing is reduntant, but it definitely works afaict!
dunno why it does that sometimes.. Ill be back at my computer within the next few hours, but this shd be fixable on my mobile. harder to check if the fix actually did its job here tho, so see if this ver works better! elsewise Ill fix properly it when I get homeThere is a problem with that version of "Smuggler Agent_dialog.c". The end of line characters aren't properly set so I can't view it properly, and WinMerge shows the entire file as being one big block of difference.
@DeathDaisy: can you provide a version of "Smuggler Agent_dialog.c" with standard end of line characters?
ref SmugglingIsland
int n;
n = GetCharacterCurrentIsland(Pchar);
if(n < 0) return "none";
SmugglingIsland = GetIslandByIndex(n);
case "Ready to go":
if(getSmugglingState(SmugglingIsland) == 1) PatrolState = DLG_TEXT[78];
if(getSmugglingState(SmugglingIsland) == 2) PatrolState = DLG_TEXT[79];
if(getSmugglingState(SmugglingIsland) == 3) PatrolState = DLG_TEXT[80];
if(getSmugglingState(SmugglingIsland) == 4) PatrolState = DLG_TEXT[81];
Indeed if you do 'return' in a 'void' function, it should just be 'return' without a value following it.The 'if(n<0)' probably shouldn't happen - it means you're talking to the agent and you're not on a valid island, in which case how did he get there? But if it does happen, you're bailing out right away - and you're returning string value "none" from inside function 'void ProcessDialogEvent()', which being a "void" type should not be returning any value at all. I'm not sure, but perhaps it might be tidier to have 'if(n < 0) DialogExit();'?
just doing a return migth work. but doing a dialog exit might be better indeed.Yes, that's certainly more readable.
I'm not sure about this:The 'if(n<0)' probably shouldn't happen - it means you're talking to the agent and you're not on a valid island, in which case how did he get there? But if it does happen, you're bailing out right away - and you're returning string value "none" from inside function 'void ProcessDialogEvent()', which being a "void" type should not be returning any value at all. I'm not sure, but perhaps it might be tidier to have 'if(n < 0) DialogExit();'?Code:ref SmugglingIsland int n; n = GetCharacterCurrentIsland(Pchar); if(n < 0) return "none"; SmugglingIsland = GetIslandByIndex(n);
Variable "PatrolState" isn't declared here, it's declared in case "Meeting_3". Also, lines 78-81 mean you must have a new version of "Smuggler Agent_dialog.h". (Does the player need to be told the patrol state again? )Code:case "Ready to go": if(getSmugglingState(SmugglingIsland) == 1) PatrolState = DLG_TEXT[78]; if(getSmugglingState(SmugglingIsland) == 2) PatrolState = DLG_TEXT[79]; if(getSmugglingState(SmugglingIsland) == 3) PatrolState = DLG_TEXT[80]; if(getSmugglingState(SmugglingIsland) == 4) PatrolState = DLG_TEXT[81];
I think I stole that from somewhere else, so dont know why itd do that. I dont mind changing itYes, that's certainly more readable.
I'm not sure about this:The 'if(n<0)' probably shouldn't happen - it means you're talking to the agent and you're not on a valid island, in which case how did he get there? But if it does happen, you're bailing out right away - and you're returning string value "none" from inside function 'void ProcessDialogEvent()', which being a "void" type should not be returning any value at all. I'm not sure, but perhaps it might be tidier to have 'if(n < 0) DialogExit();'?Code:ref SmugglingIsland int n; n = GetCharacterCurrentIsland(Pchar); if(n < 0) return "none"; SmugglingIsland = GetIslandByIndex(n);
hm, I have a vague memory that I figured that since Meeting_3 will always run before Ready to go, itd stay declared, but its fuzzy. just moving it to the top will probably be betterVariable "PatrolState" isn't declared here, it's declared in case "Meeting_3". Also, lines 78-81 mean you must have a new version of "Smuggler Agent_dialog.h". (Does the player need to be told the patrol state again? )Code:case "Ready to go": if(getSmugglingState(SmugglingIsland) == 1) PatrolState = DLG_TEXT[78]; if(getSmugglingState(SmugglingIsland) == 2) PatrolState = DLG_TEXT[79]; if(getSmugglingState(SmugglingIsland) == 3) PatrolState = DLG_TEXT[80]; if(getSmugglingState(SmugglingIsland) == 4) PatrolState = DLG_TEXT[81];
If a player's memory is that bad then there's no point in the smuggling agent mentioning the patrol state because the player will forget it again about five seconds after leaving the tavern. The best place to put it would be in the questbook along with the smuggling time when you've either talked to a soldier or had an officer return from a successful scouting mission. Then it's always there. (Personally I don't pay much attention to the smuggling state, but the time is important. And my memory isn't that great either. So I'm going to be looking back at the questbook a few times anyway.)I think I stole that from somewhere else, so dont know why itd do that. I dont mind changing it
hm, I have a vague memory that I figured that since Meeting_3 will always run before Ready to go, itd stay declared, but its fuzzy. just moving it to the top will probably be better
as for telling the patrol state twice, if the player is anything like me, theyll have forgotten the patrol state long ago when they talk to the smuggler again after finding the patrol time
Unfortunately, once again, that version has the wrong end of line characters.speaking of memory, Ill attach the .h file
seems my notepad++ saves some documents with unix formatting for some reason gonna keep an eye out for it.. updated the h again EDIT: and the c too, seems that had the same problemIf a player's memory is that bad then there's no point in the smuggling agent mentioning the patrol state because the player will forget it again about five seconds after leaving the tavern. The best place to put it would be in the questbook along with the smuggling time when you've either talked to a soldier or had an officer return from a successful scouting mission. Then it's always there. (Personally I don't pay much attention to the smuggling state, but the time is important. And my memory isn't that great either. So I'm going to be looking back at the questbook a few times anyway.)
Unfortunately, once again, that version has the wrong end of line characters.