From 61b5f95cb63ad5e1405366a36d56b428ab58faa0 Mon Sep 17 00:00:00 2001 From: Arcidayne <9382522b@opayq.com> Date: Thu, 14 Apr 2016 02:05:51 -0400 Subject: [PATCH] More features, confirm option on buyouts! --- Auction_Utilities/Auction_Utilities.xml | 27 +++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Auction_Utilities/Auction_Utilities.xml b/Auction_Utilities/Auction_Utilities.xml index 642c576..2e4c545 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="2.62" + version="2.63" > > - if "%1" == "on" then BUYOUT_OPTION = 1 else BUYOUT_OPTION = 0 end - ColourNote("white", "blue", "Turning %1 clickable buyouts!") - SetVariable("buyoutoption", BUYOUT_OPTION) + if "%1" == "confirm" then + if "%2" == "on" then BUYOUT_CONFIRM = 1 else BUYOUT_CONFIRM = 0 end + ColourNote("white", "blue", "Buyout confirmed now turned %2!") + else + if "%2" == "on" then BUYOUT_OPTION = 1 else BUYOUT_OPTION = 0 end + ColourNote("white", "blue", "Turning %2 clickable buyouts!") + end + SetVariable("buyoutoption", BUYOUT_OPTION) + SetVariable("buyoutconfirm", BUYOUT_CONFIRM) @@ -273,6 +279,7 @@ function OnPluginInstall() PLUGIN_VERSION = GetPluginInfo(GetPluginID(), 19) PLUGIN_NAME = GetPluginInfo(GetPluginID(), 1) BUYOUT_OPTION = GetVariable("buyoutoption") or 1 + BUYOUT_CONFIRM = GetVariable("buyoutconfirm") or 1 require "movewindow" require "mw" @@ -490,7 +497,15 @@ function mouseup (flags, hotspot_id) ColourNote("white", "blue", "Proxy bid cancelled!") end elseif hotspot_id == "buyout" then - Send("lbid " .. marketbidn .. " " .. bop) + if BUYOUT_CONFIRM == 1 then + if utils.msgbox("Confirm buyout for " .. bop .. "?", "Question", "yesno", "?") == "yes" then + Send("lbid " .. marketbidn .. " " .. bop) + else + ColourNote("Buyout cancelled!") + end + else + Send("lbid " .. marketbidn .. " " .. bop) + end elseif hotspot_id == "close" then movewindow.save_state (win) WindowShow(win, false)