[Package Index | Mudlib Index | Effect Index]
Written by Gerbil This is the longshot line-of-sight ranging thingamy. You can use it to make throwing knives, bows, fireballs or whatever. However, if you want to make a dammaging weapon, the ammo should include base_projectile. p All standard messages are supported, with the inclusion of: p $gffg which will be substituted for the query_short of the item p $qtm which will be substituted for the query_target_message p
.
void add_ammo(mixed am)This function is used to add to the list of valid ammo
varargs int add_room(mixed name, string direct, int cf)Function to add a room to the rooms array
int calc_damage(object bullet)This function calculates the dammage done.
void cause_harm(object target, object bullet)This is the really cool function for doing damage
float find_angle(int * point, int * ori)This function finds the angle between the first two points of the two given points. Sounds weird when you say it like that, huh?
void get_long()this function will tell the holder about the room they are looking at
void handle_firing_messages(int missed, mixed * doors, object bullet)Due to the size of an array of each message for each case to be displayed when firing occurs, it's easier just to mask this function with your own messages in place
int pk_allowed()This function checks things like both people are PK, the target isn't sanc'ed, etc.
string query_active_room()This finds the room currently being sighted into
string * query_ammo()This function returns the list of valid ammo types
float * query_angles()This function returns the four angles for sighting
string query_attack_skill()This function returns the skill used for attacking
int query_booleans()This function returns the boolean storage variable
int query_capacity()This function returns tha ammount of ammo holdable by the item
string * query_cmdstring()This function returns an array of strings representing the commands used to operate the item
int query_cocked()This function returns wether the item is cocked or not
string query_defence_skill()This function returns the defence skill for the item
int query_fire_delay()This function returns the delay between typing the command to fire the weapon, and it actually going off.
string * query_fire_string()This function pairs up the in and out doors for each room along the fire path
int query_how_hard()This function is to see how hard it is to hit something at the present range.
string query_in_door()Thius function determines what door the projectile will enter the target room from
int * query_origin()This function returns the recorded origin of the holder
string query_out_door()This function determines the door the projectile will leave through
int query_range()This function returns how far in feet the object can be sighted
string * query_reload_message()This function returns the reload messages
string * query_return_path()This function returns an array of strings. These strings are the exits to be taken to return to the firer
int query_right_ammo(object ob)This is to determine if a particular object is considered to be valid ammo
mixed * query_rooms()This function returns a pointer to the array of rooms stored for use. Remember, if you query this variable, and then modify it, YOU ALSO MODIFY THE VALUES STORED IN THE ITEM. Also, this will point to a dynamic array, so be careful about storing it for later
string * query_sight_message()This function returns the sight messages
int * query_size_of_room(mixed room)This finds the 3 dimensions of the given room
string * query_target_dests()This returns all the rooms linked to from the target room
string * query_target_exits()This function returns all exits from the current target room
string query_target_mess()Special message function. Returns "at
string * query_target_message()This function returns the target messages
object query_targeted()This function returns the object currently being targeted by the item
int query_valid_room(string name)This decides if the sightee can see into the given room
int range(mixed * target)This function returns the range to the given room
int rework_last_rooms()This function reworks the last few rooms. Meant as a slowrework rooms array, which is probably redundant now...
int rework_rooms_array()This function makes sure the rooms array is okay, and you are not shooting through 90 degree angles in open areas
void set_ammo(mixed am)This function sets the list of valid ammo types
void set_attack_skill(string str)This function is to set the skill that will be used to see if the firer hit or not. It defaults to fighting.combat.range.fired.
void set_capacity(int numb)This function sets the ammount of ammo that fits in the magazine
void set_cocked(int i)This function sets the cocked value of the item
void set_defense_skill(string str)This function is to set the skill that will be used to see if the target was hit or not. It defaults to fighting.combat.melee.dodge.fired.
varargs void set_fire_command(string str, int i)This is the command used to set the fire command and syntax.
void set_fire_delay(int i)This function sets the delay between typing the command to fire the weapon and it actually going off. It defaults to 5 seconds.
void set_howhard(int arg1, int arg2)This function sets how hard it is to hit the target.
void set_player(object thing)Sets the player associated with the object. This is used during the autoload sequence.
void set_range(int i)This sets the range of the item
void set_range_mess(string * str)This function sets the messages used when the item is ranged
void set_reload_command(string str)This is slightly misleading. You can load using "put". Reload is like cocking the weapon, or yanking the bolt, or winding the springs.
void set_reload_mess(string * str)This function sets the messages used when the item is reloaded.
void set_sight_command(string str)This is the function to set the command used to sight the item through the various rooms.
void set_sight_mess(string * str)
void set_target_command(string str)
void set_target_mess(string * str)This sets the targeting messages
void set_targeted(object ob)This function sets who the item is currently targeted on
void store_booleans(int i)This function stores the boolean values you give it. USE WITH EXTREME CAUTION!
string string_manip(string str)This does the string manipulations not supported by standard messaging
void target_died(object pl)This lets the holder know the target has died
void target_moved(object ob, mixed dest)This function is called when the target moves. It puts in a delay and then calls track_target
void track_target(object ob, mixed dest)This function handles tracking of the target as they move
int valid_target()* This fuction decides if the tagret is a valid one. It * should be masked for things like anti-non-living things * @returns 1 if vaid target, 0 otherwise