I added a new plugin to the original post. It is CalcDestFromHeading and basically lets you calculate a destination X and Y based on a heading and distance. It is really nice for projectiles and also handy if you want to surround something with a circle of spawns or whatever.
Here is the description, but for the actual code, see the first post in this thread:
#Usage: my @DestArray = plugin::CalcDestFromHeading(Heading, Distance, [Mob, MaxZDiff]);
# This plugin calculates the destination X and Y loc based on heading and distance
# Heading is the heading you want to calculate destination X Y Z from
# Distance is the distance you want for the destination X and Y from the source
# Mob is an optional field to allow any mob to be set, but $npc is default
# MaxZDiff is the max height difference from the source mob's Z you want to calculate the destination from.
#
# The output array can be used as follows:
# my $DestX = $DestArray[0];
# my $DestY = $DestArray[1];
# my $DestZ = $DestArray[2];
|