Exemplo n.º 1
0
        // Function from file: ion_storm.dm
        public override bool start(  )
        {
            Mob_Living_Silicon_Ai M         = null;
            dynamic message                 = null;
            Mob_Living_SimpleAnimal_Bot bot = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_Silicon_Ai)))
            {
                M = _a;


                if (M.stat != 2 && M.see_in_dark != 0)
                {
                    message = GlobalFuncs.generate_ion_law(this.ionMessage);

                    if (Lang13.Bool(message))
                    {
                        M.add_ion_law(message);
                        M.WriteMsg("<br>");
                        M.WriteMsg("<span class='danger'>" + message + " ...LAWS UPDATED</span>");
                        M.WriteMsg("<br>");
                    }
                }
            }

            if (Lang13.Bool(this.botEmagChance))
            {
                foreach (dynamic _b in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_SimpleAnimal_Bot)))
                {
                    bot = _b;


                    if (Rand13.PercentChance(this.botEmagChance ?? 0))
                    {
                        bot.emag_act();
                    }
                }
            }
            return(false);
        }
        // Function from file: communications_blackout.dm
        public override void announce(  )
        {
            string alert            = null;
            Mob_Living_Silicon_Ai A = null;

            alert = Rand13.Pick(new object [] { "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you*%fj00)`5vc-BZZT", "Ionospheric anomalies detected. Temporary telecommunication failu*3mga;b4;'1v¬-BZZZT", "Ionospheric anomalies detected. Temporary telec#MCi46:5.;@63-BZZZZT", "Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT", "Ionospheri:%£ MCayj^j<.3-BZZZZZZT", "#4nd%;f4y6,>£%-BZZZZZZZT" });

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon_Ai)))
            {
                A = _a;

                A.WriteMsg("<br>");
                A.WriteMsg("<span class='warning'><b>" + alert + "</b></span>");
                A.WriteMsg("<br>");
            }

            if (Rand13.PercentChance(30))
            {
                GlobalFuncs.priority_announce(alert);
            }
            return;
        }
        // Function from file: hologram.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            dynamic area             = null;
            Mob_Living_Silicon_Ai AI = null;


            if (Lang13.Bool(base.Topic(href, href_list, (object)(hsrc))))
            {
                return(null);
            }

            if (Lang13.Bool(href_list["AIrequest"]))
            {
                if (this.last_request + 200 < Game13.time)
                {
                    this.last_request = Game13.time;
                    this.temp         = "You requested an AI's presence.<BR>";
                    this.temp        += new Txt("<A href='?src=").Ref(this).str(";mainmenu=1'>Main Menu</A>").ToString();
                    area = GlobalFuncs.get_area(this);

                    foreach (dynamic _a in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_Silicon_Ai)))
                    {
                        AI = _a;


                        if (!(AI.client != null))
                        {
                            continue;
                        }
                        AI.WriteMsg(new Txt("<span class='info'>Your presence is requested at <a href='?src=").Ref(AI).str(";jumptoholopad=").Ref(this).str("'>").the(area).item().str("</a>.</span>").ToString());
                    }
                }
                else
                {
                    this.temp  = "A request for AI presence was already sent recently.<BR>";
                    this.temp += new Txt("<A href='?src=").Ref(this).str(";mainmenu=1'>Main Menu</A>").ToString();
                }
            }
            else if (Lang13.Bool(href_list["mainmenu"]))
            {
                this.temp = "";
            }
            this.updateDialog();
            this.add_fingerprint(Task13.User);
            return(null);
        }
Exemplo n.º 4
0
        // Function from file: ninjaDrainAct.dm
        public override dynamic ninjadrain_act(Obj_Item_Clothing_Suit_Space_SpaceNinja S = null, Ent_Static H = null, Obj_Item_Clothing_Gloves_SpaceNinja G = null)
        {
            dynamic _default = null;

            dynamic location         = null;
            Mob_Living_Silicon_Ai AI = null;
            Tech current_data        = null;
            Tech analyzing_data      = null;


            if (!(S != null) || !(H != null) || !(G != null))
            {
                return("INVALID");
            }
            _default = "RDHACKFAIL";
            ((dynamic)H).WriteMsg(new Txt("<span class='notice'>Hacking ").the(this).item().str("...</span>").ToString());
            Task13.Schedule(0, (Task13.Closure)(() => {
                location = GlobalFuncs.get_turf(H);

                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon_Ai)))
                {
                    AI = _a;

                    AI.WriteMsg("<span class='userdanger'>Network Alert: Hacking attempt detected" + (Lang13.Bool(location) ? " in " + location : ". Unable to pinpoint location") + "</span>.");
                }
                return;
            }));

            if (this.files != null && this.files.known_tech.len != 0)
            {
                foreach (dynamic _c in Lang13.Enumerate(S.stored_research, typeof(Tech)))
                {
                    current_data = _c;

                    ((dynamic)H).WriteMsg(new Txt("<span class='notice'>Checking ").the(current_data.name).item().str(" database.</span>").ToString());

                    if (GlobalFuncs.do_after(H, S.s_delay, null, this) && G.candrain && this != null)
                    {
                        foreach (dynamic _b in Lang13.Enumerate(this.files.known_tech, typeof(Tech)))
                        {
                            analyzing_data = _b;


                            if (current_data.id == analyzing_data.id)
                            {
                                if (analyzing_data.level > current_data.level)
                                {
                                    ((dynamic)H).WriteMsg("<span class='notice'>Database:</span> <b>UPDATED</b>.");
                                    current_data.level = analyzing_data.level;
                                    _default           = "RDHACK";
                                }
                                break;
                            }
                        }
                    }
                    else
                    {
                        break;
                    }
                }
            }
            ((dynamic)H).WriteMsg("<span class='notice'>Data analyzed. Process finished.</span>");
            return(_default);
        }
Exemplo n.º 5
0
        // Function from file: blob_report.dm
        public override void send_intercept(int?report = null)
        {
            report = report ?? 0;

            string intercepttext               = null;
            int    nukecode                    = 0;
            Obj_Machinery_Nuclearbomb bomb     = null;
            Mob_Living_Silicon_Ai     aiPlayer = null;
            string law = null;

            intercepttext = "";

            switch ((int?)(report))
            {
            case 1:
                intercepttext += "<FONT size = 3><b>NanoTrasen Update</b>: Biohazard Alert.</FONT><HR>";
                intercepttext += "Reports indicate the probable transfer of a biohazardous agent onto " + GlobalFuncs.station_name() + " during the last crew deployment cycle.<BR>";
                intercepttext += "Preliminary analysis of the organism classifies it as a level 5 biohazard. The origin of the biohazard is unknown.<BR>";
                intercepttext += "<b>Biohazard Response Procedure 5-6</b> has been issued for " + GlobalFuncs.station_name() + ".<BR>";
                intercepttext += "Orders for all " + GlobalFuncs.station_name() + " personnel are as follows:<BR>";
                intercepttext += " 1. Locate any outbreaks of the organism on the station.<BR>";
                intercepttext += " 2. If found, use any neccesary means to contain and destroy the organism.<BR>";
                intercepttext += " 3. Avoid damage to the capital infrastructure of the station.<BR>";
                intercepttext += "<BR>Note in the event of a quarantine breach or uncontrolled spread of the biohazard, <b>Biohazard Response Procedure 5-12</b> may be issued.<BR>";
                GlobalFuncs.print_command_report(intercepttext, "Level 5-6 Biohazard Response Procedures");
                GlobalFuncs.priority_announce("Confirmed outbreak of level 5 biohazard aboard " + GlobalFuncs.station_name() + ". All personnel must contain the outbreak.", "Biohazard Alert", "sound/AI/outbreak5.ogg");
                break;

            case 2:
                nukecode = Rand13.Int(10000, 99999);

                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Nuclearbomb)))
                {
                    bomb = _a;


                    if (bomb != null && Lang13.Bool(bomb.r_code))
                    {
                        if (bomb.z == 1)
                        {
                            bomb.r_code = nukecode;
                        }
                    }
                }
                intercepttext += "<FONT size = 3><b>NanoTrasen Update</b>: Biohazard Alert.</FONT><HR>";
                intercepttext += "Reports indicate that the biohazard has grown out of control and will soon reach critical mass.<BR>";
                intercepttext += "<b>Biohazard Response Procedure 5-12</b> has been issued for " + GlobalFuncs.station_name() + ".<BR>";
                intercepttext += "Orders for all " + GlobalFuncs.station_name() + " personnel are as follows:<BR>";
                intercepttext += "1. Secure the Nuclear Authentication Disk.<BR>";
                intercepttext += "2. Detonate the Nuke located in the vault.<BR>";
                intercepttext += "Nuclear Authentication Code: " + nukecode + " <BR>";
                GlobalFuncs.print_command_report(intercepttext, "Classified " + GlobalFuncs.command_name() + " Update");
                GlobalFuncs.priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", "sound/AI/commandreport.ogg");

                foreach (dynamic _b in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon_Ai)))
                {
                    aiPlayer = _b;


                    if (aiPlayer.client != null)
                    {
                        law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. The nuclear failsafe must be activated at any cost, the code is: " + nukecode + ".";
                        aiPlayer.set_zeroth_law(law);
                        aiPlayer.WriteMsg("Laws Updated: " + law);
                    }
                }
                break;

            default:
                base.send_intercept(report);
                break;
            }
            return;
        }