View Single Post
  #1  
Old 07-26-2015, 04:10 PM
The Crucial One
Fire Beetle
 
Join Date: Jul 2015
Posts: 28
Default quest::collectitems(item_id, remove)

I am working on removing the need for turnin's so that I wont have people running around handing in hard to obtain items to pets and what not, atm i use


Code:
sub EVENT_SAY {
$Turnin = quest::saylink("Turnin",1);
    if ($text=~/hail/i && !plugin::check_hasitem($client, 132709)) {
        plugin::Whisper("I need 2 wolf pelts to craft you what your after.");
    }
    if ($text=~/hail/i && plugin::check_hasitem($client, 132709)) {
        plugin::Whisper("I need 2 wolf pelts to craft you what your after.");
	$client->Message(15, "Would you like to $Turnin?"); 
    }
    if ($text=~/Turnin/i && plugin::check_hasitem($client, 132709)) {
$tokens = quest::collectitems(132709, 1);
$tokens = $tokens - 2;
quest::summonitem(132709, $tokens);
}
}
i mean it works but i would like to get the summoned items to be placed back in inventory slots otherwise from time to time i get client inventory issues and people loose their items...

Any help or Advice would be much appreciated,

Thanks
Crucial
Reply With Quote