Posts: 6
Threads: 0
Joined: Apr 2019
its not difficult read the first threath. Anyways starting to doubt it works, I lost out on 13 houses so far... even when there was just 1 other player.
I mean it gives the message; "this plot of land not yet ready to purchase". But I never win, making me think there is an extra confirmation box or similar that needs to be pressed when its available.
Posts: 31
Threads: 2
Joined: Jul 2016
I can confirm it works (at least for free company house acquisition) since I was able to acquire one earlier today. I had set my delay to 1200, and also had Assist Mode turn on with Quest Helpers enabled to autoconfirm any additional dialog.
Posts: 6
Threads: 0
Joined: May 2019
is there any way to add small randomness to the intervals between clicks/attempts?
worried about leaving it on for long hours without any randomness.
Posts: 1
Threads: 0
Joined: May 2019
I set it up as instructed in the first page but im having trouble figuring out how to use it in game. I don'[t know what to set the bot mode on or skill profile etc. anybody willing to give me a walk through? i put the copied code in the user functions part and set a keybind (which i may have wrong). im a noob at this. help!
Posts: 1
Threads: 0
Joined: Mar 2017
Code:
local delay = 500 --Delay between purchase attempts, 1000 is 1 second
local buytype = 0 --0 is Private Individual, 1 is Free Company, 2 is Relocation...
local PlacardID = 0
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
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
if Player:GetTarget() == nil then
Player:SetTarget(PlacardID)
end
end
RegisterEventHandler("Gameloop.Update", BuyHouseFunction)
use this edited script from bender69
put it in user function>new>name "HouseBuy"
in key binds, select new>name "name HouseBuy" >function, select "HouseBuy"> Key 1 select "Shift"> Key 2 select "1"
okay, you done, to run it, just press Shift and 1 on ur keyboard
Posts: 1
Threads: 0
Joined: May 2019
(05-12-2019, 04:55 AM)shiner1976 Wrote: I can confirm it works (at least for free company house acquisition) since I was able to acquire one earlier today. I had set my delay to 1200, and also had Assist Mode turn on with Quest Helpers enabled to autoconfirm any additional dialog.
I've got the same settings yet no matter what the code attempts to purchase a personal house instead of an FC house every time. Any ideas? Here's my code:
Code:
local delay = 1200 --Delay between purchase attempts, 1000 is 1 second
local buytype = 1 --0 is Private Individual, 1 is Free Company, 2 is Relocation...
local PlacardID = 0
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
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
if Player:GetTarget() == nil then
Player:SetTarget(PlacardID)
end
end
RegisterEventHandler("Gameloop.Update", BuyHouseFunction)
Posts: 11
Threads: 3
Joined: Jun 2017
05-29-2019, 09:08 PM
(This post was last modified: 05-29-2019, 09:11 PM by taffyapple.)
I'm trying out this code at present but having a little difficulty in controlling the delay.
I'm a little paranoid leaving it at 1200. I changed it to 2000 to test out that but it's clear from testing, it's not using any delay at all, it's going as fast as it can. I copied bender69's code following sizuka's instructions.
Can someone help me out because as much as I want a house, I don't want that to the GM's prison lol.
Posts: 11
Threads: 3
Joined: Jun 2017
05-29-2019, 09:10 PM
(This post was last modified: 05-29-2019, 09:11 PM by taffyapple.)
ended up with a double post - sorry
Posts: 3
Threads: 0
Joined: Jun 2019
It works for the most part but it only wants to select "Private Individual" instead of "Free Company" despite me changing the local buy type to "1". I've literally tried every last one of the versions posted on this thread, but still all select "Private Individual". Please help, my company needs a house ♥
Posts: 6
Threads: 0
Joined: May 2019
might need to reload lua after making changes for it to update, was how it was for me at least