Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 07-26-2015, 07:26 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

I was bored.. so I wrote a thing.. maybe this will help you?

https://perl.pastebin.mozilla.org/8840687


place that into a .pl file in your plugins folder...


Here is an example quest on how to use it..


Code:
sub EVENT_SAY {
	if($text=~/hail/i) {
		plugin::Whisper("This handin requires two " . quest::varlink(21779)
												. ", three " . quest::varlink(9990)
												. ", one " . quest::varlink(1001)
												. ", and 1 platinum, 5 gold, 5 silver, 5 copper.");
		$client->Message(315, "::" . quest::saylink("handin",1));
	} elsif($text=~/handin/i) {
		if (plugin::collect_quest($client, 21779 => 2, 9990 => 3, 1001 => 1, "platinum" => 1, "gold" => 5, "silver" => 5, "copper" => 5)) {
			plugin::Whisper("GRATS YOU DID A TURN IN..");
		} 
	}
}
Reply With Quote
  #3  
Old 07-26-2015, 07:43 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

This sounds similar to the way KinglyKrab was changing handins to pull from inventory instead of awaiting a trade window.

I can definitely see it being useful for a builder who wants to avoid the trade window method.
Reply With Quote
  #4  
Old 07-26-2015, 07:58 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Yeah, I had written plugins to do something similar to what Natedog is doing, but he added money functionality and made it a hash. It's a much nicer way to do it than the trade window, that's for sure, as you can require as many items as you want.
Reply With Quote
  #5  
Old 07-26-2015, 09:39 PM
The Crucial One
Fire Beetle
 
Join Date: Jul 2015
Posts: 28
Default

Thanks for your Reply's all this is much helpful! With all the random players that are always handing shit into pets this makes my life that much easier!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:43 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3