Beispiel #1
0
    public override bool OnRemoveItem(GameObject attachee, GameObject triggerer)
    {
        if (PartyLeader.GetMap() == 5079 && triggerer.GetNameId() == 1050) // Zuggtmoy level, taking from throne of gems
        {
            var zuggtmoy = Utilities.find_npc_near(triggerer, 8064);
            var loc      = triggerer.GetLocation();
            var rot      = triggerer.Rotation;
            triggerer.Destroy();
            var empty_throne = GameSystems.MapObject.CreateObject(1051, loc);
            empty_throne.Rotation = rot;
            UiSystems.CharSheet.Hide();
            if (((zuggtmoy != null) && (SelectedPartyLeader != null)))
            {
                if ((GetGlobalFlag(181)))
                {
                    SetGlobalFlag(181, false);
                    Zuggtmoy.transform_into_demon_form(zuggtmoy, SelectedPartyLeader, 320);
                }
                else
                {
                    SelectedPartyLeader.BeginDialog(zuggtmoy, 320);
                }
            }

            DetachScript();
            return(RunDefault);
        }
        else
        {
            return(SkipDefault);
        }
    }
Beispiel #2
0
    public override bool OnHeartbeat(GameObject attachee, GameObject triggerer)
    {
        var c_time = Council.council_time();

        if ((attachee.GetMap() == 5048 && ScriptDaemon.get_v(435) != 0 && c_time == 1))
        {
            // Townhall
            if (ScriptDaemon.get_v(435) == 1)
            {
                ScriptDaemon.set_v(435, 3);
                Council_Script(attachee, triggerer);
            }
        }

        if ((attachee.GetMap() == 5048))
        {
            // Townhall
            if ((ScriptDaemon.get_v(436) == 3 && ScriptDaemon.get_v(435) < 4))
            {
                // you've found the trap, initiate dialogue with rufus to GTFO
                foreach (var npc in ObjList.ListVicinity(attachee.GetLocation(), ObjectListFilter.OLC_NPC))
                {
                    if ((npc.GetNameId() == 8071))
                    {
                        SelectedPartyLeader.BeginDialog(npc, 2000);
                    }
                }
            }
        }

        return(RunDefault);
    }
Beispiel #3
0
    public override bool OnNewMap(GameObject attachee, GameObject triggerer)
    {
        if ((attachee.GetStat(Stat.level_fighter) >= 8))
        {
            SelectedPartyLeader.BeginDialog(attachee, 230);
        }

        return(SkipDefault);
    }
Beispiel #4
0
    public override bool OnNewMap(GameObject attachee, GameObject triggerer)
    {
        if ((GetGlobalFlag(195)))
        {
            SelectedPartyLeader.BeginDialog(attachee, 480);
        }

        return(SkipDefault);
    }
Beispiel #5
0
    public override bool OnNewMap(GameObject attachee, GameObject triggerer)
    {
        if ((attachee.GetMap() == 5163))
        {
            SelectedPartyLeader.BeginDialog(attachee, 340);
        }
        else if ((attachee.GetMap() != 5184 && attachee.GetMap() != 5163))
        {
            triggerer.RemoveFollower(attachee);
            attachee.SetObjectFlag(ObjectFlag.OFF);
        }

        return(SkipDefault);
    }
Beispiel #6
0
    public override bool OnNewMap(GameObject attachee, GameObject triggerer)
    {
        if ((attachee.GetMap() == 5192 || attachee.GetMap() == 5193))
        {
            SelectedPartyLeader.BeginDialog(attachee, 80);
        }
        else if ((attachee.GetMap() != 5093 && attachee.GetMap() != 5192 && attachee.GetMap() != 5193))
        {
            var leader = attachee.GetLeader();
            leader.RemoveFollower(attachee);
            AttachParticles("CounterSpell", attachee);
            Sound(4016, 1);
            SetGlobalVar(989, 4);
            attachee.SetObjectFlag(ObjectFlag.OFF);
        }

        return(SkipDefault);
    }
Beispiel #7
0
    public override bool OnNewMap(GameObject attachee, GameObject triggerer)
    {
        if ((attachee.GetLeader() != null))
        {
            if ((attachee.GetMap() == 5121))
            {
                if ((GetGlobalVar(999) >= 15))
                {
                    attachee.TurnTowards(triggerer);
                    SelectedPartyLeader.BeginDialog(attachee, 30);
                }
                else if ((GetQuestState(66) == QuestState.Accepted) || (GetQuestState(67) == QuestState.Accepted) || (GetQuestState(77) == QuestState.Accepted))
                {
                    attachee.TurnTowards(triggerer);
                    SelectedPartyLeader.BeginDialog(attachee, 200);
                }
            }
            else if (((attachee.GetMap() == 5158) && (!GetGlobalFlag(959))))
            {
                SetGlobalFlag(959, true);
                SelectedPartyLeader.BeginDialog(attachee, 210);
            }
            else if ((attachee.GetMap() == 5007) || (attachee.GetMap() == 5060) || (attachee.GetMap() == 5151))
            {
                if (((GetGlobalVar(968) == 1) && (!Utilities.is_daytime())))
                {
                    SelectedPartyLeader.BeginDialog(attachee, 220);
                }
            }
            else if ((attachee.GetMap() == 5008) || (attachee.GetMap() == 5061) || (attachee.GetMap() == 5152))
            {
                if (((GetGlobalVar(968) == 9) && (!Utilities.is_daytime())))
                {
                    attachee.TurnTowards(triggerer);
                    SelectedPartyLeader.BeginDialog(attachee, 260);
                }
            }
        }

        return(RunDefault);
    }
Beispiel #8
0
    public static void Council_Script(GameObject attachee, GameObject triggerer)
    {
        if ((attachee.GetMap() == 5048 && !GetGlobalFlag(432)))
        {
            if ((ScriptDaemon.get_v(435) == 3))
            {
                // full council assembly spawn
                var burne = GameSystems.MapObject.CreateObject(14004, new locXY(477, 470));
                burne.Move(new locXY(477, 470), 0f, 15f);
                burne.Rotation = 2.3f;
                burne.SetInt(obj_f.critter_description_unknown, 20000);
                ScriptDaemon.destroy_weapons(burne, 4058, 0, 0);
                var rufus = GameSystems.MapObject.CreateObject(14006, new locXY(474, 472));
                rufus.Move(new locXY(474, 472), 15f, -10f);
                rufus.Rotation = 2.5f;
                rufus.SetInt(obj_f.critter_description_unknown, 8071);
                var jaroo = GameSystems.MapObject.CreateObject(14005, new locXY(474, 476));
                jaroo.Rotation = 5.5f;
                ScriptDaemon.destroy_weapons(jaroo, 4047, 4111, 0);
                jaroo.SetInt(obj_f.critter_description_unknown, 20001);
                var renton = GameSystems.MapObject.CreateObject(14012, new locXY(477, 475));
                renton.Move(new locXY(477, 475), 0f, -8f);
                renton.Rotation = 5.4f;
                var terjon = GameSystems.MapObject.CreateObject(14007, new locXY(480, 474));
                terjon.Move(new locXY(480, 474), -25f, 0f);
                terjon.Rotation = 5.8f;
                ScriptDaemon.destroy_weapons(terjon, 4124, 6054, 0);
                var badger1 = GameSystems.MapObject.CreateObject(14371, new locXY(482, 474));
                badger1.Move(new locXY(482, 474), 0f, 0f);
                badger1.Rotation = 2.1f;
                var nevets = GameSystems.MapObject.CreateObject(14102, new locXY(475, 477));
                nevets.Move(new locXY(475, 477), -8f, 0f);
                nevets.Rotation = 5.2f;
                var miller = GameSystems.MapObject.CreateObject(14031, new locXY(477, 477));
                miller.Move(new locXY(477, 477), 3f, 0f);
                miller.Rotation = 5.3f;
                var gundi = GameSystems.MapObject.CreateObject(14016, new locXY(479, 477));
                gundi.Move(new locXY(479, 477), 0f, 0f);
                gundi.Rotation = 5.8f;
                SetGlobalFlag(432, true);
                SelectedPartyLeader.BeginDialog(burne, 7000);
            }
            else if ((ScriptDaemon.get_v(435) == 2))
            {
                // only badgers spawn, if you suspected R&G
                var badger1 = GameSystems.MapObject.CreateObject(14371, new locXY(476, 477));
                badger1.Rotation = 2.5f;
                var badger2 = GameSystems.MapObject.CreateObject(14371, new locXY(479, 477));
                badger2.Rotation = 2.6f;
                var badger3 = GameSystems.MapObject.CreateObject(14371, new locXY(474, 476));
                badger3.Rotation = 2.5f;
                SetGlobalFlag(432, true);
            }
        }
        else if ((attachee.GetMap() == 5048 && ScriptDaemon.get_v(435) >= 4))
        {
            // this should delete everyone after it's all over
            foreach (var npc in ObjList.ListVicinity(attachee.GetLocation(), ObjectListFilter.OLC_NPC))
            {
                if ((to_be_deleted(npc) == 1 && npc.GetLeader() == null))
                {
                    npc.Destroy();
                }
            }
        }

        return;
    }