any interest in a comment option for createpath.lua ??

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

any interest in a comment option for createpath.lua ??

#1 Post by lisa »

I used to have a notepad and pen by my keyboard when making WP so that I could then add in all the extra stuff after I had finished.

I've been messing around and I changed the createpath to have another option, an add comment option. So when I want to add things in places of the WP I hit the key and type in what I want. Then when I open the WP file it has the comments for the WP I stated earlier so I can add in the things I wanted to.

Anyone else interested in that? If so I'll send the files to rock5 to check out and he might add it.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#2 Post by rock5 »

I like the idea although aren't we running a bit low on keypad numbers?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#3 Post by lisa »

I used 0, At first I used C but in the end I decided to stay with the keypadnumber theme.

output is like this.

Code: Select all

	<!-- #  3 --><waypoint x="-146" z="-6899" y="42">	</waypoint>
	<!-- #  4 --><waypoint x="-146" z="-6899" y="42">
		 <!-- talk to me -->
	</waypoint>
	<!-- #  6 --><waypoint x="-146" z="-6899" y="42">	</waypoint>
'talk to me' was my user input, only issue would be if somone actually typed --> then it would close the tag early. Was trying to find a way to make it only accept letters and numbers but in the end I decided it would be very rare for someone to accidently type --> so just left it as is.

So for me I type in the code I want at the time and then I can just go in later and delete out the <!-- -->
or if I am in a rush I just type something to remind me what I wanted to do at the time.

I spent a few hours trying to make it close tag before comments and then not have another close tag added but in the end I decided there is no harm in the comment being between the waypoint tags, I even like that idea more now.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#4 Post by rock5 »

Why put your comment between <!-- and -->? Why not just output,

Code: Select all

	<!-- #  3 --><waypoint x="-146" z="-6899" y="42">	</waypoint>
	<!-- #  4 --><waypoint x="-146" z="-6899" y="42">
		 talk to me
	</waypoint>
	<!-- #  6 --><waypoint x="-146" z="-6899" y="42">	</waypoint>
That way you could enter commands directly while using createpath and not need to go back and edit 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#5 Post by lisa »

I actually assumed the bot would read it and try to use it in some way since you can add code to inside waypoint tags. Also having the <!-- --> makes it stand out more a little from the rest of the code.
I'll have to rethink this as I like the idea of adding the code straight in as I make WP without having to go back later to edit it.

Tested it, without the <!-- --> it returns an error. failed to compile and run Lua code.

so if you didn't type code you would need to add in the tags.
Wouldn't be to hard to type <!-- buy bow --> when not adding code and just doing notes.
I'm thinking I will change it to have <!-- zz zz --> as default. That will make it easy to use replace later if I added in code directly and if I just added notes then it won't get errors.

Code: Select all

   <!-- #  3 --><waypoint x="-146" z="-6899" y="42">   </waypoint>
   <!-- #  4 --><waypoint x="-146" z="-6899" y="42">
       <!-- zz talk to me zz -->
   </waypoint>
   <!-- #  6 --><waypoint x="-146" z="-6899" y="42">   </waypoint>

Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#6 Post by rock5 »

You're forgetting that the 'comment' is being placed between waypoint tags so it's technically lua. To comment in lua you use '--'.

So if you leave out the <!-- and --> you can enter commands directly. If you want to comment it with the intention of editing it later before running it, you can type anything. If you want it to work with the comment in place just just prefix the comment with '--'.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#7 Post by lisa »

How would that affect what comes after the -- though? as in technically the </waypoint> will be after the --
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#8 Post by rock5 »

lisa wrote:How would that affect what comes after the -- though? as in technically the </waypoint> will be after the --
Well it puts the </waypoint> on a new line so it shouldn't be a problem.

On another note, I should really add player:target_Object too.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#9 Post by lisa »

as in what the mouse is hovering over? I would assume if you meant an actual targeted object, then you could just adapt the target npc to fit.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#10 Post by rock5 »

lisa wrote:as in what the mouse is hovering over? I would assume if you meant an actual targeted object, then you could just adapt the target npc to fit.
Some targets you can't target by clicking on them so, yes, mouse over is what I meant. No keys left though. Maybe I could use the '+' key?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#11 Post by lisa »

I don't see any reason not to use the + key, one of the reasons I decided not to use C key was because by default it is also character info shortcut. So if someone was creating a path and decided to look at their char info for some reason it would trigger the comment command.
i don't think any of the numberpad keys are shortcuts to anything by default.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: any interest in a comment option for createpath.lua ??

#12 Post by jduartedj »

like rock5 suggested I think It could be an option to add a "custom code" to the WP, this way we could input any function or just a comment using -- before what we write! I'd personally prefer the "NUM+" (NUMPADPLUS?) key because I already use Numpad 0 key for calling a mount while gaming.

EDIT: That last setence didn't made a lot of since cuz i also use Num keys to cast spells.... NUM0 or Num+ doesn't really matter to me really.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#13 Post by rock5 »

Just tested with my 'target_Object' option. BTW I ended up using the decimal point for targeting objects.

So what I was able to do was,
1. Use '1' to mark waypoints to a mailbox
2. While holding the mouse over the mail box, press the numpad dot to target the mailbox.
3. Press '0' to enter a 'yrest(1000)'.
4. press '0' to enter "UMM_TakeMail()' command.
5. Press '0' to enter another yrest.
6. Use '1' to mark waypoints to another location.
7. Press '0' to enter an 'error("Finished")' command to end the script.

It worked flawlessly. Are you guys as exited by this as I am? :D
  • 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: any interest in a comment option for createpath.lua ??

#14 Post by rock5 »

I've added it to rev 560.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: any interest in a comment option for createpath.lua ??

#15 Post by lisa »

YAY ;)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: any interest in a comment option for createpath.lua ??

#16 Post by jduartedj »

SUUUUUWWWWWEEEEEEEETTTTTT
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Post Reply