caquinha
Member
- Joined
- Aug 8, 2016
- Messages
- 248
- Solutions
- 1
- Reaction score
- 24
I'm using this market system for 8.60
https://otland.net/threads/offline-player-to-player-item-trader-auction-system.51447/
And i need some help to if offer have more then 30 days, it be delete for offers lists and send item back to player depot...
@Stellow made this script to delete offers but it not send item back to owners:
There is a way to convert this script 1.0 to 0.4
https://otland.net/threads/automatic-znote-aac-shop-tfs-1-0.224483/
It send parcel...
marketcleaner.lua
Anyone know how to help me?
https://otland.net/threads/offline-player-to-player-item-trader-auction-system.51447/
And i need some help to if offer have more then 30 days, it be delete for offers lists and send item back to player depot...
@Stellow made this script to delete offers but it not send item back to owners:
There is a way to convert this script 1.0 to 0.4
https://otland.net/threads/automatic-znote-aac-shop-tfs-1-0.224483/
It send parcel...
Code:
<globalevent name="marketcleaner" type="startup" event="script" value="marketcleaner.lua"/>
marketcleaner.lua
Code:
function onStartup()
local result = db.getResult("SELECT `id`, `date` FROM `auction_system` ORDER by `date` ASC;")
local days = 30*3600*24
local nowtime = os.date('*t')
if(result:getID() ~= -1) then
while(true)
local id = result:getDataInt("id")
local date = result:getDataInt("date")
local time= os.time(nowtime) - date
local duedate = time - days
if duedate >= 0 then
-- delete offer
db.executeQuery("DELETE FROM `auction_system` WHERE `id` = '".. id .."';")
end
if not(result:next()) then
break
end
end
end
result:free()
end
Anyone know how to help me?
Last edited: