コード例 #1
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);
    }
コード例 #2
0
    public override bool OnEnterCombat(GameObject attachee, GameObject triggerer)
    {
        if (GetGlobalFlag(403) && GetGlobalFlag(405))
        {
            attachee.FloatMesFileLine("mes/script_activated.mes", 13, TextFloaterColor.Red);
        }

        if (attachee.GetNameId() == 14077) // Seleucas
        {
            var ggv400 = GetGlobalVar(400);
            var ggv403 = GetGlobalVar(403);
            ggv400 = ggv400 | (1);   // indicate that you have entered combat with Seleucas' group
            SetGlobalVar(400, ggv400);
            if ((ggv403 & (2)) != 0) // Moathouse regroup scenario; Seleucas is warned by guard of approaching party
            {
                ggv403 |= 0x4;
                SetGlobalVar(403, ggv403);
            }

            attachee.RemoveScript(ObjScriptEvent.Heartbeat); // His heartbeat script - disabled, in case hostilies momentarily cease / fight ends with him charmed
            if (GetGlobalFlag(403) && GetGlobalFlag(405))
            {
                SelectedPartyLeader.FloatMesFileLine("mes/script_activated.mes", 10001, TextFloaterColor.Red);
            }
        }
        else if (attachee.GetNameId() == 14074)
        {
            var pad3 = attachee.GetInt(obj_f.npc_pad_i_3);
            if ((pad3 & (0x40)) != 0)
            {
                attachee.FloatLine(15002, triggerer);
                attachee.RemoveScript(ObjScriptEvent.Dialog);
                pad3 ^= 0x40;
                attachee.SetInt(obj_f.npc_pad_i_3, pad3);
            }
        }

        var a123 = attachee.ItemWornAt(EquipSlot.WeaponPrimary).GetInt(obj_f.weapon_type);

        if ((new[] { 14, 17, 46, 48, 68 }).Contains(a123))
        {
            // 14 - light crossbow
            // 17 - heavy crossbow
            // 46 - shortbow
            // 48 - longbow
            // 68 - repeating crossbow
            var dummy = 1;
        }
        else
        {
            Livonya.tag_strategy(attachee);
            if ((new[] { 37, 41, 43, 44, 61 }).Contains(a123))
            {
                // Reach Weapons
            }
            else
            {
                Livonya.get_melee_strategy(attachee);
            }
        }

        return(RunDefault);
    }