Rock5's travelTo 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.
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's travelTo userfunction

#41 Post by rock5 » Sat Jan 11, 2014 10:52 pm

Are you using Bill D Cats version? Version 3.1?

Actually I should update the first post with that version.
  • 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

User avatar
L33t_Of_Lag
Posts: 38
Joined: Thu Jan 02, 2014 7:34 am

Re: Rock5's travelTo userfunction

#42 Post by L33t_Of_Lag » Mon Jan 13, 2014 12:18 am

Hey guys, i noticed something today. From Varanas snoop, I put travelTo("Sarlo"). So as expected, it went to AKOR first. But after akor, it went to syrbal pass, and then to sarlo. Why didnt it just goto Sarlo from AKOR?

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

Re: Rock5's travelTo userfunction

#43 Post by rock5 » Mon Jan 13, 2014 1:44 am

There isn't a connection from AKOR to Sarlo directly (unless it changed recently).
  • 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

User avatar
L33t_Of_Lag
Posts: 38
Joined: Thu Jan 02, 2014 7:34 am

Re: Rock5's travelTo userfunction

#44 Post by L33t_Of_Lag » Mon Jan 13, 2014 2:06 am

Do you mean there isn't an option from AKOR? If so, there is.

You can go directly from AKOR to Salro. Is there anything i can change to make this happen. Because as you know, the more ports you do, you are more than likely going to crash.

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

Re: Rock5's travelTo userfunction

#45 Post by rock5 » Mon Jan 13, 2014 5:21 am

Well there wasn't initially. Maybe it was initially a bug that they didn't add the link from AKOR to Sarlo and then they fixed it. I'll update the userfunction.
  • 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

User avatar
L33t_Of_Lag
Posts: 38
Joined: Thu Jan 02, 2014 7:34 am

Re: Rock5's travelTo userfunction

#46 Post by L33t_Of_Lag » Mon Jan 13, 2014 5:58 am

thanks. Let us know when done. :)

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

Re: Rock5's travelTo userfunction

#47 Post by rock5 » Mon Jan 13, 2014 6:07 am

Done already. All I needed to do was add Sarlo to the Rorazan link list.
  • 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

User avatar
L33t_Of_Lag
Posts: 38
Joined: Thu Jan 02, 2014 7:34 am

Re: Rock5's travelTo userfunction

#48 Post by L33t_Of_Lag » Mon Jan 13, 2014 6:31 am

Thanks very much :)

883Dman
Posts: 90
Joined: Sat Dec 08, 2012 9:25 pm

Re: Rock5's travelTo userfunction

#49 Post by 883Dman » Wed Mar 05, 2014 5:12 pm

Is there a way to do an if statement if you want different characters to go to different locations?

ex:

if char="Tom, Dick, Harry";
then travelTo("Sarlo")
else travelTo("Varanas")

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

Re: Rock5's travelTo userfunction

#50 Post by rock5 » Wed Mar 05, 2014 7:48 pm

Code: Select all

if player.Name == "Tom" or player.Name == "Dick" or player.Name == "Harry" then
    travelTo("Sarlo")
    loadPaths("SarloWP")
else
    travelTo("Varanas")
    loadPaths("VaranasWP")
end
  • 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

883Dman
Posts: 90
Joined: Sat Dec 08, 2012 9:25 pm

Re: Rock5's travelTo userfunction

#51 Post by 883Dman » Wed Mar 05, 2014 8:01 pm

awesome. I knew it would be something simple. Thanks

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

Re: Rock5's travelTo userfunction

#52 Post by rock5 » Sun Mar 16, 2014 8:32 pm

Updated to version 3.12. Fixes bug in autolinks.

The userfunction checks in memory if you have visited the main intersections such as Varanas, Obsidian and Rorazan when planing routes to take. Certain links are available by default, eg. from Reifort to Obsidian. The function has a table it checks for these. So if it can't get to a location because it hasn't visited it yet, it checks the autolink table to see if the link will be available anyway. The code that checks the autolinks had a bug in it which means it never did work, which is strange because I could have swore that it did. :?:

I also added an autolink from Heffner to Varanas. I discovered that if you portal to Heffner you can teleport to Varanas even if you have never visited it before.
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Rock5's travelTo userfunction

#53 Post by ZZZZZ » Thu Mar 20, 2014 2:26 am

~~ never mind, was using player:target() in commandline and it wouldnt target for some reason so i thought the ID's were wrong.

updated the userfunction for the snoop in the new zone:
userfunction_travelTo.lua
(31 KiB) Downloaded 158 times
I used

Code: Select all

WailingFjord = "ZONE_Z27_WAILING_FJORD",
in the optionString list, just want to make sure that was correct, lol.

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: Rock5's travelTo userfunction

#54 Post by Ego95 » Thu Mar 20, 2014 8:45 am

Added the new zone aswell and fixed the teleport to Dalanis which was not work because there was some old stuff in the function like the destination

Code: Select all

"Dalanis,Thunderhoof"
.

deleted:

Code: Select all

Thunderhoof = "ZONE_THUNDERHOOF_MESA",
changed:

Code: Select all

Dalanis = "ZONE_DAELANIS",
to

Code: Select all

Dalanis = "ZONE_THUNDERHOOF_MESA",
userfunction_travelTo.lua
(30.98 KiB) Downloaded 155 times

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

Re: Rock5's travelTo userfunction

#55 Post by rock5 » Thu Mar 20, 2014 10:47 am

Ego95, you are wrong. Both strings are still needed. From Rorazan Snoop shows Thunderhoof but from other locations such as Southern Janost it still shows Dalanis. To clarify it for you, let me explain it. travelTo uses the same name for the location that it uses for the snoop strings. But some locations are known by more than 1 name eg. Dalanis/Thunderhoof Hills. In this case the 'location' is Dalanis so if a snoop uses a different name then the link is represented with the location then name, eg. "Dalanis,Thunderhoof". The first word is the location and the second is the string to use for snoop. I hope that clears it up.

I see you also included a link from Dalanis to Wailing Fjord. I'll assume that's right.


I foresee a problem. Obviously Wailing Fjord is another hub so until it's added to the hub list the function might try to go places via Wailing Fjord even if you have never been there before. I don't know how I can add it if I'm nowhere near adding the location myself. Actually looks like I included some handy functions in the userfunction file itself to find the offset for it. If there is anyone who is close to unlocking the Wailing Fjord snoop could they please follow the following instructions.
  • 1. BEFORE clicking the Wailing Fjord Snoop for the first time start commandline.xml and type the following in MM.

    Code: Select all

    readPorts()
    2. Then open a dialog with the Snoop. It should show that yellow message "You succeeded in opening the transport portal here.".
    3. Then in MM again type

    Code: Select all

    comparePorts()
It should print the offset and bit value. If there is more than 1 result, the first result should be the correct one.

Then, if you don't know how to add it, let me know what it prints and I'll add 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.”
          • Ronald Reagan

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Rock5's travelTo userfunction

#56 Post by ZZZZZ » Fri May 23, 2014 10:21 pm

I forgot all about this, saw it today so figured I would do it.

Code: Select all

Command> comparePorts()

Base address is 0x9E5DE4
Location: Zone 27, LocalName "Muckgale Port"
        Offset: 0x373, Bit: 16

Code: Select all

local hubList = {
	Varanas = {Offset=0x0, Bit=0x4, AutoLinkFrom={"VaranasBridge","Heffner"}},
	Rorazan = {Offset=0x261, Bit=0x32},
	Obsidian = {Offset=0x0, Bit=0x32, AutoLinkFrom={"Reifort","BattleSquare"}},
	Dalanis = {Offset=0x12B, Bit=0x1, AutoLinkFrom={"DalanisObsidianEnvoy","DoD"}},
	AyrenCaravan = {Offset=0x0, Bit=0x64, AutoLinkFrom={"Reifort"}} -- Added because it adds an alternate route to Lyk
	WailingFjord = {Offset=0x373, Bit=0x16}
}

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

Re: Rock5's travelTo userfunction

#57 Post by rock5 » Fri May 23, 2014 10:52 pm

Thanks.

Updated first post to version 3.13. Finally!
  • 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

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: Rock5's travelTo userfunction

#58 Post by Ego95 » Tue Aug 05, 2014 12:01 pm

Sometimes I'm getting some problems with this userfunction.
At first, is it right, the travelTo userfunction works together with the gotoportal userfunction? It's because I'm getting problems with some teleports. It tells me that the loadingscreen did't appear while it's already gone.

For example it always happens when I teleport from varanas Central Place to the bridge. At the bridge it tells me the loading screen didn't appear. In that case it's not fatal, because my script goes on normal. But in some cases it doesn't.

My actual problem is porting from the Mercenary Square to the Glory Square in Obsidian. If I use the travelTo from the Mercenary Square it tells me on the Glory Square, that the loading screen didn't appear and that's why it tries to walk back to the Mercenary Square. This isn't possible because there are some walls if the bot walks straight forward. Additionally it wouldn't make sense to walk back because it would teleport to the glory square again and then walk back again. How can I fix this?

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

Re: Rock5's travelTo userfunction

#59 Post by rock5 » Tue Aug 05, 2014 6:58 pm

Hm... I didn't realize (or I forgot) that travelTo uses a function from goToPortal. I didn't list it as a requirement. Anyway...

So you are saying it does teleport but it writes that the loading screen failed to appear? Is it taking longer than 15s for the loading screen to appear? When you say "that's why it tries to walk back to the Mercenary Square." that says to me that you are using some other code with travelTo. What other code do you use at that 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

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: Rock5's travelTo userfunction

#60 Post by Ego95 » Tue Aug 05, 2014 7:22 pm

rock5 wrote:Hm... I didn't realize (or I forgot) that travelTo uses a function from goToPortal. I didn't list it as a requirement. Anyway...

So you are saying it does teleport but it writes that the loading screen failed to appear? Is it taking longer than 15s for the loading screen to appear? When you say "that's why it tries to walk back to the Mercenary Square." that says to me that you are using some other code with travelTo. What other code do you use at that waypoint?
Yeah I just found a print function in the userfunction which would be shown, when gotoportal is not installed. Didn't know, if thats an old print which isn't needed anymore.

Like you said, it is teleporting, but thinks it failed. The loadingscreen appears immediately, maybe with a really high ping one or two seconds later.

In short, my script buys something at the Mercenary square, ports to the glory square an sends it via mailbox. After reaching the glory square it tries to walk back to the mercenary square, I think because it thinks teleporting failed.
Well, I have to look up something later. After you asked me if I am using some other code at that waypoint, I'm not sure anymore, if I made a new waypoint for sending at the glorysquare. So it could be possible that he walks back to the mercenary square because he wants to send the mail from that place.
I'll have to look that up later at the computer and let you hear about it.

The thing which keeps is the message that the teleport failed. Like I said for example from varanas central to the bridge the character waits 10-15 seconds on the bridge, writes, that the teleport failed but then keeps on going normal because destination was reached.

I believe I noticed things like this when worldtraveler and travelTo didn't exist, so it has to do with gotoportal I think. My first thought was that all that coding is too long when teleporting, so that is checks for the loadingscreen too late. But it's strange that it happens on the same places for me.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests