示例#1
0
    public static int traders_exposed()
    {
        // this script determines whether the traders surmise they are about to be exposed
        // it uses the time stamps to determine whether they knew this stuff BEFORE you assaulted them
        var a = 0;

        if ((GetQuestState(15) == QuestState.Completed && ScriptDaemon.tsc(427, 426)))
        {
            // laborer spy revealed to Burne
            a = a + 1;
        }

        if ((GetQuestState(16) == QuestState.Completed && ScriptDaemon.tsc(431, 426)))
        {
            // confronted traders about laborer spy
            a = a + 1;
        }

        if (GetGlobalFlag(444) || GetGlobalFlag(422) || (GetGlobalFlag(428) && (GetGlobalFlag(7) || (CurrentTimeSeconds >= GetGlobalVar(423) + 24 * 60 * 60 && GetGlobalFlag(4)))))
        {
            // confronted about assassination attempt, and either presented hard evidence or Corl was killed too
            a = a + 1;
        }

        if ((GetQuestState(17) == QuestState.Completed && ScriptDaemon.tsc(430, 426)))
        {
            // found out the courier
            a = a + 1;
        }

        return(a);
    }
示例#2
0
    public static int traders_awol()
    {
        // this script determines whether the traders fled after being attacked -
        // the condition being that they surmise they are about to be exposed
        // it uses the time stamps to determine whether they knew this stuff BEFORE you assaulted them
        if (!GetGlobalFlag(426))
        {
            return(0);
        }

        var a = 0;

        if ((GetQuestState(15) == QuestState.Completed && ScriptDaemon.tsc(427, 426)))
        {
            // laborer spy revealed to Burne
            a = a + 1;
        }

        if ((GetQuestState(16) == QuestState.Completed && ScriptDaemon.tsc(431, 426)))
        {
            // confronted traders about laborer spy
            a = a + 1;
        }

        if (GetGlobalFlag(444) || GetGlobalFlag(422) || (GetGlobalFlag(428) && (GetGlobalFlag(7) || (CurrentTimeSeconds >= ScriptDaemon.get_v(423) + 24 * 60 * 60 && GetGlobalFlag(4)))))
        {
            // Discussed things with badger arrestor, or Confronted Traders about assassination attempt, with either presented hard evidence (Assassin's letter) or Corl was killed too
            a = a + 1;
        }

        if ((GetQuestState(17) == QuestState.Completed && ScriptDaemon.tsc(430, 426)))
        {
            // found out the courier
            a = a + 1;
        }

        if (a >= 1)
        {
            return(1);
        }
        else
        {
            return(0);
        }
    }
示例#3
0
    public override bool OnHeartbeat(GameObject attachee, GameObject triggerer)
    {
        if (attachee.GetNameId() == 14181) // Water Temple Bugbear
        {
            if ((!GameSystems.Combat.IsCombatActive() && (ScriptDaemon.get_v(453) & 2) == 0))
            {
                foreach (var pc in GameSystems.Party.PartyMembers)
                {
                    if (pc.type == ObjectType.pc && is_safe_to_talk2(attachee, pc, 20))
                    {
                        // attachee.turn_towards(pc)
                        // pc.begin_dialog(attachee, 1)
                        // game.particles('ef-minocloud', attachee)
                        attachee.ClearCritterFlag(CritterFlag.MUTE);
                        attachee.SetScriptId(ObjScriptEvent.Dialog, 445);
                        ScriptDaemon.set_v(453, ScriptDaemon.get_v(453) | 2); // escorting to Water flag
                        var trueCount = (ScriptDaemon.tsc(456, 475) ? 1 : 0)
                                        + (ScriptDaemon.tsc(458, 475) ? 1 : 0)
                                        + (ScriptDaemon.tsc(459, 475) ? 1 : 0);
                        if (trueCount >= 2)
                        {
                            attachee.FloatLine(1000, pc);
                        }
                        else if (ScriptDaemon.tsc(456, 475))
                        {
                            attachee.FloatLine(1001, pc);
                        }
                        else if (ScriptDaemon.tsc(458, 475))
                        {
                            attachee.FloatLine(1002, pc);
                        }
                        else if (ScriptDaemon.tsc(459, 475))
                        {
                            attachee.FloatLine(1003, pc);
                        }
                    }
                }
            }
        }

        return(RunDefault);
    }