<!--quoteo(post=241709:date=Feb 28 2008, 05:45 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Feb 28 2008, 05:45 AM) <a href="index.php?act=findpost&pid=241709"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->1. This might help: <i>HaveLetterOfMarque(GetCurrentLocationNation())</i><!--QuoteEnd--></div><!--QuoteEEnd-->
Fix it:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->case "Hornblower_Start":
SetEnterLocationQuest("Redmond_Port","Hornblower_Start_Check",0);
break;
case "Hornblower_Start_Check":
if (HaveLetterOfMarque(ENGLAND))
{
if(Makeint(PChar.Rank) >= 12)
{
LAi_SetActorType(CharacterFromID("Horatio Hornblower"));
LAi_ActorFollow(CharacterFromID("Horatio Hornblower"),PChar,"Hornblower_Talk",10.5);
Characters[GetCharacterIndex("Horatio Hornblower")].Dialog.CurrentNode = "Horatio_Quest";
}
}
break;
case "Hornblower_Talk":
DeleteEnterLocationQuest("Redmond_port", "Hornblower_Start_Check");
LAi_ActorWaitDialog(PChar,CharacterFromID("Horatio Hornblower"));
LAi_ActorDialog(CharacterFromID("Horatio Hornblower"),PChar,"",1.0,1.0);
break;<!--c2--></div><!--ec2-->
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->2. I wrote a function for giving ships to characters. I never tested it on anyone but the pchar, but you could try putting it in a code file and applying it to Horatio. See what happens. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid="
" border="0" alt="dunno.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Fix it:
First I have to add those line in the character creation code; <img src="style_emoticons/<#EMO_DIR#>/type_1.gif" style="vertical-align:middle" emoid=":nk" border="0" alt="type_1.gif" />
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->ch.Ship.Name = "Marguerite"; // Hornblower
ch.Ship.Type = "RN_Light_Frigate"; // Hornblower
ch.Ship.Stopped = true; // Hornblower
ch.Ship.Name = "Hotspur"; // Bush
ch.Ship.Type = "RN_Sloop_of_War"; // Bush
ch.Ship.Stopped = true; // Bush<!--c2--></div><!--ec2-->
Like this! <img src="style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid="
" border="0" alt="onya.gif" />
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->makeref(ch,Characters[n]);
ch.old.name = "Horatio";
ch.old.lastname = "Hornblower";
ch.name = LanguageConvertString(tmpLangFileID,"Horatio");
ch.lastname = LanguageConvertString(tmpLangFileID,"Hornblower");
ch.id = "Horatio Hornblower";
//ch.model = "lt_Horatio_Hornblower";
ch.model = "rn_lieut18_2";
ch.sex = "man";
ch.sound_type= "seaman";
ch.location= "Redmond_port";
ch.location.group = "goto";
ch.location.locator = "goto_43";
//ch.Dialog.Filename = "00_Fast_Recruit_Dialog.c";
ch.Dialog.Filename = "00_Horatio_Hornblower_Dialog.c";
ch.greeting = "Gr_Horatio_Hornblower";
ch.quest.area = "Redmond";
ch.nation = ENGLAND;
ch.rank = 10;
ch.reputation = "50";
ch.experience = "160000";
ch.skill.Leadership = "6";
ch.skill.Fencing = "1";
ch.skill.Sailing = "6";
ch.skill.Accuracy = "4";
ch.skill.Cannons = "6";
ch.skill.Grappling = "1";
ch.skill.Repair = "1";
ch.skill.Defence = "1";
ch.skill.Commerce = "1";
ch.skill.Sneak = "6";
ch.perks.list.BasicDefense = true;
ch.perks.list.AdvancedDefense = true;
ch.perks.list.Toughness = true;
ch.perks.list.CriticalHit = true;
ch.perks.list.FastReload = true;
ch.perks.list.BasicBattleState = true;
ch.perks.list.AdvancedBattleState= true;
ch.perks.list.ShipSpeedUp= true;
ch.perks.list.ShipTurnRateUp= true;
ch.perks.list.StormProfessional = true;
ch.perks.list.SharedExperience = true;
ch.money = "250";
ch.quest.officerprice = "500";
ch.quest.officertype = OFFIC_TYPE_FIRSTMATE;
ch.Ship.Name = "Marguerite";
ch.Ship.Type = "RN_Light_Frigate";
ch.Ship.Stopped = true;
TakenItems(ch, "blade14+3", 2);
TakenItems(ch, "pistol9+3", 2);
TakenItems(ch, "ammopouch", 2);
TakenItems(ch, "powderflask", 2);
TakenItems(ch, "CommonArmor", 2);
TakenItems(ch, "potion2", 5);
TakenItems(ch, "potion3", 5);
if (ENABLE_AMMOMOD)
{
TakenItems(ch, "gunpowder", 12);
TakenItems(ch, "pistolbullets", 12);
}
LAi_RemoveLoginTime(ch);
LAi_SetHuberStayType(ch);
LAi_SetHP(ch, 130.0, 130.0);
ch.HPBonus = 220;
LAi_group_MoveCharacter(ch, "ENGLAND_CITIZENS");
n = n + 1;<!--c2--></div><!--ec2-->
Then I use this in the quest_reaction.c: <img src="style_emoticons/<#EMO_DIR#>/type_1.gif" style="vertical-align:middle" emoid=":nk" border="0" alt="type_1.gif" />
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->case "Hornblower_And_Bush_Joined":
ChangeCharacterAddress(CharacterfromID("Horatio Hornblower"), "none", "");
SetCompanionIndex(Pchar, -1, GetCharacterIndex("Horatio Hornblower"));
SetCompanionIndex(Pchar, -1, GetCharacterIndex("Lieutenant Bush"));
SetCharacterRemovable(characterFromID("Horatio Hornblower"), false);
SetCharacterRemovable(characterFromID("Lieutenant Bush"), false);
break;<!--c2--></div><!--ec2-->
The reason that i use: <i>ChangeCharacterAddress(CharacterfromID("Horatio Hornblower"), "none", "");</i> is because at that point Hornblower is in the same room as the player and Hornblower must be remove so it can be add to the companion list.
Also if you set the NPChar to:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->AddPassenger(PChar, CharacterFromID("Horatio Hornblower"), 0);
SetOfficersIndex(PChar, 1, GetCharacterIndex("Horatio Hornblower"));
LAi_SetOfficerType(CharacterFromID("Horatio Hornblower"));<!--c2--></div><!--ec2-->
This set your NPC to act as an officer and will not use the ship assign to him. The NPC will appear in the passenger list or assign as a fighter giving you the ability to use him like you want. As soon you tell the game to set your NPC as Companion(Captain) they will use the ship assign to them and you won't be able to use them as officer since they will not appear in the passenger list. How ever they will be there with there ship once you go at sea.
P.S: For the code you wrote for #2 Pieter it make the game crash(engine.exe error) <img src="style_emoticons/<#EMO_DIR#>/boom.gif" style="vertical-align:middle" emoid=":boom" border="0" alt="boom.gif" /> but you give me an idea to use it later on in the quest. <img src="style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid="
" border="0" alt="icon_wink.gif" /> Also Pieter if you know what this line mean wanna tell me please: ch.Ship.Stopped = true;
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->3. This must have something to do with it:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> Group_CreateGroup("FlyingDutchman");
Group_AddCharacter("FlyingDutchman", "Davy Jones");
Group_SetGroupCommander("FlyingDutchman", "Davy Jones");
Group_SetPursuitGroup("FlyingDutchman", PLAYER_GROUP);
Group_SetTaskAttack("FlyingDutchman", PLAYER_GROUP);
Group_SetAddress("FlyingDutchman", ISLAND_09, "Quest_ships", "Quest_ship_12");
Group_LockTask("FlyingDutchman");
UpdateRelations();
characters[GetCharacterIndex("Davy Jones")].nosurrender = 2;
Character_SetAbordageEnable(characterFromID("Davy Jones"), false);<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->
^I didn't try anything about it yet.^ <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid="
" border="0" alt="dunno.gif" />
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->4. From the governor dialog file:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
case "promote":
SetMusicNoPause("music_govreward"); // NK
iNation = sti(NPChar.nation);
NPChar.templand = GetCharacterLand(PChar);
Promote(&PChar, &NPChar, iNation);
dialog.text = DLG_TEXT[338] + XI_ConvertString(GetRankName(PChar, iNation)) + DLG_TEXT[384] + (GetCharacterLand(PChar) - sti(NPChar.templand)) + DLG_TEXT[385] + XI_ConvertString(GetNationRoyalByType(iNation)) +".";
DeleteAttribute(NPChar,"templand");
Link.l1 = DLG_TEXT[339];
Link.l1.go = "exit";
break;<!--c2--></div><!--ec2-->
I think the <i>Promote(&PChar, &NPChar, iNation);</i> function should do the trick.<!--QuoteEnd--></div><!--QuoteEEnd-->
^I didn't try anything about it yet.^ <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid="
" border="0" alt="dunno.gif" />
<b>Cheers,</b> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid="
" border="0" alt="par-ty.gif" />