View Single Post
  #5  
Old 07-14-2009, 01:29 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

These should help as references:
Regular expression examples - Wikipedia, the free encyclopedia
Perl regular expressions for the common man

Here's the finished product:

Code:
#############
#Written By : cubber, regexp by AndMetal
#Quest Name: #summonitem proxy
#Quest Zone: Cshome
#Quest NPC: Krakskull
#################
sub EVENT_SAY {
	if($text=~/Hail/i) {
         quest::say("Hello there $name,  need some [items summoned]?");
	} elsif ($text=~/i seek item (\d{1,6})/i) {
		my $itemNum = $1;
		quest::emote("Krakskull begins to chant...");
		quest::summonitem($itemNum);      	
		quest::emote("The item you seek apears before your eyes!");
	}
}
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote