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.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#1
Post
by rock5 » Tue Jul 19, 2011 11:44 am
Seeing as Jduartedj hasn't been online for awhile, I thought I'd start my own thread for my fixed version of his "
teleport" userfunction. This version has even more improvements and features than previous versions I've uploaded in other threads.
teleport
- Description:
- This function allows you to teleport your character over short distances. The maximum distance you can teleport is 120 but this function will try to make shorter hops if the coordinates you give it are too far. If there are obstacles in the way it may fail to teleport.
Syntax:
- teleport(x, z, y, absolute)
or
teleport(x, z, absolute)
for backward compatibility.
Arguments:
- If absolute is "false" then the x, z, y values are how much it will move by. eg. if x = 20 then it will move 20 to the east.
If absolute is "true" or nil then the x, z, y values are the absolute coordinates it will move to. eg. if x = 4400 then it will move to 4400 on the x axis.
x, z and y are optional but at least one must be specified. If one is omitted then it will not move on that axis.
Examples:
Code: Select all
teleport(4400) -- move to 4400 on the 'x' axis.
teleport(nil,3300) -- move to 3300 on the 'z' axis.
teleport(4400,3300) -- move to 4400, 3300 on the x, z axis.
teleport(50, -50, false) -- move 50 east and 50 south.
teleport(nil, nil, 100, false) -- move 100 straight up.
User settings:
- The maximum distance, I've found, that the character can teleport in one go is 120, but this function will try to make shorter hops if the coordinates given are too far. The function uses a maximum step size of 115, to add a little bit of a buffer. Between multiple hops, it will pause for 500 milliseconds for the new location to register. Both these values can be changed by the user with the following functions.
- teleport_SetStepSize(val)
teleport_SetStepPause(val)
-- NEW FUNCTION ADDED--
teleportToWP
- Description:
- This function will teleport directly to a waypoint. It accepts either the waypoint index number or the waypoints 'tag' if it has one. If the argument is ommitted it teleports to the next waypoint. Also, you don't need to run "__WPL:setWaypointIndex" as the function does it for you.
Syntax:
Arguments:
- If index is a number, it will teleport to that waypoint index number.
If index is a string it will teleport to the waypoint with that "tag" name.
If index is ommitted then it will teleport to the next waypoint.
Examples:
Code: Select all
teleportToWP() -- Will teleport to next waypoint
teleportToWP(3) -- Will teleport to waypoint 3
teleportToWP("repair") -- Will teleport to the waypoint with tag="repair"
Note: Please make sure you delete 'addon_teleport.lua' if it exits.
-
Attachments
-
- userfunction_teleport.lua
- Version 2.1
- Added teleportToWP(index) - (3.25 KiB) Downloaded 3063 times
- 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.”
-
MiesterMan
- Posts: 543
- Joined: Tue Jul 06, 2010 9:15 pm
- Location: Between the Second and Third Circles of Hell
#2
Post
by MiesterMan » Tue Jul 19, 2011 4:21 pm
Oooo, is this kind of like a speed hack?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#3
Post
by rock5 » Tue Jul 19, 2011 9:56 pm
It's a hack, yes. It's based on jduartedj's teleport userfunction that my optimized Miller's Ranch egg script has been using all this time. The main improvement are; it now accepts 3 coordinates, coordinates are optional and it seems to quite successfully do smaller hops if the distance is too far without being pulled back.
Why, have you just become aware of it?
- 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.”
-
MiesterMan
- Posts: 543
- Joined: Tue Jul 06, 2010 9:15 pm
- Location: Between the Second and Third Circles of Hell
#4
Post
by MiesterMan » Tue Jul 19, 2011 10:31 pm
I knew about the teleport UF but it never really worked for me. The optimized script was faster but I could never see the teleporting.
Also, I haven't farmed eggs in ages.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#5
Post
by rock5 » Tue Jul 19, 2011 11:25 pm
MiesterMan wrote:I knew about the teleport UF but it never really worked for me. The optimized script was faster but I could never see the teleporting.
Also, I haven't farmed eggs in ages.
On my egg script page there was a link to my fixed version of the
teleport function. The original
teleport function didn't work anymore I think. That reminds me, I should update that link to point here.
- 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.”
-
Guest1234
- Posts: 65
- Joined: Wed Aug 31, 2011 10:19 am
#6
Post
by Guest1234 » Wed Sep 07, 2011 4:57 am
This seems broken with the update...
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#7
Post
by rock5 » Wed Sep 07, 2011 6:54 am
Guest1234 wrote:This seems broken with the update...
Yes, updates can do that. Please read this.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=2912
- 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.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#8
Post
by lisa » Wed Sep 07, 2011 6:57 am
Mine works fine though *shrug*
-
Guest1234
- Posts: 65
- Joined: Wed Aug 31, 2011 10:19 am
#9
Post
by Guest1234 » Wed Sep 07, 2011 10:06 am
I did that before getting the updated swimhack.
I will try again tomorrow.
Thanks.
-
poioip
- Posts: 18
- Joined: Tue Jul 12, 2011 8:14 pm
#10
Post
by poioip » Sun Sep 18, 2011 9:43 am
it gives me an error
1:1pm - ...acro/micromacro/scripts/rom/classes/waypointlist.lua:22: XML Prase Er
ror.
File: ...acro/micromacro/scripts/rom/waypoints/XXXXXXXteleport.xml
Line: 3
Column: 23
Pos: 63
Message:not well-formed <invalid token>
the code is
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!-- # 1 -->teleport(31959,3270,22, true)
<!-- # 2 -->teleport(32030,3264,23, true)player:harvest();
<!-- # 3 -->teleport(32098,3290,27, true)player:harvest();
<!-- # 4 -->teleport(31986,3233,31, true)player:harvest();
<!-- # 5 -->teleport(32060,3222,39, true)
-
poioip
- Posts: 18
- Joined: Tue Jul 12, 2011 8:14 pm
#11
Post
by poioip » Sun Sep 18, 2011 6:30 pm
hey Rock5
can you please explain more about the syntax for this teleporter script
and please give an solid example
like where to put it in what section of the code
thx in advance
Last edited by
poioip on Sun Sep 18, 2011 8:12 pm, edited 3 times in total.
-
Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
#12
Post
by Administrator » Sun Sep 18, 2011 7:04 pm
poioip wrote:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!-- # 1 -->teleport(31959,3270,22, true)
<!-- # 2 -->teleport(32030,3264,23, true)player:harvest();
<!-- # 3 -->teleport(32098,3290,27, true)player:harvest();
<!-- # 4 -->teleport(31986,3233,31, true)player:harvest();
<!-- # 5 -->teleport(32060,3222,39, true)
You should probably have put that
inside the waypoint tags, as per the instructions.
-
poioip
- Posts: 18
- Joined: Tue Jul 12, 2011 8:14 pm
#14
Post
by poioip » Sun Sep 18, 2011 8:19 pm
hey Rock5!!!
in yout egg script you had
Code: Select all
<!-- # 6 --><waypoint x="3937" z="2978">
player:target_Object(112956,nil,true,false,feedEvalFunc)
portTo(3940,3055) </waypoint>
is the actual syntax as follows:
Code: Select all
<waypoint x="" z="" y=""> portTo("","") </waypoint>
but at the introduction you explained it like as follows
Rock5 said:
Syntax:
teleport(x, z, y, absolute)
or
teleport(x, z, absolute)
for backward compatibility.
which one works?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#15
Post
by rock5 » Mon Sep 19, 2011 12:37 am
poioip, first you need to learn the correct structure of waypoint files. I suggest reading this
http://www.solarstrike.net/wiki/index.p ... oinf_files
Secondly, you shouldn't use teleporting in the open where anyone can see you. You are asking for trouble then. It should only really be used in private places like instances.
portTo is a local function for the millers egg script. It does a couple of checks before using the "
teleport" function. So the correct format is
teleport(x, z, y, absolute)
or
teleport(x, z, absolute)
for backward compatibility.
- 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.”
-
poioip
- Posts: 18
- Joined: Tue Jul 12, 2011 8:14 pm
#16
Post
by poioip » Mon Sep 19, 2011 7:17 am
Code: Select all
<waypoint x="" z="" y=""> portTo("","") </waypoint>
so this is the actual code huh?
ty
or how do i use it with a waypoint and to harvest?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#17
Post
by rock5 » Mon Sep 19, 2011 9:52 am
No, I said you have to use "
teleport". "portTo" only works in the MRC_Optimised.xml script.
Maybe something like
Code: Select all
<waypoint x="1111" z="1111" y="11"> player:harvest() teleport("2222","2222") </waypoint>
<waypoint x="2222" z="2222" y="22"> player:harvest() teleport("3333","3333") </waypoint>
<waypoint x="3333" z="3333" y="33"> player:harvest() teleport("4444","4444") </waypoint>
etc.
What this does is;
- 1. Move to waypoint 1111,1111.
2. Do code at waypoint 1111,1111 (Harvests then teleports to coordinates 2222,2222).
3. Move to waypoint 2222,2222 (But I'm already there!).
4. Do code at waypoint 2222,2222 (Harvests then teleports to coordinates 3333,3333).
etc.
I hope you get the picture.
Actually, I could probably simplify this. Add this to the "onLoad" section at the top of the waypoint file.
Code: Select all
<onLoad>
function portToNextWP()
local nextWP = __WPL.Waypoints[__WPL.CurrentWaypoint]
teleport( nextWP.X, nextWP.Z, nextWP.Y)
end
</onLoad>
Then you could do
Code: Select all
<waypoint x="1111" z="1111" y="11"> player:harvest() portToNextWP() </waypoint>
<waypoint x="2222" z="2222" y="22"> player:harvest() portToNextWP()</waypoint>
<waypoint x="3333" z="3333" y="33"> player:harvest() portToNextWP()</waypoint>
etc.
- 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.”
-
poioip
- Posts: 18
- Joined: Tue Jul 12, 2011 8:14 pm
#18
Post
by poioip » Mon Sep 19, 2011 10:30 am
Thank you it works
YAY AT LAST
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#19
Post
by rock5 » Tue Sep 20, 2011 8:44 am
i'm going to add this to the file. It will work something like this.
Syntax:
Examples:
Code: Select all
teleportToWP(2) -- will teleport to waypoint index 2
teleportToWP("NPC") -- will teleport to the waypoint with the tag set to "NPC"
Not implemented -teleportToWP(wp) -- will teleport to 'wp' table where 'wp' has a X, Z and Y value. Can be used to teleport to pawns or objects too.
teleportToWP() -- if the arg is ommitted it will teleport to the next waypoint.
I'll have to test it tomorrow as the server is down.
- 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.”
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#20
Post
by rock5 » Wed Sep 21, 2011 7:54 am
Ok, added the new function to version 2.1. Read about it on the first post.
- 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.”
Who is online
Users browsing this forum: No registered users and 5 guests