View Single Post
  #2  
Old 02-13-2015, 11:12 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

I have no idea what P99 has, I don't play there. And this is not a "buff" bot by a long shot.. just something tossed together really quick and crude like. It's up to you to figure out what items (#finditem) you want to put in the arrays (if I were doing the work of finding the item id's I probably would have tossed them in a hash but.. keeping it as simple to read as I assume you are unfamiliar with Perl altogether). Hasnt been syntax checked, hasn't been tested, nothing.. but, it is a reply.

Code:
# delete or rename Priest_of_Discord.lua in \global\quests
# name this Priest_of_Discord.pl and place in the same directory
sub EVENT_SAY {
	my @itemsarray;
	if ($text=~/Hail/i) {
		plugin::Whisper (	"Oh.. it's you.  Yeah, so I've been demoted from the Priest of all things Evil to an item butler.".
							"Do you want a [".quest::saylink("bag")."] to put your junk in or do you want your [".quest::saylink("items")."] now?");
	}
	elsif ($text=~/bag/i) {
		quest::summonitem(17969);
	}
	elsif ($text=~/items/i) {
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Bard");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Cleric");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Druid");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Enchanter");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Magician");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Monk");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Necromancer");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Paladin");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Ranger");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Rogue");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Shadowknight");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Shaman");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Warrior");
		@itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Wizard");
		foreach $individualitem (@itemsarray) {
			if (!plugin::check_hasitem($client, $individualitem)) { quest::summonitem($individualitem); }
		}
	}
}
Reply With Quote