lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 09-09-2012, 04:17 AM
Delone's Avatar
Delone Delone is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2012
Posts: 21
Creating a button to fire a keybound action?

Is there any way to link a button created in a window to a keybound action?

e.g. If I wanted to create a button on a quickbar which was to toggle autorun on and off?

If yes, does it work for specific commands, or does it just fire a particular keypress, and that is then dependant on people having the required action bound to that key? If it's command specific, is there a listing of the commands associated with particualr actions? I couldn't find anything along these lines in the documentation.

Any additional information would be most welcome, still muddling my way through learning this, and with no programming background at all I'm mostly just picking and prodding at others code where I see them doing something similar to what I want to achieve in order to learn how things work.

Thanks in advance, Delone.
Reply With Quote
  #2  
Unread 09-09-2012, 10:55 AM
Queekusme's Avatar
Queekusme Queekusme is offline
The Indomitable
Interface Author - Click to view interfaces
 
Join Date: May 2011
Posts: 13
As far as I know, you cannot use either Quickslots or a button on an interface to control a keyboard press or bound action.

if it were possible then people would skip the button aspect and create bots to auto level them (by standing them in front of a mob and spawn-killing them) when they went to work/school/sleep etc.

I must admit if it were possible, it is tempting, but I doubt that I personally would do it.
__________________
We create that what only we love most, But what truly creates us is what(who) loves us the most. - ME, i'm philosopher nao
Where's Chuck Norris' plugin?
Reply With Quote
  #3  
Unread 09-09-2012, 04:33 PM
Delone's Avatar
Delone Delone is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2012
Posts: 21
From what I can see, it would be no more possible to do this with an action bound to a button on a quickslot than it is now - you would still have to click the button on the interface each time to fire the event, just as you would have to be at the keyboard to press the keystroke.

As it is, every quickslot in existance is capable of firing an action, including all of our attacks - what I was asking was if it's possible to trigger actions that are NOT attacks/skills but rather the various commands that are triggered via keybindings at the moment. I have limited mobility in my left arm, and as such I use my left hand on WASD for steering and movement, but very little else. All other actions I fire with mouse. Up till now that hasn't been a problem, but being in the RoR beta and with the new moving combat style, I'm having to use the mouse to control movement as well, so having to let go of it to perform keyboard actions leaves me unable to control the camera for longer periods of time than I like - being able to bind these actions to an onscreen button would make things much easier for me.

Since the original post I've come across Garan's posting on action codes: http://forums.lotro.com/showthread.p...I.Lotro.Action (great stuff from Garan as usual ) and have seen a couple of examples of responding to keypresses via codes to get events to fire, but can't get my head around a way of working it back the other way - using a click to trigger a code which then fires the action.

Last edited by Delone : 09-09-2012 at 05:21 PM.
Reply With Quote
  #4  
Unread 09-09-2012, 05:32 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
Quote:
Originally Posted by Delone
Since the original post I've come across Garan's posting on action codes: http://forums.lotro.com/showthread.p...I.Lotro.Action (great stuff from Garan as usual ) and have seen a couple of examples of responding to keypresses via codes to get events to fire, but can't get my head around a way of working it back the other way - using a click to trigger a code which then fires the action.
Thanks. Unfortunately, that post is sorely outdated. There are quite a few Action codes that have been added since that post and even more that will be added with RoR. I'll have to get around to updating that post sometime after RoR release.

As to your original question, no, there is no way at present to use a quickslot to fire Actions. The closest thing we can come to that are Aliases such as emotes, etc. since those can be bound to a quickslot.
Reply With Quote
  #5  
Unread 09-09-2012, 07:39 PM
Delone's Avatar
Delone Delone is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2012
Posts: 21
Quote:
Originally Posted by Garan
Thanks. Unfortunately, that post is sorely outdated. There are quite a few Action codes that have been added since that post and even more that will be added with RoR. I'll have to get around to updating that post sometime after RoR release.

As to your original question, no, there is no way at present to use a quickslot to fire Actions. The closest thing we can come to that are Aliases such as emotes, etc. since those can be bound to a quickslot.
Thanks for the info Garan, can stop going in circles trying to get this to work now.

Whilst your post I refered to may be outdated, it still has a lot of info that I didn't see anywhere else and was helpful for the exact things I was trying to do

As part of my experiments, I was mucking around with pre-defining a quickslot button, using the line

self.TestQS1:SetShortcut( Turbine.UI.Lotro.Shortcut( 6.0, "0x7002E996" ) );

and attempting to use codes directly in combination with changing the type values of "6.0" to see if any of them might happen to pass the code through in a usable form (just blind stabs, but you never know, heh), and worked out that 6.0 was for skills, and 4.0 causes it to be considered an alias and 7.0 seemed to be a pet command shortcut based on the error message (wasn't using a pet class)... is there a listing of what the various types are for these values somewhere?

Edit: 2.0 is an item, 9.0 is a hobby... still testing

3.0 gives an odd effect when you mouseover it, with a small white line popping up below and to the right of the quickslot when you place the mouse over it, but, along with 5.0 seems to accept any form of shortcut paired with it without giving an invalid shortcut error - but doesnt display or allow that shortcut to be used.

Last edited by Delone : 09-10-2012 at 01:27 AM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pressed button and mouse over button problem Marzio XML modification help (L) 3 09-24-2011 07:03 PM
Possible to do an action bar plugin like Dominos? Oliner Lua Programming Help (L) 3 01-05-2011 10:40 AM
Docked action bars Flipsod XML modification help (L) 3 07-18-2008 04:57 PM
Woodland Celtic Action bar v1 Vulcan Beta Interfaces (L) 1 04-22-2007 02:43 PM
Kaylan's Scroll Action Bar Kaylan Beta Interfaces (L) 0 04-01-2007 12:03 AM


All times are GMT -5. The time now is 01:00 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui