|
|
[Package Index | Mudlib Index | Effect Index]
File /obj/longshot.cWritten 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
Inherits
This class inherits the following classes /std/secure/longshot.cIncludes
This class includes the following files /include/dirs.hMethod index
- add_ammo(mixed)
This function is used to add to the list of valid ammo
- add_room(mixed, string, int)
Function to add a room to the rooms array
- calc_damage(object)
This function calculates the dammage done.
- cause_harm(object, object)
This is the really cool function for doing damage
- find_angle(int *, int *)
This function finds the angle between the first two points of the two
given points.
- get_long()
this function will tell the holder about the room they are
looking at
- handle_firing_messages(int, mixed *, object)
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
- pk_allowed()
This function checks things like both people are PK, the target isn't sanc'ed, etc.
- query_active_room()
This finds the room currently being sighted into
- query_ammo()
This function returns the list of valid ammo types
- query_angles()
This function returns the four angles for sighting
- query_attack_skill()
This function returns the skill used for attacking
- query_booleans()
This function returns the boolean storage variable
- query_capacity()
This function returns tha ammount of ammo holdable by the item
- query_cmdstring()
This function returns an array of strings representing
the commands used to operate the item
- query_cocked()
This function returns wether the item is cocked or not
- query_defence_skill()
This function returns the defence skill for the item
- query_fire_delay()
This function returns the delay between typing the command
to fire the weapon, and it actually going off.
- query_fire_string()
This function pairs up the in and out doors for each room along the fire path
- query_how_hard()
This function is to see how hard it is to hit something
at the present range.
- query_in_door()
Thius function determines what door the projectile will enter the target
room from
- query_origin()
This function returns the recorded origin of the holder
- query_out_door()
This function determines the door the projectile will leave through
- query_range()
This function returns how far in feet the object can be sighted
- query_reload_message()
This function returns the reload messages
- query_return_path()
This function returns an array of strings.
- query_right_ammo(object)
This is to determine if a particular object is considered to be valid ammo
- query_rooms()
This function returns a pointer to the array of rooms stored
for use.
- query_sight_message()
This function returns the sight messages
- query_size_of_room(mixed)
This finds the 3 dimensions of the given room
- query_target_dests()
This returns all the rooms linked to from the target room
- query_target_exits()
This function returns all exits from the current target room
- query_target_mess()
Special message function.
- query_target_message()
This function returns the target messages
- query_targeted()
This function returns the object currently being targeted by the item
- query_valid_room(string)
This decides if the sightee can see into the given room
- range(mixed *)
This function returns the range to the given room
- rework_last_rooms()
This function reworks the last few rooms.
- rework_rooms_array()
This function makes sure the rooms array is okay, and you are not shooting
through 90 degree angles in open areas
- set_ammo(mixed)
This function sets the list of valid ammo types
- set_attack_skill(string)
This function is to set the skill that will be used to see if the
firer hit or not.
- set_capacity(int)
This function sets the ammount of ammo that fits in the magazine
- set_cocked(int)
This function sets the cocked value of the item
- set_defense_skill(string)
This function is to set the skill that will be used to see if the
target was hit or not.
- set_fire_command(string, int)
This is the command used to set the fire command and syntax.
- set_fire_delay(int)
This function sets the delay between typing the command to
fire the weapon and it actually going off.
- set_howhard(int, int)
This function sets how hard it is to hit the target.
- set_player(object)
Sets the player associated with the object.
- set_range(int)
This sets the range of the item
- set_range_mess(string *)
This function sets the messages used when the item is ranged
- set_reload_command(string)
This is slightly misleading.
- set_reload_mess(string *)
This function sets the messages used when the item is reloaded.
- set_sight_command(string)
This is the function to set the command used to sight the item through
the various rooms.
- set_sight_mess(string *)
- set_target_command(string)
- set_target_mess(string *)
This sets the targeting messages
- set_targeted(object)
This function sets who the item is currently targeted on
- store_booleans(int)
This function stores the boolean values you give it.
- string_manip(string)
This does the string manipulations not supported by standard messaging
- target_died(object)
This lets the holder know the target has died
- target_moved(object, mixed)
This function is called when the target moves.
- track_target(object, mixed)
This function handles tracking of the target as they
move
- valid_target()
* This fuction decides if the tagret is a valid one.
Public Functions
These are functions that everyone can access.
.
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
|