Posts: 3
Threads: 0
Joined: Jun 2019
(06-04-2019, 11:05 AM)qwerbob Wrote: might need to reload lua after making changes for it to update, was how it was for me at least
I reloaded everything even my whole computer, still selects "Private Individual". Could it be that it selects it too fast for me to see the change?
Posts: 3
Threads: 0
Joined: Jun 2019
Can anyone actually confirm a code that purchases a free company? Or verify that this code works?
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: 1
Threads: 0
Joined: Jun 2019
I just installed mmo minion but have no idea how to get this work, can anyone help me please and ty.
Posts: 31
Threads: 2
Joined: Dec 2013
(06-07-2019, 07:53 PM)Iandude Wrote: I just installed mmo minion but have no idea how to get this work, can anyone help me please and ty.
Same here
Posts: 30
Threads: 7
Joined: Jun 2015
Hmmm just tried, but i think its not working because it stays at the buying screen
Posts: 1
Threads: 0
Joined: Aug 2019
Can someone describe what exactly is supposed to happen in game if this is successfully running? I tried the edited script, I set up the keybind as suggested, but nothing happened. Well, no, I take it back: it caused me to use an action in game since it's also a keybind for something in game. I did reload everything first, after creating the shortcut and keybind for it, too. I tried making a different keybind and reloaded stuff, still nothing happened. I'm just curious what I did wrong or how to fix it; maybe it'll help someone else reading this. Thanks in advance.
Posts: 27
Threads: 5
Joined: Dec 2014
(08-15-2019, 12:12 PM)bambooraven Wrote: Can someone describe what exactly is supposed to happen in game if this is successfully running? I tried the edited script, I set up the keybind as suggested, but nothing happened. Well, no, I take it back: it caused me to use an action in game since it's also a keybind for something in game. I did reload everything first, after creating the shortcut and keybind for it, too. I tried making a different keybind and reloaded stuff, still nothing happened. I'm just curious what I did wrong or how to fix it; maybe it'll help someone else reading this. Thanks in advance.
I'm guessing considering the time of the post you've figured it out by now. If not, it will simply spam at the interval you set until the estate is taken by you or another individual. It might be best for you to setup a shortcut button rather than bind it to a specific set of key combinations. This way it's much easier for you to start/stop it by pressing the button.
Overall it's a great script and I appreciate the time it took to write it up. I've used this in the past to purchase an individual and free company home. At the moment I'm wondering about the relocation option. I'm currently trying to relocate my fc to a larger estate. I have a vague timeline of 3-4 days for when this estate expires to be claimed. I'm just wondering if this relocation option is for a personal home or fc? If the former, can someone please tell me what I need to modify?
Thank you
Posts: 171
Threads: 26
Joined: May 2016
read the secound line of the code
Posts: 27
Threads: 5
Joined: Dec 2014
09-30-2019, 07:11 PM
(This post was last modified: 09-30-2019, 07:48 PM by modena.)
(09-30-2019, 06:04 PM)super4uwak Wrote: read the secound line of the code
Doesn't specify if the relocation is private or free company. Just states relocation, the code doesn't really discern what type (as far as I can tell) other than it selecting yes when the dialogue eventually appears.
Posts: 734
Threads: 18
Joined: Feb 2014
you change the 1 to a 0, 1 or 2
the - indicates a comment, telling you what your choices are