TalkAction Modify 0.3.5 to 0.2.5 Empty house

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
284
Best answers
0
Reaction score
2
This script was made by Adam for 0.3.5 tfs. Could someone modify it so it works with 0.2.5 tfs please. It clears homes of players that never login.

PHP:
--Adam 2008

--Goosio OT

local safelist = {1,2}

function onSay(cid, words, param)
if getPlayerGroupId(cid) > 2 then
    pdelete = "Inactive Players With Houses:\n\n"
    days = 10*3600*24
    t=os.date('*t')
    local house = db.getResult("SELECT `owner`,`id` FROM `houses`")
    if(house:getID() ~= -1) then
        while (true) do
        local owner = house:getDataInt("owner")
        local hid = house:getDataInt("id")
            local player = db.getResult("SELECT `id`,`name`,`lastlogin` FROM `players` WHERE `id` = '"..owner.."'  ")
            if(player:getID() ~= -1) then
                local lastlogin = player:getDataInt("lastlogin")
                local pid = player:getDataInt("id")
                local name = player:getDataString("name")
                time=os.time(t) - lastlogin
                offline = time - days
                if offline >= 0 then
                    pdelete = pdelete.."House #"..hid.." owned by "..name.."\n"
                    if isInArray(safelist,hid) == FALSE then                    
                        setHouseOwner(hid, 0)
                    end
                end
            player:free()
            end
            if not(house:next()) then
                break
            end
        end
            
        house:free()    
        doShowTextDialog(cid, 5958, pdelete)
    else
        doPlayerSendCancel(cid, "Error.")
    end
end
return TRUE
end
 

babalow

Nobody o/
Joined
Nov 7, 2007
Messages
392
Best answers
0
Reaction score
0
Location
Brazil
@up
function
onSay(cid, words, param)
maybe movements.
 
OP
Nightimarez

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
284
Best answers
0
Reaction score
2
As the title says, talkactions. I need someone to convert this to work for 0.2.5
 

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,717
Best answers
8
Reaction score
285
What is it? CreatureEvents? actions? movemts?
 
OP
Nightimarez

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
284
Best answers
0
Reaction score
2
Still seeking for someone to modify this script to work on Mystic Spirit.
 
Top