Rock5's travelTo userfunction
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Rock5's travelTo userfunction
Works fine for me. I posted an updated version recently. Have you updated?
- 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
Re: Rock5's travelTo userfunction
I got latest now I will give it a spin.
Re: Rock5's travelTo userfunction
Im thinking you need to add a line to travelto
so if it uses a portal
that it does update:player() before it returns to the running wp.
or something so it sets the current player wp to where it is. then exit the function.
so if it uses a portal
that it does update:player() before it returns to the running wp.
or something so it sets the current player wp to where it is. then exit the function.
Re: Rock5's travelTo userfunction
beanybabe wrote:Im thinking you need to add a line to travelto
so if it uses a portal
that it does update:player() before it returns to the running wp.
or something so it sets the current player wp to where it is. then exit the function.
I looked at the code and the problem was in gotoPortal() I edited mine and added the line rock sugested to update player location. __WPL.setWaypointIndex(__WPL:getNearestWaypoint())
some of the other portal functions may need the same change.
Code: Select all
83 if closestObject then
84 print("Targeting portal "..closestObject.Id..", range "..distance(player.X,player.Z,closestObject.X,closestObject.Z))
__WPL.setWaypointIndex(__WPL:getNearestWaypoint()) --- add this line here.
return movetoportal(closestObject)
else
print("Portal not found within range of "..tostring(_range))
return false
end
Re: Rock5's travelTo userfunction
It's probably not a good idea to change that in the userfunction. When using travelTo in a waypoint the next waypoint is where it will go. So you don't need to find the nearest waypoint and in fact doing so might cause unexpected results. You only need to set the nearest waypoint if you use travelTo in the onload. So I would just add that line in the onload after the travelTo.
- 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
Re: Rock5's travelTo userfunction
i changed it in mine now all the portals seem to work right, I think this has been what is causing people problem with portals.
Re: Rock5's travelTo userfunction
GoToPortal just goes to the portal, it doesn't check if it works, it doesn't wait for the loading screen and doesn't update the player. That is why I created GoThroughPortal. In most cases I would use that. It waits for the loading screen, waits 3 seconds then updates player. It also checks whether the teleport worked and returns true or false so you could, for instance, have it try again if it fails. GoThroughPortal is the complete package. You would use GoToPortal only if you wanted to use your own method to check if it worked so you would also have to include a waitForLoadingScreen and player:update.
- 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
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: Rock5's travelTo userfunction
Okay, I think I was a bit premature on saying the function works for new Dwarven characters. It doesn't.
The problem is this; while you can transport from Yrvandis Hollows to Varanas via Snoop by using the dialog options, you have not yet technically activated the Varanas portal. I think this is why the travelTo userfunction is not working for new Dwarves. It checks in memory (or however) to see what hubs are available and doesn't yet see Varanas. If you have picked your second class, it will transport to Reifort Camp, then use the Ailic's Aide to go to Obsidian. That's where it stops working because neither Varanas or Heffner Camp are available. If you haven't yet picked your second class then you have no additional transport options and it just ends without transporting.
I think there may need to be a check for getZoneId = 31 (Yrvandis Hollows) and player.Race = 2 (Dwarf) then assume the Varanas portal is available and transport via Snoop's dialog options.
The problem is this; while you can transport from Yrvandis Hollows to Varanas via Snoop by using the dialog options, you have not yet technically activated the Varanas portal. I think this is why the travelTo userfunction is not working for new Dwarves. It checks in memory (or however) to see what hubs are available and doesn't yet see Varanas. If you have picked your second class, it will transport to Reifort Camp, then use the Ailic's Aide to go to Obsidian. That's where it stops working because neither Varanas or Heffner Camp are available. If you haven't yet picked your second class then you have no additional transport options and it just ends without transporting.
I think there may need to be a check for getZoneId = 31 (Yrvandis Hollows) and player.Race = 2 (Dwarf) then assume the Varanas portal is available and transport via Snoop's dialog options.
Re: Rock5's travelTo userfunction
The function has override assumed links. We can just add Yrvandis Hollows the the list of assumed links. In the hub list we can just add Yrvandis to the AutoLinkFrom
Try that.
Code: Select all
Varanas = {Offset=0x0, Bit=4, AutoLinkFrom={"VaranasBridge","Heffner","Yrvandis"}},
- 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
Re: Rock5's travelTo userfunction
I am having trouble with that portal into drill again. I just applied that new update.
enter drill then
If I just run this
loadPaths("any xml file.xml");
it works ok
but if I run this it will Not start the xml file
enter drill then
If I just run this
loadPaths("any xml file.xml");
it works ok
but if I run this it will Not start the xml file
Code: Select all
if getZoneId() == 401 and getCurrency("honor") == 0 then
GotoGuild("Drill Ground");
player:target_Object("Drill Ground");
sendMacro("ChoiceOption(1);");
waitForLoadingScreen();
loadPaths("any xml file.xml");
end
Re: Rock5's travelTo userfunction
If you are not in zone 401 it will skip that code. Make sure it's the right zone.
- 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
Re: Rock5's travelTo userfunction
its strange some times it works but usually the second time and after it fails.
I wrote the code a few ways to start the called wp outside the instance then have it enter.
i wrote it for the main to enter then call the wp
no matter how I did it it would not start the wp running.
but if i enter or start outside depending on the revision both work ok
they only fail if i call them from another program and try to enter drill ground
I have seen other people posting on something like this in other zones with portals
it worked a bit when i patched the function to use portals but that did not help today.
also if you enter and call a wp it always seems to want to jump past the first and go to one further in this only happens the few times it actually starts and may be a clue as to were to look for the problem.
i ripped all the code apart and made it all into one large wp I removes all the checks for honor and now I have it working it will log 1 char to the next and mail stuff when its done. Its good enough for now but Id like to get it to check gold and honor some day.
I wrote the code a few ways to start the called wp outside the instance then have it enter.
i wrote it for the main to enter then call the wp
no matter how I did it it would not start the wp running.
but if i enter or start outside depending on the revision both work ok
they only fail if i call them from another program and try to enter drill ground
I have seen other people posting on something like this in other zones with portals
it worked a bit when i patched the function to use portals but that did not help today.
also if you enter and call a wp it always seems to want to jump past the first and go to one further in this only happens the few times it actually starts and may be a clue as to were to look for the problem.
i ripped all the code apart and made it all into one large wp I removes all the checks for honor and now I have it working it will log 1 char to the next and mail stuff when its done. Its good enough for now but Id like to get it to check gold and honor some day.
Re: Rock5's travelTo userfunction
Try adding print messages to figure out where it is failing and what is happening.
Is it possible that waypoint 1 and 2 are very close to one another?
Is it possible that waypoint 1 and 2 are very close to one another?
- 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
Re: Rock5's travelTo userfunction
on Second thought this is to much to code...
Found something you might add to world traveler.
If character had never been to stronghold, it will not show up on Varanas portal.
second class is needed to get the reiford portal.
If you add a check for stronghold on Varanas portal then if it had not been there have it
port to Reiford
then Stronghold
then have it click snoop at stronghold and
continue with what it was doing.
---------------------------------
I notice it will detect if you start by npc to dogs
but not at mail boxes in many areas
Found something you might add to world traveler.
If character had never been to stronghold, it will not show up on Varanas portal.
second class is needed to get the reiford portal.
If you add a check for stronghold on Varanas portal then if it had not been there have it
port to Reiford
then Stronghold
then have it click snoop at stronghold and
continue with what it was doing.
---------------------------------
I notice it will detect if you start by npc to dogs
but not at mail boxes in many areas
Re: Rock5's travelTo userfunction
Firstly worldtraveler is a different userfunction than mine. Don't get them mixed up. Secondly I believe travelTo will use recall to Reifort or Heffner when necessary. So it should already do what you describe.
- 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
Re: Rock5's travelTo userfunction
oh worldtraveler and travelto and castle all get me messed up some times but i'm starting to get used to them.
Just adding extra seconds here and there helped at portals. I wish I was good at arrays so I could make the store buy stuff for honor more friendly. For now just edit it and change the items each time. Looking at the code for travelto I need something like the way it works for the inventory items and costs. Hopefully ill be done messing with this part soon and start on some other thing.
Just adding extra seconds here and there helped at portals. I wish I was good at arrays so I could make the store buy stuff for honor more friendly. For now just edit it and change the items each time. Looking at the code for travelto I need something like the way it works for the inventory items and costs. Hopefully ill be done messing with this part soon and start on some other thing.
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: Rock5's travelTo userfunction
Based on the 3.20 release, I've added a few more connections in Varanas and Obsidian Stronghold. Added the auto-connect between Yrvandis and Varanas.
- VaranasAuction to/from VaranasCentral
VaranasBank to/from VaranasCentral
ElvenAirship to/from VaranasClassHall
ObsidianAuction to/from ObsidianBank
ObsidianAuction to/from GlorySquare
ObsidianBank to/from GlorySquare
- Attachments
-
- userfunction_travelTo.lua
- Version 3.21
- (42.64 KiB) Downloaded 202 times
Re: Rock5's travelTo userfunction
The problem with adding Yrvandis as an autolink to Varanas is that it's not available until you finish Taffrock, right? I guess it can't hurt as you wouldn't use it unless you had done it. And you don't have much other choice. Well, if you had your second class you could recall out so that might no longer work. Hm... Is there anything we could test to know if we finished Taffrock? Possible a particular quest needs to be completed? If we could test for that we could add/remove Yrvandis from the autolinks as needed.
- 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
- Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
Re: Rock5's travelTo userfunction
The most likely quest to check is 425189 -- Silvershadow Invitation. That's the one that activates the options in Snoop's dialog.
Re: Rock5's travelTo userfunction
When I do dwarfs area had sent 20 xp orbs or so and get the char to 20/20 the trainer npc's then give me the portal there. May still need to click snoop in that zone after training.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests