zbizu
Legendary OT User
functions to see online players eq/depot
reversing parameters will result giving a copy of your eq/depot to specified player
spyEq:
cid will receive a copy of target's eq and bp content
target will not lose anything and won't be notified
example: spyEq(cid, "your target")
you will receive a blue backpack with a perfect copy of your target's eq
he won't even know about that nor lose anything
spyDepot:
you will receive a container with a perfect copy of target's depot from specified town
he won't even know about that nor lose anything
example: spyDepot(cid, "your target", 4)
"your target" field allows these types of data:
Functions:
Usage/installation:
it's up to you. I was too lazy to do action/talkaction so I used it via /execute
handle with care, if you reverse cid and target order, your target will receive a copy of your items
reversing parameters will result giving a copy of your eq/depot to specified player
spyEq:
cid will receive a copy of target's eq and bp content
target will not lose anything and won't be notified
example: spyEq(cid, "your target")
you will receive a blue backpack with a perfect copy of your target's eq
he won't even know about that nor lose anything
spyDepot:
you will receive a container with a perfect copy of target's depot from specified town
he won't even know about that nor lose anything
example: spyDepot(cid, "your target", 4)
"your target" field allows these types of data:
Code:
"name",
player,
cid (player:getId())
Functions:
Code:
function spyEq(cid, target)
if not Player(cid) then
return false
end
if not Player(target) then
return false
end
local tr = Player(target)
local main_bp = Container(doCreateItemEx(2002))
for i = 1, 10 do
local eq_slot = tr:getSlotItem(i)
if eq_slot then
main_bp:addItemEx(eq_slot:clone())
end
end
Player(cid):addItemEx(main_bp)
return true
end
function spyDepot(cid, target, town)
if not Player(cid) then
return false
end
if not Player(target) then
return false
end
local tr = Player(target)
local main_bp = Container(doCreateItemEx(17432))
for i = 0, tr:getDepotChest(town, true):getItemHoldingCount() - 1 do
if tr:getDepotChest(town, true):getItem(i) == nil then
break
end
main_bp:addItemEx(tr:getDepotChest(town, true):getItem(i):clone())
end
Player(cid):addItemEx(main_bp)
return true
end
Usage/installation:
it's up to you. I was too lazy to do action/talkaction so I used it via /execute
handle with care, if you reverse cid and target order, your target will receive a copy of your items
Last edited: