You can do this in lua too. In globalevents startup.lua add this before "Check house auctions":what file and part ? can u tell me? for check
-- Check house owner premium
local resultId = db.storeQuery("SELECT `id`, `owner` FROM `houses` WHERE NOT `owner` = 0 AND (SELECT `premdays` FROM `accounts` WHERE (SELECT `account_id` FROM `players` WHERE `id` = `owner`) = `id`) = 0")
if resultId ~= false then
repeat
local house = House(result.getDataInt(resultId, "id"))
if house then
house:setOwnerGuid(0)
end
until not result.next(resultId)
result.free(resultId)
end
You can do this in lua too. In globalevents startup.lua add this before "Check house auctions":
Untested so let me know how it goes.LUA:-- Check house owner premium local resultId = db.storeQuery("SELECT `id`, `owner` FROM `houses` WHERE NOT `owner` = 0 AND (SELECT `premdays` FROM `accounts` WHERE (SELECT `account_id` FROM `players` WHERE `id` = `owner`) = `id`) = 0") if resultId ~= false then repeat local house = House(result.getDataInt(resultId, "id")) if house then house:setOwnerGuid(0) end until not result.next(resultId) result.free(resultId) end
Just tested this myself and it does work. Are you sure you placed in right script (data/globalevents/scripts/startup.lua) and add the code BEFORE:no sucess :/, player still have a house without premium
-- Check house auctions