Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2014, 12:39 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default Armor Quest

Custom armor quest. Was quite a pita to make this thing so hopefully someone can use it lol


Code:
#Quest file for Mesa - Lobo

sub EVENT_SAY {
	if($text=~/hail/i) {
		plugin::Whisper("Hail $class. Do you seek to earn some " . quest::saylink("armour", 1) . "?");
	} 
	elsif($text=~/armour/i) {
		plugin::Whisper("I can make you armor provided you have the proper " . quest::saylink("materials", 1) . " for me.");
	}
	elsif($text=~/materials/i) {
		plugin::Whisper(" Bring me a armor " . quest::saylink("pattern", 1) . " and a " . quest::saylink("crafting", 1) . " piece.");
	} 
	elsif($text=~/pattern/i) {
		plugin::Whisper("Indeed, they can be found from most creatures. Keep your eyes and ears open.");
	}
    elsif($text=~/crafting/i) {
		plugin::Whisper("Yes you fool! Infact I happen to sell them. Plate for Plate,Chain for Chain get it?!");
	}
	}

	sub EVENT_SPAWN {
	plugin::SetMobColor(quest::ChooseRandom(0..255), quest::ChooseRandom(0..255), quest::ChooseRandom(0..255));
}

sub EVENT_ITEM { 
	if(plugin::check_handin(\%itemcount, 1458 => 1, 1380 => 1)) { # Plate
		quest::summonitem(1387); # Plate boots
	} elsif (plugin::check_handin(\%itemcount, 1458 => 1, 1374 => 1)) { # Plate
		quest::summonitem(1386); # Plate arms
	} elsif (plugin::check_handin(\%itemcount, 1458 => 1, 1375 => 1)) { # Plate
		quest::summonitem(1384); # Plate wrists
	} elsif (plugin::check_handin(\%itemcount, 1458 => 1, 1379 => 1)) { # Plate
		quest::summonitem(1386); # Plate hands
	} elsif (plugin::check_handin(\%itemcount, 1458 => 1, 1373 => 1)) { # Plate
		quest::summonitem(1389); # Plate head
	} elsif (plugin::check_handin(\%itemcount, 1458 => 1, 1381 => 1)) { # Plate
		quest::summonitem(1388); # Plate legs
	} elsif (plugin::check_handin(\%itemcount, 1458 => 1, 1382 => 1)) { # Plate
		quest::summonitem(1383); # Plate Chest
	} elsif(plugin::check_handin(\%itemcount, 1503 => 1, 1380 => 1)) { # Leather
		quest::summonitem(1391); # Leather boots
	} elsif (plugin::check_handin(\%itemcount, 1503 => 1, 1374 => 1)) { # Leather
		quest::summonitem(1399); # Leather arms
	} elsif (plugin::check_handin(\%itemcount, 1503 => 1, 1375 => 1)) { # Leather
		quest::summonitem(1392); # Leather wrists
	} elsif (plugin::check_handin(\%itemcount, 1503 => 1, 1379 => 1)) { # Leather
		quest::summonitem(1394); # Leather hands
	} elsif (plugin::check_handin(\%itemcount, 1503 => 1, 1373 => 1)) { # Leather
		quest::summonitem(1396); # Leather head
	} elsif (plugin::check_handin(\%itemcount, 1503 => 1, 1381 => 1)) { # Leather
		quest::summonitem(1395); # Leather legs
	} elsif (plugin::check_handin(\%itemcount, 1503 => 1, 1382 => 1)) { # Leather
		quest::summonitem(1393); # Leather Chest
	} elsif(plugin::check_handin(\%itemcount, 1450 => 1, 1380 => 1)) { # Chain
		quest::summonitem(1434); # chain boots
	} elsif (plugin::check_handin(\%itemcount, 1450 => 1, 1374 => 1)) { # Chain
		quest::summonitem(1432); # chain arms
	} elsif (plugin::check_handin(\%itemcount, 1450 => 1, 1375 => 1)) { # Chain
		quest::summonitem(1435); # chain wrists
	} elsif (plugin::check_handin(\%itemcount, 1450 => 1, 1379 => 1)) { # Chain
		quest::summonitem(1439); # chain hands
	} elsif (plugin::check_handin(\%itemcount, 1450 => 1, 1373 => 1)) { # Chain
		quest::summonitem(1440); # chain head
	} elsif (plugin::check_handin(\%itemcount, 1450 => 1, 1381 => 1)) { # Chain
		quest::summonitem(1441); # chain legs
	} elsif (plugin::check_handin(\%itemcount, 1450 => 1, 1382 => 1)) { # Chain
		quest::summonitem(1436); # chain Chest
	} elsif(plugin::check_handin(\%itemcount, 1502 => 1, 1380 => 1)) { # silk
		quest::summonitem(1443); # silk boots
	} elsif (plugin::check_handin(\%itemcount, 1502 => 1, 1374 => 1)) { # silk
		quest::summonitem(1442); # silk arms
	} elsif (plugin::check_handin(\%itemcount, 1502 => 1, 1375 => 1)) { # silk
		quest::summonitem(1445); # silk wrists
	} elsif (plugin::check_handin(\%itemcount, 1502 => 1, 1379 => 1)) { # silk
		quest::summonitem(1447); # silk hands
	} elsif (plugin::check_handin(\%itemcount, 1502 => 1, 1373 => 1)) { # silk
		quest::summonitem(1449); # silk head
	} elsif (plugin::check_handin(\%itemcount, 1502 => 1, 1381 => 1)) { # silk
		quest::summonitem(1448); # silk legs
	} elsif (plugin::check_handin(\%itemcount, 1502 => 1, 1382 => 1)) { # silk
		quest::summonitem(1446); # silk Chest
		}
	}
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #2  
Old 01-02-2015, 07:28 AM
jimrocken
Fire Beetle
 
Join Date: Aug 2010
Posts: 14
Default

little change so it will be easier to add, remove or change things later on

Code:
#Quest file for Mesa - Lobo

sub EVENT_SAY {
$Link_Armour = quest::saylink("armour", 1);
$Link_materials = quest::saylink("materials", 1);
$Link_crafting = quest::saylink("crafting", 1);
$Link_Pattern = quest::saylink("pattern", 1);
	if($text=~/hail/i) {
		plugin::Whisper("Hail $class. Do you seek to earn some $Link_armour?");
	} 
	elsif($text=~/armour/i) {
		plugin::Whisper("I can make you armor provided you have the proper $Link_materials for me.");
	}
	elsif($text=~/materials/i) {
		plugin::Whisper(" Bring me a armor $Link_pattern and a $Link_crafting piece.");
	} 
	elsif($text=~/pattern/i) {
		plugin::Whisper("Indeed, they can be found from most creatures. Keep your eyes and ears open.");
	}
    elsif($text=~/crafting/i) {
		plugin::Whisper("Yes you fool! Infact I happen to sell them. Plate for Plate,Chain for Chain get it?!");
	}
}

sub EVENT_SPAWN {
	plugin::SetMobColor(quest::ChooseRandom(0..255), quest::ChooseRandom(0..255), quest::ChooseRandom(0..255));
}

sub EVENT_ITEM {
%ItemDB = (
	1387 => { "ReqItem1" => 1458, "ReqItem2" => 1380}, #Plate Boots
	1386 => { "ReqItem1" => 1458, "ReqItem2" => 1374}, #Plate Arms
	1384 => { "ReqItem1" => 1458, "ReqItem2" => 1375}, #Plate Wrist
	1386 => { "ReqItem1" => 1458, "ReqItem2" => 1379}, #Plate Hands
	1389 => { "ReqItem1" => 1458, "ReqItem2" => 1373}, #Plate Head
	1388 => { "ReqItem1" => 1458, "ReqItem2" => 1381}, #Plate Legs
	1383 => { "ReqItem1" => 1458, "ReqItem2" => 1382}, #Plate Chest
	1391 => { "ReqItem1" => 1503, "ReqItem2" => 1380}, #Leather boots
	1399 => { "ReqItem1" => 1503, "ReqItem2" => 1374}, #Leather arms
	1392 => { "ReqItem1" => 1503, "ReqItem2" => 1375}, #Leather wrists
	1394 => { "ReqItem1" => 1503, "ReqItem2" => 1379}, #Leather hands
	1396 => { "ReqItem1" => 1503, "ReqItem2" => 1373}, #Leather head
	1395 => { "ReqItem1" => 1503, "ReqItem2" => 1381}, #Leather legs
	1393 => { "ReqItem1" => 1503, "ReqItem2" => 1382}, #Leather Chest
	1434 => { "ReqItem1" => 1450, "ReqItem2" => 1380}, #chain boots
	1432 => { "ReqItem1" => 1450, "ReqItem2" => 1374}, #chain arms
	1435 => { "ReqItem1" => 1450, "ReqItem2" => 1375}, #chain wrists
	1439 => { "ReqItem1" => 1450, "ReqItem2" => 1379}, #chain hands
	1440 => { "ReqItem1" => 1450, "ReqItem2" => 1373}, #chain head
	1441 => { "ReqItem1" => 1450, "ReqItem2" => 1381}, #chain legs
	1436 => { "ReqItem1" => 1450, "ReqItem2" => 1382}, #chain Chest
	1443 => { "ReqItem1" => 1502, "ReqItem2" => 1380}, #silk boots
	1442 => { "ReqItem1" => 1502, "ReqItem2" => 1374}, #silk arms
	1445 => { "ReqItem1" => 1502, "ReqItem2" => 1375}, #silk wrists
	1447 => { "ReqItem1" => 1502, "ReqItem2" => 1379}, #silk hands
	1449 => { "ReqItem1" => 1502, "ReqItem2" => 1373}, #silk head
	1448 => { "ReqItem1" => 1502, "ReqItem2" => 1381}, #silk legs
	1446 => { "ReqItem1" => 1502, "ReqItem2" => 1382} #silk Chest
);
			foreach $id (sort keys %ItemDB)
			{
				if(plugin::check_handin(\%itemcount, $ItemDB{$id}{"ReqItem1"} => 1, $ItemDB{$id}{"ReqItem2"} => 1)) {
					quest::summonitem($id);
				}
			}
			plugin::return_items(\%itemcount);
}
Reply With Quote
  #3  
Old 01-02-2015, 09:22 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

awesome clean up job,gives me a little bit of better way of coding aswell!
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #4  
Old 01-02-2015, 02:44 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Hash'es are invaluable, as jim demonstrated.

http://perlmaven.com/perl-hashes


Quote:
Originally Posted by Bandor View Post
awesome clean up job,gives me a little bit of better way of coding aswell!
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 10:37 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