// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static bool create_xeno( string ckey = null ) { ByTable candidates = null; dynamic M = null; dynamic alien_caste = null; dynamic spawn_here = null; Mob_Living_Carbon_Alien new_xeno = null; if ( !Lang13.Bool( ckey ) ) { candidates = new ByTable(); M = null; foreach (dynamic _a in GlobalVars.player_list ) { M = _a; if ( Lang13.Int( M.stat ) != 2 ) { continue; } if ( !Lang13.Bool( ((dynamic)M.client.prefs.be_special).contains( "xenomorph" ) ) ) { continue; } if ( Lang13.Bool( ((dynamic)M.client).is_afk() ) ) { continue; } if ( Lang13.Bool( M.mind ) && Lang13.Bool( M.mind.current ) && Lang13.Int( M.mind.current.stat ) != 2 ) { continue; } candidates += M.ckey; }; if ( candidates.len != 0 ) { ckey = Interface13.input( "Pick the player you want to respawn as a xeno.", "Suitable Candidates", null, null, candidates, 4224 ); } else { ((dynamic)Task13.user).write( "<font color='red'>Error: create_xeno(): no suitable candidates.</font>" ); } } if ( !( ckey is string ) ) { return false; } alien_caste = Interface13.input( Task13.user, "Please choose which caste to spawn.", "Pick a caste", null, new ByTable(new object [] { "Queen", "Praetorian", "Hunter", "Sentinel", "Drone", "Larva" }), 4224 ); spawn_here = ( GlobalVars.xeno_spawn.len != 0 ? Rand13.pick( GlobalVars.xeno_spawn ) : Rand13.pick( GlobalVars.latejoin ) ); new_xeno = null; dynamic _b = alien_caste; // Was a switch-case, sorry for the mess. if ( _b=="Queen" ) { new_xeno = new Mob_Living_Carbon_Alien_Humanoid_Royal_Queen( spawn_here ); } else if ( _b=="Praetorian" ) { new_xeno = new Mob_Living_Carbon_Alien_Humanoid_Royal_Praetorian( spawn_here ); } else if ( _b=="Hunter" ) { new_xeno = new Mob_Living_Carbon_Alien_Humanoid_Hunter( spawn_here ); } else if ( _b=="Sentinel" ) { new_xeno = new Mob_Living_Carbon_Alien_Humanoid_Sentinel( spawn_here ); } else if ( _b=="Drone" ) { new_xeno = new Mob_Living_Carbon_Alien_Humanoid_Drone( spawn_here ); } else if ( _b=="Larva" ) { new_xeno = new Mob_Living_Carbon_Alien_Larva( spawn_here ); } else { return false; }; ((dynamic)new_xeno).ckey = ckey; GlobalFuncs.message_admins( "<span class='notice'>" + GlobalFuncs.key_name_admin( Task13.user ) + " has spawned " + ckey + " as a filthy xeno " + alien_caste + ".</span>" ); return true; }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static Mob_Living wabbajack( dynamic M = null ) { dynamic Robot = null; Ent_Item W = null; Mob_Living new_mob = null; dynamic randomize = null; dynamic robot = null; Mob_Living D = null; Mob_Living Robot2 = null; Mob_Living Slime = null; dynamic beast = null; dynamic animal = null; Preferences A = null; Mob_Living H = null; ByTable all_species = null; dynamic speciestype = null; dynamic S = null; if ( M is Mob_Living ) { if ( M is Mob_Living && Lang13.Int( M.stat ) != 2 ) { if ( Lang13.Bool( M.notransform ) ) { return null; } M.notransform = 1; M.canmove = 0; M.icon = null; ((dynamic)M.overlays).Cut(); M.invisibility = 101; if ( M is Mob_Living_Silicon_Robot ) { Robot = M; if ( Lang13.Bool( Robot.mmi ) ) { GlobalFuncs.qdel( Robot.mmi ); } ((dynamic)Robot).notify_ai( 1 ); } else { W = null; foreach (dynamic _a in M ) { if ( !( _a is Ent_Item ) ) { continue; } W = _a; if ( W is Ent_Item_Weapon_Implant ) { GlobalFuncs.qdel( W ); continue; } ((dynamic)W).layer = Temp13.initial( ((dynamic)W).layer ); ((dynamic)W).loc = M.loc; W.dropped( M ); }; } new_mob = null; randomize = Rand13.pick(new object [] { "monkey", "robot", "slime", "xeno", "humanoid", "animal" }); dynamic _f = randomize; // Was a switch-case, sorry for the mess. if ( _f=="monkey" ) { new_mob = new Mob_Living_Carbon_Monkey( M.loc ); new_mob.languages |= 1; } else if ( _f=="robot" ) { robot = Rand13.pick(new object [] { "cyborg", "syndiborg", "drone" }); dynamic _b = robot; // Was a switch-case, sorry for the mess. if ( _b=="cyborg" ) { new_mob = new Mob_Living_Silicon_Robot( M.loc ); } else if ( _b=="syndiborg" ) { new_mob = new Mob_Living_Silicon_Robot_Syndicate( M.loc ); } else if ( _b=="drone" ) { new_mob = new Mob_Living_SimpleAnimal_Drone( M.loc ); D = new_mob; ((dynamic)D).update_drone_hack(); }; if ( new_mob is Mob_Living_Silicon ) { ((dynamic)new_mob).gender = M.gender; new_mob.invisibility = 0; new_mob.job = "Cyborg"; Robot2 = new_mob; ((dynamic)Robot2).mmi = new Ent_Item_Device_Mmi( new_mob ); ((dynamic)((dynamic)Robot2).mmi).transfer_identity( M ); } else { new_mob.languages |= 1; } } else if ( _f=="slime" ) { new_mob = new Mob_Living_SimpleAnimal_Slime( M.loc ); if ( Rand13.percentChance( 50 ) ) { Slime = new_mob; ((dynamic)Slime).is_adult = 1; } new_mob.languages |= 1; } else if ( _f=="xeno" ) { if ( Rand13.percentChance( 50 ) ) { new_mob = new Mob_Living_Carbon_Alien_Humanoid_Hunter( M.loc ); } else { new_mob = new Mob_Living_Carbon_Alien_Humanoid_Sentinel( M.loc ); } new_mob.languages |= 1; } else if ( _f=="animal" ) { if ( Rand13.percentChance( 50 ) ) { beast = Rand13.pick(new object [] { "carp", "bear", "mushroom", "statue", "bat", "goat", "killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp" }); dynamic _c = beast; // Was a switch-case, sorry for the mess. if ( _c=="carp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp( M.loc ); } else if ( _c=="bear" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Bear( M.loc ); } else if ( _c=="mushroom" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Mushroom( M.loc ); } else if ( _c=="statue" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Statue( M.loc ); } else if ( _c=="bat" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Bat( M.loc ); } else if ( _c=="goat" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Goat( M.loc ); } else if ( _c=="killertomato" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Killertomato( M.loc ); } else if ( _c=="spiderbase" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider( M.loc ); } else if ( _c=="spiderhunter" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Hunter( M.loc ); } else if ( _c=="blobbernaut" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Blob_Blobbernaut( M.loc ); } else if ( _c=="magicarp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged( M.loc ); } else if ( _c=="chaosmagicarp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged_Chaos( M.loc ); }; } else { animal = Rand13.pick(new object [] { "parrot", "corgi", "crab", "pug", "cat", "mouse", "chicken", "cow", "lizard", "chick", "fox", "butterfly" }); dynamic _d = animal; // Was a switch-case, sorry for the mess. if ( _d=="parrot" ) { new_mob = new Mob_Living_SimpleAnimal_Parrot( M.loc ); } else if ( _d=="corgi" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Corgi( M.loc ); } else if ( _d=="crab" ) { new_mob = new Mob_Living_SimpleAnimal_Crab( M.loc ); } else if ( _d=="pug" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Pug( M.loc ); } else if ( _d=="cat" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Cat( M.loc ); } else if ( _d=="mouse" ) { new_mob = new Mob_Living_SimpleAnimal_Mouse( M.loc ); } else if ( _d=="chicken" ) { new_mob = new Mob_Living_SimpleAnimal_Chicken( M.loc ); } else if ( _d=="cow" ) { new_mob = new Mob_Living_SimpleAnimal_Cow( M.loc ); } else if ( _d=="lizard" ) { new_mob = new Mob_Living_SimpleAnimal_Lizard( M.loc ); } else if ( _d=="fox" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Fox( M.loc ); } else if ( _d=="butterfly" ) { new_mob = new Mob_Living_SimpleAnimal_Butterfly( M.loc ); } else { new_mob = new Mob_Living_SimpleAnimal_Chick( M.loc ); }; } new_mob.languages |= 1; } else if ( _f=="humanoid" ) { new_mob = new Mob_Living_Carbon_Human( M.loc ); A = new Preferences(); new ByTable().set( 1, new_mob ).set( "icon_updates", 0 ).apply( A.GetType().GetMethod( "copy_to" ) ); H = new_mob; if ( Rand13.percentChance( 50 ) ) { all_species = new ByTable(); speciestype = null; foreach (dynamic _e in Lang13.get_all_types( typeof(Species) ) - typeof(Species) ) { speciestype = _e; S = Lang13.call( speciestype ); if ( !Lang13.Bool( S.dangerous_existence ) ) { all_species += speciestype; } }; new ByTable().set( 1, Rand13.pick( all_species ) ).set( "icon_update", 0 ).apply( H.GetType().GetMethod( "set_species" ) ); H.real_name = ((dynamic)((dynamic)H).dna.species).random_name( ((dynamic)H).gender, 1 ); } ((dynamic)H).update_body(); H.update_hair(); ((dynamic)H).update_mutcolor(); ((dynamic)((dynamic)H).dna).update_dna_identity(); } else { return null; }; new_mob.attack_log = M.attack_log; M.attack_log += "[" + GlobalFuncs.time_stamp() + "] <font color='orange'>" + M.real_name + " (" + M.ckey + ") became " + new_mob.real_name + ".</font>"; new_mob.a_intent = "harm"; if ( Lang13.Bool( M.mind ) ) { ((dynamic)M.mind).transfer_to( new_mob ); } else { ((dynamic)new_mob).key = M.key; } ((dynamic)new_mob).write( "<B>Your form morphs into that of a " + randomize + ".</B>" ); GlobalFuncs.qdel( M ); return new_mob; } } return null; }