Esempio n. 1
0
    public override bool OnEndCombat(GameObject attachee, GameObject triggerer)
    {
        if (attachee.GetNameId() == 14811) // The Beacon
        {
            attachee.FloatMesFileLine("mes/script_activated.mes", 16, TextFloaterColor.Red);
            var countt_encroachers = 1;
            var countt_all         = 1;
            foreach (var npc in ObjList.ListVicinity(attachee.GetLocation(), ObjectListFilter.OLC_NPC))
            {
                attachee.FloatMesFileLine("mes/test.mes", countt_all, TextFloaterColor.Red);
                countt_all += 1;
                if (ScriptDaemon.is_far_from_party(npc, 48) && !npc.IsUnconscious())
                {
                    attachee.FloatMesFileLine("mes/test.mes", countt_encroachers, TextFloaterColor.Green);
                    countt_encroachers += 1;
                    var joe = Utilities.party_closest(npc);
                }
            }

            // encroach(npc, joe)
            attachee.FloatMesFileLine("mes/script_activated.mes", 16, TextFloaterColor.Red);
            if (ScriptDaemon.get_v("Beacon_Active") > 0)
            {
                ScriptDaemon.set_v("Beacon_Active", ScriptDaemon.get_v("Beacon_Active") - 1);
            }

            attachee.Destroy(); // so combat won't get stuck
            attachee.FloatMesFileLine("mes/script_activated.mes", 16, TextFloaterColor.Red);
            return(RunDefault);
        }

        return(RunDefault);
    }
Esempio n. 2
0
    public static bool join_temple(string temple_name_input)
    {
        var temple_name = temple_name_input.ToString();

        if (temple_name == "water")
        {
            SetGlobalFlag(112, true);               // Oohlgrist has joined water temple
            if ((ScriptDaemon.get_v(454) & 2) == 2) // Water has already regrouped
            {
                ScriptDaemon.set_v(454, ScriptDaemon.get_v(454) | 0x40);
            }
        }
        else if (temple_name == "fire")
        {
            SetGlobalFlag(118, true);                   // Oohlgrist has joined fire temple
            if ((ScriptDaemon.get_v(454) & 0x8) == 0x8) // Fire has already regrouped
            {
                ScriptDaemon.set_v(454, ScriptDaemon.get_v(454) | 0x10);
            }
        }
        else
        {
            SelectedPartyLeader.Damage(null, DamageType.Subdual, Dice.Parse("500d1"));
            SelectedPartyLeader.FloatMesFileLine("mes/skill_ui.mes", 155);
        }

        return(SkipDefault);
    }
Esempio n. 3
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);
    }
Esempio n. 4
0
    public override bool OnDying(GameObject attachee, GameObject triggerer)
    {
        ScriptDaemon.record_time_stamp(505);
        ScriptDaemon.set_v(499, ScriptDaemon.get_v(499) + 1);
        if (Math.Pow((ScriptDaemon.get_v(498) / 75f), 3) + Math.Pow((ScriptDaemon.get_v(499) / 38f), 3) + Math.Pow((ScriptDaemon.get_v(500) / 13f), 3) >= 1)
        {
            ScriptDaemon.record_time_stamp(510);
        }

        return(RunDefault);
    }
Esempio n. 5
0
    public override bool OnDialog(GameObject attachee, GameObject triggerer)
    {
        if (attachee.GetNameId() == 14181) // Water Temple Sentry
        {
            if (ScriptDaemon.get_v("water_sentry_pester") < 7)
            {
                var lll = RandomRange(0, 3);
                attachee.FloatLine(lll + 1100, triggerer);
                ScriptDaemon.set_v("water_sentry_pester", ScriptDaemon.get_v("water_sentry_pester") + 1);
            }
            else if (ScriptDaemon.get_v("water_sentry_pester") == 7)
            {
                var lll = RandomRange(0, 1);
                attachee.FloatLine(1104 + lll, triggerer);
                ScriptDaemon.set_v("water_sentry_pester", ScriptDaemon.get_v("water_sentry_pester") + 1);
            }
            else if (ScriptDaemon.get_v("water_sentry_pester") == 8)
            {
                attachee.FloatLine(1150, triggerer);
                ScriptDaemon.set_v("water_sentry_pester", ScriptDaemon.get_v("water_sentry_pester") + 1);
            }
            else if (ScriptDaemon.get_v("water_sentry_pester") > 8)
            {
                attachee.SetCritterFlag(CritterFlag.MUTE);
            }
        }
        else if ((!attachee.HasMet(triggerer)))
        {
            ScriptDaemon.record_time_stamp(501);
            if ((GetGlobalFlag(91)))
            {
                triggerer.BeginDialog(attachee, 100);
            }
            else
            {
                triggerer.BeginDialog(attachee, 1);
            }
        }
        else
        {
            triggerer.BeginDialog(attachee, 300);
        }

        return(SkipDefault);
    }
Esempio n. 6
0
    public static void initialize_council_events()
    {
        // sets persistent variable 'Varrr438' to store the time of the council
        if (ScriptDaemon.get_v(435) == 0)
        {
            ScriptDaemon.set_v(435, 1);
            var c_month = CurrentCalendar.Month + 1;
            var c_year  = CurrentCalendar.Year;
            if (c_month == 13)
            {
                c_month = 1;
                c_year  = c_year + 1;
            }

            ScriptDaemon.set_v(438, c_month + 32 * c_year);
        }

        return;
    }
Esempio n. 7
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);
    }
Esempio n. 8
0
    public override bool OnDying(GameObject attachee, GameObject triggerer)
    {
        if (CombatStandardRoutines.should_modify_CR(attachee))
        {
            CombatStandardRoutines.modify_CR(attachee, CombatStandardRoutines.get_av_level());
        }

        if (attachee.GetNameId() == 14248)
        {
            // Ogre Chief
            ScriptDaemon.record_time_stamp(505);
            ScriptDaemon.record_time_stamp(508);
            ScriptDaemon.set_v(499, ScriptDaemon.get_v(499) + 1);
            if (Math.Pow((ScriptDaemon.get_v(498) / 75f), 3) + Math.Pow((ScriptDaemon.get_v(499) / 38f), 3) + Math.Pow((ScriptDaemon.get_v(500) / 13f), 3) >= 1)
            {
                ScriptDaemon.record_time_stamp(510);
            }
        }
        else if (attachee.GetNameId() == 14156)
        {
            // Earth Commander
            ScriptDaemon.record_time_stamp(506);
            ScriptDaemon.record_time_stamp(507);
            ScriptDaemon.set_v(500, ScriptDaemon.get_v(500) + 1);
            if (Math.Pow((ScriptDaemon.get_v(498) / 75f), 3) + Math.Pow((ScriptDaemon.get_v(499) / 38f), 3) + Math.Pow((ScriptDaemon.get_v(500) / 13f), 3) >= 1)
            {
                ScriptDaemon.record_time_stamp(511);
            }
        }
        else if (attachee.GetNameId() == 8045)
        {
            // Romag
            // actually, he already has a san_dying of his own, so no need for this one
            // we'll keep it as "infrastructure"
            ScriptDaemon.record_time_stamp(456);
        }
        else if (attachee.GetNameId() == 14154)
        {
            // Hartsch
            ScriptDaemon.record_time_stamp(506);
            ScriptDaemon.set_v(500, ScriptDaemon.get_v(500) + 1);
            if (ScriptDaemon.get_v(500) >= 10)
            {
                ScriptDaemon.record_time_stamp(511);
            }
        }
        else if (attachee.GetNameId() == 14244)
        {
            // Juggernaut; makes it go kaboom and fade out
            attachee.SetObjectFlag(ObjectFlag.SEE_THROUGH);
            attachee.SetObjectFlag(ObjectFlag.FLAT);
            attachee.SetObjectFlag(ObjectFlag.TRANSLUCENT);
            attachee.SetObjectFlag(ObjectFlag.CLICK_THROUGH);
            attachee.SetObjectFlag(ObjectFlag.NOHEIGHT);
            attachee.FadeTo(0, 1, 10);
            // attachee.scripts[14] = 444 # so that upon end of combat the Jug will become click-through
            AttachParticles("sp-polymorph other", attachee);
            AttachParticles("sp-unholy water", attachee);
            AttachParticles("sp-enervation-hit", attachee);
            AttachParticles("sp-pyrotechnics-fireworks", attachee);
            AttachParticles("sp-ray of enfeeblement-end", attachee);
            AttachParticles("mon-earthelem-unconceal", attachee);
            AttachParticles("Ass Sunburst", attachee);
            AttachParticles("ef-minocloud", attachee);
            AttachParticles("sp-flare", attachee);
            AttachParticles("sp-mage hand", attachee);
            Sound(15122, 1);
            Sound(15122, 1);
        }

        return(RunDefault);
    }
Esempio n. 9
0
    public static bool san_enter_combat_backup_with_beacon_shit(GameObject attachee, GameObject triggerer)
    {
        Livonya.tag_strategy(attachee);
        if (attachee.GetNameId() == 14811)                       // The Beacon
        {
            attachee.SetScriptId(ObjScriptEvent.EndCombat, 446); // end combat round script
            attachee.FloatMesFileLine("mes/script_activated.mes", 13, TextFloaterColor.Red);
            return(RunDefault);
        }

        if ((!ScriptDaemon.can_see_party(attachee) && ScriptDaemon.is_far_from_party(attachee, 10)) || ScriptDaemon.is_far_from_party(attachee, 40))
        {
            if (ScriptDaemon.is_far_from_party(attachee, 70))
            {
                var joe = Utilities.party_closest(attachee);
                ScriptDaemon.encroach(attachee, joe);
            }

            attachee.SetInt(obj_f.critter_strategy, 119); // Seek out low ac beacon
            AttachParticles("sp-Hold Person", attachee);
            if (ScriptDaemon.get_v("Beacon_Active") == 0)
            {
                var top_path    = 0;
                var bottom_path = 0;
                foreach (var pc in GameSystems.Party.PartyMembers)
                {
                    if (ScriptDaemon.within_rect_by_corners(pc, 467, 360, 467, 388) && !pc.IsUnconscious())
                    {
                        top_path = top_path + 1;
                    }

                    if (ScriptDaemon.within_rect_by_corners(pc, 504, 355, 504, 385) && !pc.IsUnconscious())
                    {
                        bottom_path = bottom_path + 1;
                    }
                }

                int primary_beacon_x;
                int primary_beacon_y;
                int tertiary_beacon_x;
                int tertiary_beacon_y;
                if (top_path > bottom_path)
                {
                    primary_beacon_x  = 470;
                    primary_beacon_y  = 388;
                    tertiary_beacon_x = 492;
                    tertiary_beacon_y = 387;
                }
                else
                {
                    primary_beacon_x  = 492;
                    primary_beacon_y  = 387;
                    tertiary_beacon_x = 470;
                    tertiary_beacon_y = 388;
                }

                var beacon_loc  = new locXY(primary_beacon_x, primary_beacon_y);
                var beacon3_loc = new locXY(tertiary_beacon_x, tertiary_beacon_y);
                var beacon      = GameSystems.MapObject.CreateObject(14811, beacon_loc);
                beacon.Move(new locXY(470, 388), 0, 0);
                beacon.SetInt(obj_f.npc_ac_bonus, -50);
                beacon.SetBaseStat(Stat.dexterity, -70); // causes problems at end of round, or does it?
                // beacon.object_flag_set(OF_DONTDRAW) # this causes combat to lag at the beacon's turn
                beacon.SetObjectFlag(ObjectFlag.CLICK_THROUGH);
                beacon.AddToInitiative();
                beacon.SetInitiative(-20);
                UiSystems.Combat.Initiative.UpdateIfNeeded();
                beacon.SetScriptId(ObjScriptEvent.EndCombat, 446); // end combat round
                // beacon.scripts[14] = 446 # exit combat
                AttachParticles("sp-hold person", beacon);
                var beacon2 = GameSystems.MapObject.CreateObject(14811, new locXY(483, 395));
                beacon2.Move(new locXY(483, 395), 0, 0);
                beacon2.SetInt(obj_f.npc_ac_bonus, -40);
                // beacon2.object_flag_set(OF_DONTDRAW)
                beacon2.SetObjectFlag(ObjectFlag.CLICK_THROUGH);
                beacon2.AddToInitiative();
                beacon2.SetInitiative(-21);
                UiSystems.Combat.Initiative.UpdateIfNeeded();
                AttachParticles("sp-hold person", beacon2);
                var beacon3 = GameSystems.MapObject.CreateObject(14811, beacon3_loc);
                beacon3.Move(beacon3_loc, 0, 0);
                beacon3.SetInt(obj_f.npc_ac_bonus, -30);
                // beacon3.object_flag_set(OF_DONTDRAW)
                beacon3.SetObjectFlag(ObjectFlag.CLICK_THROUGH);
                beacon3.AddToInitiative();
                beacon3.SetInitiative(-23);
                UiSystems.Combat.Initiative.UpdateIfNeeded();
                AttachParticles("sp-hold person", beacon3);
                ScriptDaemon.set_v("Beacon_Active", 3);
            }
        }
        else if (ScriptDaemon.is_far_from_party(attachee, 75))
        {
            var joe = Utilities.party_closest(attachee);
            ScriptDaemon.encroach(attachee, joe);
        }
        else
        {
            Livonya.get_melee_strategy(attachee);
        }

        // Tried changing their standpoint midfight, didn't work.
        // attachee.standpoint_set(STANDPOINT_DAY, attachee.obj_get_int(obj_f_npc_pad_i_3) - 342 + 500)
        // attachee.standpoint_set(STANDPOINT_NIGHT, attachee.obj_get_int(obj_f_npc_pad_i_3) - 342 + 500)
        // if attachee.obj_get_int(obj_f_npc_pad_i_3) == 361 or attachee.obj_get_int(obj_f_npc_pad_i_3) == 362: #sentry standpoints
        // hl(attachee)
        // xx = 482
        // yy = 417
        // for npc in game.obj_list_vicinity(location_from_axis(xx,yy), OLC_NPC ):
        // if npc.leader_get() == OBJ_HANDLE_NULL:
        // npc.standpoint_set(STANDPOINT_DAY, npc.obj_get_int(obj_f_npc_pad_i_3) - 342 + 500)
        // npc.standpoint_set(STANDPOINT_NIGHT, npc.obj_get_int(obj_f_npc_pad_i_3) - 342 + 500)
        // npc.npc_flag_set(ONF_KOS)
        // npc.npc_flag_unset(ONF_KOS_OVERRIDE)
        return(RunDefault);
    }
Esempio n. 10
0
    public static void council_heartbeat()
    {
        var c_time = council_time();

        // 1 - between 22:00 and 22:30 on council day
        // 2 - between 22:30 and 23:00
        // 3 - between 19:00 and 22:00
        // 4 - after council events ( >23:00 and beyond that day), but without ordinary council
        // 5 - ordinary council time
        // 0 - otherwise
        if (traders_awol() == 1)
        {
            ScriptDaemon.set_v(435, 6);
        }

        if (c_time == 5)
        {
            ScriptDaemon.set_v(440, 1);
        }
        else if (c_time == 1)
        {
            if (ScriptDaemon.get_v(435) == 1)
            {
                ScriptDaemon.set_v(435, 3);
            }
            else if (ScriptDaemon.get_v(435) >= 5 || ScriptDaemon.get_v(435) == 0 && ScriptDaemon.get_v(440) == 0)
            {
                ScriptDaemon.set_v(440, 1);
            }
            else if (ScriptDaemon.get_v(435) == 4)
            {
                // council_events()
                var dummy = 1;
            }
        }
        else if (c_time == 2)
        {
            if (ScriptDaemon.get_v(435) == 3 || ScriptDaemon.get_v(435) == 1)
            {
                ScriptDaemon.set_v(435, 4);
                ScriptDaemon.set_v(436, 1);
                SetGlobalFlag(432, true);
            }
        }
        // council_events()
        else if (c_time == 3)
        {
            if (ScriptDaemon.get_v(435) == 2)
            {
                ScriptDaemon.set_v(435, 5);
                ScriptDaemon.set_v(436, 5);
                SetGlobalVar(750, 3);
                SetGlobalVar(751, 3);
                if ((!PartyLeader.HasReputation(23) && (!GetGlobalFlag(814) || !GetGlobalFlag(815))))
                {
                    PartyLeader.AddReputation(23);
                }
            }
        }
        else if ((c_time == 0 || c_time == 4))
        {
            if (c_time == 0 && GetGlobalFlag(336) && (ScriptDaemon.get_v(435) == 1 || ScriptDaemon.get_v(435) == 2))
            {
                ScriptDaemon.set_v(435, 0);
            }
            else if (ScriptDaemon.get_v(435) == 3 || ScriptDaemon.get_v(435) == 4 || (ScriptDaemon.get_v(435) == 1 && c_time == 4))
            {
                // chiefly used for the case where the whole thing played out without you
                if (ScriptDaemon.get_v(436) == 0)
                {
                    ScriptDaemon.set_v(436, 1);
                }

                ScriptDaemon.set_v(435, 5);
                if ((!PartyLeader.HasReputation(23) && (!GetGlobalFlag(814) || !GetGlobalFlag(815))))
                {
                    PartyLeader.AddReputation(23);
                }
            }

            if (ScriptDaemon.get_v(435) == 2 && c_time == 4)
            {
                ScriptDaemon.set_v(435, 5);
                ScriptDaemon.set_v(436, 5);
                SetGlobalVar(750, 3);
                SetGlobalVar(751, 3);
                if ((!PartyLeader.HasReputation(23) && (!GetGlobalFlag(814) || !GetGlobalFlag(815))))
                {
                    PartyLeader.AddReputation(23);
                }
            }

            ScriptDaemon.set_v(440, 0);
        }

        return;
    }
Esempio n. 11
0
    public static void quickstart(int simulated_game_state = 0, bool cheat_items = true, bool autokill_on = true)
    {
        gearup(simulated_game_state, true);
        Logger.Info("{0}", simulated_game_state.ToString());
        if (simulated_game_state >= 0)
        {
            SetQuestState(18, QuestState.Completed); // Catch Furnok quest
            SetQuestState(100, QuestState.Accepted); // Fetch Giant's head
            SetGlobalFlag(21, true);                 // Enable Terjon
            MakeAreaKnown(2);                        // Moathouse
            MakeAreaKnown(5);                        // Emridy
        }

        if (simulated_game_state >= 1)
        {
            Logger.Info("Executing WB...");
            // Having just completed Welkwood Bog, going on Moathouse + Emridy
            StoryState = 1;
            MakeAreaKnown(7);                        // Welkwood Bog
            SetGlobalVar(970, 2);                    // Talked to Smyth about WB
            // game.global_flags[66] = 1 # Paid Elmo - do NOT set this flag, else he won't get his better gear
            SetGlobalFlag(67, true);                 // Have spoken to vignette's relevant figure
            SetGlobalFlag(605, true);                // WB description box fired
            SetGlobalFlag(976, true);                // Mathel dead
            SetQuestState(73, QuestState.Completed); // Welkwood Bog quest
            if (PartyAlignment == Alignment.NEUTRAL)
            {
                SetQuestState(27, QuestState.Accepted); // Find Terjon's pendant
            }

            // Kill section #
            if ((ScriptDaemon.get_v("qs_welkwood") & (((1 << 11)) - 1)) != (((1 << 11)) - 1))
            {
                ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 1);
                if ((ScriptDaemon.get_v("qs_welkwood") & 2) == 0)
                {
                    ScriptDaemon.cnk(14785); // Mathel
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 2);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x4) == 0)
                {
                    ScriptDaemon.cnk(14183); // Goblin Leader
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 0x4);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x8) == 0)
                {
                    ScriptDaemon.cnk(14641); // Kobold Sergeant
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 0x8);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x10) == 0)
                {
                    ScriptDaemon.cnk(14631); // Gnoll
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 0x10);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x20) == 0)
                {
                    ScriptDaemon.cnk(14081); // Skeleton Gnoll
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 0x20);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x40) == 0)
                {
                    ScriptDaemon.cnk(14640, how_many: 10, timer: 200); // Kobolds
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 0x40);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & (1 << 7)) == 0)
                {
                    ScriptDaemon.cnk(14187, how_many: 18, timer: 800); // Goblins
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | (1 << 7));
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x100) == 0)
                {
                    ScriptDaemon.cnk(14183); // Goblin Leader
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 0x100);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x200) == 0)
                {
                    ScriptDaemon.cnk(14640, how_many: 9, timer: 1800); // Kobolds
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | 0x200);
                }

                if ((ScriptDaemon.get_v("qs_welkwood") & 0x400) == 0)
                {
                    ScriptDaemon.cnk(14641); // Kobold Sergeant
                    ScriptDaemon.set_v("qs_welkwood", ScriptDaemon.get_v("qs_welkwood") | (1 << 10));
                }

                Logger.Info("WB executed!");
            }
        }

        // for pc in game.party[0].group_list():
        // if pc.stat_level_get(stat_experience) <= 820:
        // pc.stat_base_set(stat_experience, 820)
        if (simulated_game_state >= 2)
        {
            if (autokill_on)
            {
                ScriptDaemon.set_f("qs_autokill_moathouse", true);
            }

            // Having just completed Moathouse + Emridy + Welkwood Bog
            // for pc in game.party[0].group_list():
            // if pc.stat_level_get(stat_experience) <= 6000:
            // pc.stat_base_set(stat_experience, 6000)
            StoryState = 2;
            MakeAreaKnown(8);  // Moathouse Cave Exit
            MakeAreaKnown(10); // Deklo
            Logger.Info("Executing Moathouse + Emridy Meadows...");
        }

        if (simulated_game_state >= 3)
        {
            // Having Finished Nulb + HB
            // I.E. auto-kill Nulb and HB
            // preparing for "legitimate" AoH + Revenge Encounter + Moathouse Respawn ( + Temple )
            // for pc in game.party[0].group_list():
            // if pc.stat_level_get(stat_experience) <= 16000:
            // pc.stat_base_set(stat_experience, 16000)
            Logger.Info("Executing Nulb, HB");
            StoryState = 3;
            MakeAreaKnown(3);                       // Nulb
            MakeAreaKnown(6);                       // Imeryds
            MakeAreaKnown(9);                       // HB
            SetQuestState(35, QuestState.Accepted); // Grud's story
            SetQuestState(41, QuestState.Accepted); // Preston's tooth ache
            SetQuestState(42, QuestState.Accepted); // Assassinate Lodriss
            SetQuestState(59, QuestState.Accepted); // Free Serena
            SetQuestState(60, QuestState.Accepted); // Mona's Orb
            SetQuestState(63, QuestState.Accepted); // Bribery for justice
            if (autokill_on)
            {
                ScriptDaemon.set_f("qs_autokill_nulb", true);
            }
        }

        if (simulated_game_state >= 3.5f)
        {
            SetQuestState(65, QuestState.Accepted); // Hero's Prize Quest
            SetGlobalVar(972, 2);                   // Have talked to Kent about Witch
            ScriptDaemon.set_f("qs_arena_of_heroes_enable");
        }

        if (simulated_game_state >= 4)
        {
            // Autokill Temple, AoH, Revenge Encounter, MR
            Logger.Info("Executing Temple, AoH, Moathouse Respawn, Revenge Encounter");
            if (autokill_on)
            {
                ScriptDaemon.set_f("qs_autokill_temple");
            }

            StoryState = 4;
            MakeAreaKnown(4);                       // Temple
            SetQuestState(65, QuestState.Accepted); // Hero's Prize Quest
            SetGlobalFlag(944, true);
        }

        if (simulated_game_state >= 5)
        {
            // Autokill Greater Temple, Verbobonc (minus slavers)
            Logger.Info("Executing Greater Temple, Verbobonc");
            if (autokill_on)
            {
                ScriptDaemon.set_f("qs_autokill_greater_temple");
            }

            StoryState = 5;
            MakeAreaKnown(11); // Temple Burnt Farmhouse
            MakeAreaKnown(14); // Verbobonc
        }

        if (simulated_game_state >= 6)
        {
            Logger.Info("Executing Nodes, WotGS");
            if (autokill_on)
            {
                ScriptDaemon.set_f("qs_autokill_nodes");
            }

            StoryState = 6;
        }
    }
Esempio n. 12
0
 public static void bugbear_room_increment_turn_counter(int turn_num)
 {
     ScriptDaemon.set_v("bugbear_room_turn_counter", turn_num);
     ScriptDaemon.set_v("bugbear_room_timevent_count", 0);
 }