Thread: Odd problem
View Single Post
  #1  
Old 05-12-2015, 11:29 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default Odd problem

Having a problem with a quest and I can not seem to solve it on my own.


Problem is coming from the give item,whenever you give him one of the items he just returns it. I have took it all the way down to its most simple form. With no return checks and only 1 item turn in and he just eats the item. globals are on as the text part is working fine. Ive tried everything I can think of he just refuses to take the items from you.

Here is the code:

Code:
sub EVENT_SAY {
if($text=~/hail/i) {
		if (defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2) {
			plugin::Whisper("Wonderful $name! Just give me your old Emblem and I will give you a more powerful version! ");
			} 
			elsif (defined $qglobals{"Greko"} && $qglobals{"Greko"} == 1) {
			plugin::Whisper("Get to work $name!");
			} 
			elsif (defined $qglobals{"Greko"} && $qglobals{"Greko"} >= 3) {
			plugin::Whisper("You have proven yourself to be a powerful $class!");
				} 
				else {
		plugin::Whisper("Hello $name I am Greko. I have the ability to unlock the true power of your  " . quest::saylink("emblem", 1) . "!");
	}
	}
	elsif($text=~/emblem/i) {
	plugin::Whisper("If you were willing to do me a  " . quest::saylink("favour", 1) . " I will be willing to help you unlock your power!");
	}
	elsif($text=~/favour/i) {
	plugin::Whisper("I want you to bring hell to the Commanders that dwell in these halls! So what say you are you up to the " . quest::saylink("task", 1) . " ?");
	}
	elsif($text=~/task/i) {
	plugin::Whisper("Very well be off now!");
	quest::assigntask(17);
	quest::setglobal("Greko", 1, 5, "F");
	}
	}
	
 
sub EVENT_ITEM { 
	if (plugin::check_handin(\%itemcount, 2372 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5333);
	quest::summonitem(5510);
	}
	elsif (plugin::check_handin(\%itemcount, 2379 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5371);
	}
	elsif (plugin::check_handin(\%itemcount, 2378 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5375);
	quest::summonitem(5508);
	}
	elsif (plugin::check_handin(\%itemcount, 2377 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5390);
	quest::summonitem(5511);
	}
	elsif (plugin::check_handin(\%itemcount, 2370 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5409);
	quest::summonitem(5428);
	}
	elsif (plugin::check_handin(\%itemcount, 2376 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5419);
	quest::summonitem(5509);
	}
	elsif (plugin::check_handin(\%itemcount, 2298 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5420);
	quest::summonitem(5505);
	}
	elsif (plugin::check_handin(\%itemcount, 2277 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5421);
	quest::summonitem(5516);
	}
	elsif (plugin::check_handin(\%itemcount, 2278 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5426);
	quest::summonitem(5513);
	}
	elsif (plugin::check_handin(\%itemcount, 2275 == 1) && defined $qglobals{"Greko"} && $qglobals{"Greko"} == 2 ) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5427);
	quest::summonitem(5514);
	}
	plugin::return_items(\%itemcount);
}
}

He ate the item when It looked like:

Code:
if (plugin::check_handin(\%itemcount, 2372 == 1)) {
		plugin::Whisper("As promised! Here is your updated Emblem!");
		quest::setglobal("Greko", 5, 5, "F");
		quest::setglobal("Spells1", 2, 5, "F");
	quest::summonitem(5333);
	quest::summonitem(5510);
	}
}
__________________
Owner and Developer - Everquest: A New World
Reply With Quote