View Single Post
  #4  
Old 03-18-2015, 09:29 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Well, $itemcount is a hash reference used to see if a client has that item, which is not useful in EVENT_ITEM where you're checking for hand in, rather than just checking if a client has an item or not, meaning you should use plugin::check_handin, not $itemcount. You can use $itemcount in other subroutines like this:
Code:
sub EVENT_SAY {
    if ($text=~/Hail/i && $itemcount{59943} >= 1) {
        plugin::Whisper("You have the skull!");
    } elsif ($text=~/Hail/i && $itemcount{59943} == 0) {
        plugin::Whisper("You don't have the skull!");
    }
}
Reply With Quote