;'God - Check Inventory'

TargetID = GetUserFlag(#USERID, 45)

If GetUserAccess(#USERID) < 5
	SetUserSkill(#USERID,160,0)
	GoTo END
EndIf

If Lower(GetUserMessage(#USERID))="all"
	SendMessageToAll(GetUserName(TargetID)+"'s Inventory:",#MSG_EMOTE)
Else
	SendMessageToUser(#USERID,GetUserName(TargetID)+"'s Inventory:",#MSG_EMOTE)
EndIf


Item = 0
Y = 0

While Y < 8
     X = 0

	ItemList=""
	
	While X < 4
		Item = Y * 4 + X
		ItemID = GetUserInvItem(TargetID,Item)
		
		If ItemID > 0
			ItemList=ItemList+GetItemName(ItemID)+", "
		Else
			ItemList=ItemList+"Empty, "
		EndIf
		
		X=X+1
	Wend
	
	If Lower(GetUserMessage(#USERID))="all"
		SendMessageToAll(ItemList,#MSG_EMOTE)
	Else
		SendMessageToUser(#USERID,ItemList,#MSG_EMOTE)
	EndIf

	Y=Y+1
Wend

Label END

Continue = 1