I realize now this is #wc slots, thus why it was 'broken'. Correct code below.
Code:
if($text=~/^#myequipment$/i)
{
for($slot = 0; $slot < 24; $slot++)
{
if($client->GetItemIDAt($slot) >= 1 && $client->GetItemIDAt($slot) < 400000000)
{
plugin::Whisper("Slot $slot contains: " . quest::varlink($client->GetItemIDAt($slot)));
}
else
{
plugin::Whisper("Slot $slot is empty.");
}
}
}