• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action NEW DEPOT IDEA(from runescape)

Zerak456

Gorlex.net NEW!
Joined
Aug 13, 2008
Messages
1,060
Reaction score
6
Ehm hello guys
i need a script, when u pull a lever u i will deposit ur eq

can someone make it?:D:D

REP++
 
what version of TFS are you using?

I have been making scripts for people lately...
and they don't work cause wrong TFS.
 
Idea is nice, but currently there is no function to operate on player depots. We'll see what can be done.
 
Idea is nice, but currently there is no function to operate on player depots. We'll see what can be done.

LUA:
function doPlayerAddDepotItem(cid, item, count)
    local item,count,pid = type(item)=="table" and item or {item},type(count)=="table" and count or {(count or 1)},getPlayerGUID(cid)
    doRemoveCreature(cid)
    for k,v in ipairs(item) do
        local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1")
        return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '"..(count[k] > 1 and string.format("%x",count[k]) or '').."')") or false
    end
end

Credits to Maguss -> http://otland.net/f163/doplayeradddepotitem-getinstantspells-setplayerrk-35751/
 
LUA:
function doPlayerAddDepotItem(cid, item, count)
    local item,count,pid = type(item)=="table" and item or {item},type(count)=="table" and count or {(count or 1)},getPlayerGUID(cid)
    doRemoveCreature(cid)
    for k,v in ipairs(item) do
        local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1")
        return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '"..(count[k] > 1 and string.format("%x",count[k]) or '').."')") or false
    end
end

Credits to Maguss -> http://otland.net/f163/doplayeradddepotitem-getinstantspells-setplayerrk-35751/

What slawkens meant, was that you cant add items to players depot without forcing his logout.

tankssssssssss
 
Back
Top