Leader loot: is it possible to capture item name and recipient when assigning loot?
is it possible to grab the name of the selected item and the selected raidmember when assigning loot? My idea is that I'd make an assign button that would then broadcast that info to a channel for dkp tracking, as in
/tc lootchannel [item] sold to [charname]
I haven't seen any direct way to reference the currently selected item or items, or the currently selected recipient, but I'm still fairly newbish about modding and have only learned from the things I've taken apart so far.
maybe capture the item name when the item is clicked and append the recipient when it is clicked? any suggestions would be greatly appreciated
It would be possible to get the name from the dropdown list as far as I know. But the item name would be harder because it uses a template to display the data.
My suggestion would be to add a button to the row for the template. So you would select the item, select the member, and instead of hitting "Assign" at the bottom, you would click the button next to the item name which would then send the tell to the channel and then click the Assign button for you.
Dunno if that's over your head, but it should be doable via the code.
is it possible to grab the name of the selected item and the selected raidmember when assigning loot? My idea is that I'd make an assign button that would then broadcast that info to a channel for dkp tracking, as in
/tc lootchannel [item] sold to [charname]
I haven't seen any direct way to reference the currently selected item or items, or the currently selected recipient, but I'm still fairly newbish about modding and have only learned from the things I've taken apart so far.
maybe capture the item name when the item is clicked and append the recipient when it is clicked? any suggestions would be greatly appreciated
Thanks!
Not sure I understand exactly what you're wanting. There is already a line in the log each time a party member gets assigned a piece of loot, something like "Joe loots [Greatsword of Uberness] from the Exquisite Chest of Wyrmlord Zaos" so I'm pondering the utility of creating code to basically send the same log text out again. *confused*
As Darqwood said, all the info you need goes to the logs anyway. If you run eqdkp take a look here, used to use a modified version of that back in the day.
For me, two reasons; one is that I would have an easy-to-use announce button to announce the item up for bid, and I also plan to have a field where the raid looter could enter the DKP spent, putting all the information in a single easily filterable line.
I haven't played with EQDKP before; when I tried searching for it a while back all I found were pay services or packages that assumed you were either a programmer or web admin, neither of which am I. My only knowledge of XML comes from looking through existing interfaces here, breaking them and fixing them to do extra stuff I want to do.
I may look into eqdkp again, using your link, but for the time being this is a fun exercise, and I'm learning
From what I've seen, there doesn't seem to be a way for the interface to get ahold of item links directly. I've got the same situation as you do, with wanting to link loot for guildies sitting out, and ultimately I ended up modding Othesus' Examine window, changing the first search buttons as follows:
This way I examine the item, click the channel button, click the examine window icon (which pastes the link at the end of the line) then hit enter twice (once to put focus on the chat line, and the second to send it).
Yeah it's convoluted, but once you're used to it it goes pretty fast. Click click enter enter. I'd love to find a way for the code to get the actual itemid so I could paste a nicely formatted channel tell with a proper link straight from the loot window, but unless we get that data in an accessible way it'll continue to be kludgy without 3rd party out-of-game apps.
Last edited by ObsidianDragon : 05-24-2010 at 08:11 PM.
This makes me think - I'm planning on building a DKP tracking system into my EQ2 Journal system for guilds, along with a way to track looted items and such - it wouldn't save the data per se, but raid leaders would be able to see (or anyone in the raid zone for that matter) who looted what and off whom, what the raid's DPS spread was, and other such details. That would fit what you were looking for, right?
Reading further I think it would also be possible to setup the program for anyone whos running it in the same guild to view the raid details, loot data, and such and perhaps save it after all to a guild log of sorts, so that people not in the raid, or even in game can see the data as it happens. Kinda like a play by play.
Last edited by anubisrwml : 05-25-2010 at 05:43 PM.
Well a prog that shows everyone what is in the box would help with my problem.
A prog that shows what got looted by who isn't for me atleast a solution to my problem.
As like ObsidianDragon said, i'm kinda looking for a very quick way to link all items that are in a chest to link in guildchat (or a other channel)
Like (if its possible cos i dont know stuff about programming a UI) a button on the loot window that when ya click it all links just get posted in guildchat (or other channel)
Well I made something fairly close to what I was looking for. I built off of the DrumsUI loot window since that's what I've been happily using for some time (Thanks!)
The announce button does a beginchatinput which opens the channel with the starting DKP/Plat bid amounts, leaving the cursor open. You can then shift+click on the item to pop its link at the end of the line, then hit enter to send it. Unfortunately the only loot data accessible to the code is the display name, not the direct link, so this multi-step process is necessary.
To announce the winning bid one would first hover over the text of the item being assigned to put it in the 'item' box below(there doesn't seem to be any external way to reference the row data in the hardcoded itemlist elements that I could find), set the "groupmember" dropdown to the winning bidder, then with the value set to the winning bid either hit the DKP buy or Plat buy button to announce the winning bid before assigning it.
It's not really fancy, and the extra space it takes up persists even in non-leader loot (couldn't figure out an easy way to collapse the extra window space, scripted resizing didn't work) so I wouldn't recommend it unless you really want the extra announcement functionality.
I recommend going in and hardcoding the default DKP/Plat starting bid amounts to whatever you use, and setting the channel to whatever you use, either as "tc channelname" or "say" or "raidsay" or "gu" or wherever you want the default announcement to be.
I'm always happy if anyone wants to give any contructive criticism of my coding, or point out better ways of doing things. I don't promise to make any great efforts to improve it unless I want it improved; I mod because I'm lazy, not because I'm industrious.
Anybody else is more than welcome to use/hack to pieces any of the code I added (is marked with comment lines). My apologies to Drumstix if my adaptation is in any way bothersome.
Last edited by ObsidianDragon : 06-06-2010 at 06:38 PM.
Hey I took the ui box that ObsidianDragon made, is there anyway to make it say the loot that is selected and not what the mouse was last over? Im kinda new to this UI stuff.
Selection in these sorts of template driven list are managed by hard-coded client stuff, which doesn't provide a scriptable event for "onSelect", so the typical hack-work-around is to use an "onHover" script.
You could add a button to the item template to generate the chat message, but this would of course produce buttons for every item in the list.
Yeah, I really tried to work it to 'see' the loot selection, but there is no way to reference the entries, and there's no way to add an extra row button or activateable into the entry template (it breaks if you try to add any elements).
(Zonx: if you know of a working way to add a button to the loot row template so there's a button in each row, I'd love to see the syntax - I tried a very simple button, but anytime I tried to add anything inside the row template the loot window would crash the client.)
I know hovering sucks as it's soooo easy to wander over other items. If I understood pack properties and it was possible to set the window to repack itself for leader loot, I'd put all my extra stuff at the top to make it easier; 'til then you may just want to loot from bottom to top.
I'll dork with the row template soon as I have time. If adding stuff to it is crashing the client as you say, it's certainly possible to do the following...
Add a single button that uses variables to apply the chat script.
Give the template an onHover script that moves the button to a spot over the row template and sets the button variables based on what's in the row.
With this setup, there'd be far less risk of hovering over another row on the way to the chat button. The button also acts as a visual marker for the item that will be sent to chat.
Oh and it requires less system memory since you're not repeating the button
That would be great, but I don't know how to find out which row I'm hovering over, so I wouldn't know where to move the button; the template shows no form of index.
I suppose I could just put in like a dozen invisible placeholder dummy buttons that become visible/invisible when hovered in/out and while the row text populates a separate hidden dummy button that each of those loot buttons would activate. I don't think that two superimposed layers can simultaneously have onhoverin triggered, but I guess if the button were small enough that there was a margin of the row item text all the way around it then you couldn't hit the button without triggering the surrounding text onhoverin to populate the action button.
It would convoluted and kludgy, but I think I might be able to make it work, and it would be less prone to mistakes at runtime, which would be a plus.
Though, if you know how to tell spatially which item just got hovered over, that'd be way better
(I'll definitely be playing with the code this weekend)
Last edited by ObsidianDragon : 07-29-2010 at 05:58 PM.
You don't need the row index, just the template's "Top" loc within the scroll page.
Place chatButton inside the scroll page (not inside the template). Set it's visibility="false".
Assuming this doesn't crash the client add something like the following to the row template
onHover="
parent.chatButton.Top = Top
parent.chatButton.visible = true
parent.chatButton.itemVariable=itemTextLabel.text
parent.chatButton.dkpVariable=parent.parent.yourDKPtextbox.text
"
And your button has an onPress Script that looks something like this...
onPress="
chatConcat = 'Now taking bids on ' ## itemVariable ## '. Opening bid is ' ## dkpVariable
rsay=chatConcat
rsay=chatConcat
visible=false
"
The onHover moves the button to the vertical location of the row, makes it visible, and assigns the item name and the dkp you entered to variables on the button. Pressing the button generates the chat msg then hides the button.
If you hover over another row, the button moves to that row, is shown, and receives the item value for that row.
Now if putting the button inside the scroll page crashes the client, you'll need to promote it to a higher level and do some extra math to adjust the buttons location using both the row's "Top" value and the scrollpage's vertical scrolllocation. Come to think of it, not sure you can get the vertical scroll separate from the horizontal, so might just be screwed at that point.
Disclaimer: Pathing and object names have been changed to protect the innocent. Any resemblance to real paths or objects in your code is purely coincidence. Adjust as needed to work in your mod.
Ahhh yes, of course; I was able to put a button in the scroll page, just not in the template. This will make the window much easier to use, looking forward to tidying this up this weekend.