Hey guys,
I am currently trying to modify an addon for WebDKP. We have earlier used WebDKP version 2.5.1, which seemed to work very well with the 1.12 patch. The problem with this version is, however, not being able to upload the log to the webpage. We had to manually add all items and awards after the raid.
We later learned that the version 2.7 was able to upload to the site.
After going through the lua-code of this addon I discovered how to use the addon (because there were no instructions for the commands). I learned that I had to be whispered !startbid [item] to start a bidding-session, and the old way (WebDKP 2.5.1) of getting a prompt to charge dkp to a player who received item, did not work anymore.
My main concern with this addon is that some of the coding seem like it was maybe for a newer patch than 1.12 (I might be wrong). Now I currently do not have a solution on how to shift+click an item to be the next item to be bid on.
My problem:
I need to be able to shift+left-click on a link from the chat. I will then take the item information and put up for bidding. I am having problem with having a post hook on the shift+left-click, to register when it clicks, so I can actually get the information. The rest should be fine.
I have have tried:
hooksecurefunc() -- seem to not recognize the function. Maybe it is for a newer patch?
HookScript -- seem to not be recognized. Maybe it is for a newer patch?
When I tried the code below it did not recognize the _G[....]. Maybe I can do it another way?
What I tried, and "kinda" worked was:
The problem with this code was that it was overriding the original SetItemRef, and now i.e I couldn´t right-click an item that was linked to get information about it. Maybe it is possible to use SetItemRef in a more secure way? (like hooksecurefunc() should worked ).
Maybe there is an eventhandler that could manage my problem better? All I want is to register when a shift+click occurs from the chat and do something with the clicked information!
Hopefully there is someone here with more experience than me (first time trying lua)
--
Cheers
Tzui <Agony> - Horde
I am currently trying to modify an addon for WebDKP. We have earlier used WebDKP version 2.5.1, which seemed to work very well with the 1.12 patch. The problem with this version is, however, not being able to upload the log to the webpage. We had to manually add all items and awards after the raid.
We later learned that the version 2.7 was able to upload to the site.
After going through the lua-code of this addon I discovered how to use the addon (because there were no instructions for the commands). I learned that I had to be whispered !startbid [item] to start a bidding-session, and the old way (WebDKP 2.5.1) of getting a prompt to charge dkp to a player who received item, did not work anymore.
My main concern with this addon is that some of the coding seem like it was maybe for a newer patch than 1.12 (I might be wrong). Now I currently do not have a solution on how to shift+click an item to be the next item to be bid on.
My problem:
I need to be able to shift+left-click on a link from the chat. I will then take the item information and put up for bidding. I am having problem with having a post hook on the shift+left-click, to register when it clicks, so I can actually get the information. The rest should be fine.
I have have tried:
hooksecurefunc() -- seem to not recognize the function. Maybe it is for a newer patch?
HookScript -- seem to not be recognized. Maybe it is for a newer patch?
When I tried the code below it did not recognize the _G[....]. Maybe I can do it another way?
Code:
for i = 1, 4 do
local lootButton = _G["LootButton"..i]
lootButton:HookScript("OnClick", WebDKP_myFunction)
end
What I tried, and "kinda" worked was:
Code:
WebDKP_SetItemRef_OnEvent_Original = nil;
if ( SetItemRef ~= WebDKP_myFunction ) then
WebDKP_SetItemRef_OnEvent_Original = SetItemRef;
SetItemRef = WebDKP_myFunction;
end
The problem with this code was that it was overriding the original SetItemRef, and now i.e I couldn´t right-click an item that was linked to get information about it. Maybe it is possible to use SetItemRef in a more secure way? (like hooksecurefunc() should worked ).
Maybe there is an eventhandler that could manage my problem better? All I want is to register when a shift+click occurs from the chat and do something with the clicked information!
Hopefully there is someone here with more experience than me (first time trying lua)
--
Cheers
Tzui <Agony> - Horde