Files
dsrc/sku.0/sys.server/compiled/game/script/theme_park/tatooine/gating.scriptlib
T

147 lines
4.5 KiB
Plaintext

include library.quests;
include library.factions;
//include theme_park.tatooine.gating;
//tatooine themepark quest constants:
const string BIB_QUEST = "bibNewbieQuest1";
const string BIB_QUEST2 = "bibNewbieQuest2";
const string EPHANT_MON_QUEST = "ephantMonQuest1";
const string MAX_REBO_QUEST = "maxReboQuest1";
const string BARADA_QUEST = "baradaQuest1";
const string BIB_QUEST3 = "bibIntermediateQuest3";
const string JABBA_QUEST = "jabbaAdvQuest1";
const string JABBA_QUEST2 = "jabbaAdvQuest2";
const string JABBA_QUEST3 = "jabbaAdvQuest3";
const string JABBA_CRAFTING_1 = "jabbaCrafting1";
const string JABBA_CRAFTING_2 = "jabbaCrafting2";
const string JABBA_COMBAT_1 = "jabbaCombat1";
const string JABBA_COMBAT_2 = "jabbaCombat2";
const string DERA_QUEST_1 = "deraQuest1";
const string DERA_CRAFTING_1 = "deraCrafting1";
const string DERA_CRAFTING_2 = "deraCrafting2";
const string DERA_COMBAT_1 = "deraCombat1";
const string DERA_COMBAT_2 = "deraCombat2";
const string TALMONT_QUEST_1 = "talmontQuest1";
const string TALMONT_CRAFTING_1 = "talmontCrafting1";
const string TALMONT_CRAFTING_2 = "talmontCrafting2";
const string TALMONT_COMBAT_1 = "talmontCombat1";
const string TALMONT_COMBAT_2 = "talmontCombat2";
boolean canTakeQuest( obj_id player, string questId )
{
//can't complete quests you've already done:
if ( quests.hasCompletedQuest( player, questId ) )
return false;
//special case for infiltration missions
/*if ( questId == DERA_QUEST_1 || questId == TALMONT_QUEST_1 )
return canTakeInfiltrationMission( player, questId );*/
//can do the crafting and combat missions if you've completed the infiltration quest
if ( questId == DERA_CRAFTING_1 ||
questId == DERA_CRAFTING_2 ||
questId == DERA_COMBAT_1 ||
questId == DERA_COMBAT_2
)
return quests.hasCompletedQuest( player, DERA_QUEST_1);
//can do the crafting and combat missions if you've completed the infiltration quest
if ( questId == TALMONT_CRAFTING_1 ||
questId == TALMONT_CRAFTING_2 ||
questId == TALMONT_COMBAT_1 ||
questId == TALMONT_COMBAT_2
)
return quests.hasCompletedQuest( player, TALMONT_QUEST_1);
//can't take any quests with less that 500 faction, unless you are infiltrating:
if ( factions.getFactionStanding( player, factions.FACTION_HUTT ) < 500f )
if ( quests.canInfiltrate( player, DERA_QUEST_1) == false && quests.canInfiltrate( player, TALMONT_QUEST_1) == false )
return false;
//can do the crafting and combat missions if you've completed Jabba's advanced quests:
if ( questId == JABBA_CRAFTING_1 ||
questId == JABBA_CRAFTING_2 ||
questId == JABBA_COMBAT_1 ||
questId == JABBA_COMBAT_2
)
return quests.hasCompletedQuest( player, JABBA_QUEST3);
if ( questId == BIB_QUEST )
return true;
if ( questId == BIB_QUEST2 )
return quests.hasCompletedQuest( player, BIB_QUEST);
//You can complete these quests in any order:
if ( questId == EPHANT_MON_QUEST ||
questId == MAX_REBO_QUEST ||
questId == BARADA_QUEST
)
return quests.hasCompletedQuest( player, BIB_QUEST2);
//You can't take this quest unless you've completed all three of these:
if ( questId == BIB_QUEST3 )
{
if ( quests.hasCompletedQuest( player, EPHANT_MON_QUEST ) &&
quests.hasCompletedQuest( player, MAX_REBO_QUEST ) &&
quests.hasCompletedQuest( player, BARADA_QUEST )
)
return true;
else
return false;
}
if ( questId == JABBA_QUEST )
return quests.hasCompletedQuest( player, BIB_QUEST3);
if ( questId == JABBA_QUEST2 )
return quests.hasCompletedQuest( player, JABBA_QUEST);
if ( questId == JABBA_QUEST3 )
return quests.hasCompletedQuest( player, JABBA_QUEST2);
debugServerConsoleMsg( player, "Error: Don't know WTF " + questId + " quest is!" );
return false;
}
/*boolean canTakeInfiltrationMission( obj_id player, string questId )
{
if ( questId == DERA_QUEST_1 )
{
if ( factions.isPartisan( player ) )
{
string declaredFaction = factions.getDeclaredFaction( player );
if ( !declaredFaction.equals( factions.FACTION_REBEL ))
return false;
}
if ( factions.getFactionStanding( player, factions.FACTION_REBEL ) < 500f )
return false;
return true;
}
if ( questId == TALMONT_QUEST_1 )
{
if ( factions.isPartisan( player ) )
{
string declaredFaction = factions.getDeclaredFaction( player );
if ( !declaredFaction.equals( factions.FACTION_IMPERIAL ))
return false;
}
if ( factions.getFactionStanding( player, factions.FACTION_IMPERIAL ) < 500f )
return false;
return true;
}
debugServerConsoleMsg( player, "Error: " + questId + " is not an infiltration quest!" );
return false;
}*/