Creating Paths

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#21 Post by BillDoorNZ » Tue Mar 20, 2012 2:14 pm

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)

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

Re: Creating Paths

#22 Post by rock5 » Tue Mar 20, 2012 11:07 pm

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

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#23 Post by BillDoorNZ » Wed Mar 21, 2012 5:18 am

there were a few other objects (non-portal ones) that had no name either...will post a list next time i'm near dod

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

Re: Creating Paths

#24 Post by rock5 » Wed Mar 21, 2012 7:33 am

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
Yes, but if you go stand near the portal then target the nearest no name object, it will most likely be the 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

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#25 Post by BillDoorNZ » Wed Mar 21, 2012 1:30 pm

lol...good point :)

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#26 Post by BillDoorNZ » Wed Mar 21, 2012 2:25 pm

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

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

Re: Creating Paths

#27 Post by rock5 » Wed Mar 21, 2012 11:03 pm

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.
userfunction_gotoportal.lua
(1 KiB) Downloaded 590 times
Just use

Code: Select all

GoToPortal()
to go to the nearest portal within range of 150.

You can override the default 150 range by adding a range to the command.

Code: Select all

GoToPortal(300)
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.
  • 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

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#28 Post by BillDoorNZ » Thu Mar 22, 2012 2:40 pm

thx Rock, works a treat :)

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#29 Post by Uniden65 » Sat Mar 24, 2012 11:41 am

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.....

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

Re: Creating Paths

#30 Post by rock5 » Sat Mar 24, 2012 1:25 pm

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.....
Why do you need the codes/numbers for the portals? Doesn't the function work for you? If not, what happens?

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

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#31 Post by Uniden65 » Sat Mar 24, 2012 11:40 pm

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.

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

Re: Creating Paths

#32 Post by rock5 » Sun Mar 25, 2012 3:47 am

Simple usage:

Code: Select all

	<!-- #  1 --><waypoint x="3367" z="148" y="54">
		GoToPortal()
		waitForLoadingScreen()
	</waypoint>
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">
		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

imosxxx
Posts: 9
Joined: Tue Apr 17, 2012 8:32 am

Re: Creating Paths

#33 Post by imosxxx » Wed Apr 25, 2012 9:24 am

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?

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

Re: Creating Paths

#34 Post by rock5 » Wed Apr 25, 2012 9:33 am

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

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

imosxxx
Posts: 9
Joined: Tue Apr 17, 2012 8:32 am

Re: Creating Paths

#35 Post by imosxxx » Wed Apr 25, 2012 11:03 am

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

Code: Select all

CancelBuff(" mount name ");
or maybe there is some other code?

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

Re: Creating Paths

#36 Post by rock5 » Wed Apr 25, 2012 11:51 am

Try

Code: Select all

player:dismount()
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 says

Code: Select all

Attack()
to

Code: Select all

Attack() yrest(50) Attack()
Might make it more reliable.
  • 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

imosxxx
Posts: 9
Joined: Tue Apr 17, 2012 8:32 am

Re: Creating Paths

#37 Post by imosxxx » Wed Apr 25, 2012 12:31 pm

Tried adding that code to gotoportal.lua but still while mounted it wont enter - used

Code: Select all

player:dismount()
before

Code: Select all

GoToPortal()
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 :)

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#38 Post by BillDoorNZ » Wed Apr 25, 2012 2:43 pm

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.

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

Re: Creating Paths

#39 Post by rock5 » Wed Apr 25, 2012 3:03 pm

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.
  • 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

imosxxx
Posts: 9
Joined: Tue Apr 17, 2012 8:32 am

Re: Creating Paths

#40 Post by imosxxx » Wed Apr 25, 2012 3:13 pm

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

Code: Select all

GoToPortal()
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

Code: Select all

player:dismount()
GoToPortal()
that works fine

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 27 guests