Creating Paths
-
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
Re: Creating Paths
lol...I'll see if I can find them - problem is, I prolly am not recording those as there is no name associated with them but I'll put a list together slowly (I don't run a lot of instances atm)
Re: Creating Paths
I been playing a bit with this function. You know it would be easy to make a function that finds the nearest object with no name and then target it. This could work with any portal, assuming they all don't have names.
- 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
-
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
Re: Creating Paths
there were a few other objects (non-portal ones) that had no name either...will post a list next time i'm near dod
Re: Creating Paths
Yes, but if you go stand near the portal then target the nearest no name object, it will most likely be the portal.BillDoorNZ wrote:there were a few other objects (non-portal ones) that had no name either...will post a list next time i'm near dod
- 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
-
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
Re: Creating Paths
Standing outside Dalanis sewer entrance (still in main city partm but right next to teleporter 112224). One interesting thing I did notice is that once I use the portal it appears in my list once I'm inside too and I can use it to teleport back out as well.
Code: Select all
Id Name Coords Attackable Distance
1001 Character Name (-2935, -99, 7228) FALSE 11
102815 Rat (-2917, -103, 7201) TRUE 35
112224 (-2986, -77, 7237) FALSE 49
102815 Rat (-2886, -89, 7244) TRUE 63
102815 Rat (-2859, -82, 7270) TRUE 100
114405 Resident (-3154, 79, 7260) FALSE 277
114400 Resident (-3163, 79, 7273) FALSE 286
114443 Slovenly Vagrant (-3179, 79, 7259) FALSE 296
103282 Lionheart Knight Patrol (-3051, 74, 7500) TRUE 344
114415 Little Girl (-3173, 59, 7441) FALSE 353
114952 Dalanis Usher (-3023, 74, 7523) FALSE 356
114794 Little Boy (-3185, 59, 7441) FALSE 361
102331 Rabbit (-3181, 59, 7446) TRUE 362
114415 Little Girl (-3179, 59, 7453) FALSE 365
114534 John Hoffman (-3275, 67, 7238) FALSE 370
102815 Rat (-2736, 55, 7487) TRUE 371
102815 Rat (-3258, 67, 7093) TRUE 377
103282 Lionheart Knight Patrol (-3052, 74, 7545) TRUE 382
113714 Battered Wooden Box (-3004, 53, 6872) FALSE 386
113714 Battered Wooden Box (-3078, 55, 6878) FALSE 400
114770 Funeral Parlor Assistant (-3328, 67, 7290) FALSE 423
103500 Cockroach (-2566, 62, 7354) TRUE 432
114794 Little Boy (-3176, 59, 7579) FALSE 453
110014 Elder (-3321, 74, 6922) FALSE 511
114407 Resident (-3328, 74, 6913) FALSE 521
114403 Resident (-3346, 74, 6914) FALSE 534
560009 Abyssal Mercury Ore (-2587, -14, 6789) FALSE 568
111378 (-8886, -443, 15571) FALSE 10252
111378 (-8970, -453, 15567) FALSE 10298
111378 (-9056, -451, 15558) FALSE 10341
111378 (-9148, -452, 15547) FALSE 10387
111378 (-9240, -447, 15539) FALSE 10436
Re: Creating Paths
Yeah, I was testing at FA and the portal inside was the same id as the one outside.
I whipped up the function. Try this. Just useto go to the nearest portal within range of 150.
You can override the default 150 range by adding a range to the command.
Lastly, the function returns 'true' if it finds a portal and 'false' if it doesn't, so you can use it in an 'if' statement in more complex coding.
I whipped up the function. Try this. Just use
Code: Select all
GoToPortal()
You can override the default 150 range by adding a range to the command.
Code: Select all
GoToPortal(300)
- 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
-
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
Re: Creating Paths
thx Rock, works a treat
Re: Creating Paths
thanks all this is great but it still does not help me get the codes for the portals...
my return script cant see outer teleport and i dont have the numbers.....
my return script cant see outer teleport and i dont have the numbers.....
Re: Creating Paths
Why do you need the codes/numbers for the portals? Doesn't the function work for you? If not, what happens?CDWriter wrote:thanks all this is great but it still does not help me get the codes for the portals...
my return script cant see outer teleport and i dont have the numbers.....
Assuming all portals don't have names, then the function should work for every portal.
- 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: Creating Paths
No to sound retarded here but how do i use the function ?
so you can use it in an 'if' statement in more complex coding.
Re: Creating Paths
Simple usage:
Where the waypoint is somewhere near the portal (not in the portal).
Used in an if statement:
Code: Select all
<!-- # 1 --><waypoint x="3367" z="148" y="54">
GoToPortal()
waitForLoadingScreen()
</waypoint>
Used in an if statement:
Code: Select all
<!-- # 1 --><waypoint x="3367" z="148" y="54">
if not GoToPortal() then
error("Portal not found")
end
waitForLoadingScreen()
</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
Re: Creating Paths
im trying to use function GoToPortal() , but sometimes it just won't enter the portal and will stand outside all the time event if in MM window i can see that he has found the portal "Targeting object 112072" (KS)
What should i do? - how can i make this function to try to enter this portal again if first time is not successful?
What should i do? - how can i make this function to try to enter this portal again if first time is not successful?
Re: Creating Paths
First of all, the only time it has failed for me is when it targeted the wrong object. It works by targeting the nearest object with no name. Are you sure it was targeting the portal? An eay way to check is to see when it does work, does it still say "Targeting object 112072" or does it say a different Id?
Secondly you could just do "GoToPortal()" twice to have it try twice. Or maybe
Secondly you could just do "GoToPortal()" twice to have it try twice. Or maybe
Code: Select all
GoToPortal()
Attack()
- 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: Creating Paths
I found out that if I am mounted on Storm Hippogriff i can't enter - if I unmount - i can enter all the time.
What is the code to unmount? i found this or maybe there is some other code?
What is the code to unmount? i found this
Code: Select all
CancelBuff(" mount name ");
Re: Creating Paths
Try
Does it show the same Id for the portal while you are mounted to when you're not mounted? Maybe there is something about your mount that is getting detected as an object with no name. Maybe it's a line-of-site issue. Do you get a message in game saying you can't see the object?
It works fine for me when I'm mounted. Try changing the line in gotoportal that saysto
Might make it more reliable.
Code: Select all
player:dismount()
It works fine for me when I'm mounted. Try changing the line in gotoportal that says
Code: Select all
Attack()
Code: Select all
Attack() yrest(50) Attack()
- 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: Creating Paths
Tried adding that code to gotoportal.lua but still while mounted it wont enter - used before and it works fine ... and portal has same ID 112072 when i enter dismounted. Maybe thats because Storm Hippogriff is kinda floating in air because when i use getpos.lua the coordinates kinda change a bit all the time back and forward heh
Code: Select all
player:dismount()
Code: Select all
GoToPortal()
-
- Posts: 446
- Joined: Wed Aug 03, 2011 7:37 pm
Re: Creating Paths
I imagine that the ROM Client auto dismounts you when you attack something that is attackable. Attacking the portal prolly doesn't trigger the auto dismount code. Thats my guess anyway.
Re: Creating Paths
Yes but you shouldn't need to dismount to go through a portal.
I had an idea. We are talking about ks, right? Isn't the portal half submerged? So if you are mounted that means you have a mount that flies above water. Maybe you're too high to go through the ks portal when mounted.
Although, I don't remember having to dismount my flying mount to go into ks when I used to do it. But it was awhile ago so I could be wrong.
I had an idea. We are talking about ks, right? Isn't the portal half submerged? So if you are mounted that means you have a mount that flies above water. Maybe you're too high to go through the ks portal when mounted.
Although, I don't remember having to dismount my flying mount to go into ks when I used to do it. But it was awhile ago so I could be wrong.
- 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: Creating Paths
If I am using waypont thats go in to the portal I don't need to dismount ... or if i fly manually ... so high isn't the problem. When i use that code my character stops at last waypoint - targets portal - flies a bit closer and thats all - it just wont go near enough to teleport. But I am happy with combination of
that works fine
Code: Select all
GoToPortal()
Code: Select all
player:dismount()
GoToPortal()
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 53 guests