From a80a951e94325b2052a20c4264425379563438f9 Mon Sep 17 00:00:00 2001 From: Magnus Date: Sun, 1 Jan 2006 21:33:21 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1752 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- quakec/fallout2/client.qc | 381 +++++- quakec/fallout2/combat.qc | 61 +- quakec/fallout2/defs.qc | 8 +- quakec/fallout2/doors.qc | 2 +- quakec/fallout2/items.qc | 12 +- quakec/fallout2/knight.qc | 3 +- quakec/fallout2/menus.qc | 2 +- quakec/fallout2/mod_buy.qc | 2392 +++++++++-------------------------- quakec/fallout2/modbuy.qc | 2127 ++++--------------------------- quakec/fallout2/ogre.qc | 1 + quakec/fallout2/player.qc | 439 +++---- quakec/fallout2/progs.src | 5 +- quakec/fallout2/soldier.qc | 2 + quakec/fallout2/triggers.qc | 6 +- quakec/fallout2/weapons.qc | 832 +++++++++--- quakec/fallout2/wizard.qc | 3 +- quakec/fallout2/world.qc | 102 +- 17 files changed, 2327 insertions(+), 4051 deletions(-) diff --git a/quakec/fallout2/client.qc b/quakec/fallout2/client.qc index 5a3234d3..3bb76685 100644 --- a/quakec/fallout2/client.qc +++ b/quakec/fallout2/client.qc @@ -7,6 +7,7 @@ void() player_stand1; void (vector org) spawn_tfog; void (vector org, entity death_owner) spawn_tdeath; void(float slot) WeaponAmmo; +void() Identify; float modelindex_dead, modelindex_sneak, modelindex_prone, modelindex_eyes, modelindex_player, modelindex_gone; @@ -331,19 +332,12 @@ entity() SelectSpawnPoint = if (spot) return spot; - ent1 = "info_player_start"; - - spot = find (world, classname, "info_player_start"); - - if (spot) - cooperate = 1; - - spot = find (world, classname, "spawn3"); - - if (spot) + if (coop == 1) + ent1 = "info_player_coop"; + else ent1 = "spawn3"; - - if (spot) + + if (ent1 == "spawn3") { if (self.team == 1) ent1 = "spawn1"; @@ -488,7 +482,6 @@ void() PutClientInServer = self.classname = "player"; self.health = 100; self.takedamage = DAMAGE_AIM; - self.solid = SOLID_SLIDEBOX; self.movetype = MOVETYPE_WALK; self.show_hostile = 0; self.max_health = 100; @@ -503,6 +496,8 @@ void() PutClientInServer = self.effects = 0; self.invincible_time = 0; self.active = 1; + self.solid = SOLID_NOT; + self.materialize = 200; DecodeLevelParms (); @@ -512,7 +507,7 @@ void() PutClientInServer = self.th_pain = player_pain; self.th_die = PlayerDie; self.slot1 = 17; - self.slot2 = 19; + self.armor = 2; self.current_slot = 1; WeaponAmmo(1); WeaponAmmo(2); @@ -833,7 +828,7 @@ void() PlayerJump = self.button2 = 0; // player jumping sound - sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM); + sound (self, CHAN_BODY, "player/ax1.wav", 1, ATTN_NORM); }; @@ -952,6 +947,89 @@ void() CheckWaterJump = } }; +void () SpeedControl = +{ + + self.maxspeed = 200; + + if (self.position == 1) + self.maxspeed = self.maxspeed * 0.50; + if (self.position == 2) + self.maxspeed = self.maxspeed * 0.25; + if (self.currentmenu != "none") + self.maxspeed = 0; +}; + +void() ArmorCheck = +{ + local float type; + local float bit; + local float value; + + //Armor + if (self.armor == 1) + type = 0.20; + if (self.armor == 2) + type = 0.30; + if (self.armor == 3) + type = 0.35; + if (self.armor == 4) + type = 0.35; + if (self.armor == 5) + type = 0.40; + if (self.armor == 6) + type = 0.45; + if (self.armor == 7) + type = 0.10; + if (self.armor == 8) + type = 0.50; + + if (self.armor <= 3) + self.items = (self.items - (self.items & ((IT_ARMOR1 | IT_ARMOR2) | IT_ARMOR3)) + IT_ARMOR1); + else if (self.armor <= 6) + self.items = (self.items - (self.items & ((IT_ARMOR1 | IT_ARMOR2) | IT_ARMOR3)) + IT_ARMOR1); + else + self.items = (self.items - (self.items & ((IT_ARMOR1 | IT_ARMOR2) | IT_ARMOR3)) + IT_ARMOR1); + + if (self.armor == 1) + self.armornoise = "misc/thud.wav"; + if (self.armor == 2) + self.armornoise = "misc/thud.wav"; + if (self.armor == 3) + self.armornoise = "misc/thud.wav"; + if (self.armor == 4) + self.armornoise = "weapons/ric1.wav"; + if (self.armor == 5) + self.armornoise = "misc/thud.wav"; + if (self.armor == 6) + self.armornoise = "misc/thud.wav"; + if (self.armor == 7) + self.armornoise = "misc/laserdef.wav"; + if (self.armor == 8) + self.armornoise = "weapons/ric1.wav"; + + self.armorvalue = type * 100; + self.armortype = type; +}; + +void () WeightControl = +{ + + GetArmorWeight(); + GetWeaponWeight(self, 1); + GetWeaponWeight(self, 2); + + if (self.class == 1) + self.max_weight = 20; + if (self.class == 2) + self.max_weight = 20; + if (self.class == 3) + self.max_weight = 30; + if (self.class == 4) + self.max_weight = 15; +}; + + void () PositionControl = { local string img; @@ -1002,6 +1080,35 @@ void() PlayerPreThink = makevectors (self.v_angle); // is this still used + if (self.materialize > 0) + { + self.materialize = self.materialize - 1; + + if (self.materialize <= 0) + { + if (walkmove(0, 0)) + { + self.solid = SOLID_SLIDEBOX; + //bprint(2, "turning solid\n"); + } + else + { + self.materialize = 50; + //bprint(2, "stuck in object, returning non-solid\n"); + } + } + } + + if (self.team == 0 && self.currentmenu == "none") + { + self.currentmenu = "select_team"; + DisplayMenu (); + } + else if (self.class == 0 && self.currentmenu == "none") + { + self.currentmenu = "select_skill"; + DisplayMenu (); + } self.recoil = self.recoil - 0.2; @@ -1013,7 +1120,11 @@ void() PlayerPreThink = if (self.cycle1 < time) { + Identify(); PositionControl(); + SpeedControl(); + WeightControl(); + ArmorCheck(); Crosshair(); if (self.currentmenu != "none") DisplayMenu(); @@ -1026,7 +1137,37 @@ void() PlayerPreThink = if (self.cycle2 < time) { - self.cycle2 = time + 2; + if (self.equipment == 8) + r = 30; + else + r = 20; + + if (self.sneak == 0) + { + if (self.ammo_cells < r) + self.ammo_cells = self.ammo_cells + 1; + + if (self.ammo_cells > r) + self.ammo_cells = r; + } + if (self.sneak >= 1) + { + self.ammo_cells = self.ammo_cells = 1; + + if (self.ammo_cells <= 0) + { + sprint(self, 2, "uncloaked.\n"); + self.sneak = 0; + } + } + + if (self.regen > 0) + { + self.health = self.health + 3; + self.regen = self.regen - 1; + } + + self.cycle2 = time + 1; } @@ -1244,6 +1385,8 @@ void() CheckPowerups = }; +void() Footstep; + /* ================ PlayerPostThink @@ -1263,7 +1406,7 @@ void() PlayerPostThink = return; // check to see if player landed and play landing sound - if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) ) + if ((self.jump_flag < -50) && (self.flags & FL_ONGROUND) ) { if (self.watertype == CONTENT_WATER) sound (self, CHAN_BODY, "player/h2ojump.wav", 1, ATTN_NORM); @@ -1274,11 +1417,20 @@ void() PlayerPostThink = sound (self, CHAN_VOICE, "player/land2.wav", 1, ATTN_NORM); } else - sound (self, CHAN_VOICE, "player/land.wav", 1, ATTN_NORM); + Footstep(); } self.jump_flag = self.velocity_z; + if (self.rtime >= 1) + { + self.weaponframe = 3; + self.rtime = (self.rtime - 1); + + if (self.perk == 3) + self.rtime = (self.rtime - 1); + } + CheckPowerups (); W_WeaponFrame (); @@ -1299,10 +1451,28 @@ void() ClientConnect = bprint (PRINT_HIGH, " entered the game\n"); - stuffcmd(self, "bind shift impulse 200\n"); - stuffcmd(self, "bind ctrl impulse 201\n"); + stuffcmd(self, "v_damagecshift 1\n"); stuffcmd(self, "alias duck impulse 200\n"); stuffcmd(self, "alias prone impulse 201\n"); + stuffcmd(self, "alias reload impulse 50\n"); + stuffcmd(self, "alias chem impulse 51\n"); + stuffcmd(self, "alias buy impulse 52\n"); + stuffcmd(self, "alias special impulse 53\n"); + stuffcmd(self, "alias exit impulse 54\n"); + stuffcmd(self, "alias drop impulse 55\n"); + stuffcmd(self, "alias info impulse 56\n"); + stuffcmd(self, "alias equip impulse 57\n"); + + stuffcmd(self, "bind c equip\n"); + stuffcmd(self, "bind g drop\n"); + stuffcmd(self, "bind e exit\n"); + stuffcmd(self, "bind z special\n"); + stuffcmd(self, "bind r reload\n"); + stuffcmd(self, "bind x chem\n"); + stuffcmd(self, "bind b buy\n"); + stuffcmd(self, "bind q info\n"); + stuffcmd(self, "bind shift prone\n"); + stuffcmd(self, "bind ctrl duck\n"); stuffcmd(self, "exec fallout.cfg\n"); @@ -1350,6 +1520,68 @@ void(entity targ, entity attacker) ClientObituary = attackerteam = infokey(attacker, "team"); targteam = infokey(targ, "team"); + if (targ.classname == "player") + { + if (coop == 1 && no_connect < 4) + no_connect = no_connect + 1; + + if (no_connect > 4) + no_connect = 4; + } + + if (attacker.classname == "player") + { + if (coop == 1 && no_connect < 4) + no_connect = no_connect + 1; + + if (attacker == targ) + attacker.kills = attacker.kills - 1; + else if (attacker.team == targ.team) + attacker.kills = attacker.kills - 1; + else if (targ.classname == "player") + attacker.kills = attacker.kills + 1; + else if (targ.classname == "monster") + attacker.kills = attacker.kills + 1; + } + + if (targ == attacker && targ.deathtype == "suicide") + { + bprint(2, attacker.netname); + bprint(2, " takes the easy way out\n"); + return; + } + + if (targ == attacker && targ.deathtype == "bleed") + { + bprint(2, attacker.netname); + bprint(2, " bled to death\n"); + return; + } + + if (targ != attacker && (targ.classname == "monster" || targ.classname == "player") && (attacker.classname == "monster" || attacker.classname == "player")) + { + bprint (PRINT_MEDIUM, "[ "); + + if (attacker.critical == 3) //headshot + bprint (PRINT_MEDIUM, "X "); + if (attacker.critical == 777) //through the wall + bprint (PRINT_MEDIUM, "% "); + if (attacker.critical == 778) //wall headshot + bprint (PRINT_MEDIUM, "& "); + if (attacker.velocity_z != 0) + bprint (PRINT_MEDIUM, "@ "); + if (attacker.current_slot == 1 && attacker.mag1 == 0) + bprint (PRINT_MEDIUM, "! "); + + bprint (PRINT_MEDIUM, "] "); + + bprint(2, attacker.netname); + bprint(2, " >>> "); + bprint(2, targ.netname); + bprint(2, "\n"); + return; + } + if (targ.classname == "player") { @@ -1631,3 +1863,112 @@ void(entity targ, entity attacker) ClientObituary = } } }; + + + +void() Identify = +{ + local string c1, c2, c3, c5, c6, c7; + + makevectors (self.v_angle); + traceline (self.origin, (self.origin + (v_forward * 2000)), FALSE, self); + if (trace_ent.classname == "player" && self.currentmenu == "none" && self.team == trace_ent.team) + { + if (trace_ent.class == 2) + c1 = "medic\n"; + if (trace_ent.class == 3) + c1 = "assassin\n"; + if (trace_ent.class == 4) + c1 = "soldier\n"; + if (trace_ent.class == 6) + c1 = "scientist\n"; + + c2 = ftos (trace_ent.health); + c3 = GetWeaponName (trace_ent, trace_ent.current_slot); + + if (trace_ent.armor == 0) + c5 = "\nno armor"; + if (trace_ent.armor == 1) + c5 = "\nlightly armored"; + if (trace_ent.armor == 2) + c5 = "\nleather armor"; + if (trace_ent.armor == 3) + c5 = "\nkevlar armor"; + if (trace_ent.armor == 4) + c5 = "\nmetal armor"; + if (trace_ent.armor == 5) + c5 = "\ncombat armor"; + if (trace_ent.armor == 6) + c5 = "\nbrotherhood armor"; + if (trace_ent.armor == 7) + c5 = "\nforce armor"; + if (trace_ent.armor == 8) + c5 = "\nmetal armor mkii"; + + centerprint7 (self, trace_ent.netname, "\n", c1, c2, "\n", c3, c5); + } + if (trace_ent.classname == "robowolf" && self.currentmenu == "none") + { + c1 = "robo-fang\n"; + c2 = "robot construct\nowned by "; + c3 = trace_ent.track.netname; + if (trace_ent.team == self.team) + c5 = "\nfriendly\n"; + else + c5 = "\nhostile\n"; + + centerprint7 (self, trace_ent.netname, c1, c2, c3, c5, "", ""); + } + if (trace_ent.classname == "station" && self.currentmenu == "none") + { + c1 = trace_ent.netname; + if (self.armor == 0) + c2 = "uncompleted"; + else if (trace_ent.health >= trace_ent.max_health) + c2 = "online"; + else if (trace_ent.health >= trace_ent.max_health*0.75) + c2 = "banged up"; + else if (trace_ent.health >= trace_ent.max_health*0.50) + c2 = "damaged"; + else + c2 = "almost destroyed"; + + c3 = trace_ent.track.netname; + + centerprint7 (self, c1, "\nstationary bot", "\n", c2, "\n", "owned by ", c3); + } + if (trace_ent.classname == "monster" && self.currentmenu == "none") + { + c1 = "hostile"; + c2 = "natural armor"; + if (trace_ent.armor == 1) + c2 = "lightly armored"; + if (trace_ent.armor == 2) + c2 = "leather armor"; + if (trace_ent.armor == 3) + c2 = "kevlar armor"; + if (trace_ent.armor == 4) + c2 = "metal armor"; + if (trace_ent.armor == 5) + c2 = "combat armor"; + if (trace_ent.armor == 6) + c2 = "brotherhood armor"; + if (trace_ent.armor == 7) + c2 = "force armor"; + if (trace_ent.armor == 8) + c2 = "metal armor mkii"; + + if (trace_ent.weapon == 1) + c3 = "rifle"; + if (trace_ent.weapon == 2) + c3 = "pistol"; + if (trace_ent.weapon == 3) + c3 = "shotgun"; + if (trace_ent.weapon == 4) + c3 = "smg"; + if (trace_ent.weapon >= 5) + c3 = "assault rifle"; + + centerprint7 (self, trace_ent.netname, "\n", c1, "\n", c2, "\n", c3); + } +}; diff --git a/quakec/fallout2/combat.qc b/quakec/fallout2/combat.qc index 63678529..bde0d8d7 100644 --- a/quakec/fallout2/combat.qc +++ b/quakec/fallout2/combat.qc @@ -105,12 +105,13 @@ The damage is coming from inflictor, but get mad at attacker This should be the only function that ever reduces health. ============ */ -void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= + +void(entity targ, entity inflictor, entity attacker, float damage) T_Damage = { local vector dir; local entity oldself; local float save; - local float take; + local float take, severity, helm; local string s; local string attackerteam, targteam; @@ -129,6 +130,56 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= else damage = damage * 4; + if (attacker.critical == 3)//attacker scored a headshot/critical + { + if (attacker.critical == 3) + { + severity = 0 + random()*20; + if (attacker.perk == 7) + severity = severity + 4; + + if (attacker.class == 3) + severity = severity + 2; + + if (severity >= 19) + damage = (damage * 5); + else if (severity >= 14) + damage = (damage * 4); + else + damage = (damage * 3); + + helm = targ.armortype; + if (targ.helmet == 0) + { + sound (targ, CHAN_BODY, "player/headshot.wav", 1, ATTN_NORM); + helm = 0; + } + if (targ.helmet == AS_STRAIGHT) + { + sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM); + helm = 0.30; + } + if (targ.helmet == AS_SLIDING) + { + sound (targ, CHAN_BODY, "weapons/helmet.wav", 1, ATTN_NORM); + helm = 0.45; + } + + damage = (damage - (damage * helm)); + + makevectors (targ.v_angle); + } + } + + if (damage <= 0) + { + damage = 0; + sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM); + } + + if (random()*4<=1) + sound (targ, CHAN_BODY, targ.armornoise, 1, ATTN_NORM); + // save damage based on the target's armor level save = ceil(targ.armortype*damage); @@ -139,7 +190,6 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= targ.items = targ.items - (targ.items & (IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3)); } - targ.armorvalue = targ.armorvalue - save; take = ceil(damage-save); // add to the damage total for clients, which will be sent as a single @@ -154,7 +204,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= damage_inflictor = inflictor; - +/* // figure momentum add if ( (inflictor != world) && (targ.movetype == MOVETYPE_WALK) ) { @@ -174,7 +224,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= if ( (rj > 1) & ((attacker.classname == "player") & (targ.classname == "player")) & ( attacker.netname == targ.netname)) targ.velocity = targ.velocity + dir * damage * rj; - } + }*/ @@ -207,6 +257,7 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage= return; // do the damage + take = take - targ.armor; targ.health = targ.health - take; if (targ.health <= 0) diff --git a/quakec/fallout2/defs.qc b/quakec/fallout2/defs.qc index 59f95188..f5090e9e 100644 --- a/quakec/fallout2/defs.qc +++ b/quakec/fallout2/defs.qc @@ -468,7 +468,7 @@ float fraglimit; float deathmatch; float coop; float rj = 1; - +float no_connect; //================================================ // @@ -626,7 +626,12 @@ float red_armor; .float ctimer; .float flash; .float oldteam; +.float dead; +.float grenadetoggle; +.float kills; +.float materialize; +.string armornoise; .string ammotype1; .string ammotype2; .string deathsound; @@ -796,6 +801,7 @@ void(string s) changelevel = #70; void(string var, string val) cvar_set = #72; // sets cvar.value void(entity client, string s) centerprint = #73; // sprint, but in middle +void (entity client, string x1, string x2, string x3, string x4, string x5, string x6, string x7) centerprint7 = #73; void(vector pos, string samp, float vol, float atten) ambientsound = #74; diff --git a/quakec/fallout2/doors.qc b/quakec/fallout2/doors.qc index 8be65c77..30b0ede9 100644 --- a/quakec/fallout2/doors.qc +++ b/quakec/fallout2/doors.qc @@ -237,7 +237,7 @@ void () door_touch = { if (self.size_y <= 128 && self.size_x <= 128) { - if (other.class == 6) + if (other.class == 4) { SpawnOpenDoor(self, other); return; diff --git a/quakec/fallout2/items.qc b/quakec/fallout2/items.qc index 4ae0766a..acbcf795 100644 --- a/quakec/fallout2/items.qc +++ b/quakec/fallout2/items.qc @@ -427,12 +427,14 @@ void() armor_touch = void() item_armor1 = { - self.touch = armor_touch; - precache_model ("progs/armor.mdl"); - setmodel (self, "progs/armor.mdl"); + self.touch = SUB_Null; + self.solid = SOLID_BBOX; + precache_model ("progs/enforcer.mdl"); + setmodel (self, "progs/enforcer.mdl"); self.skin = 0; - setsize (self, '-16 -16 0', '16 16 56'); - StartItem (); + setsize (self, '-16 -16 -24', '16 16 32'); + setorigin(self, self.origin + '0 0 24'); + self.classname = "merchant"; }; /*QUAKED item_armor2 (0 .5 .8) (-16 -16 0) (16 16 32) diff --git a/quakec/fallout2/knight.qc b/quakec/fallout2/knight.qc index beec2c7b..a3a2cfdf 100644 --- a/quakec/fallout2/knight.qc +++ b/quakec/fallout2/knight.qc @@ -262,6 +262,7 @@ void() monster_knight = self.th_melee = knight_atk1; self.th_pain = knight_pain; self.th_die = knight_die; - + self.armornoise = "weapons/ric1.wav"; + walkmonster_start (); }; diff --git a/quakec/fallout2/menus.qc b/quakec/fallout2/menus.qc index ce034ba2..0c02be1d 100644 --- a/quakec/fallout2/menus.qc +++ b/quakec/fallout2/menus.qc @@ -175,5 +175,5 @@ string () de_dust = string () EquipmentString = { - return ("+ special equipment +\npress your c key to activate!\n\n1 stealth boy 20c\n2 displacer cloak 20c\n3 security alarm 20c\n4 motion sensor 20c\n5 extra magazines 20c\n6 electronic tools mark ii 30c\n7 climbing gear 30c\n8 remote camera 40c\n9 enhanced battery 50c\n0 laser defense field 50c\n"); + return ("+ special equipment +\npress your c key to activate!\n\n1 medic's bag 15c\n2 security alarm 15c\n3 remote camera 15c\n4 belt pouch 15c\n5 backpack 15c\n6 toolkit mark ii 15c\n7 climbing gear 15c\n8 enhanced battery 15c\n9 stealth boy 45c\n\n"); }; diff --git a/quakec/fallout2/mod_buy.qc b/quakec/fallout2/mod_buy.qc index 2297ef99..5f1b9ab9 100644 --- a/quakec/fallout2/mod_buy.qc +++ b/quakec/fallout2/mod_buy.qc @@ -1,7 +1,173 @@ -float () weightx; -void (float wt, float cost, string item) BuyWeapon = + +void(float cost, float type) BuyGrenade = +{ + local string y; + local float x; + + if (self.ammo_shells < cost) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not enough money.\n"); + return; + } + + if (self.equipment == 4) + x = 2; + else + x = 1; + + if (self.handgrenade >= x) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "already have a grenade.\n"); + return; + } + + sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM); + self.handgrenade = self.handgrenade + 1; + self.grenadetype = type; + self.ammo_shells = self.ammo_shells - cost; + y = ftos(self.bandages); + sprint(self, PRINT_HIGH, "you bought a "); + if (type == 1) + sprint(self, PRINT_HIGH, "smoke grenade.\n"); + if (type == 2) + sprint(self, PRINT_HIGH, "frag grenade.\n"); + if (type == 3) + sprint(self, PRINT_HIGH, "emp grenade.\n"); +}; + + +void() BuyBandages = +{ + local string y; + + if (self.ammo_shells < 2) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not enough money.\n"); + return; + } + if (self.class != 2) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not a medic.\n"); + return; + } + if (self.bandages >= 50) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "too many bandages.\n"); + return; + } + + sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM); + self.bandages = self.bandages + 25; + self.ammo_shells = self.ammo_shells - 2; + if (self.bandages > 50) + self.bandages = 50; + y = ftos(self.bandages); + sprint(self, PRINT_HIGH, "you now have "); + sprint(self, PRINT_HIGH, y); + sprint(self, PRINT_HIGH, "/50 bandages.\n"); +}; + +void(float cost, float type) BuyChem = +{ + local string x; + local float y; + + if (self.ammo_shells < cost) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not enough money.\n"); + return; + } + if (type >= 2 && self.class != 1) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not a medic.\n"); + return; + } + if (self.equipment == 1) + y = 4; + else + y = 2; + + if (self.chemcount >= y) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "you can't hold any more chems.\n"); + return; + } + + sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM); + self.chemcount = y; + self.chem = type; + self.ammo_shells = self.ammo_shells - cost; + x = GetChemName(); + sprint (self, PRINT_HIGH, x); + sprint(self, PRINT_HIGH, " purchased.\n"); +}; + +void(string type) ChangeAmmo = +{ + + if (self.ammo_shells < 1) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not enough money.\n"); + return; + } + + + sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM); + + if (self.current_slot == 1) + self.ammotype1 = type; + if (self.current_slot == 2) + self.ammotype2 = type; +}; + +void() BuyScraps = +{ + local string y; + + if (self.ammo_shells < 5) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not enough money.\n"); + return; + } + if (self.class != 6) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not a scientist.\n"); + return; + } + if (self.scraps >= 15) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "too many metal scraps.\n"); + return; + } + + sound (self, CHAN_BODY, "items/armor1.wav", 1, ATTN_NORM); + self.scraps = self.scraps + 5; + self.ammo_shells = self.ammo_shells - 5; + if (self.scraps > 15) + self.scraps = 15; + y = ftos(self.scraps); + sprint(self, PRINT_HIGH, "you now have "); + sprint(self, PRINT_HIGH, y); + sprint(self, PRINT_HIGH, "/15 scraps.\n"); + +}; + + +void (float wt, float cost, float item) BuyWeapon = { local float lbs; local string qq; @@ -11,100 +177,81 @@ void (float wt, float cost, string item) BuyWeapon = local string c2; lbs = weightx (); - if (((self.team == SPAWNFLAG_LASER) && ((random () * SECRET_NO_SHOOT) < AS_MELEE))) - { - sprint (self, SPAWNFLAG_LASER, "markdown: from "); - c1 = ftos (cost); - sprint (self, SPAWNFLAG_LASER, c1); - sprint (self, SPAWNFLAG_LASER, " to "); - c3 = ceil ((cost * 0.66)); - c2 = ftos (c3); - sprint (self, SPAWNFLAG_LASER, c2); - sprint (self, SPAWNFLAG_LASER, "\n"); - cost = (cost * 0.66); - } - if ((self.current_slot == SPAWNFLAG_SUPERSPIKE)) + + if ((self.current_slot == 1)) { curr = self.slot1_weight; - if ((self.slot2 == "none")) - { + + if (self.slot2 == 0) self.slot2 = self.slot1; - } - /*else + if (self.slot1 != 0) { - if ((self.slot1 != "none")) - { - DropWeapon (self.slot1, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - } - }*/ - //GetWeaponModel (); + DropWeapon (self.slot1, 1, 0); + self.slot1 = 0; + } + GetWeaponModel (); } - if ((self.current_slot == SPAWNFLAG_LASER)) + if ((self.current_slot == 2)) { curr = self.slot2_weight; - if ((self.slot1 == "none")) - { + + if (self.slot1 == 0) self.slot1 = self.slot2; - } - /*else + if (self.slot2 != 0) { - if ((self.slot2 != MULTICAST_ALL)) - { - DropWeapon (self.slot2, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - } - }*/ - //GetWeaponModel (); + DropWeapon (self.slot2, 1, 0); + self.slot2 = 0; + } + + GetWeaponModel (); } - if ((((lbs + wt) - curr) > 30)) + if ((lbs + wt - curr) > self.max_weight) { - //Weight (); sprint (self, PRINT_HIGH, "you can't carry that much.\n"); self.currentmenu = "none"; - //GetWeaponModel (); + GetWeaponModel (); return; } - if ((cost > self.ammo_shells)) + if (cost > self.ammo_shells) { sprint (self, PRINT_HIGH, "not enough money.\n"); self.currentmenu = "none"; - //GetWeaponModel (); + GetWeaponModel (); return; } - self.ammo_shells = (self.ammo_shells - cost); - if ((self.current_slot == SPAWNFLAG_SUPERSPIKE)) + self.ammo_shells = self.ammo_shells - cost; + if ((self.current_slot == 1)) { GetWeaponWeight (self, self.current_slot); stuffcmd (self, "impulse 1\n"); self.slot1 = item; self.items = (self.items | IT_SUPER_NAILGUN); - //GetWeaponModel (); + GetWeaponModel (); } - else + if (self.current_slot == 2) { - if ((self.current_slot == SPAWNFLAG_LASER)) - { - GetWeaponWeight (self, self.current_slot); - stuffcmd (self, "impulse 2\n"); - self.slot2 = item; - self.items = (self.items | IT_GRENADE_LAUNCHER); - //GetWeaponModel (); - } + GetWeaponWeight (self, self.current_slot); + stuffcmd (self, "impulse 2\n"); + self.slot2 = item; + self.items = (self.items | IT_GRENADE_LAUNCHER); + GetWeaponModel (); } - //qq = GetWeaponName (self, self.current_slot); + qq = GetWeaponName (self, item); sprint (self, PRINT_HIGH, qq); sprint (self, PRINT_HIGH, " purchased.\n"); + sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM); self.currentmenu = "none"; - //WeaponAmmo (SPAWNFLAG_SUPERSPIKE); - //WeaponAmmo (SPAWNFLAG_LASER); - GetWeaponWeight (self, SPAWNFLAG_SUPERSPIKE); - GetWeaponWeight (self, SPAWNFLAG_LASER); - //GetWeaponModel (); + WeaponAmmo (SPAWNFLAG_SUPERSPIKE); + WeaponAmmo (SPAWNFLAG_LASER); + GetWeaponWeight (self, 1); + GetWeaponWeight (self, 2); + GetWeaponModel (); return; }; -void (float cost, string item) BuyPerk = +void (float cost, float item) BuyPerk = { - if ((self.frags < cost)) + if (self.frags < cost) { sprint (self, PRINT_HIGH, "not enough kills\n"); self.currentmenu = "none"; @@ -116,37 +263,46 @@ void (float cost, string item) BuyPerk = return; }; -void (float wt, float cost, string item) BuyArmor = +void (float wt, float cost, float item) BuyArmor = { local float curr; local float lbs; + local string x; lbs = weightx (); - + if (((item >= TE_LIGHTNING2) && (self.protect >= SPAWNFLAG_SUPERSPIKE))) + { + sprint (self, PRINT_HIGH, "remove your hardware before buying\nany kind of advanced armor!\ntoo much interference otherwise."); + self.currentmenu = "none"; + return; + } if ((cost > self.ammo_shells)) { sprint (self, PRINT_HIGH, "not enough money.\n"); self.currentmenu = "none"; return; } - if ((((lbs + wt) - self.armor_weight) > 30)) + if ((((lbs + wt) - self.armor_weight) > self.max_weight)) { - //Weight (); sprint (self, PRINT_HIGH, "you can't carry that much.\n"); self.currentmenu = "none"; return; } - sprint (self, PRINT_HIGH, "armor purchased.\n"); + sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM); self.ammo_shells = (self.ammo_shells - cost); self.armor_weight = wt; self.armor = item; - //Equip_Armor (); + x = GetArmorName(); + sprint (self, PRINT_HIGH, x); + sprint (self, PRINT_HIGH, " purchased.\n"); + return; }; -void (float cost, string item) BuyGadget = +void (float cost, float item) BuyEquipment = { local float lbs; + local string x; lbs = weightx (); if ((cost > self.ammo_shells)) @@ -155,15 +311,20 @@ void (float cost, string item) BuyGadget = self.currentmenu = "none"; return; } - sprint (self, PRINT_HIGH, "gadget purchased.\n"); - self.ammo_shells = (self.ammo_shells - cost); + sound (self, CHAN_BODY, "items/item1.wav", 1, ATTN_NORM); self.equipment = item; + x = GetEquipmentName(); + sprint (self, PRINT_HIGH, x); + sprint (self, PRINT_HIGH, " purchased.\n"); + self.ammo_shells = (self.ammo_shells - cost); return; }; -void (float cost, string item) Buyprotect = +void (float cost, float item) BuyProtect = { - if ((self.armor == "brotherhood combat armor")) + local string x; + + if ((self.armor >= TE_LIGHTNING2)) { sprint (self, PRINT_HIGH, "too many electronics in\nyour currently worn armor!"); self.currentmenu = "none"; @@ -175,1757 +336,460 @@ void (float cost, string item) Buyprotect = self.currentmenu = "none"; return; } - sprint (self, PRINT_HIGH, "protect purchased.\n"); + sound (self, CHAN_BODY, "items/item1.wav", 1, ATTN_NORM); self.ammo_shells = (self.ammo_shells - cost); self.protect = item; + x = GetProtectName(); + sprint (self, PRINT_HIGH, x); + sprint (self, PRINT_HIGH, " purchased.\n"); + return; }; + float (float input) overweight = { local float var; local float max; var = ((((input) + self.armor_weight) + self.slot1_weight) + self.slot2_weight); - max = 30; - if (self.class == 6) - max = 40; - - if (self.perk == "") - max = max + 10; - - if (var > max) - return (TRUE); - else + max = self.max_weight; + if ((self.class == TE_LIGHTNING2)) + { + max = (max + SPAWNFLAG_LASER); + } + if ((self.perk == TE_LAVASPLASH)) + { return (FALSE); + } + if ((var > max)) + { + return (TRUE); + } + else + { + return (FALSE); + } }; float () weightx = { local float var; - var = 0; - var = (self.slot1_weight + self.slot2_weight + self.armor_weight); - return (var); + var = self.slot1_weight + self.slot2_weight + self.armor_weight; + return var; }; void () W_GetClass = { - if ((self.currentmenu == "select_class")) + if ((self.currentmenu == "select_skill")) { sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) + if (self.impulse == 1) { - if ((self.class == SPAWNFLAG_LASER)) - { - return; - } self.currentmenu = "none"; self.max_health = 80; - self.class = SPAWNFLAG_LASER; - self.override = SPAWNFLAG_SUPERSPIKE; - stuffcmd (self, "kill\n"); - self.ghost = MULTICAST_ALL; + self.class = 1; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nMedic - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; return; } - if ((self.impulse == SPAWNFLAG_LASER)) + if ((self.impulse == 2)) { - if ((self.class == AS_MELEE)) - { - return; - } self.currentmenu = "none"; self.max_health = 70; - self.class = AS_MELEE; - self.override = SPAWNFLAG_SUPERSPIKE; - stuffcmd (self, "kill\n"); - self.ghost = MULTICAST_ALL; + self.class = 2; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nAssassin - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; return; } - if ((self.impulse == AS_MELEE)) + if (self.impulse == 3) { - if ((self.class == SECRET_1ST_DOWN)) - { - return; - } self.currentmenu = "none"; self.max_health = 100; - self.class = SECRET_1ST_DOWN; - self.override = SPAWNFLAG_SUPERSPIKE; - stuffcmd (self, "kill\n"); - self.ghost = MULTICAST_ALL; + self.class = 3; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nSoldiier - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; return; } - if ((self.impulse == SECRET_1ST_DOWN)) + if (self.impulse == 4) { - if ((self.class == MULTICAST_PVS_R)) - { - return; - } self.max_health = 80; self.currentmenu = "none"; - self.class = TE_LIGHTNING2; - self.override = SPAWNFLAG_SUPERSPIKE; - stuffcmd (self, "kill\n"); - self.ghost = MULTICAST_ALL; + self.class = 4; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nScientist - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; return; } } - if ((self.impulse > SECRET_1ST_DOWN)) - { + if (self.impulse > 4) return; - } + }; -/* -void () W_PlayerMenu = -{ - local float type; - local float value; - local float bit; - local float r; - local entity spot; - local entity te; - local string ac; - local string menu; - local float ratio; - local float r1; - local float r2; - local float var; - local float soldout; - local float lbs; - local float b1; - if ((self.currentmenu == "none")) +void() W_PlayerMenu = +{ + if (self.currentmenu == "none") + return; + + if (self.currentmenu == "shop_list") { + if (self.impulse == 1) + self.currentmenu = "shop_trait"; + if (self.impulse == 2) + self.currentmenu = "shop_perk"; + if (self.impulse == 3) + self.currentmenu = "shop_armor"; + if (self.impulse == 4) + self.currentmenu = "shop_protect"; + if (self.impulse == 5) + self.currentmenu = "shop_weapons"; + if (self.impulse == 6) + self.currentmenu = "shop_equipment"; + if (self.impulse == 7) + self.currentmenu = "shop_chems"; + if (self.impulse == 8) + self.currentmenu = "shop_other"; + + DisplayMenu(); return; } - else + + if (self.currentmenu == "shop_trait") { - if ((self.currentmenu == "help")) + if (self.impulse == 1) + self.currentmenu = "shop_trait"; + if (self.impulse == 2) + self.currentmenu = "shop_perk"; + if (self.impulse == 3) + self.currentmenu = "shop_armor"; + if (self.impulse == 4) + self.currentmenu = "shop_protect"; + if (self.impulse == 5) + self.currentmenu = "shop_weapons"; + if (self.impulse == 6) + self.currentmenu = "shop_equipment"; + if (self.impulse == 7) + self.currentmenu = "shop_chems"; + if (self.impulse == 8) + self.currentmenu = "shop_other"; + + DisplayMenu(); + return; + } + if (self.currentmenu == "shop_perk") + { + if (self.impulse == 1) + BuyPerk(1, 1); + if (self.impulse == 2) + BuyPerk(1, 2); + if (self.impulse == 3) + BuyPerk(1, 3); + if (self.impulse == 4) + BuyPerk(2, 4); + if (self.impulse == 5) + BuyPerk(2, 5); + if (self.impulse == 6) + BuyPerk(2, 6); + if (self.impulse == 7) + BuyPerk(2, 7); + if (self.impulse == 8) + BuyPerk(3, 8); + if (self.impulse == 9) + BuyPerk(4, 9); + + return; + } + if (self.currentmenu == "shop_armor") + { + if (self.impulse == 1) + BuyArmor(3, 03, 1); //weight, cost, item + if (self.impulse == 2) + BuyArmor(7, 05, 2); //weight, cost, item + if (self.impulse == 3) + BuyArmor(9, 10, 3); //weight, cost, item + if (self.impulse == 4) + BuyArmor(15, 12, 4); //weight, cost, item + if (self.impulse == 5) + BuyArmor(12, 25, 5); //weight, cost, item + if (self.impulse == 6) + BuyArmor(17, 35, 6); //weight, cost, item + if (self.impulse == 7) + BuyArmor(5, 45, 7); //weight, cost, item + if (self.impulse == 8) + BuyArmor(20, 55, 8); //weight, cost, item + + return; + } + if (self.currentmenu == "shop_protect") + { + if (self.impulse == 1) + BuyProtect(20, 1); + if (self.impulse == 2) + BuyProtect(20, 2); + if (self.impulse == 3) + BuyProtect(30, 3); + if (self.impulse == 4) + BuyProtect(30, 4); + if (self.impulse == 5) + BuyProtect(40, 5); + + return; + } + if (self.currentmenu == "shop_weapons") + { + if (self.impulse == 1) + self.currentmenu = "shop_melee"; + if (self.impulse == 2) + self.currentmenu = "shop_thrown"; + if (self.impulse == 3) + self.currentmenu = "shop_pistols"; + if (self.impulse == 4) + self.currentmenu = "shop_shotguns"; + if (self.impulse == 5) + self.currentmenu = "shop_rifles"; + + DisplayMenu(); + return; + } + if (self.currentmenu == "shop_melee") + { + if (self.impulse == 1) + BuyWeapon(1, 1, 1); //weight, cost, item + if (self.impulse == 2) + BuyWeapon(6, 3, 2); //weight, cost, item + if (self.impulse == 3) + BuyWeapon(3, 10, 3); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(10, 15, 4); //weight, cost, item + + return; + } + if (self.currentmenu == "shop_thrown") + { + if (self.impulse == 1) + BuyGrenade(3, 1); //weight, cost, item + if (self.impulse == 2) + BuyGrenade(4, 2); //weight, cost, item + if (self.impulse == 3) + BuyGrenade(5, 3); //weight, cost, item + if (self.impulse == 4) + BuyGrenade(6, 4); //weight, cost, item + + return; + } + if (self.currentmenu == "shop_pistols") + { + if (self.impulse == 1) + BuyWeapon(1, 5, 5); //weight, cost, item + if (self.impulse == 2) + BuyWeapon(2, 7, 6); //weight, cost, item + if (self.impulse == 3) + BuyWeapon(2, 9, 7); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(2, 21, 8); //weight, cost, item + if (self.impulse == 5) + BuyWeapon(3, 14, 13); //weight, cost, item + if (self.impulse == 6) + BuyWeapon(3, 17, 14); //weight, cost, item + + return; + } + if (self.currentmenu == "shop_shotguns") + { + if (self.impulse == 1) + BuyWeapon(3, 3, 9); //weight, cost, item + if (self.impulse == 2) + BuyWeapon(4, 7, 10); //weight, cost, item + if (self.impulse == 3) + BuyWeapon(5, 12, 11); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(7, 34, 12); //weight, cost, item + + return; + } + if (self.currentmenu == "shop_rifles") + { + if (self.impulse == 1) + BuyWeapon(3, 11, 15); //weight, cost, item + if (self.impulse == 2) + BuyWeapon(4, 21, 16); //weight, cost, item + if (self.impulse == 3) + BuyWeapon(5, 25, 17); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(6, 28, 18); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(5, 30, 19); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(4, 32, 20); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(7, 40, 21); //weight, cost, item + if (self.impulse == 4) + BuyWeapon(10, 45, 22); //weight, cost, item + + return; + } + + if (self.currentmenu == "shop_equipment") + { + if (self.impulse == 1) + BuyEquipment(20, 1); //cost, item + if (self.impulse == 2) + BuyEquipment(20, 2); //cost, item + if (self.impulse == 3) + BuyEquipment(20, 3); //cost, item + if (self.impulse == 4) + BuyEquipment(20, 4); //cost, item + if (self.impulse == 5) + BuyEquipment(20, 5); //cost, item + if (self.impulse == 6) + BuyEquipment(20, 6); //cost, item + if (self.impulse == 7) + BuyEquipment(20, 7); //cost, item + if (self.impulse == 8) + BuyEquipment(20, 8); //cost, item + if (self.impulse == 9) + BuyEquipment(20, 9); //cost, item + if (self.impulse == 10) + BuyEquipment(20, 10); //cost, item + + return; + } + + if (self.currentmenu == "shop_chems") + { + if (self.impulse == 1) + BuyChem(3, 1); //cost, item + if (self.impulse == 2) + BuyChem(5, 2); //cost, item + if (self.impulse == 3) + BuyChem(10, 3); //cost, item + if (self.impulse == 4) + BuyChem(12, 4); //cost, item + if (self.impulse == 5) + BuyChem(18, 5); //cost, item + if (self.impulse == 6) + BuyChem(21, 6); //cost, item + } + + if (self.currentmenu == "shop_other") + return; + + + if (self.currentmenu == "select_team") + { + if (self.impulse == 1) { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - self.currentmenu = "help1"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.currentmenu = "help2"; - } - if ((self.impulse == AS_MELEE)) - { - self.currentmenu = "help3"; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.currentmenu = "help4"; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - self.currentmenu = "help5"; - } - if ((self.impulse == TE_LIGHTNING2)) - { - self.currentmenu = "help6"; - } - if ((self.impulse == TE_WIZSPIKE)) - { - self.currentmenu = "help7"; - } + bprint(2, self.netname); + bprint(2, " has joined the rangers.\n"); + self.currentmenu = "confirm_team"; + DisplayMenu(); + self.team = 1; return; } - else + if (self.impulse == 2) { - if ((self.currentmenu == "menu_votehs")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_voters")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_votemap")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == AS_MELEE)) - { - spot.vote3 = (spot.vote3 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - spot.vote4 = (spot.vote4 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - spot.vote5 = (spot.vote5 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == TE_LIGHTNING2)) - { - spot.vote6 = (spot.vote6 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == TE_WIZSPIKE)) - { - spot.vote7 = (spot.vote7 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse <= TE_WIZSPIKE)) - { - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - } - return; - } - else - { - if ((self.currentmenu == "menu_voteff")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_votez")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == AS_MELEE)) - { - spot.vote3 = (spot.vote3 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - spot.vote4 = (spot.vote4 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_buy")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - menu = TraitString (); - centerprint (self, menu); - self.currentmenu = "menu_trait"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - menu = PlusString (); - centerprint (self, menu); - self.currentmenu = "menu_plus"; - return; - } - if ((self.impulse == AS_MELEE)) - { - menu = ArmorString1 (); - centerprint (self, menu); - self.currentmenu = "menu_armor"; - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_gadget == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_gadget == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - menu = HardwareString (); - centerprint (self, menu); - self.currentmenu = "menu_protect"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - menu = WeaponString (); - centerprint (self, menu); - self.currentmenu = "menu_weapon"; - return; - } - if ((self.impulse == TE_LIGHTNING2)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_gadget == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_gadget == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - menu = GadgetString (); - centerprint (self, menu); - self.currentmenu = "menu_gadget"; - return; - } - if ((self.impulse == TE_WIZSPIKE)) - { - if ((self.team == SPAWNFLAG_SUPERSPIKE)) - { - menu = DrugString1 (); - } - if ((self.team == SPAWNFLAG_LASER)) - { - menu = DrugString2 (); - } - centerprint (self, menu); - if ((self.team == SPAWNFLAG_SUPERSPIKE)) - { - self.currentmenu = "menu_drug1"; - } - if ((self.team == SPAWNFLAG_LASER)) - { - self.currentmenu = "menu_drug2"; - } - return; - } - } - else - { - if ((self.currentmenu == "menu_weapon")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - menu = MeleeString (); - centerprint (self, menu); - self.currentmenu = "menu_melee"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - menu = MiscString (); - centerprint (self, menu); - self.currentmenu = "menu_misc"; - return; - } - if ((self.impulse == AS_MELEE)) - { - menu = SmallArmString1 (); - centerprint (self, menu); - self.currentmenu = "menu_smallarm1"; - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - menu = SmallArmString2 (); - centerprint (self, menu); - self.currentmenu = "menu_smallarm2"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - menu = SmallArmString3 (); - centerprint (self, menu); - self.currentmenu = "menu_smallarm3"; - return; - } + bprint(2, self.netname); + bprint(2, " has joined the raiders.\n"); + self.currentmenu = "confirm_team"; + DisplayMenu(); + self.team = 2; + return; + } - if ((self.impulse == TE_LIGHTNING2)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - menu = HeavyGunsString (); - centerprint (self, menu); - self.currentmenu = "menu_heavy"; - return; - } - if ((self.impulse == TE_WIZSPIKE)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - menu = EnergyWeaponsString (); - centerprint (self, menu); - self.currentmenu = "menu_energy"; - return; - } + } - } - else - { - if ((self.currentmenu == "menu_build")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spawn_station (self.origin, self, MULTICAST_ALL, SECRET_1ST_DOWN); - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spawn_station (self.origin, self, SPAWNFLAG_SUPERSPIKE, TE_LIGHTNING2); - return; - } - if ((self.impulse == AS_MELEE)) - { - spawn_station (self.origin, self, SPAWNFLAG_LASER, TE_LAVASPLASH); - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - spawn_station (self.origin, self, 3, 15); - return; - } - } - else - { - if ((self.currentmenu == "menu_misc")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.ammo_shells >= TE_TELEPORT)) - { - if ((self.total_handgren >= SPAWNFLAG_SUPERSPIKE)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - self.ammo_shells = (self.ammo_shells - TE_TELEPORT); - self.handgren_plasma = (self.handgren_plasma + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - sprint (self, SPAWNFLAG_LASER, "plasma grenade purchased.\n"); - return; - } - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - if ((self.ammo_shells >= MULTICAST_PVS_R)) - { - if ((self.total_handgren >= SPAWNFLAG_SUPERSPIKE)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - self.ammo_shells = (self.ammo_shells - MULTICAST_PVS_R); - self.handgren_frag = (self.handgren_frag + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - sprint (self, SPAWNFLAG_LASER, "frag grenade purchased.\n"); - return; - } - } - if ((self.impulse == AS_MELEE)) - { - if ((self.ammo_shells >= AS_MELEE)) - { - if ((self.total_handgren >= SPAWNFLAG_SUPERSPIKE)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - self.ammo_shells = (self.ammo_shells - AS_MELEE); - self.handgren_emp = (self.handgren_emp + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - sprint (self, SPAWNFLAG_LASER, "emp grenade purchased.\n"); - return; - } - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - if ((self.ammo_shells >= SPAWNFLAG_LASER)) - { - if ((self.total_handgren >= SPAWNFLAG_SUPERSPIKE)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - self.ammo_shells = (self.ammo_shells - SPAWNFLAG_LASER); - self.handgren_smoke = (self.handgren_smoke + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - centerprint (self, "Smoke Grenade purchased."); - return; - } - } - if ((self.impulse == MULTICAST_PVS_R)) - { - if ((self.ammo_shells >= SPAWNFLAG_LASER)) - { - if ((self.total_handgren >= SPAWNFLAG_LASER)) - { - sprint (self, SPAWNFLAG_LASER, "max of two flashbangs.\n"); - return; - } - self.ammo_shells = (self.ammo_shells - SPAWNFLAG_LASER); - self.handgren_flash = (self.handgren_flash + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - centerprint (self, "Flash Bang purchased."); - return; - } - } - } - else - { + if (self.currentmenu == "select_skill") + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - if ((self.currentmenu == "menu_armor")) - { - - if ((((self.impulse == MULTICAST_PVS_R) || (self.impulse == TE_LIGHTNING2)) || (self.impulse == SECRET_NO_SHOOT))) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_armor == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an armory.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_armor == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an armory.\n"); - return; - } - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyArmor (AS_MELEE, AS_MELEE, "vault suit"); - } - else - { - if ((self.impulse == 2)) - { - BuyArmor (TE_WIZSPIKE, MULTICAST_PVS_R, "leather armor"); - } - else - { - if ((self.impulse == 3)) - { - BuyArmor (TE_LAVASPLASH, SECRET_NO_SHOOT, "kevlar body armor"); - } - else - { - if ((self.impulse == 4)) - { - BuyArmor (TE_LIGHTNINGBLOOD, TE_TELEPORT, "combat armor"); - } - else - { - if ((self.impulse == 5)) - { - BuyArmor (17, 15, "brotherhood combat armor"); - } - - - - - } - } - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_drop")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.current_slot == SPAWNFLAG_SUPERSPIKE)) - { - DropWeapon (self.slot1, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - self.slot1 = "none"; - self.slot1_weight = MULTICAST_ALL; - } - if ((self.current_slot == SPAWNFLAG_LASER)) - { - DropWeapon (self.slot2, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - self.slot2 = "none"; - self.slot2_weight = MULTICAST_ALL; - } - centerprint (self, "WEAPON REMOVED!"); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.armor = "none"; - self.armor_weight = MULTICAST_ALL; - centerprint (self, "ARMOR REMOVED!"); - } - if ((self.impulse == AS_MELEE)) - { - centerprint (self, "HELMET REMOVED!"); - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.protect = MULTICAST_ALL; - centerprint (self, "protect REMOVED!"); - } - if ((self.impulse == 5)) - { - self.equipment = "none"; - self.runevar = MULTICAST_ALL; - centerprint (self, "GADGET REMOVED!"); - } - if ((self.impulse == TE_LIGHTNING2)) - { - self.perk = MULTICAST_ALL; - centerprint (self, "AUGMENT REMOVED!"); - } - } - else - { - if ((self.currentmenu == "menu_armor2")) - { - lbs = weightx (); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyArmor (SECRET_NO_SHOOT, 50, TE_LAVASPLASH); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyArmor (TE_LIGHTNING3, 60, TE_TELEPORT); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyArmor (TE_LIGHTNING3, 60, TE_BLOOD); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyArmor (TE_LIGHTNING3, 70, TE_LIGHTNINGBLOOD); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyArmor (TE_WIZSPIKE, 70, IDLE2A); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyArmor (TE_TELEPORT, 80, IDLE3A); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyArmor (TE_BLOOD, 80, SECRET_YES_SHOOT); - } - else - { - if ((self.impulse == SECRET_NO_SHOOT)) - { - BuyArmor (IDLE2A, 90, IDLE5A); - } - else - { - if ((self.impulse == TE_LIGHTNING3)) - { - BuyArmor (SECRET_YES_SHOOT, 95, IDLE6A); - } - else - { - if ((self.impulse == TE_LAVASPLASH)) - { - if (((self.frags / self.dead) < 3.5)) - { - menu = ArmorString1 (); - centerprint (self, menu); - self.currentmenu = "menu_armor"; - return; - } - if (((self.frags / self.dead) >= 3.5)) - { - menu = ArmorString3 (); - centerprint (self, menu); - self.currentmenu = "menu_armor3"; - return; - } - } - } - } - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_armor3")) - { - - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyArmor (TE_WIZSPIKE, 95, IDLE7A); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyArmor (SECRET_NO_SHOOT, 95, IDLE8A); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyArmor (IDLE2A, 95, IDLE9A); - } - else - { - if ((self.impulse == TE_LAVASPLASH)) - { - menu = ArmorString1 (); - centerprint (self, menu); - self.currentmenu = "menu_armor"; - return; - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_plus")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyPerk (SECRET_NO_SHOOT, SPAWNFLAG_SUPERSPIKE); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyPerk (TE_BLOOD, SPAWNFLAG_LASER); - } - if ((self.impulse == AS_MELEE)) - { - BuyPerk (IDLE2A, AS_MELEE); - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyPerk (IDLE3A, SECRET_1ST_DOWN); - } - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyPerk (IDLE5A, MULTICAST_PVS_R); - } - if ((self.impulse == TE_LIGHTNING2)) - { - BuyPerk (SVC_TEMPENTITY, TE_LIGHTNING2); - } - if ((self.impulse == TE_WIZSPIKE)) - { - BuyPerk (DRAW4, TE_WIZSPIKE); - } - if ((self.impulse == SECRET_NO_SHOOT)) - { - BuyPerk (DOOR_TOGGLE, SECRET_NO_SHOOT); - } - if ((self.impulse == TE_LIGHTNING3)) - { - BuyPerk (RN_SHUB, TE_LIGHTNING3); - } - if ((self.impulse == TE_LAVASPLASH)) - { - BuyPerk (44, TE_LAVASPLASH); - } - } - else - { - if ((self.currentmenu == "menu_protect")) - { - if ((self.armor == "brotherhood combat armor")) - { - sprint (self, PRINT_HIGH, "too many electronics in\nyour currently worn armor!"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SPAWNFLAG_SUPERSPIKE) && (self.ammo_shells >= IDLE3A))) - { - self.protect = SPAWNFLAG_SUPERSPIKE; - self.ammo_shells = (self.ammo_shells - IDLE3A); - sprint (self, PRINT_HIGH, "pro cloak\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SPAWNFLAG_LASER) && (self.ammo_shells >= DRAW3))) - { - self.protect = SPAWNFLAG_LASER; - self.ammo_shells = (self.ammo_shells - DRAW3); - sprint (self, PRINT_HIGH, "emp shield\n"); - self.currentmenu = "none"; - return; - } - if ((self.armor == "brotherhood combat armor")) - { - sprint (self, PRINT_HIGH, "too many electronics in\nyour currently worn armor!"); - return; - } - if (((self.impulse == AS_MELEE) && (self.ammo_shells >= IDLE8A))) - { - self.protect = AS_MELEE; - self.ammo_shells = (self.ammo_shells - IDLE8A); - sprint (self, PRINT_HIGH, "force shield\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SECRET_1ST_DOWN) && (self.ammo_shells >= DRAW3))) - { - self.protect = SECRET_1ST_DOWN; - self.ammo_shells = (self.ammo_shells - DRAW3); - sprint (self, PRINT_HIGH, "force field\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == MULTICAST_PVS_R) && (self.ammo_shells >= DRAW3))) - { - self.protect = MULTICAST_PVS_R; - self.ammo_shells = (self.ammo_shells - DRAW3); - sprint (self, PRINT_HIGH, "energy shield\nonly protects against energy\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_LIGHTNING2) && (self.ammo_shells >= 65))) - { - self.protect = TE_LIGHTNING2; - self.ammo_shells = (self.ammo_shells - 65); - sprint (self, PRINT_HIGH, "pro ring\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_WIZSPIKE) && (self.ammo_shells >= 75))) - { - self.protect = TE_WIZSPIKE; - self.ammo_shells = (self.ammo_shells - 75); - sprint (self, PRINT_HIGH, "dark force\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SECRET_NO_SHOOT) && (self.ammo_shells >= 85))) - { - self.protect = SECRET_NO_SHOOT; - self.ammo_shells = (self.ammo_shells - 85); - sprint (self, PRINT_HIGH, "efreet-9088 module\nprotects against fire\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_LIGHTNING3) && (self.ammo_shells >= 95))) - { - self.protect = TE_LIGHTNING3; - self.ammo_shells = (self.ammo_shells - 95); - sprint (self, PRINT_HIGH, "sentient cube\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_LAVASPLASH) && (self.ammo_shells >= 95))) - { - self.currentmenu = "none"; - self.protect = TE_LAVASPLASH; - self.ammo_shells = (self.ammo_shells - 95); - sprint (self, PRINT_HIGH, "xe+ vampire\n"); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "menu_melee")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyWeapon (SPAWNFLAG_SUPERSPIKE, SPAWNFLAG_SUPERSPIKE, SPAWNFLAG_SUPERSPIKE); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyWeapon (SPAWNFLAG_LASER, AS_MELEE, SPAWNFLAG_LASER); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyWeapon (SPAWNFLAG_LASER, TE_WIZSPIKE, AS_MELEE); - } - } - } - } - else - { - if ((self.currentmenu == "menu_trait")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - self.trait = SPAWNFLAG_SUPERSPIKE; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.trait = SPAWNFLAG_LASER; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == AS_MELEE)) - { - self.trait = AS_MELEE; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.trait = SECRET_1ST_DOWN; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - self.trait = MULTICAST_PVS_R; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - self.trait = TE_LIGHTNING2; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_smallarm1")) - { - if (self.impulse == 1) - BuyWeapon (1, 5, TE_LAVASPLASH); - if (self.impulse == 2) - BuyWeapon (2, 7, TE_TELEPORT); - if (self.impulse == 3) - BuyWeapon (2, 9, TE_WIZSPIKE); - if (self.impulse == 4) - BuyWeapon (3, 14, TE_BLOOD); - if (self.impulse == 5) - BuyWeapon (3, 17, TE_LIGHTNINGBLOOD); - if (self.impulse == 6) - BuyWeapon (2, 21, 42); - } - else - { - if ((self.currentmenu == "menu_smallarm2")) - { - if (self.impulse == 1) - BuyWeapon (2, 3, IDLE8A); - if (self.impulse == 2) - BuyWeapon (3, 3, DRAW3); - if (self.impulse == 3) - BuyWeapon (4, IDLE2A, DRAW4); - if (self.impulse == 4) - BuyWeapon (5, 35, RN_HOLO); - } - else - { - if ((self.currentmenu == "menu_drug1")) - { - if ((self.regen > MULTICAST_ALL)) - { - return; - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.ammo_shells < AS_MELEE)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - self.drug = SPAWNFLAG_SUPERSPIKE; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - AS_MELEE); - centerprint (self, "stimpacks purchased."); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - if ((self.ammo_shells < MULTICAST_PVS_R)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - self.drug = SPAWNFLAG_LASER; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - MULTICAST_PVS_R); - centerprint (self, "medkit purchased."); - } - if ((self.impulse == AS_MELEE)) - { - if ((self.ammo_shells < TE_BLOOD)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - if ((self.frags < TE_LAVASPLASH)) - { - centerprint (self, "not yet ready."); - self.currentmenu = "none"; - return; - } - self.drug = AS_MELEE; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - TE_BLOOD); - centerprint (self, "superstims purchased."); - } - } - else - { - if ((self.currentmenu == "menu_drug2")) - { - if ((self.regen > MULTICAST_ALL)) - { - return; - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.ammo_shells < AS_MELEE)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - self.drug = SPAWNFLAG_SUPERSPIKE; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - AS_MELEE); - centerprint (self, "stimpacks purchased."); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - if ((self.ammo_shells < TE_WIZSPIKE)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - self.drug = SECRET_1ST_DOWN; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - TE_WIZSPIKE); - centerprint (self, "adrenaline purchased."); - } - if ((self.impulse == AS_MELEE)) - { - if ((self.ammo_shells < IDLE3A)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - self.drug = MULTICAST_PVS_R; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - IDLE3A); - centerprint (self, "psycho purchased."); - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - if ((self.ammo_shells < TE_BLOOD)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - if ((self.frags < TE_LAVASPLASH)) - { - centerprint (self, "not yet ready."); - self.currentmenu = "none"; - return; - } - self.drug = SPAWNFLAG_LASER; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - TE_BLOOD); - centerprint (self, "medkit purchased."); - } - if ((self.impulse == MULTICAST_PVS_R)) - { - if ((self.ammo_shells < IDLE9A)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - if ((self.frags < TE_LAVASPLASH)) - { - centerprint (self, "not yet ready."); - self.currentmenu = "none"; - return; - } - self.drug = TE_LIGHTNING2; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - IDLE9A); - centerprint (self, "berserk purchased."); - } - } - else - { - if (self.currentmenu == "menu_smallarm3") - { - if (self.impulse == 1) - BuyWeapon (3, 11, EF_FLAG1); - if (self.impulse == 2) - BuyWeapon (4, 21, IDLE9A); - if (self.impulse == 3) - BuyWeapon (6, 24, IDLE5A); - if (self.impulse == 4) - BuyWeapon (5, 27, IDLE7A); - if (self.impulse == 5) - BuyWeapon (6, 36, IDLE10A); - if (self.impulse == 6) - BuyWeapon (5, 23, SVC_SELLSCREEN); - if (self.impulse == 7) - BuyWeapon (7, 41, RN_ATTRACT); - if (self.impulse == 8) - BuyWeapon (8, 51, SVC_FINALE); - - } - else - { - if ((self.currentmenu == "menu_energy")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyWeapon (AS_MELEE, IDLE9A, RN_FIELD); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyWeapon (TE_WIZSPIKE, SVC_SMALLKICK, 43); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyWeapon (TE_TELEPORT, RN_SHAMB, RN_CLOUD); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyWeapon (TE_LIGHTNING2, 57, RN_ATTRACT); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyWeapon (SPAWNFLAG_LASER, 72, 42); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyWeapon (TE_LIGHTNING2, 89, SVC_BIGKICK); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyWeapon (TE_WIZSPIKE, 96, DOOR_TOGGLE); - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_heavy")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyWeapon (SECRET_YES_SHOOT, 55, 47); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyWeapon (TE_TELEPORT, 75, 50); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyWeapon (SECRET_YES_SHOOT, SVC_BIGKICK, RN_SHAMB); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyWeapon (IDLE5A, 72, 49); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyWeapon (TE_BLOOD, 81, SVC_FINALE); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyWeapon (IDLE2A, 81, 55); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyWeapon (TE_LIGHTNINGBLOOD, 56, 54); - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_gadget")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyGadget (IDLE8A, SPAWNFLAG_SUPERSPIKE); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyGadget (IDLE8A, SPAWNFLAG_LASER); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyGadget (IDLE8A, AS_MELEE); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyGadget (IDLE8A, SECRET_1ST_DOWN); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyGadget (IDLE8A, MULTICAST_PVS_R); - //WeaponAmmo (SPAWNFLAG_SUPERSPIKE); - //WeaponAmmo (SPAWNFLAG_LASER); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyGadget (IDLE8A, TE_LIGHTNING2); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyGadget (IDLE8A, TE_WIZSPIKE); - } - else - { - if ((self.impulse == SECRET_NO_SHOOT)) - { - BuyGadget (IDLE8A, SECRET_NO_SHOOT); - } - else - { - if ((self.impulse == TE_LIGHTNING3)) - { - BuyGadget (IDLE8A, TE_LIGHTNING3); - } - else - { - if ((self.impulse == TE_LAVASPLASH)) - { - BuyGadget (IDLE8A, TE_LAVASPLASH); - } - } - } - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "13")) - { - return; - } - else - { - if ((self.currentmenu == "menu_svote")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - stuffcmd (self, "votehs\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - stuffcmd (self, "voters\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == AS_MELEE)) - { - stuffcmd (self, "votemap\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - stuffcmd (self, "voteff\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - stuffcmd (self, "zombie\n"); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "menu_menu")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - Garage (); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.currentmenu = "menu_drop"; - return; - } - if ((self.impulse == AS_MELEE)) - { - Score (); - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.currentmenu = "menu_svote"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - self.currentmenu = "menu_website"; - return; - } - if ((self.impulse == TE_LIGHTNING2)) - { - self.currentmenu = "menu_contact"; - return; - } - if ((self.impulse == TE_WIZSPIKE)) - { - stuffcmd (self, "clear\n"); - stuffcmd (self, "cmd topten\n"); - stuffcmd (self, "toggleconsole\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SECRET_NO_SHOOT)) - { - stuffcmd (self, "clear\n"); - stuffcmd (self, "server\n"); - stuffcmd (self, "toggleconsole\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == TE_LIGHTNING3)) - { - centerprint (self, "stats and equipment reset"); - BasicConfig (); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "menu_special")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - Hack (); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - Shield (); - self.currentmenu = "none"; - return; - } - if ((self.impulse == AS_MELEE)) - { - LocalScan (); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "775")) - { - return; - } - else - { - if ((self.currentmenu == "774")) - { - return; - } - else - { - if ((self.currentmenu == "motd")) - { - MOTD (); - } - else - { - if ((self.currentmenu == "select_team")) - { - sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - self.ghost = MULTICAST_ALL; - stuffcmd (self, "team Good\n"); - self.team = SPAWNFLAG_SUPERSPIKE; - centerprint (self, "You now work for Vault 18."); - bprint (PRINT_HIGH, self.netname); - bprint (PRINT_HIGH, " has joined Vault 18\n"); - if ((self.class == MULTICAST_ALL)) - { - self.currentmenu = "select_class"; - } - if ((self.class != MULTICAST_ALL)) - { - self.currentmenu = "none"; - self.override = SPAWNFLAG_SUPERSPIKE; - stuffcmd (self, "kill\n"); - self.motd_count = MULTICAST_ALL; - if ((self.max_health == SPAWNFLAG_SUPERSPIKE)) - { - self.max_health = 90; - } - self.ghost = MULTICAST_ALL; - return; - } - self.motd_count = MULTICAST_ALL; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.ghost = MULTICAST_ALL; - stuffcmd (self, "team Evil\n"); - self.team = SPAWNFLAG_LASER; - centerprint (self, "You now work for the Enclave."); - bprint (PRINT_HIGH, self.netname); - bprint (PRINT_HIGH, " has joined the Enclave\n"); - if ((self.class == MULTICAST_ALL)) - { - self.currentmenu = "select_class"; - } - if ((self.class != MULTICAST_ALL)) - { - self.currentmenu = "none"; - self.override = SPAWNFLAG_SUPERSPIKE; - stuffcmd (self, "kill\n"); - self.motd_count = MULTICAST_ALL; - if ((self.max_health == SPAWNFLAG_SUPERSPIKE)) - { - self.max_health = 90; - } - self.ghost = MULTICAST_ALL; - return; - } - self.motd_count = MULTICAST_ALL; - return; - } - if ((self.impulse == AS_MELEE)) - { - other = find (world, classname, "player"); - while ((other != world)) - { - if ((other.team == SPAWNFLAG_SUPERSPIKE)) - { - b1 = (b1 + other.frags); - } - if ((other.team == SPAWNFLAG_LASER)) - { - r1 = (r1 + other.frags); - } - other = find (other, classname, "player"); - } - if ((r1 > b1)) - { - self.impulse = SPAWNFLAG_SUPERSPIKE; - W_PlayerMenu (); - return; - } - if ((b1 > r1)) - { - self.impulse = SPAWNFLAG_LASER; - W_PlayerMenu (); - return; - } - if ((r1 == b1)) - { - if (((random () * SECRET_NO_SHOOT) <= SECRET_1ST_DOWN)) - { - self.impulse = SPAWNFLAG_SUPERSPIKE; - } - else - { - self.impulse = SPAWNFLAG_LASER; - } - W_PlayerMenu (); - return; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + if (self.impulse == 1) + { + self.currentmenu = "none"; + self.max_health = 80; + self.class = 1; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nMedic - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; + } + if ((self.impulse == 2)) + { + self.currentmenu = "none"; + self.max_health = 70; + self.class = 2; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nAssassin - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; + } + if (self.impulse == 3) + { + self.currentmenu = "none"; + self.max_health = 100; + self.class = 3; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nSoldiier - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; + } + if (self.impulse == 4) + { + self.max_health = 80; + self.currentmenu = "none"; + self.class = 4; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nScientist - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; } } - if ((self.impulse > AS_MELEE)) - { - return; - } - self.currentmenu = "none"; - return; -};*/ + + + if (self.currentmenu == "confirm_team") + { + if (self.impulse == 1) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "select_skill"; + DisplayMenu(); + self.impulse = 0; + return; + } + if (self.impulse == 2) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "select_team"; + DisplayMenu(); + self.impulse = 0; + self.team = 0; + return; + } + } + if (self.currentmenu == "confirm_skill") + { + if (self.impulse == 1) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "none"; + PutClientInServer(); + self.impulse = 0; + return; + } + if (self.impulse == 2) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "select_skill"; + DisplayMenu(); + self.impulse = 0; + self.class = 0; + return; + } + } + +}; \ No newline at end of file diff --git a/quakec/fallout2/modbuy.qc b/quakec/fallout2/modbuy.qc index 91fd98e6..5f1b9ab9 100644 --- a/quakec/fallout2/modbuy.qc +++ b/quakec/fallout2/modbuy.qc @@ -1,5 +1,45 @@ + +void(float cost, float type) BuyGrenade = +{ + local string y; + local float x; + + if (self.ammo_shells < cost) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not enough money.\n"); + return; + } + + if (self.equipment == 4) + x = 2; + else + x = 1; + + if (self.handgrenade >= x) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "already have a grenade.\n"); + return; + } + + sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM); + self.handgrenade = self.handgrenade + 1; + self.grenadetype = type; + self.ammo_shells = self.ammo_shells - cost; + y = ftos(self.bandages); + sprint(self, PRINT_HIGH, "you bought a "); + if (type == 1) + sprint(self, PRINT_HIGH, "smoke grenade.\n"); + if (type == 2) + sprint(self, PRINT_HIGH, "frag grenade.\n"); + if (type == 3) + sprint(self, PRINT_HIGH, "emp grenade.\n"); +}; + + void() BuyBandages = { local string y; @@ -34,6 +74,43 @@ void() BuyBandages = sprint(self, PRINT_HIGH, "/50 bandages.\n"); }; +void(float cost, float type) BuyChem = +{ + local string x; + local float y; + + if (self.ammo_shells < cost) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not enough money.\n"); + return; + } + if (type >= 2 && self.class != 1) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "not a medic.\n"); + return; + } + if (self.equipment == 1) + y = 4; + else + y = 2; + + if (self.chemcount >= y) + { + self.currentmenu = "none"; + sprint(self, PRINT_HIGH, "you can't hold any more chems.\n"); + return; + } + + sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM); + self.chemcount = y; + self.chem = type; + self.ammo_shells = self.ammo_shells - cost; + x = GetChemName(); + sprint (self, PRINT_HIGH, x); + sprint(self, PRINT_HIGH, " purchased.\n"); +}; void(string type) ChangeAmmo = { @@ -100,66 +177,50 @@ void (float wt, float cost, float item) BuyWeapon = local string c2; lbs = weightx (); - if (((self.team == SPAWNFLAG_LASER) && ((random () * SECRET_NO_SHOOT) < AS_MELEE))) - { - sprint (self, SPAWNFLAG_LASER, "markdown: from "); - c1 = ftos (cost); - sprint (self, SPAWNFLAG_LASER, c1); - sprint (self, SPAWNFLAG_LASER, " to "); - c3 = ceil ((cost * 0.66)); - c2 = ftos (c3); - sprint (self, SPAWNFLAG_LASER, c2); - sprint (self, SPAWNFLAG_LASER, "\n"); - cost = (cost * 0.66); - } - if ((self.current_slot == SPAWNFLAG_SUPERSPIKE)) + + if ((self.current_slot == 1)) { curr = self.slot1_weight; - if ((self.slot2 == MULTICAST_ALL)) - { + + if (self.slot2 == 0) self.slot2 = self.slot1; - } - else + if (self.slot1 != 0) { - if ((self.slot1 != MULTICAST_ALL)) - { - DropWeapon (self.slot1, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - } + DropWeapon (self.slot1, 1, 0); + self.slot1 = 0; } GetWeaponModel (); } - if ((self.current_slot == SPAWNFLAG_LASER)) + if ((self.current_slot == 2)) { curr = self.slot2_weight; - if ((self.slot1 == MULTICAST_ALL)) - { + + if (self.slot1 == 0) self.slot1 = self.slot2; - } - else + if (self.slot2 != 0) { - if ((self.slot2 != MULTICAST_ALL)) - { - DropWeapon (self.slot2, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - } + DropWeapon (self.slot2, 1, 0); + self.slot2 = 0; } + GetWeaponModel (); } - if ((((lbs + wt) - curr) > self.max_weight)) + if ((lbs + wt - curr) > self.max_weight) { sprint (self, PRINT_HIGH, "you can't carry that much.\n"); self.currentmenu = "none"; GetWeaponModel (); return; } - if ((cost > self.ammo_shells)) + if (cost > self.ammo_shells) { sprint (self, PRINT_HIGH, "not enough money.\n"); self.currentmenu = "none"; GetWeaponModel (); return; } - self.ammo_shells = (self.ammo_shells - cost); - if ((self.current_slot == SPAWNFLAG_SUPERSPIKE)) + self.ammo_shells = self.ammo_shells - cost; + if ((self.current_slot == 1)) { GetWeaponWeight (self, self.current_slot); stuffcmd (self, "impulse 1\n"); @@ -167,26 +228,23 @@ void (float wt, float cost, float item) BuyWeapon = self.items = (self.items | IT_SUPER_NAILGUN); GetWeaponModel (); } - else + if (self.current_slot == 2) { - if ((self.current_slot == SPAWNFLAG_LASER)) - { - GetWeaponWeight (self, self.current_slot); - stuffcmd (self, "impulse 2\n"); - self.slot2 = item; - self.items = (self.items | IT_GRENADE_LAUNCHER); - GetWeaponModel (); - } + GetWeaponWeight (self, self.current_slot); + stuffcmd (self, "impulse 2\n"); + self.slot2 = item; + self.items = (self.items | IT_GRENADE_LAUNCHER); + GetWeaponModel (); } - qq = GetWeaponName (self, self.current_slot); + qq = GetWeaponName (self, item); sprint (self, PRINT_HIGH, qq); sprint (self, PRINT_HIGH, " purchased.\n"); sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM); self.currentmenu = "none"; WeaponAmmo (SPAWNFLAG_SUPERSPIKE); WeaponAmmo (SPAWNFLAG_LASER); - GetWeaponWeight (self, SPAWNFLAG_SUPERSPIKE); - GetWeaponWeight (self, SPAWNFLAG_LASER); + GetWeaponWeight (self, 1); + GetWeaponWeight (self, 2); GetWeaponModel (); return; }; @@ -209,6 +267,7 @@ void (float wt, float cost, float item) BuyArmor = { local float curr; local float lbs; + local string x; lbs = weightx (); if (((item >= TE_LIGHTNING2) && (self.protect >= SPAWNFLAG_SUPERSPIKE))) @@ -229,17 +288,21 @@ void (float wt, float cost, float item) BuyArmor = self.currentmenu = "none"; return; } - sprint (self, PRINT_HIGH, "armor purchased.\n"); sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM); self.ammo_shells = (self.ammo_shells - cost); self.armor_weight = wt; self.armor = item; + x = GetArmorName(); + sprint (self, PRINT_HIGH, x); + sprint (self, PRINT_HIGH, " purchased.\n"); + return; }; void (float cost, float item) BuyEquipment = { local float lbs; + local string x; lbs = weightx (); if ((cost > self.ammo_shells)) @@ -249,14 +312,18 @@ void (float cost, float item) BuyEquipment = return; } sound (self, CHAN_BODY, "items/item1.wav", 1, ATTN_NORM); - sprint (self, PRINT_HIGH, "item purchased.\n"); - self.ammo_shells = (self.ammo_shells - cost); self.equipment = item; + x = GetEquipmentName(); + sprint (self, PRINT_HIGH, x); + sprint (self, PRINT_HIGH, " purchased.\n"); + self.ammo_shells = (self.ammo_shells - cost); return; }; void (float cost, float item) BuyProtect = { + local string x; + if ((self.armor >= TE_LIGHTNING2)) { sprint (self, PRINT_HIGH, "too many electronics in\nyour currently worn armor!"); @@ -270,9 +337,12 @@ void (float cost, float item) BuyProtect = return; } sound (self, CHAN_BODY, "items/item1.wav", 1, ATTN_NORM); - sprint (self, PRINT_HIGH, "hardware purchased.\n"); self.ammo_shells = (self.ammo_shells - cost); self.protect = item; + x = GetProtectName(); + sprint (self, PRINT_HIGH, x); + sprint (self, PRINT_HIGH, " purchased.\n"); + return; }; @@ -306,9 +376,8 @@ float () weightx = { local float var; - var = MULTICAST_ALL; - var = (self.slot1_weight + self.slot2_weight + self.armor_weight); - return (var); + var = self.slot1_weight + self.slot2_weight + self.armor_weight; + return var; }; void () W_GetClass = @@ -320,7 +389,7 @@ void () W_GetClass = { self.currentmenu = "none"; self.max_health = 80; - self.class = 2; + self.class = 1; self.currentmenu = "confirm_skill"; centerprint (self, "your class will be\n\nMedic - OK?\n1 Yes \n2 No \n"); self.ghost = 0; @@ -330,8 +399,7 @@ void () W_GetClass = { self.currentmenu = "none"; self.max_health = 70; - self.class = AS_MELEE; - self.override = SPAWNFLAG_SUPERSPIKE; + self.class = 2; self.currentmenu = "confirm_skill"; centerprint (self, "your class will be\n\nAssassin - OK?\n1 Yes \n2 No \n"); self.ghost = 0; @@ -341,7 +409,7 @@ void () W_GetClass = { self.currentmenu = "none"; self.max_health = 100; - self.class = 4; + self.class = 3; self.currentmenu = "confirm_skill"; centerprint (self, "your class will be\n\nSoldiier - OK?\n1 Yes \n2 No \n"); self.ghost = 0; @@ -351,10 +419,10 @@ void () W_GetClass = { self.max_health = 80; self.currentmenu = "none"; - self.class = 6; + self.class = 4; self.currentmenu = "confirm_skill"; centerprint (self, "your class will be\n\nScientist - OK?\n1 Yes \n2 No \n"); - self.ghost = MULTICAST_ALL; + self.ghost = 0; return; } } @@ -387,6 +455,9 @@ void() W_PlayerMenu = self.currentmenu = "shop_chems"; if (self.impulse == 8) self.currentmenu = "shop_other"; + + DisplayMenu(); + return; } if (self.currentmenu == "shop_trait") @@ -407,6 +478,9 @@ void() W_PlayerMenu = self.currentmenu = "shop_chems"; if (self.impulse == 8) self.currentmenu = "shop_other"; + + DisplayMenu(); + return; } if (self.currentmenu == "shop_perk") { @@ -428,6 +502,8 @@ void() W_PlayerMenu = BuyPerk(3, 8); if (self.impulse == 9) BuyPerk(4, 9); + + return; } if (self.currentmenu == "shop_armor") { @@ -447,6 +523,8 @@ void() W_PlayerMenu = BuyArmor(5, 45, 7); //weight, cost, item if (self.impulse == 8) BuyArmor(20, 55, 8); //weight, cost, item + + return; } if (self.currentmenu == "shop_protect") { @@ -460,6 +538,8 @@ void() W_PlayerMenu = BuyProtect(30, 4); if (self.impulse == 5) BuyProtect(40, 5); + + return; } if (self.currentmenu == "shop_weapons") { @@ -473,6 +553,9 @@ void() W_PlayerMenu = self.currentmenu = "shop_shotguns"; if (self.impulse == 5) self.currentmenu = "shop_rifles"; + + DisplayMenu(); + return; } if (self.currentmenu == "shop_melee") { @@ -484,9 +567,22 @@ void() W_PlayerMenu = BuyWeapon(3, 10, 3); //weight, cost, item if (self.impulse == 4) BuyWeapon(10, 15, 4); //weight, cost, item + + return; } if (self.currentmenu == "shop_thrown") - return; + { + if (self.impulse == 1) + BuyGrenade(3, 1); //weight, cost, item + if (self.impulse == 2) + BuyGrenade(4, 2); //weight, cost, item + if (self.impulse == 3) + BuyGrenade(5, 3); //weight, cost, item + if (self.impulse == 4) + BuyGrenade(6, 4); //weight, cost, item + + return; + } if (self.currentmenu == "shop_pistols") { if (self.impulse == 1) @@ -501,8 +597,10 @@ void() W_PlayerMenu = BuyWeapon(3, 14, 13); //weight, cost, item if (self.impulse == 6) BuyWeapon(3, 17, 14); //weight, cost, item + + return; } - if (self.currentmenu == "shop_shotgun") + if (self.currentmenu == "shop_shotguns") { if (self.impulse == 1) BuyWeapon(3, 3, 9); //weight, cost, item @@ -512,6 +610,8 @@ void() W_PlayerMenu = BuyWeapon(5, 12, 11); //weight, cost, item if (self.impulse == 4) BuyWeapon(7, 34, 12); //weight, cost, item + + return; } if (self.currentmenu == "shop_rifles") { @@ -532,6 +632,7 @@ void() W_PlayerMenu = if (self.impulse == 4) BuyWeapon(10, 45, 22); //weight, cost, item + return; } if (self.currentmenu == "shop_equipment") @@ -557,1806 +658,138 @@ void() W_PlayerMenu = if (self.impulse == 10) BuyEquipment(20, 10); //cost, item + return; } if (self.currentmenu == "shop_chems") - return; + { + if (self.impulse == 1) + BuyChem(3, 1); //cost, item + if (self.impulse == 2) + BuyChem(5, 2); //cost, item + if (self.impulse == 3) + BuyChem(10, 3); //cost, item + if (self.impulse == 4) + BuyChem(12, 4); //cost, item + if (self.impulse == 5) + BuyChem(18, 5); //cost, item + if (self.impulse == 6) + BuyChem(21, 6); //cost, item + } + if (self.currentmenu == "shop_other") return; -}; - - - - - - - - - - - - - - -/*void () W_PlayerMenu = -{ - local float type; - local float value; - local float bit; - local float r; - local entity spot; - local entity te; - local string ac; - local string menu; - local float ratio; - local float r1; - local float r2; - local float var; - local float soldout; - local float lbs; - local float b1; - - if ((self.currentmenu == "none")) + if (self.currentmenu == "select_team") { - return; - } - else - { - if ((self.currentmenu == "help")) + if (self.impulse == 1) { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - self.currentmenu = "help1"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.currentmenu = "help2"; - } - if ((self.impulse == AS_MELEE)) - { - self.currentmenu = "help3"; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.currentmenu = "help4"; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - self.currentmenu = "help5"; - } - if ((self.impulse == TE_LIGHTNING2)) - { - self.currentmenu = "help6"; - } - if ((self.impulse == TE_WIZSPIKE)) - { - self.currentmenu = "help7"; - } + bprint(2, self.netname); + bprint(2, " has joined the rangers.\n"); + self.currentmenu = "confirm_team"; + DisplayMenu(); + self.team = 1; return; } - else + if (self.impulse == 2) { - if ((self.currentmenu == "menu_votehs")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_voters")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_votemap")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == AS_MELEE)) - { - spot.vote3 = (spot.vote3 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - spot.vote4 = (spot.vote4 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - spot.vote5 = (spot.vote5 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == TE_LIGHTNING2)) - { - spot.vote6 = (spot.vote6 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == TE_WIZSPIKE)) - { - spot.vote7 = (spot.vote7 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse <= TE_WIZSPIKE)) - { - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - } - return; - } - else - { - if ((self.currentmenu == "menu_voteff")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_votez")) - { - spot = find (spot, classname, "voteboy"); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - spot.vote1 = (spot.vote1 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - spot.vote2 = (spot.vote2 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == AS_MELEE)) - { - spot.vote3 = (spot.vote3 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - spot.vote4 = (spot.vote4 + SPAWNFLAG_SUPERSPIKE); - self.currentmenu = "none"; - } - sprint (self, PRINT_HIGH, "Thank you for voting!\n"); - return; - } - else - { - if ((self.currentmenu == "menu_buy")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - menu = TraitString (); - centerprint (self, menu); - self.currentmenu = "menu_trait"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - menu = PlusString (); - centerprint (self, menu); - self.currentmenu = "menu_plus"; - return; - } - if ((self.impulse == AS_MELEE)) - { - menu = ArmorString1 (); - centerprint (self, menu); - self.currentmenu = "menu_armor"; - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_gadget == 3))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_gadget == 3))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - menu = HardwareString (); - centerprint (self, menu); - self.currentmenu = "menu_hardware"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - menu = WeaponString (); - centerprint (self, menu); - self.currentmenu = "menu_weapon"; - return; - } - if ((self.impulse == TE_LIGHTNING2)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_gadget == 3))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_gadget == 3))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs a proto-lab.\n"); - return; - } - menu = GadgetString (); - centerprint (self, menu); - self.currentmenu = "menu_gadget"; - return; - } - if ((self.impulse == TE_WIZSPIKE)) - { - if ((self.team == SPAWNFLAG_SUPERSPIKE)) - { - menu = DrugString1 (); - } - if ((self.team == SPAWNFLAG_LASER)) - { - menu = DrugString2 (); - } - centerprint (self, menu); - if ((self.team == SPAWNFLAG_SUPERSPIKE)) - { - self.currentmenu = "menu_drug1"; - } - if ((self.team == SPAWNFLAG_LASER)) - { - self.currentmenu = "menu_drug2"; - } - return; - } - if (self.impulse == 8) - { - menu = SpecialString (); - self.currentmenu = "menu_items"; - return; - } - } - else - { - if ((self.currentmenu == "menu_weapon")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - menu = MeleeString (); - centerprint (self, menu); - self.currentmenu = "menu_melee"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - menu = MiscString (); - centerprint (self, menu); - self.currentmenu = "menu_misc"; - return; - } - if ((self.impulse == AS_MELEE)) - { - menu = SmallArmString1 (); - centerprint (self, menu); - self.currentmenu = "menu_smallarm1"; - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - menu = SmallArmString2 (); - centerprint (self, menu); - self.currentmenu = "menu_smallarm2"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - menu = SmallArmString3 (); - centerprint (self, menu); - self.currentmenu = "menu_smallarm3"; - return; - } + bprint(2, self.netname); + bprint(2, " has joined the raiders.\n"); + self.currentmenu = "confirm_team"; + DisplayMenu(); + self.team = 2; + return; + } - if ((self.impulse == TE_LIGHTNING2)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - menu = HeavyGunsString (); - centerprint (self, menu); - self.currentmenu = "menu_heavy"; - return; - } - if ((self.impulse == TE_WIZSPIKE)) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_weapon == MULTICAST_ALL))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an arms lab.\n"); - return; - } - menu = EnergyWeaponsString (); - centerprint (self, menu); - self.currentmenu = "menu_energy"; - return; - } + } - } - else - { - if ((self.currentmenu == "menu_build")) - { - if ((self.impulse == 999)) - { - spawn_station (self.origin, self, 4, 2); - return; - } - if ((self.impulse == 1)) - { - spawn_station (self.origin, self, 0, 4); - return; - } - if ((self.impulse == 2)) - { - spawn_station (self.origin, self, 1, 6); - return; - } - if ((self.impulse == 3)) - { - spawn_station (self.origin, self, 2, 10); - return; - } - if ((self.impulse == 4)) - { - spawn_station (self.origin, self, 3, 11); - return; - } - if ((self.impulse == 999)) - { - spawn_station (self.origin, self, 5, 12); - return; - } - if ((self.impulse == 999)) - { - spawn_station (self.origin, self, 6, 15); - return; - } - } - else - { - if ((self.currentmenu == "menu_misc")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.ammo_shells >= 3)) - { - if ((self.total_handgren >= 1)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - self.ammo_shells = (self.ammo_shells - 3); - self.handgren_smoke = (self.handgren_smoke + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - sprint (self, SPAWNFLAG_LASER, "smoke grenade purchased.\n"); - return; - } - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - if ((self.ammo_shells >= 4)) - { - if ((self.total_handgren >= 1)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - self.ammo_shells = (self.ammo_shells - 4); - self.handgren_frag = (self.handgren_frag + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - sprint (self, SPAWNFLAG_LASER, "frag grenade purchased.\n"); - return; - } - } - if ((self.impulse == AS_MELEE)) - { - if ((self.ammo_shells >= AS_MELEE)) - { - if ((self.total_handgren >= 1)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - if (self.ammo_shells < 5) - return; - self.ammo_shells = (self.ammo_shells - 5); - self.handgren_emp = (self.handgren_emp + SPAWNFLAG_SUPERSPIKE); - self.total_handgren = (self.total_handgren + SPAWNFLAG_SUPERSPIKE); - sprint (self, SPAWNFLAG_LASER, "emp grenade purchased.\n"); - return; - } - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - if ((self.total_handgren >= 1)) - { - sprint (self, SPAWNFLAG_LASER, "max of one grenade.\n"); - return; - } - - if (self.ammo_shells < 7) - return; - self.ammo_shells = (self.ammo_shells - 7); - self.handgren_flash = (self.handgren_flash + 1); - self.total_handgren = (self.total_handgren + 1); - sprint (self, SPAWNFLAG_LASER, "flashbang purchased.\n"); - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - - return; - - } - } - else - { - if ((self.currentmenu == "menu_helmets")) - { - if ((mode == SPAWNFLAG_SUPERSPIKE)) - { - centerprint (self, "Sorry, currently in\nNo Armor mode."); - return; - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyHelmet (SPAWNFLAG_SUPERSPIKE, MULTICAST_PVS_R, SPAWNFLAG_SUPERSPIKE); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyHelmet (SPAWNFLAG_LASER, IDLE8A, SPAWNFLAG_LASER); - } - if ((self.impulse == AS_MELEE)) - { - BuyHelmet (AS_MELEE, IDLE8A, AS_MELEE); - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyHelmet (SPAWNFLAG_LASER, SVC_INTERMISSION, SECRET_1ST_DOWN); - } - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyHelmet (SPAWNFLAG_LASER, 50, MULTICAST_PVS_R); - } - if ((self.impulse == TE_LIGHTNING2)) - { - BuyHelmet (SECRET_1ST_DOWN, 75, TE_LIGHTNING2); - } - } - else - { - if ((self.currentmenu == "menu_armor")) - { - if ((mode == SPAWNFLAG_SUPERSPIKE)) - { - centerprint (self, "Sorry, currently in\nNo Armor mode."); - return; - } - if ((((self.impulse == MULTICAST_PVS_R) || (self.impulse == TE_LIGHTNING2)) || (self.impulse == SECRET_NO_SHOOT))) - { - if (((self.team == SPAWNFLAG_SUPERSPIKE) && (blue_armor == 3))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an armory.\n"); - return; - } - if (((self.team == SPAWNFLAG_LASER) && (red_armor == 3))) - { - self.currentmenu = "none"; - sprint (self, SPAWNFLAG_LASER, "your team needs an armory.\n"); - return; - } - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyArmor (AS_MELEE, AS_MELEE, SPAWNFLAG_SUPERSPIKE); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyArmor (5, 8, SPAWNFLAG_LASER); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyArmor (9, 10, AS_MELEE); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyArmor (15, 12, 4); - } - else - { - if ((self.impulse == 5)) - { - BuyArmor (12, 25, 5); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyArmor (17, 35, 6); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyArmor (6, 45, 7); - } - else - { - if ((self.impulse == 8)) - { - BuyArmor (20, 55, 8); - } - else - { - if ((self.impulse == TE_LIGHTNING3)) - { - self.ammo_shells = (self.ammo_shells + (2 * self.armor)); - sprint (self, SPAWNFLAG_LASER, "armor sold.\n"); - self.armor = 0; - } - else - { - if ((self.impulse == TE_LAVASPLASH)) - { - self.ammo_shells = (self.ammo_shells + (SPAWNFLAG_LASER * self.armor)); - sprint (self, SPAWNFLAG_LASER, "ARMOR SOLD\n"); - self.armor = MULTICAST_ALL; - self.armor_weight = MULTICAST_ALL; - } - } - } - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_drop")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.current_slot == SPAWNFLAG_SUPERSPIKE)) - { - DropWeapon (self.slot1, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - self.slot1 = MULTICAST_ALL; - self.slot1_weight = MULTICAST_ALL; - } - if ((self.current_slot == SPAWNFLAG_LASER)) - { - DropWeapon (self.slot2, SPAWNFLAG_SUPERSPIKE, MULTICAST_ALL); - self.slot2 = MULTICAST_ALL; - self.slot2_weight = MULTICAST_ALL; - } - centerprint (self, "WEAPON REMOVED!"); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.armor = MULTICAST_ALL; - self.armor_weight = MULTICAST_ALL; - centerprint (self, "ARMOR REMOVED!"); - } - if ((self.impulse == AS_MELEE)) - { - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.protect = MULTICAST_ALL; - centerprint (self, "HARDWARE REMOVED!"); - } - if ((self.impulse == MULTICAST_PVS_R)) - { - self.equipment = MULTICAST_ALL; - self.runevar = MULTICAST_ALL; - centerprint (self, "GADGET REMOVED!"); - } - if ((self.impulse == TE_LIGHTNING2)) - { - self.perk = MULTICAST_ALL; - centerprint (self, "AUGMENT REMOVED!"); - } - } - else - { - if ((self.currentmenu == "menu_armor2")) - { - lbs = weightx (); - if ((mode == SPAWNFLAG_SUPERSPIKE)) - { - centerprint (self, "Sorry, currently in\nNo Armor mode."); - return; - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyArmor (SECRET_NO_SHOOT, 50, TE_LAVASPLASH); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyArmor (TE_LIGHTNING3, 60, TE_TELEPORT); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyArmor (TE_LIGHTNING3, 60, TE_BLOOD); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyArmor (TE_LIGHTNING3, 70, TE_LIGHTNINGBLOOD); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyArmor (TE_WIZSPIKE, 70, IDLE2A); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyArmor (TE_TELEPORT, 80, IDLE3A); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyArmor (TE_BLOOD, 80, SECRET_YES_SHOOT); - } - else - { - if ((self.impulse == SECRET_NO_SHOOT)) - { - BuyArmor (IDLE2A, 90, IDLE5A); - } - else - { - if ((self.impulse == TE_LIGHTNING3)) - { - BuyArmor (SECRET_YES_SHOOT, 95, IDLE6A); - } - else - { - if ((self.impulse == TE_LAVASPLASH)) - { - if (((self.frags / self.dead) < 3.5)) - { - menu = ArmorString1 (); - centerprint (self, menu); - self.currentmenu = "menu_armor"; - return; - } - if (((self.frags / self.dead) >= 3.5)) - { - menu = ArmorString3 (); - centerprint (self, menu); - self.currentmenu = "menu_armor3"; - return; - } - } - } - } - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_armor3")) - { - if ((mode == SPAWNFLAG_SUPERSPIKE)) - { - centerprint (self, "Sorry, currently in\nNo Armor mode."); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyArmor (TE_WIZSPIKE, 95, IDLE7A); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyArmor (SECRET_NO_SHOOT, 95, IDLE8A); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyArmor (IDLE2A, 95, IDLE9A); - } - else - { - if ((self.impulse == TE_LAVASPLASH)) - { - menu = ArmorString1 (); - centerprint (self, menu); - self.currentmenu = "menu_armor"; - return; - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_plus")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyPerk (SECRET_NO_SHOOT, SPAWNFLAG_SUPERSPIKE); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyPerk (TE_BLOOD, SPAWNFLAG_LASER); - } - if ((self.impulse == AS_MELEE)) - { - BuyPerk (IDLE2A, AS_MELEE); - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyPerk (IDLE3A, SECRET_1ST_DOWN); - } - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyPerk (IDLE5A, MULTICAST_PVS_R); - } - if ((self.impulse == TE_LIGHTNING2)) - { - BuyPerk (SVC_TEMPENTITY, TE_LIGHTNING2); - } - if ((self.impulse == TE_WIZSPIKE)) - { - BuyPerk (DRAW4, TE_WIZSPIKE); - } - if ((self.impulse == SECRET_NO_SHOOT)) - { - BuyPerk (DOOR_TOGGLE, SECRET_NO_SHOOT); - } - if ((self.impulse == TE_LIGHTNING3)) - { - BuyPerk (RN_SHUB, TE_LIGHTNING3); - } - if ((self.impulse == TE_LAVASPLASH)) - { - BuyPerk (44, TE_LAVASPLASH); - } - } - else - { - if ((self.currentmenu == "menu_hardware")) - { - if ((self.armor >= TE_WIZSPIKE)) - { - sprint (self, PRINT_HIGH, "too many electronics in\nyour currently worn armor!"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SPAWNFLAG_SUPERSPIKE) && (self.ammo_shells >= IDLE3A))) - { - self.protect = SPAWNFLAG_SUPERSPIKE; - self.ammo_shells = (self.ammo_shells - IDLE3A); - sprint (self, PRINT_HIGH, "pro cloak\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SPAWNFLAG_LASER) && (self.ammo_shells >= DRAW3))) - { - self.protect = SPAWNFLAG_LASER; - self.ammo_shells = (self.ammo_shells - DRAW3); - sprint (self, PRINT_HIGH, "emp shield\n"); - self.currentmenu = "none"; - return; - } - if ((self.armor >= TE_LIGHTNING2)) - { - sprint (self, PRINT_HIGH, "too many electronics in\nyour currently worn armor!"); - return; - } - if (((self.impulse == AS_MELEE) && (self.ammo_shells >= IDLE8A))) - { - self.protect = AS_MELEE; - self.ammo_shells = (self.ammo_shells - IDLE8A); - sprint (self, PRINT_HIGH, "force shield\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SECRET_1ST_DOWN) && (self.ammo_shells >= DRAW3))) - { - self.protect = SECRET_1ST_DOWN; - self.ammo_shells = (self.ammo_shells - DRAW3); - sprint (self, PRINT_HIGH, "force field\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == MULTICAST_PVS_R) && (self.ammo_shells >= DRAW3))) - { - self.protect = MULTICAST_PVS_R; - self.ammo_shells = (self.ammo_shells - DRAW3); - sprint (self, PRINT_HIGH, "energy shield\nonly protects against energy\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_LIGHTNING2) && (self.ammo_shells >= 65))) - { - self.protect = TE_LIGHTNING2; - self.ammo_shells = (self.ammo_shells - 65); - sprint (self, PRINT_HIGH, "pro ring\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_WIZSPIKE) && (self.ammo_shells >= 75))) - { - self.protect = TE_WIZSPIKE; - self.ammo_shells = (self.ammo_shells - 75); - sprint (self, PRINT_HIGH, "dark force\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == SECRET_NO_SHOOT) && (self.ammo_shells >= 85))) - { - self.protect = SECRET_NO_SHOOT; - self.ammo_shells = (self.ammo_shells - 85); - sprint (self, PRINT_HIGH, "efreet-9088 module\nprotects against fire\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_LIGHTNING3) && (self.ammo_shells >= 95))) - { - self.protect = TE_LIGHTNING3; - self.ammo_shells = (self.ammo_shells - 95); - sprint (self, PRINT_HIGH, "sentient cube\n"); - self.currentmenu = "none"; - return; - } - if (((self.impulse == TE_LAVASPLASH) && (self.ammo_shells >= 95))) - { - self.currentmenu = "none"; - self.protect = TE_LAVASPLASH; - self.ammo_shells = (self.ammo_shells - 95); - sprint (self, PRINT_HIGH, "xe+ vampire\n"); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "menu_melee")) - { - if ((self.impulse == 1)) - { - BuyWeapon (1, 1, 1); - } - else - { - if ((self.impulse == 2)) - { - BuyWeapon (8, 3, 3); - } - else - { - if ((self.impulse == 3)) - { - BuyWeapon (4, 10, 2); - } - - else - { - if ((self.impulse == 4)) - { - BuyWeapon (7, 15, 4); - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_trait")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - self.trait = SPAWNFLAG_SUPERSPIKE; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.trait = SPAWNFLAG_LASER; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == AS_MELEE)) - { - self.trait = AS_MELEE; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.trait = SECRET_1ST_DOWN; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - self.trait = MULTICAST_PVS_R; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - self.trait = TE_LIGHTNING2; - sprint (self, PRINT_HIGH, "trait acquired\n"); - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_smallarm1")) - { - if (self.impulse == 1) - BuyWeapon (1, 5, TE_LAVASPLASH); - if (self.impulse == 2) - BuyWeapon (2, 7, TE_TELEPORT); - if (self.impulse == 3) - BuyWeapon (2, 9, TE_WIZSPIKE); - if (self.impulse == 4) - BuyWeapon (3, 14, TE_BLOOD); - if (self.impulse == 5) - BuyWeapon (3, 17, TE_LIGHTNINGBLOOD); - if (self.impulse == 6) - BuyWeapon (2, 21, 42); - } - else - { - if ((self.currentmenu == "menu_smallarm2")) - { - if (self.impulse == 1) - BuyWeapon (2, 3, IDLE8A); - if (self.impulse == 2) - BuyWeapon (3, 3, DRAW3); - if (self.impulse == 3) - BuyWeapon (4, IDLE2A, DRAW4); - if (self.impulse == 4) - BuyWeapon (5, 35, RN_HOLO); - } - else - { - if ((self.currentmenu == "menu_drug1")) - { - if ((self.regen > MULTICAST_ALL)) - { - return; - } - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.ammo_shells < AS_MELEE)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - self.drug = SPAWNFLAG_SUPERSPIKE; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - AS_MELEE); - centerprint (self, "stimpacks purchased."); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - if ((self.ammo_shells < MULTICAST_PVS_R)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - self.drug = SPAWNFLAG_LASER; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - MULTICAST_PVS_R); - centerprint (self, "medkit purchased."); - } - if ((self.impulse == AS_MELEE)) - { - if ((self.ammo_shells < TE_BLOOD)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - if ((self.frags < TE_LAVASPLASH)) - { - centerprint (self, "not yet ready."); - self.currentmenu = "none"; - return; - } - self.drug = AS_MELEE; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - TE_BLOOD); - centerprint (self, "superstims purchased."); - } - } - else - { - - if (self.currentmenu == "menu_items") - { - if (self.impulse == 1) - BuyBandages(); - if (self.impulse == 2) - BuyScraps(); - if (self.impulse == 3) - ChangeAmmo("fmj"); - if (self.impulse == 4) - ChangeAmmo("jhp"); - if (self.impulse == 5) - ChangeAmmo("ap"); - else - return; - } - if ((self.currentmenu == "menu_drug2")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - if ((self.ammo_shells < AS_MELEE)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - self.drug = 2; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - AS_MELEE); - centerprint (self, "stimpacks purchased."); - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - if ((self.ammo_shells < TE_WIZSPIKE)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - self.drug = SECRET_1ST_DOWN; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - TE_WIZSPIKE); - centerprint (self, "adrenaline purchased."); - } - if ((self.impulse == AS_MELEE)) - { - if ((self.ammo_shells < IDLE3A)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - self.drug = MULTICAST_PVS_R; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - IDLE3A); - centerprint (self, "psycho purchased."); - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - if ((self.ammo_shells < TE_BLOOD)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - if ((self.frags < TE_LAVASPLASH)) - { - centerprint (self, "not yet ready."); - self.currentmenu = "none"; - return; - } - self.drug = SPAWNFLAG_LASER; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - TE_BLOOD); - centerprint (self, "medkit purchased."); - } - if ((self.impulse == MULTICAST_PVS_R)) - { - if ((self.ammo_shells < IDLE9A)) - { - centerprint (self, "not enough money."); - self.currentmenu = "none"; - return; - } - if ((self.class != SPAWNFLAG_LASER)) - { - centerprint (self, "not a medic."); - self.currentmenu = "none"; - return; - } - if ((self.frags < TE_LAVASPLASH)) - { - centerprint (self, "not yet ready."); - self.currentmenu = "none"; - return; - } - self.drug = TE_LIGHTNING2; - if ((self.class == SPAWNFLAG_LASER)) - { - self.supplies = MULTICAST_PVS_R; - } - else - { - self.supplies = SPAWNFLAG_LASER; - } - self.ammo_shells = (self.ammo_shells - IDLE9A); - centerprint (self, "berserk purchased."); - } - } - else - { - if (self.currentmenu == "menu_smallarm3") - { - if (self.impulse == 1) - BuyWeapon (3, 11, EF_FLAG1); - if (self.impulse == 2) - BuyWeapon (4, 21, IDLE9A); - if (self.impulse == 3) - BuyWeapon (6, 24, IDLE5A); - if (self.impulse == 4) - BuyWeapon (5, 27, IDLE7A); - if (self.impulse == 5) - BuyWeapon (6, 36, IDLE10A); - if (self.impulse == 6) - BuyWeapon (5, 23, SVC_SELLSCREEN); - if (self.impulse == 7) - BuyWeapon (7, 41, RN_ATTRACT); - if (self.impulse == 8) - BuyWeapon (8, 51, SVC_FINALE); + if (self.currentmenu == "select_skill") + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - } - else - { - if ((self.currentmenu == "menu_energy")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyWeapon (AS_MELEE, IDLE9A, RN_FIELD); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyWeapon (TE_WIZSPIKE, SVC_SMALLKICK, 43); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyWeapon (TE_TELEPORT, RN_SHAMB, RN_CLOUD); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyWeapon (TE_LIGHTNING2, 57, RN_ATTRACT); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyWeapon (SPAWNFLAG_LASER, 72, 42); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyWeapon (TE_LIGHTNING2, 89, SVC_BIGKICK); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyWeapon (TE_WIZSPIKE, 96, DOOR_TOGGLE); - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_heavy")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyWeapon (SECRET_YES_SHOOT, 55, 47); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyWeapon (TE_TELEPORT, 75, 50); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyWeapon (SECRET_YES_SHOOT, SVC_BIGKICK, RN_SHAMB); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyWeapon (IDLE5A, 72, 49); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyWeapon (TE_BLOOD, 81, SVC_FINALE); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyWeapon (IDLE2A, 81, 55); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyWeapon (TE_LIGHTNINGBLOOD, 56, 54); - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "menu_gadget")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - BuyGadget (IDLE8A, SPAWNFLAG_SUPERSPIKE); - } - else - { - if ((self.impulse == SPAWNFLAG_LASER)) - { - BuyGadget (IDLE8A, SPAWNFLAG_LASER); - } - else - { - if ((self.impulse == AS_MELEE)) - { - BuyGadget (IDLE8A, AS_MELEE); - } - else - { - if ((self.impulse == SECRET_1ST_DOWN)) - { - BuyGadget (IDLE8A, SECRET_1ST_DOWN); - } - else - { - if ((self.impulse == MULTICAST_PVS_R)) - { - BuyGadget (IDLE8A, MULTICAST_PVS_R); - WeaponAmmo (SPAWNFLAG_SUPERSPIKE); - WeaponAmmo (SPAWNFLAG_LASER); - } - else - { - if ((self.impulse == TE_LIGHTNING2)) - { - BuyGadget (IDLE8A, TE_LIGHTNING2); - } - else - { - if ((self.impulse == TE_WIZSPIKE)) - { - BuyGadget (IDLE8A, TE_WIZSPIKE); - } - else - { - if ((self.impulse == SECRET_NO_SHOOT)) - { - BuyGadget (IDLE8A, SECRET_NO_SHOOT); - } - else - { - if ((self.impulse == TE_LIGHTNING3)) - { - BuyGadget (IDLE8A, TE_LIGHTNING3); - } - else - { - if ((self.impulse == TE_LAVASPLASH)) - { - BuyGadget (IDLE8A, TE_LAVASPLASH); - } - } - } - } - } - } - } - } - } - } - } - else - { - if ((self.currentmenu == "13")) - { - return; - } - else - { - if ((self.currentmenu == "menu_svote")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - stuffcmd (self, "votehs\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - stuffcmd (self, "voters\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == AS_MELEE)) - { - stuffcmd (self, "votemap\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - stuffcmd (self, "voteff\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - stuffcmd (self, "zombie\n"); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "menu_menu")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - Garage (); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.currentmenu = "menu_drop"; - return; - } - if ((self.impulse == AS_MELEE)) - { - Score (); - return; - } - if ((self.impulse == SECRET_1ST_DOWN)) - { - self.currentmenu = "menu_svote"; - return; - } - if ((self.impulse == MULTICAST_PVS_R)) - { - self.currentmenu = "menu_website"; - return; - } - if ((self.impulse == TE_LIGHTNING2)) - { - self.currentmenu = "menu_contact"; - return; - } - if ((self.impulse == TE_WIZSPIKE)) - { - stuffcmd (self, "clear\n"); - stuffcmd (self, "cmd topten\n"); - stuffcmd (self, "toggleconsole\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == SECRET_NO_SHOOT)) - { - stuffcmd (self, "clear\n"); - stuffcmd (self, "server\n"); - stuffcmd (self, "toggleconsole\n"); - self.currentmenu = "none"; - return; - } - if ((self.impulse == TE_LIGHTNING3)) - { - centerprint (self, "stats and equipment reset"); - BasicConfig (); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "menu_special")) - { - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - - self.currentmenu = "none"; - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - Shield (); - self.currentmenu = "none"; - return; - } - if ((self.impulse == AS_MELEE)) - { - LocalScan (); - self.currentmenu = "none"; - return; - } - } - else - { - if ((self.currentmenu == "775")) - { - return; - } - else - { - if ((self.currentmenu == "774")) - { - return; - } - else - { - if ((self.currentmenu == "motd")) - { - MOTD (); - } - else - { - if (self.currentmenu == "confirm_team") - { - if (self.impulse == 1) - { - sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - self.currentmenu = "select_skill"; - Menu_Think(); - self.impulse = 0; - return; - } - if (self.impulse == 2) - { - sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - self.currentmenu = "select_team"; - Menu_Think(); - self.impulse = 0; - self.team = 0; - return; - } - } - if (self.currentmenu == "confirm_skill") - { - if (self.impulse == 1) - { - sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - self.currentmenu = "none"; - PutClientInServer(); - self.impulse = 0; - return; - } - if (self.impulse == 2) - { - sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - self.currentmenu = "select_skill"; - Menu_Think(); - self.impulse = 0; - self.class = 0; - return; - } - } - if (self.currentmenu == "select_team") - { - sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); - if ((self.impulse == SPAWNFLAG_SUPERSPIKE)) - { - self.ghost = MULTICAST_ALL; - self.attack_finished = time + 2; - self.team = SPAWNFLAG_SUPERSPIKE; - self.attack_finished = time + 2; - bprint (PRINT_HIGH, self.netname); - bprint (PRINT_HIGH, " joins the Rangers\n"); - self.currentmenu = "confirm_team"; - Menu_Think(); - return; - } - if ((self.impulse == SPAWNFLAG_LASER)) - { - self.ghost = MULTICAST_ALL; - stuffcmd (self, "team Evil\n"); - self.team = SPAWNFLAG_LASER; - self.attack_finished = time + 2; - bprint (PRINT_HIGH, self.netname); - bprint (PRINT_HIGH, " has joined Raiders\n"); - self.currentmenu = "confirm_team"; - Menu_Think(); - return; - self.motd_count = MULTICAST_ALL; - return; - } - - if (self.impulse == 4) - { - self.team = self.oldteam; - PutClientInServer(); - self.team = self.oldteam; - return; - } - if ((self.impulse == AS_MELEE)) - { - other = find (world, classname, "player"); - while ((other != world)) - { - if ((other.team == SPAWNFLAG_SUPERSPIKE)) - { - b1 = (b1 + other.frags); - } - if ((other.team == SPAWNFLAG_LASER)) - { - r1 = (r1 + other.frags); - } - other = find (other, classname, "player"); - } - if ((r1 > b1)) - { - self.impulse = SPAWNFLAG_SUPERSPIKE; - W_PlayerMenu (); - return; - } - if ((b1 > r1)) - { - self.impulse = SPAWNFLAG_LASER; - W_PlayerMenu (); - return; - } - if ((r1 == b1)) - { - if (((random () * SECRET_NO_SHOOT) <= SECRET_1ST_DOWN)) - { - self.impulse = SPAWNFLAG_SUPERSPIKE; - } - else - { - self.impulse = SPAWNFLAG_LASER; - } - W_PlayerMenu (); - return; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + if (self.impulse == 1) + { + self.currentmenu = "none"; + self.max_health = 80; + self.class = 1; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nMedic - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; + } + if ((self.impulse == 2)) + { + self.currentmenu = "none"; + self.max_health = 70; + self.class = 2; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nAssassin - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; + } + if (self.impulse == 3) + { + self.currentmenu = "none"; + self.max_health = 100; + self.class = 3; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nSoldiier - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; + } + if (self.impulse == 4) + { + self.max_health = 80; + self.currentmenu = "none"; + self.class = 4; + self.currentmenu = "confirm_skill"; + centerprint (self, "your class will be\n\nScientist - OK?\n1 Yes \n2 No \n"); + self.ghost = 0; + return; } } - if ((self.impulse > AS_MELEE)) - { - return; - } - self.currentmenu = "none"; - return; -};*/ + + + if (self.currentmenu == "confirm_team") + { + if (self.impulse == 1) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "select_skill"; + DisplayMenu(); + self.impulse = 0; + return; + } + if (self.impulse == 2) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "select_team"; + DisplayMenu(); + self.impulse = 0; + self.team = 0; + return; + } + } + if (self.currentmenu == "confirm_skill") + { + if (self.impulse == 1) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "none"; + PutClientInServer(); + self.impulse = 0; + return; + } + if (self.impulse == 2) + { + sound (self, CHAN_WEAPON, "buttons/switch02.wav", TRUE, ATTN_NORM); + self.currentmenu = "select_skill"; + DisplayMenu(); + self.impulse = 0; + self.class = 0; + return; + } + } + +}; \ No newline at end of file diff --git a/quakec/fallout2/ogre.qc b/quakec/fallout2/ogre.qc index b4230de5..54c7f798 100644 --- a/quakec/fallout2/ogre.qc +++ b/quakec/fallout2/ogre.qc @@ -880,6 +880,7 @@ void () monster_ogre = self.health = 280; self.team = 3; self.armorvalue = 0; + self.armornoise = "misc/thud.wav"; self.th_stand = ogre_stand1; self.th_walk = ogre_walk1; self.th_run = ogre_run1; diff --git a/quakec/fallout2/player.qc b/quakec/fallout2/player.qc index 586606c6..be5d6d4b 100644 --- a/quakec/fallout2/player.qc +++ b/quakec/fallout2/player.qc @@ -18,32 +18,68 @@ void () Footstep = local float r; rand = random (); + + if (self.sneak != 0) + return; + if (self.perk == 5) - r = 0.4; - else - r = 0.8; - if ((rand < 0.25)) - sound (self, CHAN_ITEM, "player/step1.wav", r, ATTN_NORM); + r = 0.5; else { - if ((rand < 0.5)) - { + r = 1; + if (random()*4<=1) + self.show_hostile = time + 0.1; + } + + if (world.worldtype == 1 || world.worldtype == 2) + { + if ((rand < 0.25)) + sound (self, CHAN_ITEM, "player/step1.wav", r, ATTN_NORM); + else if ((rand < 0.5)) sound (self, CHAN_ITEM, "player/step2.wav", r, ATTN_NORM); - } + else if ((rand < 0.75)) + sound (self, CHAN_ITEM, "player/step3.wav", r, ATTN_NORM); else - { - if ((rand < 0.75)) - { - sound (self, CHAN_ITEM, "player/step3.wav", r, ATTN_NORM); - } - else - { - sound (self, CHAN_ITEM, "player/step4.wav", r, ATTN_NORM); - } - } + sound (self, CHAN_ITEM, "player/step4.wav", r, ATTN_NORM); + } + if (world.worldtype == 0) + { + if ((rand < 0.25)) + sound (self, CHAN_ITEM, "player/step1a.wav", r, ATTN_NORM); + else if ((rand < 0.5)) + sound (self, CHAN_ITEM, "player/step2a.wav", r, ATTN_NORM); + else if ((rand < 0.75)) + sound (self, CHAN_ITEM, "player/step3a.wav", r, ATTN_NORM); + else + sound (self, CHAN_ITEM, "player/step4a.wav", r, ATTN_NORM); } }; +float (entity guy) holding_melee = +{ + if ((guy.current_slot == WEAPON_SHOTGUN)) + { + if ((guy.slot1 <= TE_WIZSPIKE)) + { + return (TRUE); + } + if ((guy.slot1 >= WEAPON_BIG)) + { + return (FALSE); + } + } + if ((guy.current_slot == WEAPON_ROCKET)) + { + if ((guy.slot2 <= TE_WIZSPIKE)) + { + return (TRUE); + } + if ((guy.slot2 >= WEAPON_BIG)) + { + return (FALSE); + } + } +}; void () player_crouch; void () player_stand1 = [ 149, player_stand1 ] @@ -51,14 +87,14 @@ void () player_stand1 = [ 149, player_stand1 ] if (self.rtime == 0) self.weaponframe = 0; - if ((self.position == WEAPON_SHOTGUN)) + if (self.position == 1) { player_crouch (); return; } else { - if ((self.position == WEAPON_SHOTGUN)) + if (self.position == 2) { player_lay (); return; @@ -66,13 +102,13 @@ void () player_stand1 = [ 149, player_stand1 ] } if ((self.velocity_x || self.velocity_y)) { - self.walkframe = 0; + self.walkframe = MULTICAST_ALL; player_run (); return; } if ((self.walkframe >= MULTICAST_PVS_R)) { - self.walkframe = 0; + self.walkframe = MULTICAST_ALL; } self.frame = (149 + self.walkframe); self.walkframe = (self.walkframe + WEAPON_SHOTGUN); @@ -83,39 +119,41 @@ void () player_crouch = [ 45, player_run ] if (self.rtime == 0) self.weaponframe = 0; - if ((!self.velocity_x && !self.velocity_y)) + if (!self.velocity_x && !self.velocity_y) { self.frame = 45; return; } else { - if ((self.position == WEAPON_SHOTGUN)) + if (self.position == 2) { player_lay (); return; } } self.frame = (36 + self.walkframe); - if (self.walkframe >= TE_TELEPORT) - self.walkframe = 0; - self.walkframe = (self.walkframe + 1); + if ((self.walkframe >= TE_TELEPORT)) + { + self.walkframe = MULTICAST_ALL; + } + self.walkframe = (self.walkframe + WEAPON_SHOTGUN); }; -void () player_climb = [ 20, player_run ] +void () player_climb = [ 23, player_run ] { self.weaponframe = 0; - if (((!self.velocity_x && !self.velocity_y) && !self.velocity_z)) + if (self.velocity == '0 0 0') { self.frame = 25; return; } - self.frame = (SVC_TEMPENTITY + self.walkframe); - if ((self.walkframe >= TE_LIGHTNINGBLOOD)) + self.frame = (23 + self.walkframe); + if ((self.walkframe >= 10)) { self.walkframe = 0; } - self.walkframe = (self.walkframe + WEAPON_SHOTGUN); + self.walkframe = (self.walkframe + 1); }; void () player_run = [ 137, player_run ] @@ -125,7 +163,7 @@ void () player_run = [ 137, player_run ] if (self.rtime == 0) self.weaponframe = 0; - if (((((self.equipment == 7) && (self.equipment_state == WEAPON_SHOTGUN)) && (self.grab == WEAPON_SHOTGUN)) && !(self.flags & FL_ONGROUND))) + if (self.equipment == 7 && self.equipment_state == 1 && self.grab == 1 && !(self.flags & FL_ONGROUND)) { player_climb (); return; @@ -135,42 +173,44 @@ void () player_run = [ 137, player_run ] player_stand1 (); return; } - if ((self.position == WEAPON_SHOTGUN)) + if ((self.position == 1)) { player_crouch (); return; } else { - if (self.position == 1) + if ((self.position == 2)) { player_lay (); return; } } - if ((((((self.walkframe == AS_MELEE) && (self.ghost == 0)) && (self.position == 0)) && (self.velocity_z == 0)) && (self.vehicle == 0))) - { + if (self.walkframe == 1 && self.ghost == 0 && self.position == 0 && self.velocity_z == 0) Footstep (); - } - if ((((((self.walkframe == 6) && (self.ghost == 0)) && (self.position == 0)) && (self.velocity_z == 0)) && (self.vehicle == 0))) - { + + if (self.walkframe == 4 && self.ghost == 0 && self.position == 0 && self.velocity_z == 0) Footstep (); - } - if ((((((self.walkframe == TE_LIGHTNING3) && (self.ghost == 0)) && (self.position == 0)) && (self.velocity_z == 0)) && (self.vehicle == 0))) - { + + if (self.walkframe == 7 && self.ghost == 0 && self.position == 0 && self.velocity_z == 0) Footstep (); - } + self.frame = (137 + self.walkframe); - if ((self.walkframe >= TE_LIGHTNING3)) - { + if (self.walkframe >= 9) self.walkframe = 0; - } - self.walkframe = (self.walkframe + WEAPON_SHOTGUN); + + self.walkframe = (self.walkframe + 1); }; void () player_reload1 = [ 123, player_reload2 ] { - sound (self, CHAN_WEAPON, "weapons/reload.wav", WEAPON_SHOTGUN, ATTN_NORM); + if (self.current_slot == 1 && self.slot1 == 26) + sound (self, CHAN_WEAPON, "weapons/shell.wav", WEAPON_SHOTGUN, ATTN_NORM); + else if (self.current_slot == 2 && self.slot2 == 26) + sound (self, CHAN_WEAPON, "weapons/shell.wav", WEAPON_SHOTGUN, ATTN_NORM); + else + sound (self, CHAN_WEAPON, "misc/greload.wav", WEAPON_SHOTGUN, ATTN_NORM); + }; void () player_reload2 = [ 124, player_reload3 ] @@ -228,7 +268,7 @@ void () player_reload14 = [ 136, player_run ] void () player_creload1 = [ 74, player_creload2 ] { - sound (self, CHAN_WEAPON, "weapons/reload.wav", WEAPON_SHOTGUN, ATTN_NORM); + sound (self, CHAN_WEAPON, "misc/greload.wav", WEAPON_SHOTGUN, ATTN_NORM); }; void () player_creload2 = [ 75, player_creload3 ] @@ -432,6 +472,27 @@ void () player_jump9 = [ 48, player_run ] { }; +void () player_single1_left = [ 88, player_single2_left ] +{ + self.weaponframe = 4; + muzzleflash (); +}; + +void () player_single2_left = [ 89, player_run ] +{ + self.weaponframe = 5; +}; + +void () player_single1s_left = [ 183, player_single2_s ] +{ + self.weaponframe = 4; + muzzleflash (); +}; + +void () player_single2s_left = [ 184, player_run ] +{ + self.weaponframe = 5; +}; void () player_singlea = [ 88, player_run ] { @@ -516,152 +577,151 @@ void () player_pull5 = [ 157, player_pull6 ] void () player_pull6 = [ 156, player_pull7 ] { - self.weaponframe = 6; + self.weaponframe = TE_LIGHTNING2; sound (self, CHAN_WEAPON, "weapons/gpull.wav", WEAPON_SHOTGUN, ATTN_IDLE); }; void () player_pull7 = [ 155, player_pull8 ] { - self.weaponframe = 7; + self.weaponframe = TE_WIZSPIKE; }; void () player_pull8 = [ 155, player_pull9 ] { - self.weaponframe = WEAPON_BIG; - self.grenade_hold = WEAPON_SHOTGUN; + self.weaponframe = 8; + self.grenadetoggle = 1; }; void () player_pull9 = [ 155, player_pull10 ] { - self.weaponframe = TE_LIGHTNING3; + self.weaponframe = 9; }; void () player_pull10 = [ 155, player_pull11 ] { - self.weaponframe = TE_LAVASPLASH; + self.weaponframe = 10; }; void () player_pull11 = [ 155, player_run ] { - self.weaponframe = TE_TELEPORT; + self.weaponframe = 11; }; void () player_throw1 = [ 155, player_throw2 ] { - self.weaponframe = TE_BLOOD; + self.weaponframe = 12; if (((random () * WEAPON_BIG) <= WEAPON_SPIKES)) - { sound (self, CHAN_VOICE, "radio/grenade.wav", 0.7, ATTN_NORM); - } else - { sound (self, CHAN_VOICE, "radio/lookout.wav", 0.7, ATTN_NORM); - } }; void () player_throw2 = [ 156, player_throw3 ] { self.weaponframe = TE_LIGHTNINGBLOOD; - FireHandGrenade (); + //FireHandGrenade (); }; void () player_throw3 = [ 157, player_throw4 ] { - self.weaponframe = 14; + self.weaponframe = IDLE2A; }; void () player_throw4 = [ 158, player_throw5 ] { - self.weaponframe = 15; + self.weaponframe = IDLE3A; }; void () player_throw5 = [ 157, player_throw6 ] { - self.weaponframe = 16; + self.weaponframe = EF_FLAG1; }; void () player_throw6 = [ 156, player_throw7 ] { - self.weaponframe = 17; + self.weaponframe = IDLE5A; }; void () player_throw7 = [ 155, player_throw8 ] { - self.weaponframe = 18; + self.weaponframe = IDLE6A; if (self.handgrenade <= 0) stuffcmd (self, "impulse 1\n"); else stuffcmd (self, "impulse 3\n"); + }; void () player_throw8 = [ 159, player_throw9 ] { - self.weaponframe = 19; + self.weaponframe = IDLE7A; }; void () player_throw9 = [ 160, player_throw10 ] { - self.weaponframe = 20; + self.weaponframe = IDLE8A; }; void () player_throw10 = [ 161, player_throw11 ] { - self.weaponframe = 21; + self.weaponframe = IDLE9A; }; void () player_throw11 = [ 162, player_run ] { - self.weaponframe = 22; + self.weaponframe = IDLE10A; }; void () player_shotty1b = [ 183, player_shotty2b ] { - self.weaponframe = 1; + self.weaponframe = WEAPON_SHOTGUN; }; void () player_shotty2b = [ 183, player_shotty3b ] { - self.weaponframe = 2; + self.weaponframe = WEAPON_ROCKET; }; void () player_shotty3b = [ 184, player_shotty4b ] { - self.weaponframe = 3; + self.weaponframe = AS_MELEE; }; void () player_shotty4b = [ 184, player_run ] { - self.weaponframe = 4; + self.weaponframe = WEAPON_ROCKET; }; void () player_knife1 = [ 155, player_knife2 ] { - self.weaponframe = 1; + self.weaponframe = WEAPON_SHOTGUN; }; void () player_knife2 = [ 156, player_knife3 ] { - self.weaponframe = 2; + self.weaponframe = WEAPON_ROCKET; + FireMelee (); }; void () player_knife3 = [ 157, player_run ] { - self.weaponframe = 3; + self.weaponframe = AS_MELEE; }; void () player_knifea = [ 155, player_knifeb ] { - self.weaponframe = 4; + self.weaponframe = WEAPON_SPIKES; }; void () player_knifeb = [ 156, player_knifec ] { - self.weaponframe = 5; + self.weaponframe = MULTICAST_PVS_R; + FireMelee (); }; void () player_knifec = [ 157, player_run ] { - self.weaponframe = 6; + self.weaponframe = TE_LIGHTNING2; }; void () player_nail1 = [ 88, player_nail2 ] @@ -743,7 +803,7 @@ void () player_auto4 = [ 89, player_auto3 ] player_run (); return; } - self.weaponframe = 0; + self.weaponframe = MULTICAST_ALL; }; void (float num_bubbles) DeathBubbles; @@ -751,9 +811,18 @@ void () PainSound = { local float rs; - if (self.health <= 0) + if ((self.equipment == 8)) return; + if ((self.health <= 0)) + return; + + if (self.air_finished < time) + { + sound (self, CHAN_VOICE, "player/drown2.wav", 1, ATTN_NORM); + return; + } + if ((damage_attacker.classname == "teledeath")) { sound (self, CHAN_VOICE, "player/teledth1.wav", WEAPON_SHOTGUN, ATTN_NONE); @@ -768,30 +837,22 @@ void () PainSound = if ((self.watertype == CONTENT_SLIME)) { if ((random () > 0.5)) - { sound (self, CHAN_VOICE, "player/slimbrn2.wav", WEAPON_SHOTGUN, ATTN_NORM); - } else - { sound (self, CHAN_VOICE, "player/lburn2.wav", WEAPON_SHOTGUN, ATTN_NORM); - } return; } if ((self.watertype == CONTENT_LAVA)) { if ((random () > 0.5)) - { sound (self, CHAN_VOICE, "player/lburn1.wav", WEAPON_SHOTGUN, ATTN_NORM); - } else - { sound (self, CHAN_VOICE, "player/lburn2.wav", WEAPON_SHOTGUN, ATTN_NORM); - } return; } if ((self.pain_finished > time)) { - self.axhitme = 0; + self.axhitme = MULTICAST_ALL; return; } self.pain_finished = (time + 1.5); @@ -832,26 +893,27 @@ void () player_pain6 = [ 19, player_run ] void () player_pain = { + if (self.pain_finished > time) + { + sound (self, CHAN_VOICE, self.armornoise, 1, ATTN_NORM); + return; + } + + self.pain_finished = time + 0.5; + if (self.weaponframe) - { return; - } - if (((random () * WEAPON_BIG) < WEAPON_SPIKES)) - { + + if (random () * WEAPON_BIG < WEAPON_SPIKES) sound (self, CHAN_VOICE, "player/paina.wav", WEAPON_SHOTGUN, ATTN_NORM); - } else - { sound (self, CHAN_VOICE, "player/painb.wav", WEAPON_SHOTGUN, ATTN_NORM); - } - if (((random () * WEAPON_BIG) < 6)) - { + if (random () * WEAPON_BIG < TE_LIGHTNING2) sound (self, CHAN_BODY, "player/hit1.wav", WEAPON_SHOTGUN, ATTN_NORM); - } - if ((self.invisible_finished > time)) - { + if (self.invisible_finished > time) return; - } + + self.maxspeed = (self.maxspeed * 0.6); player_pain1 (); }; void () player_dieb1; @@ -874,12 +936,12 @@ void () DeathBubblesSpawn = bubble.nextthink = (time + 0.5); bubble.think = bubble_bob; bubble.classname = "bubble"; - bubble.frame = 0; - bubble.cnt = 0; + bubble.frame = MULTICAST_ALL; + bubble.cnt = MULTICAST_ALL; setsize (bubble, '-8 -8 -8', '8 8 8'); self.nextthink = (time + 0.1); self.think = DeathBubblesSpawn; - self.air_finished = (self.air_finished + WEAPON_SHOTGUN); + self.air_finished = (self.air_finished + 1); if ((self.air_finished >= self.bubble_count)) { remove (self); @@ -896,7 +958,7 @@ void (float num_bubbles) DeathBubbles = bubble_spawner.solid = SOLID_NOT; bubble_spawner.nextthink = (time + 0.1); bubble_spawner.think = DeathBubblesSpawn; - bubble_spawner.air_finished = 0; + bubble_spawner.air_finished = MULTICAST_ALL; bubble_spawner.owner = self; bubble_spawner.bubble_count = num_bubbles; return; @@ -907,6 +969,10 @@ void () DeathSound = local float rs; local float r; + if ((self.equipment == 8)) + { + return; + } if ((self.waterlevel == AS_MELEE)) { sound (self, CHAN_VOICE, "player/drown2.wav", WEAPON_SHOTGUN, ATTN_NONE); @@ -914,59 +980,14 @@ void () DeathSound = } r = random (); self.noise = "player/agdie4.wav"; - if ((self.deathsound == "")) - { - if ((r < 0.3)) - { - self.noise = "player/agdie1.wav"; - } - else - { - if ((r < 0.6)) - { - self.noise = "player/agdie3.wav"; - } - else - { - self.noise = "player/agdie4.wav"; - } - } - } - if ((self.deathsound == "")) - { - if ((r < 0.5)) - { - self.noise = "player/teledth1.wav"; - } - else - { - self.noise = "player/agdie4.wav"; - } - } - if ((self.deathsound =="")) - { - if ((r < 0.3)) - { - self.noise = "player/udeath.wav"; - } - else - { - if ((r < 0.6)) - { - self.noise = "player/agdie3.wav"; - } - else - { - self.noise = "player/gib1.wav"; - } - } - } sound (self, CHAN_VOICE, self.noise, 0.9, ATTN_NORM); return; }; void () PlayerDead = { + setmodel(self, "progs/dead.mdl"); + setsize(self, '-16 -16 -24', '16 16 0'); self.nextthink = CONTENT_EMPTY; self.deadflag = DEAD_DEAD; }; @@ -1068,8 +1089,8 @@ void () SmokeBob2 = { remove (self); } - rnd1 = (self.velocity_x + (-10 + (random () * 20))); - rnd2 = (self.velocity_y + (-10 + (random () * 20))); + rnd1 = (self.velocity_x + (-10 + (random () * IDLE8A))); + rnd2 = (self.velocity_y + (-10 + (random () * IDLE8A))); rnd3 = ((self.velocity_z + TE_LAVASPLASH) + (random () * TE_LAVASPLASH)); if ((rnd1 > MULTICAST_PVS_R)) { @@ -1089,11 +1110,11 @@ void () SmokeBob2 = } if ((rnd3 < TE_LAVASPLASH)) { - rnd3 = 15; + rnd3 = IDLE3A; } if ((rnd3 > SVC_INTERMISSION)) { - rnd3 = 25; + rnd3 = DRAW3; } self.velocity_x = rnd1; self.velocity_y = rnd2; @@ -1105,15 +1126,11 @@ void () SmokeBob2 = void (string gibname, float dm) ThrowPlayerHead = { setmodel (self, gibname); - self.frame = 0; - if ((self.team == WEAPON_ROCKET)) - { + self.frame = MULTICAST_ALL; + if (self.team == 1) self.skin = 0; - } - if ((self.team == WEAPON_SHOTGUN)) - { - self.skin = WEAPON_SHOTGUN; - } + if (self.team == 2) + self.skin = 1; self.nextthink = (time + WEAPON_SHOTGUN); self.think = SUB_Null; self.movetype = MOVETYPE_BOUNCE; @@ -1121,7 +1138,7 @@ void (string gibname, float dm) ThrowPlayerHead = self.view_ofs = '0 0 8'; setsize (self, '-8 -8 -8', '8 8 8'); self.velocity = VelocityForDamage (dm); - self.origin_z = (self.origin_z + 24); + self.origin_z = (self.origin_z + DRAW2); self.flags = (self.flags - (self.flags & FL_ONGROUND)); self.avelocity = (crandom () * '0 600 0'); }; @@ -1146,79 +1163,27 @@ void () PlayerDie = local float i; local float r; - self.solid = 0; - + //self.solid = SOLID_NOT; + self.dead = self.dead + 1; if ((self.deathtype == "fall")) { sound (self, CHAN_VOICE, "player/agdie4.wav", WEAPON_SHOTGUN, ATTN_NONE); - self.deathsound = ""; self.deathtype = ""; } if ((self.waterlevel == AS_MELEE)) { - DeathBubbles (20); + DeathBubbles (IDLE8A); sound (self, CHAN_VOICE, "player/drown2.wav", WEAPON_SHOTGUN, ATTN_NONE); - self.deathsound = ""; } r = random (); self.noise = "player/agdie2.wav"; - if ((self.deathsound == "")) - { - if ((r < 0.3)) - { - self.noise = "player/agdie1.wav"; - } - else - { - if ((r < 0.6)) - { - self.noise = "player/agdie3.wav"; - } - else - { - self.noise = "player/agdie4.wav"; - } - } - } - if ((self.deathsound == "")) - { - if ((r < 0.5)) - { - self.noise = "player/teledth1.wav"; - } - else - { - self.noise = "player/agdie4.wav"; - } - } - if ((self.deathsound == "")) - { - if ((r < 0.3)) - { - self.noise = "player/udeath.wav"; - } - else - { - if ((r < 0.6)) - { - self.noise = "player/agdie3.wav"; - } - else - { - self.noise = "player/teledth1.wav"; - } - } - } - if ((self.deathsound == "")) - { - self.noise = "player/vaporized.wav"; - } - sound (self, CHAN_VOICE, self.noise, WEAPON_SHOTGUN, ATTN_NORM); + + sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM); self.items = (self.items - (self.items & IT_INVISIBILITY)); - self.invisible_finished = 0; - self.invincible_finished = 0; - self.super_damage_finished = 0; - self.radsuit_finished = 0; + self.invisible_finished = MULTICAST_ALL; + self.invincible_finished = MULTICAST_ALL; + self.super_damage_finished = MULTICAST_ALL; + self.radsuit_finished = MULTICAST_ALL; self.modelindex = modelindex_player; self.weaponmodel = ""; self.view_ofs = '0 0 -8'; @@ -1233,21 +1198,15 @@ void () PlayerDie = self.angles_y = 0; self.angles_z = 0; i = (WEAPON_SHOTGUN + floor ((random () * WEAPON_ROCKET))); - self.angles_z = 0; - if (((self.position == WEAPON_SHOTGUN) || (self.position == WEAPON_SHOTGUN))) - { + self.angles_z = MULTICAST_ALL; + if (self.position == 1 || self.position == 2) player_diec1 (); - } else { - if ((self.health <= -40)) - { + if (self.health <= -40) player_dieb1 (); - } else - { player_diea1 (); - } } }; diff --git a/quakec/fallout2/progs.src b/quakec/fallout2/progs.src index 39d4c560..97ef3028 100644 --- a/quakec/fallout2/progs.src +++ b/quakec/fallout2/progs.src @@ -1,4 +1,4 @@ -../qwprogs.dat +../quake/turn/qwprogs.dat defs.qc subs.qc @@ -7,6 +7,7 @@ fight.qc ai.qc combat.qc items.qc +name.qc menus.qc weapons.qc world.qc @@ -29,4 +30,4 @@ wizard.qc dog.qc ogre.qc misc.qc -modbuy.qc +mod_buy.qc diff --git a/quakec/fallout2/soldier.qc b/quakec/fallout2/soldier.qc index 8b0d9e5e..b0114474 100644 --- a/quakec/fallout2/soldier.qc +++ b/quakec/fallout2/soldier.qc @@ -1340,6 +1340,7 @@ void () monster_army = self.th_pain = enf_pain; self.th_die = enf_die; self.th_missile = enf_atk1; + self.armornoise = "misc/thud.wav"; walkmonster_start(); if (random()*4 <= 2) @@ -1375,6 +1376,7 @@ void () monster_army = self.team = 3; self.armor = 2; self.armortype = 0.2; + self.armornoise = "misc/thud.wav"; self.th_stand = army_stand1; self.th_walk = army_walk1; self.th_run = army_run1; diff --git a/quakec/fallout2/triggers.qc b/quakec/fallout2/triggers.qc index b428ca8d..31a300de 100644 --- a/quakec/fallout2/triggers.qc +++ b/quakec/fallout2/triggers.qc @@ -410,7 +410,11 @@ local vector org; spawn_tfog (org); spawn_tdeath(t.origin, other); - + if (self.classname == "player") + { + self.solid = SOLID_NOT; + self.materialize = 200; + } // move the player and lock him down for a little while if (!other.health) { diff --git a/quakec/fallout2/weapons.qc b/quakec/fallout2/weapons.qc index ee35b935..93b3cf4c 100644 --- a/quakec/fallout2/weapons.qc +++ b/quakec/fallout2/weapons.qc @@ -5,17 +5,26 @@ void () player_run; void(entity bomb, entity attacker, float rad, entity ignore, string dtype) T_RadiusDamage; void(vector org, float damage) SpawnBlood; void() SuperDamageSound; +void (float rec, float number, float dam, float var, float ran, float auto) W_FireShotgun; void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle; void (float dam, float rec, string snd, float rng, float rate) FirePistol; void (float dam, float rec, string snd, float rng, float rate) FireSMG; void () W_PlayerMenu; +void () UseChem; +void () Special; +void () BuyMenu; void() Sneak; void() Bandage; void() Shield; +void() player_knife1; +void() player_knifea; +void() ExitScreen; +void() CharacterSheet; +void() UseEquipment; +void (float weap, float snd, float drop) DropWeapon; float () weightx; void (entity guy, float slot) GetWeaponWeight; -string (entity guy, float slot) GetWeaponName; // called by worldspawn @@ -815,17 +824,36 @@ void(float temp_weapon) GetWeaponModel = self.weaponmodel = "progs/v_axe.mdl"; else if (temp_weapon == 5) self.weaponmodel = "progs/v_1911.mdl"; + else if (temp_weapon == 6) + self.weaponmodel = "progs/v_deagle.mdl"; + else if (temp_weapon == 7) + self.weaponmodel = "progs/v_1911.mdl"; + else if (temp_weapon == 8) + self.weaponmodel = "progs/v_alien.mdl"; + else if (temp_weapon == 9) + self.weaponmodel = "progs/v_pipe.mdl"; + else if (temp_weapon == 10) + self.weaponmodel = "progs/v_double.mdl"; + else if (temp_weapon == 11) + self.weaponmodel = "progs/v_shotgun.mdl"; else if (temp_weapon == 12) self.weaponmodel = "progs/v_jackhammer.mdl"; else if (temp_weapon == 13) self.weaponmodel = "progs/v_mp9.mdl"; else if (temp_weapon == 14) self.weaponmodel = "progs/v_mp7.mdl"; + else if (temp_weapon == 15) + self.weaponmodel = "progs/v_rangem.mdl"; + else if (temp_weapon == 16) + self.weaponmodel = "progs/v_ak47.mdl"; else if (temp_weapon == 17) self.weaponmodel = "progs/v_ak47.mdl"; + else if (temp_weapon == 18) + self.weaponmodel = "progs/v_srifle.mdl"; else if (temp_weapon == 19) self.weaponmodel = "progs/v_night.mdl"; - + else if (temp_weapon == 99) + self.weaponmodel = "progs/v_handgren.mdl"; }; void() W_SetCurrentAmmo = @@ -875,6 +903,8 @@ void() W_SetCurrentAmmo = GetWeaponModel(self.slot1); if (self.current_slot == 2) GetWeaponModel(self.slot2); + if (self.current_slot == 3) + GetWeaponModel(99); if (self.current_slot == 1) self.currentammo = self.mag1; @@ -914,28 +944,74 @@ void () ReloadWeapon = { local float x; - sound (self, CHAN_WEAPON, "weapons/reload.wav", TRUE, ATTN_NORM); - sprint(self, 2, "reloading...\n"); + if (self.current_slot != 1 && self.current_slot != 2) + return; + + if (self.rtime > 0) + return; if (self.current_slot == 1) { + if (self.ammo1 <= 0) + return; + if (self.maxmag1 == self.mag1) + return; + if (self.slot1 <= 4) + return; + + if (self.slot1 >= 9 && self.slot1 <= 11) + { + sound (self, CHAN_WEAPON, "weapons/shell.wav", TRUE, ATTN_NORM); + self.mag1 = self.mag1 + 1; + self.ammo1 = self.ammo1 - 1; + self.currentammo = self.mag1; + self.rtime = 50; + return; + } + sound (self, CHAN_WEAPON, "weapons/reload.wav", TRUE, ATTN_NORM); + sprint(self, 2, "reloading...\n"); + x = (self.maxmag1 - self.mag1); self.mag1 = self.mag1 + x; self.ammo1 = self.ammo1 - x; + self.currentammo = self.mag1; + self.rtime = 200; } if (self.current_slot == 2) { + if (self.ammo2 <= 0) + return; + if (self.maxmag2 == self.mag2) + return; + if (self.slot2 <= 4) + return; + + if (self.slot2 >= 9 && self.slot2 <= 11) + { + sound (self, CHAN_WEAPON, "weapons/shell.wav", TRUE, ATTN_NORM); + self.mag2 = self.mag2 + 1; + self.ammo2 = self.ammo2 - 1; + self.currentammo = self.mag2; + self.rtime = 50; + return; + } + sound (self, CHAN_WEAPON, "weapons/reload.wav", TRUE, ATTN_NORM); + sprint(self, 2, "reloading...\n"); + x = (self.maxmag2 - self.mag2); self.mag2 = self.mag2 + x; self.ammo2 = self.ammo2 - x; + self.currentammo = self.mag2; + self.rtime = 200; } }; + float() W_CheckNoAmmo = { if (self.current_slot == 1) { - if (self.slot1 == 0) + if (self.slot1 <= 4) return FALSE; if (self.mag1 < 1 && self.ammo1 < 1) @@ -954,10 +1030,10 @@ float() W_CheckNoAmmo = } if (self.current_slot == 2) { - if (self.slot2 == 0) + if (self.slot2 <= 4) return FALSE; - if (self.mag1 < 2 && self.ammo1 < 2) + if (self.mag2 < 2 && self.ammo2 < 2) { self.attack_finished = (time + 0.2); stuffcmd (self, "-attack\n"); @@ -990,35 +1066,52 @@ void() W_Attack = makevectors (self.v_angle); // calculate forward angle for velocity self.show_hostile = time + 1; // wake monsters up - if (W_CheckNoAmmo()) - return; - if (self.current_slot == 1) weap = self.slot1; if (self.current_slot == 2) weap = self.slot2; + if (W_CheckNoAmmo()) + return; - if (weap == 0) + if (self.rtime > 0) + return; + + if (weap >= 0 && weap <= 4) { - self.attack_finished = time + 0.1; - FireMelee(10, 64, 0.5); + self.attack_finished = time + 0.25; + player_knife1 (); } - if (weap == 5) - { - self.attack_finished = time + 0.1; - FirePistol(10, 2, "weapons/1911.wav", 2000, 0.1); - } - if (weap == 17) - { - self.attack_finished = time + 0.1; + else if (weap == 5) + FirePistol(10, 2, "weapons/1911.wav", 2000, 0.25); + else if (weap == 6) + FirePistol(10, 2, "weapons/deagle.wav", 2000, 0.25); + else if (weap == 7) + FirePistol(10, 2, "weapons/needler.wav", 2000, 0.25); + //if (weap == 8) + // FireAlienBlaster(); + else if (weap == 9) + FireAssaultRifle(18, 2, "weapons/rangem.wav", 3000, 0.1); + else if (weap == 10) + W_FireShotgun (1, 5, 6, 160, 3000, 0); + else if (weap == 11) + W_FireShotgun (1, 5, 6, 160, 3000, 0); + else if (weap == 12) + W_FireShotgun (1, 5, 6, 160, 3000, 1); + else if (weap == 13) + FireSMG(12, 2, "weapons/mp9.wav", 2000, 0.06); + else if (weap == 14) + FireSMG(12, 2, "weapons/mp7.wav", 2000, 0.06); + else if (weap == 15) + FireAssaultRifle(14, 2, "weapons/rangem.wav", 4000, 0.5); + else if (weap == 16) + FireAssaultRifle(14, 2, "weapons/rangem.wav", 4000, 0.1); + else if (weap == 17) FireAssaultRifle(18, 2, "weapons/ak47.wav", 6000, 0.1); - } - if (weap == 19) - { - self.attack_finished = time + 0.1; - FireAssaultRifle(18, 2, "weapons/m4a1.wav", 6000, 0.1); - } + else if (weap == 18) + FireAssaultRifle(30, 2, "weapons/dks-1.wav", 8000, 0.5); + else if (weap == 19) + FireAssaultRifle(16, 2, "weapons/m4a1.wav", 4000, 0.1); }; /* @@ -1332,6 +1425,29 @@ void() ImpulseCommands = DuckOn (); if (self.impulse == 201) ProneOn (); + + if (self.impulse == 50) + ReloadWeapon (); + if (self.impulse == 51) + UseChem (); + if (self.impulse == 52) + BuyMenu (); + if (self.impulse == 53) + Special (); + if (self.impulse == 54) + ExitScreen (); + if (self.impulse == 55) + { + if (self.current_slot == 1) + DropWeapon (self.slot1, 1, 0); + else + DropWeapon (self.slot2, 1, 0); + } + if (self.impulse == 56) + CharacterSheet (); + if (self.impulse == 57) + UseEquipment (); + self.impulse = 0; }; @@ -1707,10 +1823,7 @@ void () FlashExplode = makevectors (te.angles); vec = normalize ((self.origin - te.origin)); dot = (vec * v_forward); - if (((te.equipment == 7) && (te.equipment_state == 1))) - { - dot2 = 1; - } + if ((((dot > 0.3) && CanDamage (self, te)) && (dot2 == 0))) { stuffcmd (te, "v_cshift 255 255 255 255\n"); @@ -1927,7 +2040,7 @@ void (float dam, float rec, string snd, float rng, float rate) FirePistol = if (trace_fraction == 1) return; - org = trace_endpos - v_forward * 2; + org = trace_endpos - v_forward * 1; org2 = trace_endpos + (v_forward * ((trace_ent.size_y / 2) + (trace_ent.size_x / 2))); if (trace_ent.takedamage) { @@ -1936,6 +2049,7 @@ void (float dam, float rec, string snd, float rng, float rate) FirePistol = ydif = org2_y - trace_ent.origin_y; xdif = org2_x - trace_ent.origin_x; true = 0; + if (((ydif >= CONTENT_SKY) && (ydif <= TE_LIGHTNING2))) true = 1; if (((xdif >= CONTENT_SKY) && (xdif <= TE_LIGHTNING2))) @@ -2080,6 +2194,7 @@ void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle local string x; sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM); + self.attack_finished = (time + rate); @@ -2303,7 +2418,7 @@ void () WeaponTouch = other.ammo1 = self.slot1; other.maxmag1 = self.slot2; other.mag1 = self.class; - GetWeaponModel (); + GetWeaponModel (self.slot1); remove (self); } if ((other.current_slot == 2)) @@ -2314,7 +2429,7 @@ void () WeaponTouch = other.ammo2 = self.slot1; other.maxmag2 = self.slot2; other.mag2 = self.class; - GetWeaponModel (); + GetWeaponModel (self.slot2); remove (self); } }; @@ -2323,23 +2438,21 @@ void (float weap, float snd, float drop) DropWeapon = { local string mdel; - if (((self.attack_finished > time) && (drop == 0))) + if (self.attack_finished > time && drop == 0) return; + if (self.current_slot == 3 && self.handgrenade == 0) return; - if (((self.current_slot == WEAPON_SPIKES) && (self.c4 == 0))) - { + if (self.current_slot == 4 && self.c4 == 0) return; - } - if ((weap == 0)) - { + + if (weap == 0) return; - } - if ((snd == 1)) - { + + if (snd == 1) sound (self, CHAN_WEAPON, "weapons/lock4.wav", 1, ATTN_NORM); - } + makevectors (self.v_angle); newmis = spawn (); newmis.owner = self; @@ -2349,10 +2462,8 @@ void (float weap, float snd, float drop) DropWeapon = newmis.velocity = aim (self, 500); newmis.velocity = (newmis.velocity * 500); newmis.angles_y = (random () * 360); - mdel = "progs/w_m4a1.mdl"; - - mdel = "progs/w_1911.mdl"; + mdel = "progs/w_1911.mdl"; if (weap == 1) mdel = "progs/w_knife.mdl"; @@ -2419,7 +2530,7 @@ void (float weap, float snd, float drop) DropWeapon = newmis.think = SUB_Remove; newmis.touch = WeaponTouch; newmis.cnt = weap; - if ((self.current_slot == 1)) + if (self.current_slot == 1) { self.attack_finished = time; self.slot1_weight = 0; @@ -2430,8 +2541,9 @@ void (float weap, float snd, float drop) DropWeapon = self.mag1 = 0; self.maxmag1 = 0; GetWeaponModel (); + stuffcmd(self, "impulse 1\n"); } - if ((self.current_slot == 2)) + if (self.current_slot == 2) { self.attack_finished = time; self.slot2_weight = 0; @@ -2442,8 +2554,9 @@ void (float weap, float snd, float drop) DropWeapon = self.mag2 = 0; self.maxmag2 = 0; GetWeaponModel (); + stuffcmd(self, "impulse 2\n"); } - if ((self.current_slot == 3)) + if (self.current_slot == 3) { self.attack_finished = time; newmis.handgrenade = self.handgrenade; @@ -2453,6 +2566,32 @@ void (float weap, float snd, float drop) DropWeapon = } }; +void () GetArmorWeight = +{ + local float wt; + + if (self.armor == 0) + wt = 0; + if (self.armor == 1) + wt = 3; + if (self.armor == 2) + wt = 5; + if (self.armor == 3) + wt = 9; + if (self.armor == 4) + wt = 15; + if (self.armor == 5) + wt = 12; + if (self.armor == 6) + wt = 17; + if (self.armor == 7) + wt = 6; + if (self.armor == 8) + wt = 20; + + self.armor_weight = wt; +}; + void (entity guy, float slot) GetWeaponWeight = { local float wt; @@ -2510,83 +2649,6 @@ void (entity guy, float slot) GetWeaponWeight = self.slot2_weight = wt; }; -string (entity guy, float slot) GetWeaponName = -{ - local string name; - - if (slot == 1) - name = "knife"; - else if (slot == 2) - name = "axe"; - else if (slot == 3) - name = "ripper"; - else if (slot == 4) - name = "power axe"; - else if (slot == 5) - name = "1911"; - else if (slot == 6) - name = "desert eagle"; - else if (slot == 7) - name = "needler"; - else if (slot == 8) - name = "alien blaster"; - else if (slot == 9) - name = "pipe rifle"; - else if (slot == 10) - name = "winchester"; - else if (slot == 11) - name = "mossberg"; - else if (slot == 12) - name = "citykiller"; - else if (slot == 13) - name = "mp9"; - else if (slot == 14) - name = "grease gun"; - else if (slot == 15) - name = "rangemaster"; - else if (slot == 16) - name = "ak-112"; - else if (slot == 17) - name = "ak-74"; - else if (slot == 18) - name = "dks-1"; - else if (slot == 19) - name = "moonlight"; - else if (slot == 20) - name = "sa-80"; - else if (slot == 21) - name = "gauss rifle"; - else if (slot == 22) - name = "laser carbine"; - - return name; -}; - -string (float slot) GetArmorName = -{ - local string name; - - if (slot == 0) - name = "nothing"; - if (slot == 1) - name = "bulletproof shirt"; - else if (slot == 2) - name = "leather armor"; - else if (slot == 3) - name = "kevlar armor"; - else if (slot == 4) - name = "metal armor"; - else if (slot == 5) - name = "combat armor"; - else if (slot == 6) - name = "brotherhood armor"; - else if (slot == 7) - name = "force armor"; - else if (slot == 8) - name = "light power armor"; - - return name; -}; void (float slot) WeaponAmmo = @@ -2780,11 +2842,25 @@ void(float type) UseHealingChem = traceline (source, source + v_forward*64, FALSE, self); if (trace_fraction == 1.0) { + if (self.health >= self.max_health) + { + sprint(self, 2, "you aren't injured.\n"); + return; + } + if (self.regen >= 1) + { + sprint (self, PRINT_HIGH, "you are already healing.\n"); + return; + } if (self.health < self.max_health && self.regen == 0) { sound (self, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM); self.health = self.health + heal; self.regen = heal; + sprint (self, PRINT_HIGH, "used a "); + sprint (self, PRINT_HIGH, x); + sprint (self, PRINT_HIGH, " to heal yourself.\n"); + self.chemcount = self.chemcount - 1; return; } } @@ -2801,7 +2877,13 @@ void(float type) UseHealingChem = if (trace_ent.regen >= 1) { sprint (self, 2, trace_ent.netname); - sprint (self, PRINT_HIGH, " IS ALREADY HEALING.\n"); + sprint (self, PRINT_HIGH, " is already healing.\n"); + return; + } + if (trace_ent.health >= trace_ent.max_health) + { + sprint(self, 2, trace_ent.netname); + sprint(self, 2, " isn't injured.\n"); return; } sprint (trace_ent, 2, self.netname); @@ -2813,7 +2895,7 @@ void(float type) UseHealingChem = trace_ent.health = trace_ent.health + heal; stuffcmd (trace_ent, "v_cshift 0 0 0 0\n"); sound (self, CHAN_BODY, "items/r_item2.wav", 1, ATTN_NORM); - + self.chemcount = self.chemcount - 1; } }; @@ -2843,9 +2925,10 @@ void() UseChem = if (self.chem == 7)//mentats UseBoostingChem(3); - self.chemcount = self.chemcount - 1; if (self.chemcount == 0) self.chem = 0; + + self.rtime = 100; }; void() Bandage = @@ -2940,7 +3023,11 @@ void () DisplayMenu = menu = EquipmentString (); centerprint (self, menu); } - + if (self.currentmenu == "shop_weapons") + { + menu = WeaponString (); + centerprint (self, menu); + } if (((self.currentmenu == "select_skill") && (self.team == 1))) { centerprint (self, "CHOOSE SKILL SET\n\n1 Medic \n2 Assassin \n3 Soldier \n4 Scientist\n"); @@ -2957,8 +3044,6 @@ void () DisplayMenu = centerprint (self, "CHOOSE YOUR TEAM\n\n1 Rangers (good)\n2 Raiders (evil)\n3 Auto-Assign \n"); if (self.class > 0 && self.oldteam > 0) centerprint (self, "CHOOSE YOUR TEAM\n\n1 Rangers (good)\n2 Raiders (evil)\n3 Auto-Assign \n4 Keep Previous \n"); - - } if (self.currentmenu == "confirm_team") { @@ -2973,27 +3058,32 @@ void () DisplayMenu = { sound (self, CHAN_BODY, "player/yourturn.wav", 1, ATTN_NORM); - if (self.class == 2) + if (self.class == 1) centerprint (self, "your class will be\n\nMedic - OK?\n1 Yes \n2 No \n"); - if (self.class == 3) + if (self.class == 2) centerprint (self, "your class will be\n\nAssassin - OK?\n1 Yes \n2 No \n"); - if (self.class == 4) + if (self.class == 3) centerprint (self, "your class will be\n\nSoldiier - OK?\n1 Yes \n2 No \n"); - if (self.class == 6) + if (self.class == 4) centerprint (self, "your class will be\n\nScientist - OK?\n1 Yes \n2 No \n"); } + + if (self.currentmenu == "menu_build") + { + menu = BuildString (); + centerprint (self, menu); + } }; void () Special = { - if (self.class == 2) + if (self.class == 1) Bandage (); - if (self.class == 3) + if (self.class == 2) Sneak (); - if (self.class == 6) - Shield (); - + if (self.class == 4) + self.currentmenu = "menu_build"; }; void () hos_run1; @@ -3057,8 +3147,6 @@ void () ExitScreen = centerprint (self, "\n"); self.currentmenu = "none"; } - else if (self.class == 4) - self.currentmenu = "menu_build"; }; void () Sneak = @@ -3067,12 +3155,7 @@ void () Sneak = w = weightx(); - if (self.class != 3) - { - sprint (self, PRINT_HIGH, "no stealth-boy.\n"); - return; - } - if (self.sneak == 1) + if (self.sneak >= 1) { sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); centerprint (self, " Uncloaked \n"); @@ -3085,24 +3168,24 @@ void () Sneak = sprint (self, PRINT_HIGH, "wait for stealth-boy to recharge.\n"); return; } - if (self.sneak == 0 && w <= 10) + if (self.sneak == 0 && self.class == 2) { sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); - centerprint (self, " Cloaked \n(3% detection chance)"); + centerprint (self, " cloaked and sneaking \n(1% detection chance)"); self.sneak = 1; return; } - else if (self.sneak == 0 && w <= 20) + else if (self.sneak == 0 && self.class != 2) { sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); - centerprint (self, " Cloaked \n(10% detection chance)"); + centerprint (self, " cloaked \n(15% detection chance)"); self.sneak = 3; return; } else if (self.sneak == 0 && w > 20) { sound (self, CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM); - centerprint (self, " Too Much Gear \n"); + centerprint (self, " too much gear \n"); setmodel (self, "progs/guy.mdl"); self.sneak = 0; return; @@ -3324,10 +3407,7 @@ void () Bar_Think = return; } self.flags = self.flags; - if ((((self.owner.equipment >= WEAPON_SHOTGUN) && (self.owner.equipment <= AS_MELEE)) && (self.owner.equipment_state == WEAPON_SHOTGUN))) - { - dot1 = WEAPON_SHOTGUN; - } + if ((self.owner.position == WEAPON_SHOTGUN)) { dot1 = WEAPON_SHOTGUN; @@ -3536,3 +3616,437 @@ void (vector org, entity guy, float input, float cost) spawn_station = } self.frame = 4; }; + +void () BuyMenu = +{ + local float is_shop; + local entity te; + local entity shop; + local entity spot; + local entity oldself; + local vector spot1; + local vector spot2; + local float r; + local float cyc; + local string menu; + + if (self.currentmenu == "777") + return; + + is_shop = 0; + + if (coop == 0) + { + te = findradius (self.origin, 250); + while (te) + { + if (te.classname == "buyzone1" && self.team == 1) + is_shop = 1; + if (te.classname == "buyzone2" && self.team == 2) + is_shop = 1; + + te = te.chain; + } + } + + if (coop == 1) + { + + te = findradius (self.origin, 80); + while (te) + { + if (te.classname == "buyzone") + is_shop = 1; + if (te.classname == "merchant") + is_shop = 1; + + te = te.chain; + } + } + + if ((is_shop == 0)) + { + centerprint (self, "nothing but the afterglow, here.\n(find a trader)"); + return; + } + if ((is_shop == 1)) + { + menu = ShopString (); + centerprint (self, menu); + self.currentmenu = "shop_list"; + + if (self.current_slot != 0 && self.current_slot != 2) + self.current_slot = 1; + + return; + } +}; + + + +void () CharacterSheet = +{ + local string x; + local float qq; + local float ratio; + local float r1; + local float r2; + local float var; + + var = weightx (); + stuffcmd (self, "toggleconsole\n"); + sprint (self, PRINT_HIGH, "\n\n\n\n ** INFO ** \n"); + sprint (self, PRINT_HIGH, "Class "); + if (self.class == 1) + sprint (self, 2, "Medic"); + if (self.class == 2) + sprint (self, 2, "Assassin"); + if (self.class == 3) + sprint (self, 2, "Soldier"); + if (self.class == 4) + sprint (self, 2, "Scientist"); + + sprint (self, PRINT_HIGH, "\nTeam "); + + if (self.team == 1) + sprint (self, 2, "Rangers\n"); + if (self.team == 2) + sprint (self, 2, "Raiders\n"); + + sprint (self, PRINT_HIGH, "Score "); + r1 = (self.dead); + r2 = (self.kills); + if (r1 == 0) + r1 = 1; + + ratio = (r2 / r1); + x = ftos (ratio); + sprint (self, 2, x); + sprint (self, 2, " ("); + x = ftos (self.kills); + sprint (self, 2, x); + sprint (self, PRINT_HIGH, "/"); + x = ftos (self.dead); + sprint (self, 2, x); + sprint (self, 2, ") "); + sprint (self, PRINT_HIGH, "\nSpeed "); + x = ftos (self.maxspeed); + sprint (self, 2, x); + sprint (self, PRINT_HIGH, "/300\n"); + sprint (self, PRINT_HIGH, "Money "); + + x = ftos (self.ammo_shells); + sprint (self, 2, x); + sprint (self, PRINT_HIGH, "$\n"); + if (self.class == 2) + { + sprint (self, PRINT_HIGH, "Bandages "); + x = ftos (self.bandages); + sprint (self, 2, x); + sprint (self, PRINT_HIGH, "\n"); + } + if (self.class == 6) + { + sprint (self, PRINT_HIGH, "Scraps "); + x = ftos (self.scraps); + sprint (self, 2, x); + sprint (self, PRINT_HIGH, "\n"); + } + + sprint (self, PRINT_HIGH, "\nArmor "); + x = GetArmorName(); + sprint (self, 2, x); + sprint (self, 2, " ("); + x = ftos (self.armor_weight); + sprint (self, 2, x); + sprint (self, 2, ")\n"); + + sprint (self, PRINT_HIGH, "Protective "); + x = GetProtectName(); + sprint (self, 2, x); + sprint (self, 2, "\n"); + sprint (self, PRINT_HIGH, "Chem "); + x = GetChemName(); + sprint (self, 2, x); + x = ftos (self.chemcount); + sprint (self, 2, "["); + sprint (self, 2, x); + sprint (self, 2, "]"); + sprint (self, 2, "\n"); + sprint (self, PRINT_HIGH, "Gadget "); + + x = GetEquipmentName(); + sprint (self, 2, x); + sprint (self, 2, "\n"); + sprint (self, PRINT_HIGH, "Perk "); + x = GetPerkName(); + sprint (self, 2, x); + sprint (self, 2, "\n"); + sprint (self, PRINT_HIGH, "Trait "); + x = GetTraitName(); + sprint (self, 2, x); + sprint (self, 2, "\n"); + sprint (self, PRINT_HIGH, "Weapon 1 "); + x = GetWeaponName (self, self.slot1); + sprint (self, 2, x); + sprint (self, 2, " ("); + x = ftos (self.slot1_weight); + sprint (self, 2, x); + sprint (self, 2, ") ("); + sprint (self, 2, self.ammotype1); + sprint (self, 2, ")\n"); + + sprint (self, PRINT_HIGH, "Weapon 2 "); + x = GetWeaponName (self, self.slot2); + sprint (self, 2, x); + sprint (self, 2, " ("); + x = ftos (self.slot2_weight); + sprint (self, 2, x); + sprint (self, 2, ") ("); + sprint (self, 2, self.ammotype2); + sprint (self, 2, ")\n\n"); + qq = weightx (); + sprint (self, PRINT_HIGH, "Weight "); + x = ftos (qq); + sprint (self, 2, x); + qq = self.max_weight; + sprint (self, PRINT_HIGH, "/"); + x = ftos (qq); + sprint (self, 2, x); + sprint (self, PRINT_HIGH, "\n"); + return; +}; + +void () UseEquipment = +{ + + if (self.equipment == 0) + { + centerprint(self, " no extra equipment \n"); + return; + } + if (self.equipment == 1) + { + centerprint(self, " medic's bag \nlets you carry more stimpacks\n"); + return; + } + if (self.equipment == 4) + { + centerprint(self, " belt pouch \ngives you room for two extra grenades\n"); + return; + } + if (self.equipment == 5) + { + centerprint(self, " backpack \nlets you carry more ammunition\n"); + return; + } + if (self.equipment == 6) + { + centerprint(self, " toolkit mark ii \nbuild, defuse and open doors faster\n"); + return; + } + if (self.equipment == 7 && self.equipment_state == 0) + { + sprint (self, PRINT_HIGH, "climbing gear in place.\n"); + sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM); + self.maxspeed = 100; + self.velocity_z = 0; + self.equipment_state = 1; + } + if (self.equipment == 7 && self.equipment_state == 1) + { + sprint (self, PRINT_HIGH, "climbing gear retrieved.\n"); + sound (self, CHAN_BODY, "misc/item2.wav", 1, ATTN_NORM); + self.grab = 0; + self.equipment_state = 0; + return; + } + + if (self.equipment == 8) + { + centerprint(self, " enhanced battery \nallows longer cloaking\n"); + return; + } + if (self.equipment == 9) + { + Sneak(); + return; + } + +}; + +void (vector s_aim, float dam, float var, float ran) W_FireBuckshotSpread1 = +{ + local vector source; + local vector targ; + local vector org; + local float r; + local float srange; + local float zdif; + local vector src; + local vector pos; + local float ydif; + local float xdif; + local float true; + + makevectors (self.v_angle); + source = (self.origin + '0 0 20'); + targ = ((((((s_aim + ((v_right * random ()) * var)) - ((v_right * random ()) * var)) + ((v_up * random ()) * var)) - ((v_up * random ()) * var)) + (((v_up * random ()) * var) * 0.5)) + (v_forward * ran)); + traceline (source, targ, FALSE, self); + if ((trace_fraction == 1)) + { + return; + } + org = (trace_endpos - (v_forward * 2)); + if (trace_ent.takedamage) + { + dam = ((random () * dam) + dam); + dam = (dam * (1 - trace_fraction)); + + if (trace_ent.solid != SOLID_BSP) + SpawnBlood (org, 1); + if (trace_ent.solid == SOLID_BSP) + SpawnWood (trace_ent, org, 1); + + zdif = (org_z - trace_ent.origin_z); + ydif = (org_y - trace_ent.origin_y); + xdif = (org_x - trace_ent.origin_x); + true = 0; + if (((ydif >= CONTENT_SLIME) && (ydif <= WEAPON_SPIKES))) + { + true = 1; + } + if (((xdif >= CONTENT_SLIME) && (xdif <= WEAPON_SPIKES))) + { + true = 1; + } + if (((true == 1) && (zdif >= ((trace_ent.size_z / 2) * 0.8)))) + { + if (self.attack > 2) + dam = (dam * 0.4); + + self.critical = 3; + } + T_Damage (trace_ent, self, self, dam); + } + else + { + bullet_hole (org); + } +}; + +void (float rec, float number, float dam, float var, float ran, float auto) W_FireShotgun = +{ + local vector dir; + local vector p_aim; + local float var1; + local float var2; + local float var3; + local float var4; + local float weap; + local vector adjust; + + if (self.current_slot == 1) + weap = self.slot1; + else + weap = self.slot2; + + if (self.velocity != '0 0 0') + { + var1 = ((random () * 48) * (6 + self.recoil * 1.5)); + var2 = ((random () * 48) * (6 + self.recoil * 1.5)); + var3 = ((random () * 48) * (6 + self.recoil * 1.5)); + var4 = ((random () * 48) * (6 + self.recoil * 1.5)); + } + if (self.position == 2) + { + var1 = ((random () * 12) * (6 + self.recoil * 1.5)); + var2 = ((random () * 12) * (6 + self.recoil * 1.5)); + var3 = ((random () * 12) * (6 + self.recoil * 1.5)); + var4 = ((random () * 12) * (6 + self.recoil * 1.5)); + } + if (self.position == 1) + { + var1 = ((random () * IDLE3A) * (6 + self.recoil * 1.5)); + var2 = ((random () * IDLE3A) * (6 + self.recoil * 1.5)); + var3 = ((random () * IDLE3A) * (6 + self.recoil * 1.5)); + var4 = ((random () * IDLE3A) * (6 + self.recoil * 1.5)); + } + if (self.position == 0) + { + var1 = ((random () * IDLE10A) * (6 + (self.recoil * 3))); + var2 = ((random () * IDLE10A) * (6 + (self.recoil * 3))); + var3 = ((random () * IDLE10A) * (6 + (self.recoil * 3))); + var4 = ((random () * IDLE10A) * (6 + (self.recoil * 3))); + } + + if (self.position == 0) + player_single1 (); + if (self.position == 2) + player_single1 (); + if (self.position == 1) + player_single1_s (); + + stuffcmd (self, "+lookup\n"); + stuffcmd (self, "wait\n"); + stuffcmd (self, "-lookup\n"); + + sound (self, CHAN_WEAPON, "weapons/shotgun1.wav", 1.5, ATTN_NORM); + + + if (self.position == 0) + p_aim = (((((self.origin + '0 0 20' + adjust) + (v_right * var1)) - (v_right * var2)) + (v_up * var3)) - (v_up * var4)); + else if (self.position == 1) + p_aim = (((((self.origin + '0 0 4' + adjust) + (v_right * var1)) - (v_right * var2)) + (v_up * var3)) - (v_up * var4)); + else if (self.position == 2) + p_aim = (((((self.origin + '0 0 -12' + adjust) + (v_right * var1)) - (v_right * var2)) + (v_up * var3)) - (v_up * var4)); + + msg_entity = self; + WriteByte (MSG_ONE, SVC_BIGKICK); + DropAmmo (); + self.attack = (self.attack + 1); + self.recoil = (self.recoil + 8); + Crosshair(); + + if ((self.recoil >= 30)) + { + self.recoil = 30; + } + if ((auto == 0)) + { + self.attack_finished = (time + 0.5); + } + if ((auto == 1)) + { + self.attack_finished = (time + 0.2); + } + if ((weap == DRAW4)) + { + self.attack_finished = (time + 0.75); + } + if ((weap == IDLE2A)) + { + self.attack_finished = (time + 0.4); + } + dir = aim (self, 10000); + var = SVC_INTERMISSION; + if ((number == MULTICAST_PVS_R)) + { + W_FireBuckshotSpread1 (p_aim, dam, var, ran); + W_FireBuckshotSpread1 ((p_aim + (v_right * 80)), dam, var, ran); + W_FireBuckshotSpread1 ((p_aim - (v_right * 80)), dam, var, ran); + W_FireBuckshotSpread1 ((p_aim + (v_up * 80)), dam, var, ran); + W_FireBuckshotSpread1 ((p_aim - (v_up * 80)), dam, var, ran); + } + else + { + if ((number == AS_MELEE)) + { + var = 80; + W_FireBuckshotSpread1 (p_aim, dam, var, ran); + W_FireBuckshotSpread1 (p_aim, dam, var, ran); + W_FireBuckshotSpread1 (p_aim, dam, var, ran); + } + } +}; + diff --git a/quakec/fallout2/wizard.qc b/quakec/fallout2/wizard.qc index 6f443bbf..62415b38 100644 --- a/quakec/fallout2/wizard.qc +++ b/quakec/fallout2/wizard.qc @@ -398,6 +398,7 @@ void() monster_wizard = self.th_missile = Wiz_Missile; self.th_pain = Wiz_Pain; self.th_die = wiz_die; - + self.armornoise = "misc/thud.wav"; + flymonster_start (); }; diff --git a/quakec/fallout2/world.qc b/quakec/fallout2/world.qc index 262d18b7..f74b20e9 100644 --- a/quakec/fallout2/world.qc +++ b/quakec/fallout2/world.qc @@ -387,17 +387,113 @@ void() worldspawn = precache_model ("progs/v_fist.mdl"); precache_model ("progs/v_knife.mdl"); precache_model ("progs/v_1911.mdl"); - precache_model ("progs/v_mp5.mdl"); precache_model ("progs/v_ak47.mdl"); + precache_model ("progs/v_mp7.mdl"); + precache_model ("progs/v_rangem.mdl"); + precache_model ("progs/v_pipe.mdl"); + precache_model ("progs/v_shotgun.mdl"); + precache_model ("progs/v_double.mdl"); + precache_model ("progs/v_mp9.mdl"); + precache_model ("progs/v_sa80.mdl"); + precache_model ("progs/v_deagle.mdl"); + precache_model ("progs/v_alien.mdl"); + precache_model ("progs/v_srifle.mdl"); precache_model ("progs/v_night.mdl"); precache_model ("progs/sneak.mdl"); precache_model ("progs/dead.mdl"); + precache_model ("progs/hbar.spr"); + precache_model ("progs/w_knife.mdl"); + precache_model ("progs/w_pipe.mdl"); + precache_model ("progs/w_shotgun.mdl"); + precache_model ("progs/w_axe.mdl"); + precache_model ("progs/w_1911.mdl"); + precache_model ("progs/w_deagle.mdl"); + precache_model ("progs/w_alien.mdl"); + precache_model ("progs/w_mp7.mdl"); + precache_model ("progs/w_mp9.mdl"); + precache_model ("progs/w_jackhammer.mdl"); + precache_model ("progs/w_rangem.mdl"); + precache_model ("progs/w_sa80.mdl"); + precache_model ("progs/w_ak47.mdl"); + precache_model ("progs/w_night.mdl"); + precache_model ("progs/w_srifle.mdl"); + precache_model ("progs/w_gauss.mdl"); + precache_model ("progs/w_carbine.mdl"); + precache_model ("progs/w_laser.mdl"); + + + precache_sound ("player/step1.wav"); + precache_sound ("player/step2.wav"); + precache_sound ("player/step3.wav"); + precache_sound ("player/step4.wav"); + precache_sound ("player/step1a.wav"); + precache_sound ("player/step2a.wav"); + precache_sound ("player/step3a.wav"); + precache_sound ("player/step4a.wav"); + precache_sound ("dog/dattack1.wav"); + precache_sound ("dog/ddeath.wav"); + precache_sound ("dog/dpain1.wav"); + precache_sound ("dog/dsight.wav"); + precache_sound ("dog/idle.wav"); precache_sound ("weapons/1911.wav"); + precache_sound ("weapons/auto.wav"); + precache_sound ("weapons/auto2.wav"); + precache_sound ("weapons/ak112.wav"); precache_sound ("weapons/ak47.wav"); - precache_sound ("weapons/reload.wav"); + precache_sound ("weapons/amr.wav"); + precache_sound ("weapons/blaster.wav"); + precache_sound ("weapons/blaster2.wav"); + precache_sound ("weapons/blowoff.wav"); + precache_sound ("weapons/bounce.wav"); + precache_sound ("weapons/burst.wav"); + precache_sound ("weapons/caws.wav"); precache_sound ("weapons/click.wav"); - + precache_sound ("weapons/deagle.wav"); + precache_sound ("weapons/dks-1.wav"); + precache_sound ("weapons/energy1.wav"); + precache_sound ("weapons/energy2.wav"); + precache_sound ("weapons/energy3.wav"); + precache_sound ("weapons/energy4.wav"); + precache_sound ("weapons/flamer.wav"); + precache_sound ("weapons/fnfal.wav"); + precache_sound ("weapons/g11.wav"); + precache_sound ("weapons/gauss.wav"); + precache_sound ("weapons/gl-1.wav"); + precache_sound ("weapons/gpull.wav"); + precache_sound ("weapons/helmet.wav"); + precache_sound ("weapons/jackhammer.wav"); + precache_sound ("weapons/laser.wav"); + precache_sound ("weapons/m249.wav"); + precache_sound ("weapons/m4-nw.wav"); + precache_sound ("weapons/needler.wav"); + precache_sound ("weapons/shotgun1.wav"); + precache_sound ("weapons/shotgun2.wav"); + precache_sound ("weapons/mp5.wav"); + precache_sound ("weapons/mp7.wav"); + precache_sound ("weapons/rangem.wav"); + precache_sound ("weapons/ric1.wav"); + precache_sound ("weapons/ric2.wav"); + precache_sound ("weapons/ric3.wav"); + precache_sound ("weapons/ric4.wav"); + precache_sound ("weapons/ric5.wav"); + precache_sound ("weapons/tink1.wav"); + precache_sound ("weapons/sa80-1.wav"); + precache_sound ("weapons/shell.wav"); + precache_sound ("misc/build1.wav"); + precache_sound ("misc/build2.wav"); + precache_sound ("misc/build3.wav"); + precache_sound ("player/agdie1.wav"); + precache_sound ("player/agdie2.wav"); + precache_sound ("player/agdie3.wav"); + precache_sound ("player/agdie4.wav"); + precache_sound ("player/agdie5.wav"); + precache_sound ("player/berserk.wav"); + precache_sound ("player/breathe.wav"); + precache_sound ("player/headshot.wav"); + precache_sound ("player/hit1.wav"); + precache_sound ("player/paina.wav"); + precache_sound ("player/painb.wav"); precache_model ("progs/bolt.mdl"); // for lightning gun precache_model ("progs/bolt2.mdl"); // for lightning gun precache_model ("progs/bolt3.mdl"); // for boss shock