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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #17  
Old 02-22-2013, 08:20 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

I have been reading the perl book and I got to the part of Hashes, Arrays, Scalars etc and after reading about it I decided to give it a shot.

I have it working, but I just have one issue with it... It makes it into a paragraph format. I am wanting have it in a list format, and it seems the \n doesn't work within an array.

Here is my quest file:

Code:
############
#Test Array
#Kingmen
############


sub EVENT_SAY
{


       
my $content = quest::saylink("content");

	@items = (
				CHARM => quest::varlink("1118"),
				EARONE => quest::varlink("1388"),
				HEAD => quest::varlink("1119"),
				FACE => quest::varlink("1389"),
				EARTWO => quest::varlink("1388"),
				NECK => quest::varlink("1384"),
				SHOULDER => quest::varlink("1385"),
				ARMS => quest::varlink("1264"),
				BACK => quest::varlink("1386"),
				BRACERONE => quest::varlink("1319"),
				BRACERTWO => quest::varlink("1319"),
				RANGE => quest::varlink("1373"),
				HANDS => quest::varlink("1270"),
				PRIMARY => quest::varlink("1372"),
				SECONDARY => quest::varlink("1381"),
				RINGONE => quest::varlink("1383"),
				RINGTWO => quest::varlink("1383"),
				CHEST => quest::varlink("1267"),
				LEGS => quest::varlink("1266"),
				FEET => quest::varlink("1261"),
				WAIST => quest::varlink("1387"),
				AMMO => quest::varlink("80703")
              );
      
  if($text=~/hail/i)
    {
      plugin::Whisper("Hi $name, how are you doing today?");
      plugin::Whisper("Would you like to see what $content I have today?");
    }
  if($text=~/content/i)
		{    
		$client->Message(315, "===ITEMS===");
		$client->Message(315, "@items", "\n");
		}
	          
}
Also, here is a picture of what it looks like when I execute the command:


http://img833.imageshack.us/img833/1086/arrayp.jpg

I am still reading the Perl book, but I was trying to implement what was shown in real-time vs practice exercises so it would stick a little more. I understand the concept of everything so far, but like I said, I am trying to figure out how to make it list format.

I have tried the following methods so far:

Code:
CHARM => quest::varlink("1118")
,
Code:
CHARM => quest::varlink("1118"
),
Code:
CHARM => quest::varlink("1118
"),
I was hoping one of them would bring it to a new line, but that didn't work.

Also if I do the following, it returns "syntax OK", but it shows no results in EQ.
Code:
CHARM => quest::varlink("1118"),
"\n", EARONE => quest::varlink("1388"),
As you can see, I got it working, and it is cleaner that my other "work" lol, but I still have a bit to go before I am able to write something decent.


Thanks for any responses.
~Kingmen
Reply With Quote
 


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