Ribbit
New Member
- Joined
- Dec 13, 2012
- Messages
- 51
- Reaction score
- 2
Hi I'm using 1.0 and I need to alter this script a bit to get it working for 1.0.
Code:
-- Equipment spy by Azi [ersiu] --
function getItemsInContainer(cont, sep)local text = ""local tsep = ""local count = ""for i=1, sep dotsep = tsep.."-"end
tsep = tsep..">"for i=0, getContainerSize(cont.uid)-1 dolocal item = getContainerItem(cont.uid, i)
if isContainer(item.uid) == FALSE thenif item.type > 0 then
count = "("..item.type.."x)"end
text = text.."\n"..tsep..getItemNameById(item.itemid).." "..countelse
if getContainerSize(item.uid) > 0 then
text = text.."\n"..tsep..getItemNameById(item.itemid) text = text..getItemsInContainer(item, sep+2)
elsetext = text.."\n"..tsep..getItemNameById(item.itemid)end
end
endreturn text
endfunction onSay(cid, words, param, channel)
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 dotext = text.."\n\n"local item = getPlayerSlotItem(player, i)
if item.itemid > 0 thenif isContainer(item.uid) == TRUE then
text = text..slotName[i]..": "..getItemNameById(item.itemid)..getItemsInContainer(item, 1)
elsetext = text..slotName[i]..": "..getItemNameById(item.itemid)endelsetext = text..slotName[i]..": Empty"end
end
doShowTextDialog(cid, 6579, text)
elsedoPlayerSendCancel(cid, "This player is not online.")endreturn TRUE
end [code/]