About teleporting

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

About teleporting

#1 Post by kenzu38 » Thu Jan 31, 2013 11:05 am

Hey lisa, I am currently making a waypoint that will keybind all the hacks that I am using frequently.

One of them is teleport. I want the bot to teleport either forward, back, left or right (depending on the direction the char is facing) everytime I press a key.

You posted about your telefollow function in another thread, care to explain how I can use it to do what I want? It seems the function requires a target to follow. How about when there's no target? I just need the bot to teleport to a direction I like.

Please do explain how I can do that with your telefollow userfunction.

Thanks. :)

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: About teleporting

#2 Post by lisa » Thu Jan 31, 2013 9:49 pm

Code: Select all

	local function calccoords(dist,angle)
		if dist == nil or angle == nil then
			print("\nrequirements missing.\n")
			return
		end
		local degrees, theta, sn, cs, X, Z
		degrees = angle * 60
		theta=(degrees*math.pi)/180;
		sn=math.sin(theta);
		cs=math.cos(theta);
		X= (dist*cs)
		Z= (dist*sn)
		return X,Z
	end

Code: Select all

X,Z = calccoords(_dist,target.Direction)
that is from that userfunction, you just need to change target.Direction to player.Direction.
The next line

Code: Select all

teleport((target.X - X), (target.Z-Z), target.Y)
again change target. to player.
the way that is set up it will be directly behind X-X, Z-Z
if you want to go forward then obviously X+X,Z+Z

Hopefully you can work out the rest for yourself ;)
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

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: About teleporting

#3 Post by kenzu38 » Thu Jan 31, 2013 11:15 pm

I see. Ok, thanks a lot for that explanation! :D
lisa wrote:Hopefully you can work out the rest for yourself ;)
I sure hope so haha.

Anyway, can't wait to test this. Will just post here if I encounter any problem.

Again, thanks a lot lisa!

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: About teleporting

#4 Post by kenzu38 » Fri Feb 01, 2013 11:19 am

Hoho, it works! I'm having fun teleporting around atm haha.

Thanks for the code AND the explanation, lisa! :D

Post Reply

Who is online

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