EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Get Equipment, Broken? (https://www.eqemulator.org/forums/showthread.php?t=37202)

Kingly_Krab 08-21-2013 04:09 AM

Get Equipment, Broken?
 
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.");
                }
        }
}


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


All times are GMT -4. The time now is 03:51 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.