Tele script

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Tele script

#1 Post by mailstorm » Thu Apr 26, 2012 7:24 pm

Hi there im sorry if i open this post in wrong place
I was wondering how to mkae script using userfunction from Rock
i want move my haracter to position a1 and from a1 to a2
and finish script i have coordinates but i have no idea how to set it working :(
please help

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#2 Post by rock5 » Fri Apr 27, 2012 12:29 am

At waypoint a1 use

Code: Select all

teleport(x,z,y)
Where x,z,y is the coordinates of a2.

If there is a waypoint at a1 and the next waypoint in the file is a2 you can also use.

Code: Select all

teleportToWP()
with no arguments to teleport to the next waypoint.

This is assuming the 2 points are close to each other and have a direct line of site.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Re: Tele script

#3 Post by mailstorm » Fri Apr 27, 2012 2:26 am

im realy newbie at this :D

i was just look in to otehr scripts how it is look co i make somethink like this

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
<teleportToWP()>
(5329,2123,121)

<function teleport(dX,dZ,dY, absolute)>
(5501,2000,121)
<end>

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#4 Post by rock5 » Fri Apr 27, 2012 3:45 am

If you want to teleport to those 2 places in the onload section of the waypoint it would look something like this.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
    teleport(5329,2123,121)
    teleport(5501,2000,121)
</onLoad>
</waypoints>
But of course it does nothing at those coordinates. When you start the file it teleports to the first point then the second then ends the script. Or maybe because there are no waypoints it will try to travel to 0,0. I'm not sure.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Re: Tele script

#5 Post by mailstorm » Fri Apr 27, 2012 4:31 am

How big distance can be from 1st tp to second one i mean i dont want to get wrap
lets say im woring on this for SC
Here is safe place 8 I---Here is electric shock--I 8 and here is safety place

And i want to make just step ahed and dont get electrick shock

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#6 Post by rock5 » Fri Apr 27, 2012 4:50 am

You can usually jump about 120 in 1 jump although the teleport userfunction is set to only allow 115 in one jump. Any further and it breaks it up into smaller jumps.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Re: Tele script

#7 Post by mailstorm » Fri Apr 27, 2012 6:55 am

Rock it working but i have no idea how after that bot start my other script if i add
<end> at the end it wont start
is any command to pause script ?
or make it finish after this tp ?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#8 Post by rock5 » Fri Apr 27, 2012 7:33 am

Try

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
    teleport(5329,2123,121)
    teleport(5501,2000,121)
    loadPaths("otherscript")
</onLoad>
</waypoints>
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

mailstorm
Posts: 39
Joined: Fri Feb 03, 2012 8:00 am

Re: Tele script

#9 Post by mailstorm » Fri Apr 27, 2012 8:03 am

Working Good Thank YOU 8-)

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Tele script

#10 Post by gloover » Tue May 08, 2012 7:40 am

Hey rock,

I have a more complicated question: how can I realize the teleportation forward/backward using rbassist?

Teleporting to coordinates is easy, but to get it working forward may need another variable to know the current "looking direction" at the current position.

Is it possible?

thx in advance!

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#11 Post by rock5 » Tue May 08, 2012 8:19 am

I'd say it's possible but too much work. You would have to use player.Direction and distance to calculate some coordinates. And if you want it to teleport when pressing the forward key then you would have to intercept the key presses. You wouldn't be able to use a mouse. A big problem would be you wouldn't know what Y value to use. If you use a value the same height as the player and you are facing a slope then it will try to teleport into the slope which will fail. I suspect even if there is just a bump in the ground in front of you it will fail to teleport past it because it can't teleport through the bump. In the end it wouldn't work very well.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Tele script

#12 Post by vo2male » Wed Oct 31, 2012 10:30 pm

Hi Rock! i'm sorry if i revived this old thread.. i wanted to learn on how to use this teleport function and make waypoints using teleport.. i already have the teleport userfunction and i have been using the cot_tele, and waypoints for the AT (million thanks to you ^_^)

I dont know if there is any thread here that teaches on how to use this function.

I want to use this on my waypoint for my dailies in rorazan..
heres the code:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">

   <!-- #  1 --><waypoint x="-21559" z="-22931" y="588">
   player:target_NPC("Diandon");  (<--- im using daily notes)
   yrest(1000);
   player:target_NPC("Diandon");
   yrest(1000);
   </waypoint>
   <!-- #  2 --><waypoint x="-21636" z="-22916" y="592">   </waypoint>
   <!-- #  3 --><waypoint x="-21742" z="-23032" y="588">
    queststate = getQuestStatus("Extinguish More Flames");
    while queststate == "incomplete" do
      yrest(1000);player:target_Object("Strange Flame Seedling");yrest(1000);
      queststate = getQuestStatus("Extinguish More Flames");
      end
             
end 
</waypoint>
is it possible to use teleport function on this?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#13 Post by rock5 » Wed Oct 31, 2012 10:44 pm

teleport is usually used for specific needs or just to go faster but usually in instances. It's not a good idea to teleport outside where others can see you. But if you still want to do it the easiest way is to use the 'teleportToWP()' function that teleports to the next waypoint. Just put it at the end of each waypoint.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Tele script

#14 Post by vo2male » Wed Oct 31, 2012 10:47 pm

actually i just wanted to test it.

how to incorporate this and where to put this

Code: Select all

'teleportToWP()

im sorry i was at work so i cannot test this right now.. i just want to get some idea.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#15 Post by rock5 » Wed Oct 31, 2012 11:10 pm

Just put it at the end of each waypoint where you want it to teleport to the next waypoint. So just before "</waypoint>". If the waypoint is too far it will teleport there in shorter hops. If you teleport too far too fast it will pull you back so for traveling, I don't think it would help much. teleport is mainly useful when you can teleport somewhere nearby, do something there that takes a bit of time like collecting something, then teleport to another nearby point and do something else, etc. That's why it's ideal for minigames.

If you just want to see it in action then start up the commandline waypoint file and enter teleport function directly. I suggest you use the 4th option to make it relative. Example, to add 10 to the Z axis use

Code: Select all

teleport(nil,10,nil,false)
You can use any combination of X, Z, Y values.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Tele script

#16 Post by vo2male » Wed Oct 31, 2012 11:15 pm

Thanks rock! i'll try this later as soon as i get home ^_^..

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Tele script

#17 Post by vo2male » Thu Nov 01, 2012 12:02 pm

tested it and works fine.im just encountering some rubber band effects..

how about if i will teleport downward or underground?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#18 Post by rock5 » Thu Nov 01, 2012 12:30 pm

You normally can't teleport through things. You might even have problems if there is a hill between you and your teleport destinations as it will try to teleport through the hill. You will just have to experiment with what will work. You can try smaller steps and bigger pauses at each waypoint if you like. There are 2 functions for changing them.

Code: Select all

teleport_SetStepSize(val) -- Default is 115
teleport_SetStepPause(val) -- Default is 500ms
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Tele script

#19 Post by vo2male » Thu Nov 01, 2012 12:46 pm

rock5 wrote:You normally can't teleport through things. You might even have problems if there is a hill between you and your teleport destinations as it will try to teleport through the hill. You will just have to experiment with what will work. You can try smaller steps and bigger pauses at each waypoint if you like. There are 2 functions for changing them.

Code: Select all

teleport_SetStepSize(val) -- Default is 115
teleport_SetStepPause(val) -- Default is 500ms
oh i thought its like AT... but is it possible? id like to give it a shot since there was no hill there..

and where do i put this

Code: Select all

teleport_SetStepSize(val) -- Default is 115
teleport_SetStepPause(val) -- Default is 500ms
after each

Code: Select all

teleportToWP()
?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Tele script

#20 Post by rock5 » Thu Nov 01, 2012 1:32 pm

You could put them anywhere but once a setting gets changed it stays changed. So the most likely best place to put them is in the onload of the waypoint file where you intend to use the teleport related function.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 151 guests