lotrointerface.com
Search Downloads


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

Reply
Thread Tools Display Modes
  #11  
Unread 12-21-2011, 01:17 PM
Stever1388 Stever1388 is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Nov 2010
Posts: 33
Thanks for your help again, I was messing around with this yesterday and still came to a problem (one ill turn deserves another I guess): The quickslots are semi-broken if you try to set an invalid shortcut using the 0x0000000000000000 for the first part of the string and then ever reacquire the item in question.

Here's some test code to try it out:

Code:
import "Turbine";
import "Turbine.Gameplay";
import "Turbine.UI";
import "Turbine.UI.Lotro";

Window=Turbine.UI.Window();
Window:SetSize(200,200);
Window:SetPosition(Turbine.UI.Display:GetWidth()/2-100,Turbine.UI.Display:GetHeight()/2-100);
Window:SetText("Test");
Window:SetVisible(true);

quickslots = Turbine.UI.Lotro.Quickslot();
quickslots:SetParent(Window);
quickslots:SetVisible(true);
quickslots:SetOpacity(1);
quickslots:SetSize( 36, 36 );
quickslots:SetPosition( 0, 0);

quickslots:SetShortcut(Turbine.UI.Lotro.Shortcut(2, "0x0000000000000000,0x700017E2")) -- this sets the shortcut to traveling rations whether you have them in your inventory or not
Turbine.Shell.WriteLine("Test Item name: "..quickslots:GetShortcut():GetItem():GetName())
Turbine.Shell.WriteLine("Test Shortcutdata: "..quickslots:GetShortcut():GetData())

function quickslots:ShortcutChanged(sender, args)
    Turbine.Shell.WriteLine("Name: "..quickslots:GetShortcut():GetItem():GetName())
    Turbine.Shell.WriteLine("Data: "..quickslots:GetShortcut():GetData())
end
If you don't have any traveling rations in your inventory, you'll see a quickslot in the middle of your screen that is grayed out and can't be used. If you do have traveling rations in your inventory, you'll see a quickslot that is normal looking, however, if you try to left or right click on it, nothing happens (the sandglass icon should briefly appear in the quickslot if it were working correctly).

To get it to work, you must REMOVE the stack of traveling rations from your inventory (into your bank or sell them), and then add them back into your inventory. If you then click on the quickslot again nothing will happen, but you'll get the chat output of the name and data string. Then clicking it again and it'll work like a normal quickslot. It seems the quickslot doesn't try to update until you click on it, and then once you do it finds the link its looking for, which is why it updates (it changes the data string to match the one found in inventory).

Any suggestions on getting the event to fire prior to clicking the quickslot? Is there a way to maybe make the quickslot think it's been clicked even if it hasn't?

So far this is a pretty good solution to the problem I've been having but the fact that you have to click the slot twice the first time you use it is a bit frustrating and not to my liking.
Reply With Quote
  #12  
Unread 12-21-2011, 05:01 PM
lunarwtr's Avatar
lunarwtr lunarwtr is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2011
Posts: 121
I'll have to try it when I'm at my other pc as I "had" a working example of just such a thing a while back.

Off top of my head things to try would be to see if you need to set the quickslot enabled or something upon initialization. I could be getting mixed up but I think there was a bug regarding something that had to be toggled. Also, dont' use the hard coded number "2" for the first part of the shortcut.. use Turbine.UI.Lotro.ShortcutType.Item instead.. just incase the number is wrong.
__________________
Author of Lotro Compendium, Waypoint, and Lotro Plugin Compendium (LPC)
Reply With Quote
  #13  
Unread 12-21-2011, 08:19 PM
lunarwtr's Avatar
lunarwtr lunarwtr is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2011
Posts: 121
Whatever they did, it must have broken in this release. The one I have doesn't work either anymore. If I think of a work around I'll post.
__________________
Author of Lotro Compendium, Waypoint, and Lotro Plugin Compendium (LPC)
Reply With Quote
  #14  
Unread 03-12-2024, 11:18 AM
Mirar Mirar is offline
The Wary
 
Join Date: Feb 2007
Posts: 1
Anyone found a workaround for this yet?
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
Help with toolbar items Pam Interface Help (L) 1 09-19-2010 10:21 PM
Inventory/Equipment Ideas Sorane LotRO Wish List (L) 0 11-02-2007 02:25 AM
simulated all-in-one-inventory Aalwein Beta Interfaces (L) 3 04-21-2007 01:31 AM
All-In-One Inventory Dandeak Interface Requests (L) 2 03-01-2007 12:07 PM


All times are GMT -5. The time now is 02:13 AM.


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