olha tentei criar um desse tipo e nao consegui fazer entao achei um do jhon992 aki porem o script n e meu !! e outra coisa esse e se n logar 30 dias foi oq eu consigui achar
Vai em data/globalscripts/scripts/ duplica um arquivo e nomeia para "houseclean" sem as aspas e nele cole:
function onThink(interval, lastExecution, thinkInterval)
local b = 0
local d = db.getResult("SELECT `owner` FROM `houses` WHERE `owner` > "..b..";")
if (d:getDataInt("owner") ~= false) then
local c = db.getResult("SELECT `name` FROM `players` WHERE `id` == "..d:getDataInt("owner")..";")
local lastLogin = getPlayerLastLoginSaved(getPlayerByName(c:getDataString("name")))
local e = db.getResult("SELECT `id` FROM `houses` WHERE `owner` == "..d:getDataInt("owner")..";")
if (os.date("%d", lastLogin) <= os.date("%d") and os.date("%b", lastLogin) ~= os.date("%b")) then
doCleanHouse(e:getDataInt("id"))
setHouseOwner(e:getDataInt("id"), 0)
end
end
while (d:next() ~= false) do
c = db.getResult("SELECT `name` FROM `players` WHERE `group_id` == "..d:getDataInt("owner")..";")
lastLogin = getPlayerLastLoginSaved(getPlayerByName(c:getDataString("name")))
e = db.getResult("SELECT `id` FROM `houses` WHERE `owner` == "..d:getDataInt("owner")..";")
if (os.date("%d", lastLogin) <= os.date("%d") and os.date("%b", lastLogin) ~= os.date("%b")) then
doCleanHouse(e:getDataInt("id"))
setHouseOwner(e:getDataInt("id"), 0)
end
end
return true
end
Agora em globalevents.xml cole a tag:
<globalevent name="houseclean" interval="86400" event="script" value="houseclean.lua"/>
so isso se ajudei + rep





info
Grupo: Visconde
Registrado: 21/11/11
Posts: 323
Reputação: +17
Char no Tibia: Nao tenhu
Tipo queria uma scripter do player comprar uma casa , e se ele nao loga a mais de 25 dias ele perdia a house e os itens iria pro dp
alguem pode me ajudar?
Repp+