Page 3 of 8

Re: Rock5's travelTo userfunction

Posted: Sat Jan 11, 2014 10:52 pm
by rock5
Are you using Bill D Cats version? Version 3.1?

Actually I should update the first post with that version.

Re: Rock5's travelTo userfunction

Posted: Mon Jan 13, 2014 12:18 am
by L33t_Of_Lag
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?

Re: Rock5's travelTo userfunction

Posted: Mon Jan 13, 2014 1:44 am
by rock5
There isn't a connection from AKOR to Sarlo directly (unless it changed recently).

Re: Rock5's travelTo userfunction

Posted: Mon Jan 13, 2014 2:06 am
by L33t_Of_Lag
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.

Re: Rock5's travelTo userfunction

Posted: Mon Jan 13, 2014 5:21 am
by rock5
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.

Re: Rock5's travelTo userfunction

Posted: Mon Jan 13, 2014 5:58 am
by L33t_Of_Lag
thanks. Let us know when done. :)

Re: Rock5's travelTo userfunction

Posted: Mon Jan 13, 2014 6:07 am
by rock5
Done already. All I needed to do was add Sarlo to the Rorazan link list.

Re: Rock5's travelTo userfunction

Posted: Mon Jan 13, 2014 6:31 am
by L33t_Of_Lag
Thanks very much :)

Re: Rock5's travelTo userfunction

Posted: Wed Mar 05, 2014 5:12 pm
by 883Dman
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")

Re: Rock5's travelTo userfunction

Posted: Wed Mar 05, 2014 7:48 pm
by rock5

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

Re: Rock5's travelTo userfunction

Posted: Wed Mar 05, 2014 8:01 pm
by 883Dman
awesome. I knew it would be something simple. Thanks

Re: Rock5's travelTo userfunction

Posted: Sun Mar 16, 2014 8:32 pm
by rock5
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.

Re: Rock5's travelTo userfunction

Posted: Thu Mar 20, 2014 2:26 am
by ZZZZZ
~~ 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 159 times
I used

Code: Select all

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

Re: Rock5's travelTo userfunction

Posted: Thu Mar 20, 2014 8:45 am
by Ego95
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 156 times

Re: Rock5's travelTo userfunction

Posted: Thu Mar 20, 2014 10:47 am
by rock5
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.

Re: Rock5's travelTo userfunction

Posted: Fri May 23, 2014 10:21 pm
by ZZZZZ
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}
}

Re: Rock5's travelTo userfunction

Posted: Fri May 23, 2014 10:52 pm
by rock5
Thanks.

Updated first post to version 3.13. Finally!

Re: Rock5's travelTo userfunction

Posted: Tue Aug 05, 2014 12:01 pm
by Ego95
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?

Re: Rock5's travelTo userfunction

Posted: Tue Aug 05, 2014 6:58 pm
by rock5
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?

Re: Rock5's travelTo userfunction

Posted: Tue Aug 05, 2014 7:22 pm
by Ego95
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.