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 02-22-2013, 08:28 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

The client won't allow you to start a new line in the same message (it won't even display multiple spaces next to each other). You just need to do a for each loop through your array and send a message for each entry in the array.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 02-22-2013, 08:30 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Dang. Alright, well I was hoping that I wouldn't have to do that. I suppose that I am going to have to hold off till I get to the part about foreach as I don't want to confuse myself. ~_~

Thanks for the answer Trev.

~Kingmen
Reply With Quote
  #3  
Old 02-24-2013, 12:41 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default GetItemInInventory

I was going through the possible $client commands located here, and I noticed one that I was really interested in:

Code:
$client -> GetItemInInventory
I have tried making this work in serveral ways, and I just cannot seem to get it. I have searched the forums for the use of this command and it doesn't return any results for me.

When using google to search for any reference to this (eqemu getitemininventory), it returns with the changelog.txt file which I saw the following:

Code:
KLS: Added ability to retrieve items from the inventory in perl with $client->GetItemInInventory(slot_id);
I noticed that the command shows (slot_id), but I am a tad confused on how to denote the item that I am wanting it to take.

Here is my script I am working on right now. The entire script works except for the part in black.

Code:
######
#Buffer
#Kingmen
######

sub EVENT_SAY
{

my $buffs = quest::saylink("buffs");
my $help = quest::saylink("help");
my $items = quest::saylink("items");

@diamonds = (
              Blue_Diamond && quest::varlink("22503"),
              Raw_Diamond && quest::varlink("15981"),
              Diamond && quest::varlink("10037"),
              Flawless_Diamond && quest::varlink("25814")
            );
			
@diamonds1 = (
				Blue_Diamond 	 &&	$client->GetItemInInventory(22503),
				Raw_Diamond 	 &&	$client->GetItemInInventory(10037),
				Diamond 	  	 &&	$client->GetItemInInventory(25814),
				Flawless_Diamond &&	$client->GetItemInInventory(15981)
			 );

if($text=~/hail/i)
	{
		plugin::Whisper("Hi there $name, would you like some $buffs? Also, I am collecting some $items if you want to $help");
	}
	
if($text=~/buffs/i)
	{
		plugin::Whisper("Enjoy your buffs, $name");
		quest::selfcast(1561);  #legacy of thorns
		quest::selfcast(39);    #quickness
		quest::selfcast(2570);  #kei
		quest::selfcast(5415);  #Talisman of Wunshi
		quest::selfcast(5405);  #Talisman of Fortitude
		quest::selfcast(5417);  #Champion
	}
	
if($text=~/^items$/i)
  {{
    $client->Message(315, "Yes, I am searching for the follwing items.");
    $client->Message(315, "=== ITEMS ===");
	}
  for my $dia(@diamonds){
    $client->Message(315, "$dia");
   }}
   
if($text=~/help/i)
  {{
    $client->Message(315, "Great. Stand close as I take them.");
  }
  for my $dia1(@diamonds1){
  $client->GetItemInInventory($dia1);
  $client->(315, "All Gone.");
  }}
}
All I am really wanting this script to do is search the persons' inventory, find the items in question, and take them. I have a bit more that I want to do with this, but for right now I want to get this one part working in full so as to understand how it works, and then I will work on the next part (custom currency [different name instead of current ones], and server automatically crediting the currency to the client. I am sure I can figure this part on my own as I have seen some mention to this within the forums recently [Found Here] which should make it easier for me to do so).

Thanks for any replies,
~Kingmen
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:48 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3