public bool CheckPrecondition(GameObject npc, GameObject pc, int lineNumber, out string originalScript)
    {
        switch (lineNumber)
        {
        case 2:
        case 3:
            originalScript = "game.global_flags[48] == 1";
            return(GetGlobalFlag(48));

        case 4:
        case 5:
            originalScript = "game.quests[16].state == qs_completed and (game.party_alignment == LAWFUL_GOOD or game.party_alignment == NEUTRAL_GOOD or game.party_alignment == CHAOTIC_GOOD or game.party_alignment == LAWFUL_NEUTRAL or game.party_alignment == TRUE_NEUTRAL or game.party_alignment == CHAOTIC_NEUTRAL)";
            return(GetQuestState(16) == QuestState.Completed && (PartyAlignment == Alignment.LAWFUL_GOOD || PartyAlignment == Alignment.NEUTRAL_GOOD || PartyAlignment == Alignment.CHAOTIC_GOOD || PartyAlignment == Alignment.LAWFUL_NEUTRAL || PartyAlignment == Alignment.NEUTRAL || PartyAlignment == Alignment.CHAOTIC_NEUTRAL));

        case 6:
        case 7:
            originalScript = "game.quests[16].state == qs_completed and (game.party_alignment == CHAOTIC_EVIL or game.party_alignment == NEUTRAL_EVIL or game.party_alignment == LAWFUL_EVIL)";
            return(GetQuestState(16) == QuestState.Completed && (PartyAlignment == Alignment.CHAOTIC_EVIL || PartyAlignment == Alignment.NEUTRAL_EVIL || PartyAlignment == Alignment.LAWFUL_EVIL));

        case 10:
            originalScript = "pc != game.party[0] and game.party[0].distance_to(pc) <= 40 and not critter_is_unconscious(game.party[0]) and anyone(game.party[0].group_list(), \"has_wielded\", 3005)";
            return(pc != PartyLeader && PartyLeader.DistanceTo(pc) <= 40 && !Utilities.critter_is_unconscious(PartyLeader) && PartyLeader.GetPartyMembers().Any(o => o.HasEquippedByName(3005)));

        case 31:
        case 32:
            originalScript = "pc.skill_level_get(npc,skill_bluff) >= 7";
            return(pc.GetSkillLevel(npc, SkillId.bluff) >= 7);

        default:
            originalScript = null;
            return(true);
        }
    }
Пример #2
0
    public bool CheckPrecondition(GameObject npc, GameObject pc, int lineNumber, out string originalScript)
    {
        switch (lineNumber)
        {
        case 2:
        case 6:
        case 11:
        case 13:
        case 101:
        case 104:
            originalScript = "pc.skill_level_get(npc,skill_diplomacy) >= 7";
            return(pc.GetSkillLevel(npc, SkillId.diplomacy) >= 7);

        case 3:
        case 7:
        case 12:
        case 14:
        case 102:
        case 105:
            originalScript = "pc.skill_level_get(npc,skill_bluff) >= 3";
            return(pc.GetSkillLevel(npc, SkillId.bluff) >= 3);

        case 4:
        case 8:
        case 103:
        case 106:
            originalScript = "pc.skill_level_get(npc,skill_intimidate) >= 12";
            return(pc.GetSkillLevel(npc, SkillId.intimidate) >= 12);

        case 9:
            originalScript = "pc != game.party[0] and game.party[0].distance_to(pc) <= 40 and not critter_is_unconscious(game.party[0]) and anyone(game.party[0].group_list(), \"has_wielded\", 3005)";
            return(pc != PartyLeader && PartyLeader.DistanceTo(pc) <= 40 && !Utilities.critter_is_unconscious(PartyLeader) && PartyLeader.GetPartyMembers().Any(o => o.HasEquippedByName(3005)));

        case 51:
            originalScript = "pc.money_get() >= 5000";
            return(pc.GetMoney() >= 5000);

        case 61:
            originalScript = "pc.money_get() >= 10000";
            return(pc.GetMoney() >= 10000);

        default:
            originalScript = null;
            return(true);
        }
    }
    public bool CheckPrecondition(GameObject npc, GameObject pc, int lineNumber, out string originalScript)
    {
        switch (lineNumber)
        {
        case 2:
        case 8:
            originalScript = "game.global_flags[91] == 1";
            return(GetGlobalFlag(91));

        case 3:
        case 9:
            originalScript = "game.global_flags[92] == 1";
            return(GetGlobalFlag(92));

        case 12:
        case 73:
            originalScript = "pc != game.party[0] and game.party[0].distance_to(pc) <= 40 and not critter_is_unconscious(game.party[0]) and anyone(game.party[0].group_list(), \"has_wielded\", 3005)";
            return(pc != PartyLeader && PartyLeader.DistanceTo(pc) <= 40 && !Utilities.critter_is_unconscious(PartyLeader) && PartyLeader.GetPartyMembers().Any(o => o.HasEquippedByName(3005)));

        case 66:
        case 67:
            originalScript = "pc.skill_level_get(npc,skill_intimidate) >= 8";
            return(pc.GetSkillLevel(npc, SkillId.intimidate) >= 8);

        case 68:
        case 69:
            originalScript = "pc.skill_level_get(npc,skill_diplomacy) >= 7";
            return(pc.GetSkillLevel(npc, SkillId.diplomacy) >= 7);

        case 82:
        case 83:
            originalScript = "pc.skill_level_get(npc,skill_sense_motive) >= 11";
            return(pc.GetSkillLevel(npc, SkillId.sense_motive) >= 11);

        default:
            originalScript = null;
            return(true);
        }
    }
Пример #4
0
    public bool CheckPrecondition(GameObject npc, GameObject pc, int lineNumber, out string originalScript)
    {
        switch (lineNumber)
        {
        case 6:
        case 107:
        case 207:
            originalScript = "pc != game.party[0] and game.party[0].distance_to(pc) <= 40 and not critter_is_unconscious(game.party[0]) and anyone(game.party[0].group_list(), \"has_wielded\", 3005)";
            return(pc != PartyLeader && PartyLeader.DistanceTo(pc) <= 40 && !Utilities.critter_is_unconscious(PartyLeader) && PartyLeader.GetPartyMembers().Any(o => o.HasEquippedByName(3005)));

        case 13:
        case 14:
        case 25:
        case 26:
            originalScript = "pc.skill_level_get(npc,skill_intimidate) >= 10";
            return(pc.GetSkillLevel(npc, SkillId.intimidate) >= 10);

        case 21:
        case 22:
            originalScript = "game.global_flags[37] == 1";
            return(GetGlobalFlag(37));

        case 23:
        case 24:
            originalScript = "pc.skill_level_get(npc,skill_diplomacy) >= 5";
            return(pc.GetSkillLevel(npc, SkillId.diplomacy) >= 5);

        case 27:
            originalScript = "pc.money_get() >= 10000";
            return(pc.GetMoney() >= 10000);

        case 28:
            originalScript = "pc.money_get() >= 20000";
            return(pc.GetMoney() >= 20000);

        case 41:
        case 43:
            originalScript = "pc.money_get() >= 5000";
            return(pc.GetMoney() >= 5000);

        case 42:
        case 44:
            originalScript = "pc.money_get() >= 15000";
            return(pc.GetMoney() >= 15000);

        case 101:
        case 102:
        case 103:
        case 104:
        case 111:
        case 112:
        case 113:
        case 114:
        case 121:
        case 122:
            originalScript = "game.global_flags[50] == 1";
            return(GetGlobalFlag(50));

        case 105:
        case 106:
        case 115:
        case 116:
        case 123:
        case 124:
            originalScript = "game.global_flags[50] == 0";
            return(!GetGlobalFlag(50));

        default:
            originalScript = null;
            return(true);
        }
    }