MMOMinion
Help with Spamming Housing Placard - Printable Version

+- MMOMinion (https://www.mmominion.com)
+-- Forum: FFXIVMinion (https://www.mmominion.com/forumdisplay.php?fid=87)
+--- Forum: [DOWNLOADS] Addons, Lua Modules, Navigation Meshes.. (https://www.mmominion.com/forumdisplay.php?fid=90)
+---- Forum: I Need Help with LUA coding! (https://www.mmominion.com/forumdisplay.php?fid=104)
+---- Thread: Help with Spamming Housing Placard (/showthread.php?tid=20417)



Help with Spamming Housing Placard - Ash-Brighter - 02-23-2018

Hello, 

Since 4.2 it's virtually a clickfest when it comes to trying to claim relinquished plots and their random timers. Is it possible to make a LUA module to spam the placard's purchase?


RE: Help with Spamming Housing Placard - rsilva712 - 02-24-2018

http://www.mmominion.com/thread-20403.html


RE: Help with Spamming Housing Placard - Ash-Brighter - 02-24-2018

(02-24-2018, 05:27 AM)rsilva712 Wrote:  http://www.mmominion.com/thread-20403.html

Thanks!


RE: Help with Spamming Housing Placard - sasmariozeld - 04-05-2019

It doesnt work however , it has something to do with the placecard info in it , im trying zo understand what selectYesno does buz cant figure it out


RE: Help with Spamming Housing Placard - sasmariozeld - 04-05-2019

fixed it

local delay = 5000 --Delay between purchase attempts, 1000 is 1 second
local buytype = 0 --0 is Private Individual, 1 is Free Company, 2 is Relocation...

if BuyHouseVar == nil then
BuyHouseVar = true
BuyHouseStep = 0
BuyHouseLast = 0
BuyHousePushButton = 24
if GetGameRegion() == 1 then BuyHousePushButton = 25 end
else
BuyHouseVar = not BuyHouseVar
end

function BuyHouseFunction()
d("BuyHouseStep: "..tostring(BuyHouseStep))
if BuyHouseVar and TimeSince(BuyHouseLast) > delay then
local PlacardID = 0
local el = EntityList("nearest,contentid=2002736")
if table.valid(el) then
for k,v in pairs(el) do
PlacardID = v.id
end
end

if BuyHouseStep == 0 then
if IsControlOpen("HousingSignBoard") then
BuyHouseStep = 1
else
Player:SetTarget(PlacardID)
Player:Interact(PlacardID)
end
end
if BuyHouseStep == 1 then
UseControlAction("HousingSignBoard","PurchaseLand")
if IsControlOpen("SelectYesno") then
BuyHouseStep = 3
elseif IsControlOpen("SelectString") and not IsControlOpen("HousingSignBoard") then
BuyHouseStep = 2
elseif IsControlOpen("HousingSignBoard") then
local ctrl = GetControl("HousingSignBoard")
if ctrl:GetRawData()[1].value.A == 1 then
ctrl:PushButton(BuyHousePushButton,2)
end
end
end
if BuyHouseStep == 2 then
if IsControlOpen("SelectYesno") then
BuyHouseStep = 3
elseif IsControlOpen("SelectString") then
GetControl("SelectString"):Action("SelectIndex",buytype)
elseif IsControlOpen("HousingSignBoard") then
UseControlAction("SelectYesno","Yes")
BuyHouseStep = 1
end
end
if BuyHouseStep == 3 then
if IsControlOpen("SelectYesno") then
UseControlAction("SelectYesno","Yes")
elseif Player:GetTarget() == nil then
BuyHouseStep = 0
BuyHouseLast = Now()
end
end
end
end
RegisterEventHandler("Gameloop.Update", BuyHouseFunction)


RE: Help with Spamming Housing Placard - nil - 04-25-2019

seems to be working, question (trying to understand the script) what happens in the event that a plot is purchased before you? Had a friend that was trying another bot and a FC got the plot first, they ended up sending in 10 application into that FC before they stopped it :) .


RE: Help with Spamming Housing Placard - 2tone - 08-01-2019

Is it defaulted to buy for a private individual?