I've hit a snag when creating the Flying Dutchman quest for the supermod.
A runtime error plagued me for a while, but I fixed them. Unfortunately the quest it is still not working.
The Quest is linked to quests.c
I have Notepad++
What I want:
-I want the quest to start at the same time the main quest starts, but not interfere with the Storyline.
-I want the quest when the player >= rank 2 he will get the slip of paper. Or the "Quester" dialog in Bridgetown tavern will give the paper when the dialog finishes when nextdialog.currentnode = "Win".
-Then an encounter will generate the Flying Dutchman circling around the island Grenada.
-The quest will then check if the ship is sunk, or the Captain is dead from you killing him while boarding.
-If the ship is sunk, the quest will reload the encounter when you refresh the Grenada sea.
-If the Captain is killed the quest will remove the slip of paper from your person signifying the quest is done and replace it with a unique sword and a 4 barreled pistol.
Here is the new code (i don't know how to debug in relation to the game):
I rarely edit/code quests. COAS is very similar to AoP in terms of code so I would welcome COAS modder's input on this issue.
Please Help,
Modder01

A runtime error plagued me for a while, but I fixed them. Unfortunately the quest it is still not working.
The Quest is linked to quests.c
I have Notepad++
What I want:
-I want the quest to start at the same time the main quest starts, but not interfere with the Storyline.
-I want the quest when the player >= rank 2 he will get the slip of paper. Or the "Quester" dialog in Bridgetown tavern will give the paper when the dialog finishes when nextdialog.currentnode = "Win".
-Then an encounter will generate the Flying Dutchman circling around the island Grenada.
-The quest will then check if the ship is sunk, or the Captain is dead from you killing him while boarding.
-If the ship is sunk, the quest will reload the encounter when you refresh the Grenada sea.
-If the Captain is killed the quest will remove the slip of paper from your person signifying the quest is done and replace it with a unique sword and a 4 barreled pistol.
Here is the new code (i don't know how to debug in relation to the game):
Code:
{
//login Davy Jones
iChar = GenerateCharacter(PIRATE, WITH_SHIP, "officer", MAN, 1, BOSS);
characters[iChar].id = "Davy Jones";
characters[iChar].name = "Davy";
characters[iChar].lastname = "Jones";
characters[iChar].model = "pirate_5";
characters[iChar].Ship.Type = GenerateShip(SHIP_DUTCHMAN, 1);
characters[iChar].ship.name = "The Flying Dutchman";
characters[iChar].skill.Fencing = 10;
characters[iChar].skill.Gun = 10;
LAi_SetHP(CharacterFromID("Davy Jones"), 1000.0, 1000.0);
GiveItem2Character(CharacterFromID("Davy Jones"), "blade15");
EquipCharacterByItem(CharacterFromID("Davy Jones"), "blade15");
characters[iChar].cannotsurrender = 1;
if (characters[pchar].rank) >= 2;
GiveItem2Character(pchar, "pslip");
//generate encounter
iChar = GetCharacterIndex("Davy Jones");
DeleteAttribute(&characters[iChar], "seaai");
Group_CreateGroup("dutchman");
Group_AddCharacter("dutchman", "Davy Jones");
Group_SetGroupCommander("dutchman", "Davy Jones");
Group_SetAddress("dutchman", "grenada", "quest_ships", "quest_ship_1");
SetCharacterRelationBoth(nMainCharacterIndex, iChar, RELATION_ENEMY);
Group_SetTaskAttack("dutchman", PLAYER_GROUP);
Group_LockTask("dutchman");
UpdateRelations();
//start check: kill ships
pchar.quest.Kill_ships.win_condition.l1 = "npc_death";
pchar.quest.Kill_ships.win_condition.l1.character = iChar;
pchar.quest.Kill_ships.win_condition = "Ship dead";
trace("!!! sea spawned");
//start check: kill boss
LAi_SetCheckMinHP(CharacterFromID("Davy Jones"), 200.0, 0, "char_dead");
case "Ship dead":
//generate encounter
iChar = GetCharacterIndex("Davy Jones");
DeleteAttribute(&characters[iChar], "seaai");
Group_CreateGroup("dutchman");
Group_AddCharacter("dutchman", "Davy Jones");
Group_SetGroupCommander("dutchman", "Davy Jones");
Group_SetAddress("dutchman", "grenada", "quest_ships", "quest_ship_1");
SetCharacterRelationBoth(nMainCharacterIndex, iChar, RELATION_ENEMY);
Group_SetTaskAttack("dutchman", PLAYER_GROUP);
Group_LockTask("dutchman");
UpdateRelations();
break;
case "char_dead":
GiveItem2Character(pchar, "blade19");
GiveItem2Character(pchar, "gun6");
TakeItemFromCharacter(pchar, "pslip");
break;
}
I rarely edit/code quests. COAS is very similar to AoP in terms of code so I would welcome COAS modder's input on this issue.
Please Help,
Modder01