PDA

View Full Version : Get Equipment, Broken?


Kingly_Krab
08-21-2013, 04:09 AM
I realize now this is #wc slots, thus why it was 'broken'. Correct code below.

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.");
}
}
}

Drajor
08-21-2013, 04:49 PM
The function command_peekinv is good a reference for things related to this.

EDIT:

Also you have a condition for the upper limit of item id, probably not needed.

NatedogEZ
08-21-2013, 07:57 PM
pretty sure the statement is still true if you don't use an upper limit. For the way written above, as empty slots still give you a number.. but that number is 4billion lol