-- Equipment spy by Azi [ersiu] --
function getItemsInContainer(cont, sep)
local text = ""
local tsep = ""
local count = ""
for i=1, sep do
tsep = tsep.."-"
end
tsep = tsep..">"
for i=0, getContainerSize(cont.uid)-1 do
local item = getContainerItem(cont.uid, i)
if isContainer(item.uid) == FALSE then
if item.type > 0 then
count = "("..item.type.."x)"
end
text = text.."\n"..tsep..getItemNameById(item.itemid).." "..count
else
if getContainerSize(item.uid) > 0 then
text = text.."\n"..tsep..getItemNameById(item.itemid)
text = text..getItemsInContainer(item, sep+2)
else
text = text.."\n"..tsep..getItemNameById(item.itemid)
end
end
end
return text
end
function onSay(cid, words, param, channel)
checkExhausted(cid, 1000, 5) -- zawed el line da ta7t kol function onSay
if(param == "") then
doPlayerSendCancel(cid, "Command requires param.")
return TRUE
end
local slotName = {"Head Slot", "Amulet Slot", "Backpack Slot", "Armor Slot", "Right Hand", "Left Hand", "Legs Slot", "Feet Slot", "Ring Slot", "Ammo Slot"}
local player = getPlayerByNameWildcard(param)
if isPlayer(player) == TRUE then
local text = getPlayerName(player).."'s Equipment: "
for i=1, 10 do
text = text.."\n\n"
local item = getPlayerSlotItem(player, i)
if item.itemid > 0 then
if isContainer(item.uid) == TRUE then
text = text..slotName[i]..": "..getItemNameById(item.itemid)..getItemsInContainer(item, 1)
else
text = text..slotName[i]..": "..getItemNameById(item.itemid)
end
else
text = text..slotName[i]..": Empty"
end
end
doShowTextDialog(cid, 6579, text)
else
doPlayerSendCancel(cid, "This player is not online.")
end
return TRUE
end
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}