Script to show current position

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Script to show current position

#1 Post by rock5 »

Hi guys, I just created a simple script to show your current position as you move.

Useful when testing your newly created waypoint files. Just run it in another window. When you come to a point in your waypoint file you want to change, just pause your waypoint script, move to the correct position, read the co-ords from this script and edit your waypoint file.

Hope people find it useful. Maybe it could be included with the rombot. People let me know what you think.

This was created by stripping down bot.lua and adding a little code. It could probably be stripped further or improved by the administrator.

Administrator, please feel free to further edit it as you please.
Attachments
pos.lua
(1.5 KiB) Downloaded 169 times
  • 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
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Script to show current position

#2 Post by Administrator »

Is this any different than getpos.lua that is included with the bot?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Script to show current position

#3 Post by rock5 »

Doh! :oops:

You're probably right. How long has that been there?

Anyway I just tried it and got an error

Code: Select all

...:/Program Files/micromacro/scripts/rom/functions.lua:696: attempt to index global 'database' (a nil value)
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Script to show current position

#4 Post by rock5 »

Even though getpos.lua is not working I can see from the script that I like mine better.

Even though they should do about the same thing, I made a couple of changes, I think that make it better.

1. Mine only displays the co-ordinates if they change, not just spam the same co-ordinates over and over again.
2. I noticed when I did mine that pressing delete to stop the bot also stopped the pos script. Then I realized there is no need to pause the script. All you need is Ctrl-L to stop it so I disabled the DEL and END buttons.

Do you agree? are these improvements in the functionality?
  • 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
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Script to show current position

#5 Post by Administrator »

I've fixed up the numerous problems that have crept into getpos.lua (due to changes in other files). It's now in at least a working state.
1. Mine only displays the co-ordinates if they change, not just spam the same co-ordinates over and over again.
getpos.lua doesn't spam. Actually, it uses the same, continuously-updating line the whole time.
2. I noticed when I did mine that pressing delete to stop the bot also stopped the pos script. Then I realized there is no need to pause the script. All you need is Ctrl-L to stop it so I disabled the DEL and END buttons.
Yeah, this makes sense. Actually, it looks like you just left the default start and stop/pause keys (F5/F6). You should set them to 0 to disable them.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Script to show current position

#6 Post by rock5 »

Administrator wrote:getpos.lua doesn't spam. Actually, it uses the same, continuously-updating line the whole time.
Ah, that's what \r does. Yeah, that looks much better.
Administrator wrote:Yeah, this makes sense. Actually, it looks like you just left the default start and stop/pause keys (F5/F6). You should set them to 0 to disable them.
I've done that. Now it runs just the way I want it.

If "this makes sense" why didn't you implement 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
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Script to show current position

#7 Post by Administrator »

rock5 wrote:If "this makes sense" why didn't you implement it?
I made the change after the last commit, and don't think that small of a chance is worthy of a commit by itself. It'll be in the next revision.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Script to show current position

#8 Post by rock5 »

Administrator wrote:
rock5 wrote:If "this makes sense" why didn't you implement it?
I made the change after the last commit, and don't think that small of a chance is worthy of a commit by itself. It'll be in the next revision.
OK. No probs.
  • 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
Post Reply