Hi,
How can I get an event when the player smokes some pipe?
I have been successful in getting eating and drinking events from chat but realized that smoking do not raise a chat response. Can I have it in another way?
Thanks! =)
Hi,
How can I get an event when the player smokes some pipe?
I have been successful in getting eating and drinking events from chat but realized that smoking do not raise a chat response. Can I have it in another way?
Thanks! =)
But smoking does generate messages in the emote chat channel:
/smokeYou begin to smoke.
You begin to smoke with Galahard.
Thurallor begins to smoke.
Thurallor begins to smoke with Galahard.
/smoke1
You choke on your pipe smoke.
Thurallor chokes on his pipe smoke.
Last edited by Thurallor; Nov 15 2017 at 10:12 PM.
Pipeweed smoke and Dwale's pipe do not.
"I never feed trolls and I don't read spam" - Weird Al Yankovic
Hi Thurallor,
Thank you for your reply, I didn't know about the "/smoke1", it is quite fun! =p
I should have been more clear, I was talking about when you use items, like "Pouch of Sweet Lobelia Pipe-weed".
When we use food items (like "Small Rations", for example) you have a message in chat like: "You use small rations.", but that does not happen when you use pipe-weed items (since they are actually "Effects" as a category, I think).
Since I am doing some stuffs when player eat and drink (and now smoke) I need to track these, and I couldn't do it anymore through chat.
My workaround (after spending a few hours finding out that I couldn't ever create shortcuts dynamically =p) was creating a special bag with item controls and creating a overlay control that tell me then these items are used, therefore allowing me a doing some nice stuff with it! =D
But now I think I need to recreate the tooltip for the items since the control blocks them from appearing, do you know how I can do it?
I actually created a custom Tooltip plugin for a user that wanted custom tooltips for some reason a few years back. Check:
http://www.lotrointerface.com/downlo...ustomTips.html
it may save you a bit of time.
Thanks Garan, I will check it!
I have been tinkering with your example with a "fake" item (actually I loved the idea since I first tried it a few years ago) and this is one of my core tricks for this plugin.
However, I cannot make it work with a overlay (like the ItemControl works)
Perhaps with an example it is more clear:
This is the ItemControl with Overlay (working but without tooltip and mouseenter effect):
I tried the samething with your Quickslot + Shortcut + Backdrop + Icon but with no success. Whenever I try to "MouseVisible(true) in the Icon control I loose the interaction with the Quickslot (which is the core of the "fake item").self.items[i] = Turbine.UI.Lotro.ItemControl( self.backpack:GetItem( i ) );
-- this is necessary to track the iteration with the items
self.items[i].overlay = Turbine.UI.Control();
self.items[i].overlay:SetParent(self.items[i]);
self.items[i].overlay:SetSize(self.items[i]:GetSize());
self.items[i].overlay:SetPosition(self.item s[i]:GetPosition());
self.items[i].overlay:SetZOrder(self.items[i]:GetZOrder() + 1);
self.items[i].overlay:SetToolTip(itemInfo:G etName());
-- Hiding it also hides the mouse events, that way, we have either to manually (if possible) trigger the mousehover item or recreate the tooltip
--self.items[i].overlay:SetMouseVisible(false );
self.items[i].overlay.MouseClick = function (sender, args)
-- do stuff here
end
The arguments to SetPosition() should be 0, 0 (which is the default, so you don't need to call it). A control is positioned relative to the top, left corner of its parent (in this case, self.items[i]), so if you want them to be in the same position, use (0, 0) for the child.
I don't think GetZOrder() is needed here, either; the child control is in front of its parent by default. And if I recall, it only affects the Z-order of controls that are "peers", i.e. have the same parent.
You should SetMouseVisible(false) for anything in front of the Shortcut.
The Quickslot will give you MouseClick events.
Last edited by Thurallor; Nov 17 2017 at 03:02 PM.