Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
function getItemSignature(sigData)
if (not sigData) then return nil end
for id,rprop,enchant,name,count,min,buyout,uniq in string.gfind(sigData, "(%d+):(%d+):(%d+):(.-):(%d+):(.-):(%d+):(.+)") do
if (name == nil) then name = ""; end
return tonumber(id),tonumber(rprop),tonumber(enchant),name,tonumber(count),tonumber(min),tonumber(buyout),tonumber(uniq);
end
return nil;
end
[/pre]Posted by: xenoputtss on Feb 6 2006, 04:41 PM
[pre]function getItemSignature(sigData)[/pre]
if (not sigData) then return nil end
for id,rprop,enchant,name,count,min,buyout,uniq in string.gfind(sigData, "(%d+):(%d+):(%d+):(.-):(%d+):(.-):(%d+):(.+)") do
if (name == nil) then name = ""; end
return tonumber(id),tonumber(rprop),tonumber(enchant),name,tonumber(count),tonumber(min),tonumber(buyout),tonumber(uniq);
end
return nil;
end
is the 'min' value being returned, the minimum bid? if not, where do i get that from?
function venTrashFilter(sType, signature)
--sType will be to toggel between bids and buyouts
local id,rprop,enchant, name, count,min,buyout,uniq = Auctioneer.Core.GetItemSignature(signature);
local itemKey = id..":"..rprop..":"..enchant;
local auctKey = Auctioneer.Util.GetAuctionKey();
local itemCat = Auctioneer.Util.GetCatForSig(signature);
local snap = Auctioneer.Core.GetSnapshot(auctKey, itemCat, signature);
if not (buyout > 0) then
buyout = 0
end
local ret;
if (Informant) then
ret = Auctioneer.API.GetVendorBuyPrice(id)
end
if ( (
(buyout > 0)
and buyout < ret
) or
(
buyout == 0
and min < ret
)
) then
return false;
end
return true;
end
[/pre]Posted by: xenoputtss on Feb 6 2006, 10:23 PM
ok, one more question I have this code that I modifed to make a new search function.
[pre][/pre]
function venTrashFilter(sType, signature)
--sType will be to toggel between bids and buyouts
local id,rprop,enchant, name, count,min,buyout,uniq = Auctioneer.Core.GetItemSignature(signature);
local itemKey = id..":"..rprop..":"..enchant;
local auctKey = Auctioneer.Util.GetAuctionKey();
local itemCat = Auctioneer.Util.GetCatForSig(signature);
local snap = Auctioneer.Core.GetSnapshot(auctKey, itemCat, signature);
if not (buyout > 0) then
buyout = 0
end
local ret;
if (Informant) then
ret = Auctioneer.API.GetVendorBuyPrice(id)
end
if ( (
(buyout > 0)
and buyout < ret
) or
(
buyout == 0
and min < ret
)
) then
return false;
end
return true;
end
my problem is that
Auctioneer.API.GetVendorBuyPrice(id) needs an itemID, but I don't think i have one at this point. Is there a way i can get an itemID from 'signature'?
ret = Auctioneer.API.GetVendorBuyPrice(tonumber(id))[/pre]buyout = buyout or 0;
local ret = Auctioneer.API.GetVendorBuyPrice(tonumber(id)) or 0;
if ( (
(buyout > 0)
and buyout < ret
) or
(
buyout == 0
and min < ret
)
) then
return false;
end[/pre]Posted by: MentalPower on Feb 7 2006, 11:53 AM
[*]"id" contains the item's ItemID, however Informant requires ItemID to be a number, not a string. so you have to do the following:
[pre]ret = Auctioneer.API.GetVendorBuyPrice(tonumber(id))[/pre]
Posted by: xenoputtss on Feb 7 2006, 01:40 PM
shwing! I can't believe that I didn't even think that id was a string. I thought it was the itemID, but .. . .well, you see that I didn't realize it was a string of the number.
Thanks for you help.
1 to 6 of 6