lotrointerface.com
Search Downloads


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

Reply
Thread Tools Display Modes
  #1  
Unread 03-24-2011, 08:25 AM
aens aens is offline
The Wary
 
Join Date: Nov 2010
Posts: 2
Help with custom quickslots

Hey!

Last night I did some first time ever experiementing with Lua and so far I've done a script that prints "Hello world" every 5 minutes (now how cool it that? ). Now I would want it to do an emote, but I'm struggling with the lack of help from LuaDocumentation, other plugins that does that same kind of a thing or anywhere else in the web. Do you have to use custom quickslots made with Lua, aliases or can you just enter /emote somewhere?

Question goes: is that kind of a system possible?

I found this comment from another thread:
Quote:
Originally Posted by Chiran
I guess the only way to write to chat is to make quickslot, then set a command alias for it in Lua. The user has to click it himself though for the text to be pasted into chat.

-Chiran
So must you click the quickslot to make it fire or can you make the code fire the quickslot for you?

Last edited by aens : 03-24-2011 at 08:27 AM.
Reply With Quote
  #2  
Unread 03-24-2011, 09:19 AM
lunarwtr's Avatar
lunarwtr lunarwtr is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2011
Posts: 121
those sort of actions cannot be performed via lua (I assume to prevent people from writing bots). You need user interaction, hence the quickslot. You can get creative with it though...
  1. create quickslot
  2. place it behind an image icon
  3. set a timer to highlight the image (so it flashy the user) ever 5 minutes to indicate they need to click it to get another pellet.
__________________
Author of Lotro Compendium, Waypoint, and Lotro Plugin Compendium (LPC)
Reply With Quote
  #3  
Unread 03-25-2011, 02:41 AM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
Sadly no - that's not possible, as you can't send chat commands with Lua - only print things out to the chat window.

You can however create a quickslot that will perform an emote, but again, since it's not part of Lua (it uses the macro system) you won't be able to do it at a set interval.
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote
  #4  
Unread 03-26-2011, 11:30 AM
aens aens is offline
The Wary
 
Join Date: Nov 2010
Posts: 2
Quote:
Originally Posted by Digital_Utopia
Sadly no - that's not possible, as you can't send chat commands with Lua - only print things out to the chat window.

You can however create a quickslot that will perform an emote, but again, since it's not part of Lua (it uses the macro system) you won't be able to do it at a set interval.
I don't get it. You can perform emotes with Lua (with quickslots, yes), but you can't do it at a set interval. How is that protected? If I can print "Hello world" every 5 minutes, setting the interval to a function containing "Turbine.Shell.WriteLine "Hello world";", can't you put the "use quickslot" code inside that function and make it work that way?

Last edited by aens : 03-26-2011 at 11:37 AM.
Reply With Quote
  #5  
Unread 03-26-2011, 01:29 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 341
Quote:
Originally Posted by aens
I don't get it. You can perform emotes with Lua (with quickslots, yes), but you can't do it at a set interval. How is that protected? If I can print "Hello world" every 5 minutes, setting the interval to a function containing "Turbine.Shell.WriteLine "Hello world";", can't you put the "use quickslot" code inside that function and make it work that way?
The text written to the standard channel by the WriteLine method does not get processed by the chat window, i.e. no "/" commands actually get run, the text is just output, unprocessed, to your chat window, and ONLY your chat window, no one else sees the text. So, you can't actually "perform" emotes programmatically, all you can do is change the alias in the Lua quickslot so that the next time the user clicks the Lua quickslot the alias is processed (and if it is an emote, the emote is performed). Additionally, the quickslots we can change are those that are created as part of a Lua plugin, NOT to be confused with the Quickslot bars that are part of the UI - we have no control over the built-in Quickslot bars via Lua.

When using an icon to cover a quickslot, remember to SetMouseVisible(false) on the icon so that mouse clicks get passed through to the shortcut. It also helps to put the quickslot inside another additional container Control, size the quickslot larger than it's container and position it at negative coordinates so that the ugly text part of the quickslot is hidden from any transparent portions of your image. Also be sure to set dragdrop(false) on the quickslot if you don't want your users overriding your alias and add a MouseLeave event handler that resets the alias since even with dragdrop(false), the user can still drag the alias out of the quickslot.
Reply With Quote
  #6  
Unread 03-26-2011, 07:13 PM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
Quote:
Originally Posted by aens
I don't get it.
See, that's just it - you can't do emotes with Lua. You can create quickslots and you can display text in the chat panel, but you can't send any commands. So yes, you can display "Hello World" every 5 minutes, but if you attempt to do that with "/bow" - all you will see is the text "/bow" instead of the emote being performed
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
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
Problem with consumables and quickslots. MrJackdaw Lua Programming Help (L) 5 09-13-2010 11:54 AM
Modifying Quickslots Svenn XML modification help (L) 2 04-06-2010 10:44 PM
Quickslots.. felgrath Interface Help (L) 6 01-06-2010 12:13 AM
Custom UI Skinning comes to DDO! Cairenn News 2 08-28-2009 11:16 PM
Lore master UI with plenty of quickslots :D tob Interface Requests (L) 2 07-31-2009 06:21 AM


All times are GMT -5. The time now is 08:11 AM.


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