PDA

View Full Version : I need some help Armor quest eats items


Bellos
08-20-2010, 01:17 PM
I dont mean to be such a PITA, i really hope im not pissing you guys off, just trying to relearn some stuff. Ok i have a quest but when i turn in the items he just eats them. Here is a basic block of the quest

It could be the $class == 1 but i believe thats how I did it before 1 being warrior. Or i could be not using the plugin check hand in correctly. I havent messed with it recently. So if anyone can help me out id appreciate it.


K i think it is the class part, imma check quick


Ok now he doesnt eat them, but he hands em back to me.

sub EVENT_ITEM {

if ($class == 1) {
#Helm
if (plugin::check_handin(\%itemcount, 1658 == 1) && plugin::check_handin(\%itemcount, 1659 == 1) && plugin::check_handin(\%itemcount, 1733 == 1) && plugin::check_handin(\%itemcount, 1660 == 1)) {
quest::say("Here is your Mithril Helm");
quest::summonitem(68850,0);
}

else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}

#breastplate
if (plugin::check_handin(\%itemcount, 1658 == 1) && plugin::check_handin(\%itemcount, 1659 == 1) && plugin::check_handin(\%itemcount, 1733 == 1) && plugin::check_handin(\%itemcount, 1661 == 1)) {
quest::say("Here is your Mithril Breastplate");
quest::summonitem(68960,0);
}

else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}

#Vambrace
if (plugin::check_handin(\%itemcount, 1658 == 1) && plugin::check_handin(\%itemcount, 1659 == 1) && plugin::check_handin(\%itemcount, 1733 == 1) && plugin::check_handin(\%itemcount, 1662 == 1)) {
quest::say("Here are your Mithril Vambraces");
quest::summonitem(68851,0);
}

else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}

#Bracer
if (plugin::check_handin(\%itemcount, 1658 == 1) && plugin::check_handin(\%itemcount, 1659 == 1) && plugin::check_handin(\%itemcount, 1733 == 1) && plugin::check_handin(\%itemcount, 1663 == 1)) {
quest::say("Here is your Mithril Bracer");
quest::summonitem(68854,0);
}

else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}

#Greaves
if (plugin::check_handin(\%itemcount, 1658 == 1) && plugin::check_handin(\%itemcount, 1659 == 1) && plugin::check_handin(\%itemcount, 1733 == 1) && plugin::check_handin(\%itemcount, 1664 == 1)) {
quest::say("Here are you Mithril Greaves");
quest::summonitem(68961,0);
}

else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}

#Boots
if (plugin::check_handin(\%itemcount, 1658 == 1) && plugin::check_handin(\%itemcount, 1659 == 1) && plugin::check_handin(\%itemcount, 1733 == 1) && plugin::check_handin(\%itemcount, 1716 == 1)) {
quest::say("Here are your Mithril Boots");
quest::summonitem(68853,0);
}

else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}

#Gauntlets
if (plugin::check_handin(\%itemcount, 1658 == 1) && plugin::check_handin(\%itemcount, 1659 == 1) && plugin::check_handin(\%itemcount, 1733 == 1) && plugin::check_handin(\%itemcount, 1732 == 1)) {
quest::say("Here are your Mithril Gauntlets");
quest::summonitem(68852,0);
}

else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}
}
}

Tabasco
08-20-2010, 01:50 PM
I think that needs to be plugin::check_handin(\%itemcount, 1659 => 1), => rather than ==

You should take a look at plugins/globals.pl.
functions like plugin::takeItems(...) and plugin::returnUnusedItems() are easier to use and you don't have to pass the item array.

Bellos
08-20-2010, 02:14 PM
I think that needs to be plugin::check_handin(\%itemcount, 1659 => 1), => rather than ==

You should take a look at plugins/globals.pl.
functions like plugin::takeItems(...) and plugin::returnUnusedItems() are easier to use and you don't have to pass the item array.

Yeah that worked. I looked in globals.pl i cant really understand how to use any of it.

Bellos
08-25-2010, 04:07 PM
damn it, its not working again. I didnt do any editing on it either except moving my saylinks inside my say event.

Can anyone help

Caryatis
08-25-2010, 04:53 PM
Man if I was mod here, I would resurrect this forum (http://www.eqemulator.org/forums/forumdisplay.php?f=661) so hard it wouldn't be funny.

You would be the poster child for that forum Bellos.

Here's a hint though... since your code has changed from the original post, your original post is useless for debugging why your current code doesnt work.

Bellos
08-28-2010, 01:15 AM
And if i was a mod id fuckin ban you, Why the hell you have to be an asshole? Seriously what the fuck is your problem man?

If anyone comes to me with a problem i Help em out. Go to hell dude


BTW i fixed the problem.

It was the &&s but i swore i fixed that last time. Maybe it didnt save.

To Caryatis go to hell bro