From 9f868f27ff2c07a758bfdd97afbd4b0e6923f676 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Thu, 22 Jul 2004 13:07:43 +0000 Subject: [PATCH] Forgot to remove this. --- dlls/ns/ns/include/ns.inc | 183 ++++++++++++++++++++++++++++++++ dlls/ns/ns/include/ns_const.inc | 132 +++++++++++++++++++++++ 2 files changed, 315 insertions(+) create mode 100755 dlls/ns/ns/include/ns.inc create mode 100755 dlls/ns/ns/include/ns_const.inc diff --git a/dlls/ns/ns/include/ns.inc b/dlls/ns/ns/include/ns.inc new file mode 100755 index 00000000..962c7212 --- /dev/null +++ b/dlls/ns/ns/include/ns.inc @@ -0,0 +1,183 @@ +/* NS.INC + * - + * Provides natives specific to Natural-Selection. + */ + +#if defined NS_INC + #endinput +#endif +#define NS_INC + +/* This is the only option to configure. + Set this to 2 if you're using an NS 2.01 server, and recompile your scripts. + Leave it at 3 if you're using an NS 3.0 beta server. + */ +#if !defined NS_VERSION + #define NS_VERSION 3 +#endif + + + +#include + + +/* Called whenever the client's class is changed. The classes given match get_class() output */ +forward client_changeclass(id,newclass,oldclass); + +/* Called whenever the client build's a structure. If type is 1, it's a marine structure, if type is 2, it's alien. */ +forward client_built(idPlayer,idStructure,type,impulse); + +/* Returns if the map's combat or not. */ +native ns_is_combat(); + +/* Sends a popup to a player. Set target to 0 to send to everybody. Message length is 188 characters. The last parameter, if set to 1, will only display when the player has cl_autohelp set to 1. */ +native ns_popup(target,szMsg[188],ah=0) + +/* Sets a player model. Omit the second parameter to return to default. + Note: This does *not* change back on death, team switch, gestations, etc. */ +native ns_set_player_model(id,szModel[]=""); + +/* Sets a player's skin. Omit second parameter to return to default. + Note: This does *not* change back on death, team switch, gestations, etc. */ +native ns_set_player_skin(id,skin=-1); + +/* Sets a player's body. Omit second parameter to return to default. + Note: This does *not* change back on death, team switch, gestations, etc. */ +native ns_set_player_body(id,body=-1); + +/* Sets a player's speedchange. Omit the second parameter to return to default */ +native ns_set_speedchange(id,speedchange=0); + +/* Returns a player's current speedchange. */ +native ns_get_speedchange(id); + +/* Returns a player's max speed before the speed change is factored in. */ +native ns_get_maxspeed(id); + +/* Returns whether or not this mask is set from the entity's iuser4 field. Use the "mask" enum for reference. */ +native ns_get_mask(id,mask); + +/* Sets or removes the mask from the entity's iuser4 field. Set "value" to 1 to turn the mask on, 0 to turn it off. */ +native ns_set_mask(id,mask,value); + +/* Returns built/unbuilt structures. + If: + builtOnly is 1 (default): + Only fully built structures are counted. + builtOnly is 0: + Any structure meeting the classname is counted. + + Number is 0 (default): + The total number of matching structures is returned. + Number is any other value: + The index of the #th matching structure is returned. +*/ +native ns_get_build(classname[],builtOnly=1,Number=0,NSVersion=NS_VERSION); + +/* Returns if the player has the weapon or not in their pev->weapons field. + set "setweapon" to 0 to turn the bit off, set to 1 to turn it on. Or omit it to just return the value. */ +native ns_has_weapon(id,NSWeapon:weapon,setweapon=-1); + +/* Gets spawn point for specified team (type). + If: + Team is equal to 0: + Ready room spawns are returned. + Team is greater than 0: + Spawns for the team are returned. + + Number is equal to 0: + Total number of spawns is returned. + Number is greater than 0: + The location of the specified spawn is returned. +*/ +native ns_get_spawn(team,number=0,Float:ret[3]); + +/* Configures display of the custom menus. This display is _very_ similar to set_hudmessage() */ +native ns_set_menu(id,r=NSMENU_R,g=NSMENU_G,b=NSMENU_B,Float:x=NSMENU_X,Float:y=NSMENU_Y, effects=0, Float:fadeintime=0.0, Float:fadeouttime=0.0,channel1=NSMENU_CHAN1,channel2=NSMENU_CHAN2); + +/* Displays a custom menu. It will execute command(id,keys) when the menu is pressed. */ +native ns_show_menu(id,szCommand[],szText[],keys,time); + +/* Returns the class of the player. Look in the classes enum in ns_const.inc for the value's meaning. */ +native ns_get_class(id); + +/* Returns a player's percentage of JP fuel */ +native Float:ns_get_jpfuel(id); + +/* Sets a player's percentage of JP fuel */ +native ns_set_jpfuel(id,Float:fuel); + +/* Returns a player's percentage of adrenaline (alien) */ +native Float:ns_get_energy(id); + +/* Sets a player's percentage of adrenaline */ +native ns_set_energy(id,Float:energy); + +/* Returns a player's resources. (alien only) */ +native Float:ns_get_res(id); + +/* Sets a player's resources. (alien only) */ +native ns_set_res(id,Float:res); + +/* Returns a player's experience (combat only) */ +native Float:ns_get_exp(id); + +/* Sets a player's experience (combat only) */ +native ns_set_exp(id,Float:exp); + +/* Gets a player's point spent value in combat */ +native ns_get_points(id); + +/* Sets a player's point spent value in combat */ +native ns_set_points(id,points); + +/* Gets a weapon's damage (use the weapon index, not the player) */ +native Float:ns_get_weap_dmg(idWeapon); + +/* Sets a weapon's damage (use the weapon index, not the player) */ +native ns_set_weap_dmg(idWeapon,Float:damage); + +/* Gets a weapon's range (use the weapon index, not the player) */ +native Float:ns_get_weap_range(idWeapon); + +/* Sets a weapon's range (use the weapon index, not the player) */ +native ns_set_weap_range(idWeapon,Float:range); + +/* Gets a weapon's clip ammo (use the weapon index, not the player) */ +native ns_get_weap_clip(idWeapon); + +/* Sets a weapon's clip ammo (use the weapon index, not the player) */ +native ns_set_weap_clip(idWeapon,clipsize); + +/* Gets the player's weapon reserve for the specified type of weapon. + Look in ns_const.inc for the weapon enum. */ +native ns_get_weap_reserve(id,weapon); + +/* Sets the player's weapon reserve for the specified type of weapon. + Look in ns_const.inc for the weapon enum. */ +native ns_set_weap_reserve(id,weapon,ammo); + +/* Gets a player's score. Note: score from level is automatically factored into the scoreboard display in combat. */ +native ns_get_score(idPlayer); + +/* Sets a player's score. Note: score from level is automatically factored into the scoreboard display in combat. */ +native ns_set_score(idPlayer,score); + +/* Gets a player's death count. */ +native ns_get_deaths(idPlayer); + +/* Sets a player's death count. */ +native ns_set_deaths(idPlayer,numdeaths); + +/* Gets a player's icon value (from the scoreboard) is a bitmask. Use enum "icons" for values. Returns -1 for unauthed */ +native ns_get_icon(idPlayer); + +/* Sets a player's icon value. */ +native ns_set_icon(idPlayer,iconvalue); + +/* Gets the trait type tied to the hive. Look at the hivetrait enum for the values. */ +native ns_get_hive_trait(idHive); + +/* Sets the trait type tied to the hive. Look at the hivetrait enum for the values. */ +native ns_set_hive_trait(idHive,trait); + diff --git a/dlls/ns/ns/include/ns_const.inc b/dlls/ns/ns/include/ns_const.inc new file mode 100755 index 00000000..ae4b6da7 --- /dev/null +++ b/dlls/ns/ns/include/ns_const.inc @@ -0,0 +1,132 @@ +#if defined NS_CONST_INC + #endinput +#endif +#define NS_CONST_INC + +// These values are customizable (for the custom menus) +// If your menu uses the default menu scheme, then it will use this. +#define NSMENU_X 0.2 +#define NSMENU_Y 0.1 +#define NSMENU_R 255 +#define NSMENU_G 200 +#define NSMENU_B 100 + +#define NSMENU_CHAN1 2 +#define NSMENU_CHAN2 3 + +enum masks +{ + MASK_NONE = 0, + MASK_SIGHTED = 1, + MASK_DETECTED = 2, + MASK_BUILDABLE = 4, + MASK_BASEBUILD0 = 8, // Base build slot #0 + MASK_WEAPONS1 = 8, // Marine weapons 1 + MASK_CARAPACE = 8, // Alien carapace + MASK_WEAPONS2 = 16, // Marines weapons 2 + MASK_REGENERATION = 16, // Alien regeneration + MASK_BASEBUILD1 = 16, // Base build slot #1 + MASK_WEAPONS3 = 32, // Marine weapons 3 + MASK_REDEMPTION = 32, // Alien redemption + MASK_BASEBUILD2 = 32, // Base build slot #2 + MASK_ARMOR1 = 64, // Marine armor 1 + MASK_CELERITY = 64, // Alien celerity + MASK_BASEBUILD3 = 64, // Base build slot #3 + MASK_ARMOR2 = 128, // Marine armor 2 + MASK_ADRENALINE = 128, // Alien adrenaline + MASK_BASEBUILD4 = 128, // Base build slot #4 + MASK_ARMOR3 = 256, // Marine armor 3 + MASK_SILENCE = 256, // Alien silence + MASK_BASEBUILD5 = 256, // Base build slot #5 + MASK_JETPACK = 512, // Marine jetpacks + MASK_CLOAKING = 512, // Alien cloaking + MASK_BASEBUILD6 = 512, // Base build slot #6 + MASK_FOCUS = 1024, // Alien focus + MASK_MOTION = 1024, // Marine motion tracking + MASK_BASEBUILD7 = 1024, // Base build slot #7 + MASK_SCENTOFFEAR = 2048, // Alien scent of fear + MASK_DEFENSE2 = 4096, // Defense level 2 + MASK_DEFENSE3 = 8192, // Defense level 3 + MASK_ELECTRICITY = 8192, // Electricy + MASK_MOVEMENT2 = 16384, // Movement level 2, + MASK_MOVEMENT3 = 32768, // Movement level 3 + MASK_HEAVYARMOR = 32768, // Marine heavy armor + MASK_SENSORY2 = 65536, // Sensory level 2 + MASK_SENSORY3 = 131072, // Sensory level 3 + MASK_ALIEN_MOVEMENT = 262144, // Onos is charging + MASK_WALLSTICKING = 524288, // Flag for wall-sticking + MASK_PRIMALSCREAM = 1048576, // Alien is in range of active primal scream + MASK_UMBRA = 2097152, // In umbra + MASK_DIGESTING = 4194304, // When set on a visible player, player is digesting. When set on invisible player, player is being digested + MASK_RECYCLING = 8388608, // Building is recycling + MASK_TOPDOWN = 16777216, // Commander view + MASK_PLAYER_STUNNED = 33554432, // Player has been stunned by stomp + MASK_ENSNARED = 67108864, // Webbed + MASK_ALIEN_EMBRYO = 268435456, // Gestating + MASK_SELECTABLE = 536870912, // ??? + MASK_PARASITED = 1073741824, // Parasite flag + MASK_SENSORY_NEARBY = 2147483648 // Sensory chamber in range + +} + + +enum classes +{ + CLASS_UNKNOWN = 0, + CLASS_SKULK, + CLASS_GORGE, + CLASS_LERK, + CLASS_FADE, + CLASS_ONOS, + CLASS_MARINE, + CLASS_JETPACK, + CLASS_HEAVY, + CLASS_COMMANDER, + CLASS_GESTATE, + CLASS_DEAD, + CLASS_NOTEAM +} + +enum weapons +{ + WEAPON_NONE = 0, + WEAPON_CLAWS, + WEAPON_SPIT, + WEAPON_SPORES, + WEAPON_SPIKE, + WEAPON_BITE, + WEAPON_BITE2, + WEAPON_SWIPE, + WEAPON_WEBSPINNER, + WEAPON_METABOLIZE, + WEAPON_PARASITE, + WEAPON_BLINK, + WEAPON_DIVINEWIND, + WEAPON_KNIFE, + WEAPON_PISTOL, + WEAPON_LMG, + WEAPON_SHOTGUN, + WEAPON_HMG, + WEAPON_WELDER, + WEAPON_MINE, + WEAPON_GRENADE_GUN, + WEAPON_LEAP, + WEAPON_CHARGE, + WEAPON_UMBRA, + WEAPON_PRIMALSCREAM, + WEAPON_BILEBOMB, + WEAPON_ACIDROCKET, + WEAPON_HEALINGSPRAY, + WEAPON_GRENADE, + WEAPON_STOMP, + WEAPON_DEVOUR, + WEAPON_MAX +} + +enum hivetraits +{ + HIVETRAIT_NONE = 0, + HIVETRAIT_DC = 92, + HIVETRAIT_SC = 93, + HIVETRAIT_MC = 94 +} \ No newline at end of file