From eeb6d66c73f12acca65f635a61adf9b8ac7c628e Mon Sep 17 00:00:00 2001 From: Arcidayne <9382522b@opayq.com> Date: Mon, 11 Apr 2016 12:50:06 -0400 Subject: [PATCH] Quick update and changes. --- Auction_Utilities/Auction_Utilities.xml | 63 ++++++++++++++----------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/Auction_Utilities/Auction_Utilities.xml b/Auction_Utilities/Auction_Utilities.xml index 36e0d81..a258eaf 100644 --- a/Auction_Utilities/Auction_Utilities.xml +++ b/Auction_Utilities/Auction_Utilities.xml @@ -15,7 +15,7 @@ save_state="y" date_written="2016-03-29 14:40:46" requires="4.80" - version="1.7" + version="2.0" > enabled="y" group="Auction_Market" keep_evaluating="y" - match="^\s+?(\d+)\s+.*?\s+\d+\s+.*?\s+[\d,]+\s+\d+\s+.*?$" + match="^\s+?\*?(\d+)\s+.*?\s+\d+\s+.*?\s+[\d,]\*?+\s+\d+\s+.*?$" omit_from_output="y" regexp="y" send_to="14" sequence="100" > for i,v in pairs(TriggerStyleRuns) do - if v.text:gsub(" ", "") == "%1" then - Hyperlink("lbid %1", v.text, "", "white", "", 0) - else - ColourTell (RGBColourToName (v.textcolour), +if v.text:gsub(" ", "") == "%1" then + local st, sl, spl = string.find(v.text, "[^%s]"), string.len(v.text), string.len("%1") + local ls, ts = string.rep(" ", st-1), "" + if (spl+ls) < sl then + ts = string.rep(" ", sl-(spl+ls)) + end + ColourTell(RGBColourToName(v.textcolour), RGBColourToName(v.backcolour), ls) + Hyperlink("lbid %1", "%1", "", RGBColourToName(v.textcolour), RGBColourToName(v.backcolour), 0) + ColourTell(RGBColourToName(v.textcolour), RGBColourToName(v.backcolour), ts) +else + ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text) - end + end end Note ("") @@ -92,7 +99,7 @@ EnableTrigger("CurrentBid", true) enabled="y" group="Auction_Market" keep_evaluating="y" - match="^(?:(Market|Auction|Remort Auction)): \w+ (?:is auctioning|is selling|of).*(?:(?:Level \d+, )?Num (\d+)\))\.?(?: Auction is for .*\.| Current bid is \d+\.)?" + match="^(?:\{chan ch=.*\})?(?:(Market|Auction|Remort Auction)): \w+ (?:is auctioning|is selling|of).*(?:(?:Level \d+, )?Num (\d+)\))\.?(?: Auction is for .*\.| Current bid is \d+\.)?" omit_from_output="y" regexp="y" send_to="14" @@ -102,13 +109,13 @@ EnableTrigger("CurrentBid", true) if "%1" == "Market" then bida = "lbid" elseif "%1" == "Remort Auction" then bida = "rbid" end for i,v in pairs(TriggerStyleRuns) do - if v.text:gsub(" ", "") == "%2" then - Hyperlink(bida .. " %2", v.text, "", "yellow", "", 0) - else - ColourTell (RGBColourToName (v.textcolour), + if v.text:gsub(" ", "") == "%2" then + Hyperlink(bida .. " %2", v.text, "", RGBColourToName(v.textcolour), RGBColourToName(v.backcolour), 0) + else + ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text) - end + end end Note ("") @@ -122,13 +129,13 @@ Note ("") sequence="100" > for i,v in pairs(TriggerStyleRuns) do - if v.text == "%1" then - Hyperlink("bid %1", "%1", "", "red", "", 0) - else - ColourTell (RGBColourToName (v.textcolour), + if v.text == "%1" then + Hyperlink("bid %1", "%1", "", RGBColourToName(v.textcolour), RGBColourToName(v.backcolour), 0) + else + ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text) - end + end end Note ("") @@ -142,13 +149,13 @@ Note ("") sequence="100" > function get_date(days, hours, minutes, seconds) - daysec = days*86400 - hoursec = hours*3600 - minsec = minutes*60 + daysec = days*86400 + hoursec = hours*3600 + minsec = minutes*60 - totalsecs = daysec+hoursec+minsec+seconds + totalsecs = daysec+hoursec+minsec+seconds - return os.date('(%H:%M %b %d)', os.time()+totalsecs) + return os.date('(%H:%M %b %d)', os.time()+totalsecs) end local aucd, auch, aucm, aucs = 0, 0, tonumber("%4"), tonumber("%5") @@ -175,14 +182,14 @@ ColourNote("white", "", "%1 ", "cyan", "", date_end, "white", "", string.rep(" " local hlink = "lbid " .. marketbidn .. " " .. bop for i,v in pairs(TriggerStyleRuns) do - if v.text:gsub(" ", "") == "%1" and BUYOUT_OPTION == 1 then - Hyperlink(hlink, "%1", "", "yellow", "", 0) + if v.text:gsub(" ", "") == "%1" and BUYOUT_OPTION == 1 then + Hyperlink(hlink, "%1", "", RGBColourToName(v.textcolour), RGBColourToName(v.backcolour), 0) ColourTell("", "", string.rep(" ", v.text:len() - string.len("%1"))) - else - ColourTell (RGBColourToName (v.textcolour), + else + ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text) - end + end end Note ("")