void QuestComplete(string sQuestName) { ref PChar, NPChar, sld; PChar = GetMainCharacter(); switch(sQuestName) { case "Start": Pchar.quest.Trafalgar_joins.win_condition.l1 = "location"; Pchar.quest.Trafalgar_joins.win_condition.l1.location = "Alice_tavern"; Pchar.quest.Trafalgar_joins.win_condition = "Trafalgar_Law_joins"; Pchar.quest.Redhair_joins.win_condition.l1 = "location"; Pchar.quest.Redhair_joins.win_condition.l1.location = "Turks_Tavern"; Pchar.quest.Redhair_joins.win_condition = "Redhair_joins"; Pchar.quest.DoFlamingo_Attack3.win_condition.l1 = "location"; Pchar.quest.DoFlamingo_Attack3.win_condition.l1.location = "Smugglers_Lair"; Pchar.quest.DoFlamingo_Attack3.win_condition = "DoFlamingo_Attack3"; Pchar.quest.Lighthouse_Pirates.win_condition.l1 = "location"; Pchar.quest.Lighthouse_Pirates.win_condition.l1.location = "Oxbay_Lighthouse"; Pchar.quest.Lighthouse_Pirates.win_condition = "Lighthouse_Pirates"; break; case "Trafalgar_Law_joins": SetCompanionIndex(PChar, -1, GetCharacterIndex("Trafalgar_Law")); break; case "Redhair_joins": SetCompanionIndex(PChar, -1, GetCharacterIndex("RedHair_Shanks")); break; case "Salazar_2nd_arrives": //<- Should be called Salazar_2nd_arrives Group_CreateGroup("payroll_ship"); Group_AddCharacter("payroll_ship", "Armando Salazar"); Group_SetGroupCommander("payroll_ship", "Armando Salazar"); Group_SetPursuitGroup("payroll_ship", PLAYER_GROUP); Group_SetTaskAttack("payroll_ship", PLAYER_GROUP, true); Group_LockTask("payroll_ship"); Group_SetAddress("payroll_ship", "Redmond", "Quest_ships", "Ships_other_8"); Sea_LoginGroupNow("payroll_ship"); characters[GetCharacterIndex("Armando Salazar")].nosurrender = 2; SetCharacterRelationBoth(GetCharacterIndex("payroll_ship"),GetMainCharacterIndex(),RELATION_ENEMY); pchar.quest.payroll_ship_taken1.win_condition.l1 = "NPC_Death"; pchar.quest.payroll_ship_taken1.win_condition.l1.character = "Armando Salazar"; pchar.quest.payroll_ship_taken1.win_condition.l2 = "SeaEnter"; pchar.quest.payroll_ship_taken1.win_condition = "payroll_ship_taken"; break; case "Salazar_Quest": ChangeCharacterAddressGroup(characterFromID("Navigator"), "Turks_port", "goto", "goto21"); break; case "The_Seven_Secret_of_the_Caribian_Sea": ChangeCharacterAddressGroup(characterFromID("Dealer"), "Turks_port", "goto", "goto32"); break; case "DoFlamingo_Attack3": LAi_group_MoveCharacter(CharacterFromID("MikePica"), LAi_monsters_group); LAi_group_MoveCharacter(CharacterFromID("Diamante"), LAi_monsters_group); LAi_group_MoveCharacter(CharacterFromID("Bellamy"), LAi_monsters_group); LAi_group_SetRelation(LAi_monsters_group, LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups(LAi_monsters_group, LAI_GROUP_PLAYER, true); break; case "DoFlamingo_Attack1": Group_CreateGroup("payroll_ship"); Group_AddCharacter("payroll_ship", "Doflamingo Donquixote"); Group_SetGroupCommander("payroll_ship", "Doflamingo Donquixote"); Group_SetPursuitGroup("payroll_ship", PLAYER_GROUP); Group_SetTaskAttack("payroll_ship", PLAYER_GROUP, true); Group_LockTask("payroll_ship"); Group_SetAddress("payroll_ship", "(Comes Later)", "Quest_ships", "(Comes Later)"); Sea_LoginGroupNow("payroll_ship"); characters[GetCharacterIndex("Doflamingo")].nosurrender = 2; SetCharacterRelationBoth(GetCharacterIndex("payroll_ship"),GetMainCharacterIndex(),RELATION_ENEMY); pchar.quest.payroll_ship_taken1.win_condition.l1 = "NPC_Death"; pchar.quest.payroll_ship_taken1.win_condition.l1.character = "Doflamingo Donquixote"; pchar.quest.payroll_ship_taken1.win_condition.l2 = "SeaEnter"; pchar.quest.payroll_ship_taken1.win_condition = "payroll_ship_taken"; break; case "Lighthouse_Pirates": LAi_group_MoveCharacter(CharacterFromID("Kuro"), LAi_monsters_group); LAi_group_MoveCharacter(CharacterFromID("Jango"), LAi_monsters_group); LAi_group_MoveCharacter(CharacterFromID("Gino"), LAi_monsters_group); LAi_group_MoveCharacter(CharacterFromID("Genzo"), LAi_monsters_group); LAi_group_SetRelation(LAi_monsters_group, LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups(LAi_monsters_group, LAI_GROUP_PLAYER, true); break; case "Dark_Assassin_Quest": LAi_group_MoveCharacter(CharacterFromID("Dark_Assassin"), LAi_monsters_group); LAi_group_SetRelation(LAi_monsters_group, LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups(LAi_monsters_group, LAI_GROUP_PLAYER, true); break; case: "Lighthouse_Pirates_Boss": LAi_group_MoveCharacter(CharacterFromID("Kuro"), LAi_monsters_group); LAi_group_SetRelation(LAi_monsters_group, LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups(LAi_monsters_group, LAI_GROUP_PLAYER, true); break; break; case: "Skullface_Quest": break; PChar.questnotfound = true; // PB: Testing } }