teleport follow userfunction
Posted: Thu Apr 12, 2012 10:07 pm
This userfunction is for following something using teleport.
It is designed to "follow" something when the function is called, by follow I mean teleport to it, so if you want it to repeatedly be that distance from the "something" then you need to do a loop.
"_dist" You must specify a distance value.
"address" If no address speficied then it will use your current target.
--=== Usage examples ===--
1. Follow party member 1 until player icon is set to 2
2. some event thingy
3. teleport behind mob before using skill (melee), in Profile.
--=== Notes ===--
You need Rock5's teleport userfunction
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2721
Examples are untested but will probably work.
Has no arguments to alter Y value, it will be same height as what you are "following"
Please test it and play around and post any issues you find, I don't even log on to RoM anymore, so I don't do any testing myself.
Code: Select all
function telefollow(_dist,address)
"_dist" You must specify a distance value.
"address" If no address speficied then it will use your current target.
--=== Usage examples ===--
1. Follow party member 1 until player icon is set to 2
Code: Select all
repeat
telefollow(50, GetPartyMemberAddress(1))
yrest(500)
until player:GetPartyIcon() == 2
Code: Select all
while (true) do
player:target(player:findNearestNameOrId(105476))
telefollow(50) -- follows target
yrest(500)
end
Code: Select all
<onPreSkillCast>
target = player:getTarget();
if target.Type == PT_MONSTER then
telefollow(50,target.Address)
end
</onPreSkillCast>
--=== Notes ===--
You need Rock5's teleport userfunction
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2721
Examples are untested but will probably work.
Has no arguments to alter Y value, it will be same height as what you are "following"
Please test it and play around and post any issues you find, I don't even log on to RoM anymore, so I don't do any testing myself.