Beispiel #1
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;
    }
    public static void council_events()
    {
        // this script is fired from first_heartbeat in the Hommlet Exterior map 5001
        if ((SelectedPartyLeader.GetMap() == 5001 && GetGlobalVar(435) == 4 && !GetGlobalFlag(435) && GetGlobalFlag(432)))
        {
            // spawns everyone that was inside Towne Hall
            SetGlobalFlag(435, true);
            var burne = GameSystems.MapObject.CreateObject(14453, new locXY(578, 406));
            burne.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            burne.RemoveScript(ObjScriptEvent.Heartbeat);
            burne.SetInt(obj_f.critter_description_unknown, 20000);
            burne.Move(new locXY(578, 406), 0f, 0f);
            burne.Rotation = 1;
            ScriptDaemon.destroy_weapons(burne, 4058, 0, 0);
            var jaroo = GameSystems.MapObject.CreateObject(14005, new locXY(583, 412));
            jaroo.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            jaroo.RemoveScript(ObjScriptEvent.Heartbeat);
            jaroo.SetInt(obj_f.critter_description_unknown, 20001);
            jaroo.Move(new locXY(583, 412), 0f, 0f);
            jaroo.Rotation = 0;
            ScriptDaemon.destroy_weapons(jaroo, 4047, 4111, 0);
            var rufus = GameSystems.MapObject.CreateObject(14006, new locXY(571, 407));
            rufus.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            rufus.RemoveScript(ObjScriptEvent.Heartbeat);
            rufus.SetInt(obj_f.critter_description_unknown, 8071);
            rufus.Move(new locXY(571, 407), 0f, 0f);
            rufus.Rotation = 3;
            var terjon = GameSystems.MapObject.CreateObject(14007, new locXY(570, 412));
            terjon.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            terjon.RemoveScript(ObjScriptEvent.Heartbeat);
            terjon.SetInt(obj_f.critter_description_unknown, 20003);
            terjon.Move(new locXY(570, 412), 0f, 0f);
            terjon.Rotation = 4.5f;
            ScriptDaemon.destroy_weapons(terjon, 4124, 6054, 0);
            var renton = GameSystems.MapObject.CreateObject(14012, new locXY(583, 409));
            renton.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            renton.RemoveScript(ObjScriptEvent.Heartbeat);
            renton.SetInt(obj_f.critter_description_unknown, 20007);
            renton.Move(new locXY(583, 409), 0f, 0f);
            renton.Rotation = 1;
            ScriptDaemon.destroy_weapons(renton, 4096, 4036, 6074);
            var nevets = GameSystems.MapObject.CreateObject(14102, new locXY(576, 407));
            nevets.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            nevets.RemoveScript(ObjScriptEvent.Heartbeat);
            nevets.SetInt(obj_f.critter_description_unknown, 20058);
            nevets.Move(new locXY(576, 407), 0f, 0f);
            nevets.Rotation = 3;
            var miller = GameSystems.MapObject.CreateObject(14031, new locXY(571, 412));
            miller.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            miller.RemoveScript(ObjScriptEvent.Heartbeat);
            miller.SetInt(obj_f.critter_description_unknown, 20026);
            miller.Move(new locXY(571, 412), 3f, 0f);
            miller.Rotation = 3;
            miller.AddCondition("Prone", 0, 0);
            var gundi = GameSystems.MapObject.CreateObject(14016, new locXY(582, 411));
            gundi.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            gundi.RemoveScript(ObjScriptEvent.Heartbeat);
            gundi.SetInt(obj_f.critter_description_unknown, 20011);
            gundi.Move(new locXY(582, 411), -10f, -10f);
            gundi.Rotation = 3;
            gundi.AddCondition("Prone", 0, 0);
            var crybaby = GameSystems.MapObject.CreateObject(14002, new locXY(575, 417));
            crybaby.Move(new locXY(575, 417), 0f, 0f);
            crybaby.RemoveScript(ObjScriptEvent.FirstHeartbeat);
            crybaby.RemoveScript(ObjScriptEvent.Heartbeat);
            crybaby.Rotation = 5.5f;
            crybaby.RemoveScript(ObjScriptEvent.Heartbeat);
            crybaby.ClearObjectFlag(ObjectFlag.OFF);
            if ((GetGlobalVar(436) == 4))
            {
                StartTimer(2000, () => proactivity(crybaby, 3000));
            }
            else
            {
                StartTimer(7000, () => proactivity(crybaby, 3000));
            }

            var randy1 = RandomRange(1, 2);
            randy1 = 2;
            // remove randomness for testing purposes
            if ((randy1 == 1))
            {
                var gremag = GameSystems.MapObject.CreateObject(14014, new locXY(365, 653));
                gremag.AddCondition("Invisible", 0, 0);
                gremag.SetObjectFlag(ObjectFlag.DONTDRAW);
                var rannos = GameSystems.MapObject.CreateObject(14018, new locXY(366, 655));
                rannos.AddCondition("Invisible", 0, 0);
                rannos.SetObjectFlag(ObjectFlag.DONTDRAW);
                var dlg_popup = GameSystems.MapObject.CreateObject(14806, new locXY(364, 653));
            }
            else
            {
                var gremag = GameSystems.MapObject.CreateObject(14014, new locXY(318, 495));
                gremag.AddCondition("Invisible", 0, 0);
                gremag.SetObjectFlag(ObjectFlag.DONTDRAW);
                var rannos = GameSystems.MapObject.CreateObject(14018, new locXY(320, 496));
                rannos.AddCondition("Invisible", 0, 0);
                rannos.SetObjectFlag(ObjectFlag.DONTDRAW);
                var dlg_popup = GameSystems.MapObject.CreateObject(14806, new locXY(317, 494));
            }

            // dlg_popup.object_flag_unset(OF_DONTDRAW)
            // dlg_popup.object_flag_unset(OF_CLICK_THROUGH)
            // damage section, tough ones:
            if ((GetGlobalVar(436) != 4))
            {
                lightly_damage(renton);
                lightly_damage(terjon);
                lightly_damage(rufus);
                lightly_damage(jaroo);
                lightly_damage(burne);
                StartTimer(8500, () => heal_script(terjon, rufus));
                StartTimer(9500, () => heal_script(jaroo, renton));
            }

            // damage section, frail but important ones:
            if ((GetGlobalVar(436) != 4))
            {
                if ((GetGlobalVar(436) != 6 && GetGlobalVar(436) != 7))
                {
                    lightly_damage(nevets);
                    lightly_damage(gundi);
                    StartTimer(700, () => heal_script(jaroo, gundi));
                    StartTimer(5800, () => heal_script(jaroo, nevets));
                }
                else
                {
                    heavily_damage(nevets);
                    heavily_damage(gundi);
                }
            }

            // damage section, frail and unimportant ones:
            if ((ScriptDaemon.get_v(436) != 4))
            {
                if ((ScriptDaemon.get_v(436) == 3))
                {
                    lightly_damage(miller);
                    StartTimer(3500, () => float_comment(terjon, 3000));
                    StartTimer(3510, () => heal_script(terjon, miller));
                }
                else
                {
                    heavily_damage(miller);
                }
            }
        }

        return;
    }