teleport follow userfunction

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

teleport follow userfunction

#1 Post by lisa » Thu Apr 12, 2012 10:07 pm

This userfunction is for following something using teleport.

Code: Select all

function telefollow(_dist,address)
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

Code: Select all

repeat
telefollow(50, GetPartyMemberAddress(1))
yrest(500)
until player:GetPartyIcon() == 2
2. some event thingy

Code: Select all

while (true) do
player:target(player:findNearestNameOrId(105476))
telefollow(50) -- follows target
yrest(500)
end
3. teleport behind mob before using skill (melee), in Profile.

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.
Attachments
userfunction_telefollow.lua
V 1.0
(862 Bytes) Downloaded 286 times
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
ThulsaDoom
Posts: 125
Joined: Mon Oct 19, 2015 2:46 pm

Re: teleport follow userfunction

#2 Post by ThulsaDoom » Thu Mar 21, 2024 7:16 am

Hi;
I have realized that the function

Code: Select all

function telefollow(_dist,address)
Does not work. When you call it it doesn't teleport you, it just doesn't do anything.

What could it be due to, any change in memory addresses?

Thanks

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: teleport follow userfunction

#3 Post by Administrator » Thu Mar 21, 2024 3:19 pm

I just tested this out myself. As far as I can tell, it works just fine.

To test, I first got the address of monster. Then, I just plugged it into the function like so:

Code: Select all

	local followtgt = 0x4B747800;
	telefollow(10, followtgt);
When ran, my character continually teleported a few steps forward until reaching the position of the monster.


What may have happened, though, is that you used the copy of
userfunction_teleport.lua
from here. This is an older version, and probably won't work. If you did download that file and replace it, please revert back.
For your convenience, you can just copy and paste it from here: https://raw.githubusercontent.com/Solar ... leport.lua

User avatar
ThulsaDoom
Posts: 125
Joined: Mon Oct 19, 2015 2:46 pm

Re: teleport follow userfunction

#4 Post by ThulsaDoom » Sat Mar 23, 2024 12:15 pm

That was the problem, not updated.

Thank you so much

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 13 guests