Log in

View Full Version : faction turn in


SoTRichard
05-14-2008, 02:36 AM
sub EVENT_ITEM {
# honorable badge turn in
if (plugin::check_handin(\%itemcount, 55561 => 4)) &amp;&amp; ($faction <5){
quest::summonitem(29400); # Honorable reward
quest::say("Thankyou you have saved felwithe from death and destruction!");
quest::exp(100000);
}
else {
quest::emote("will not accept this item.");
plugin::return_items(\%itemcount);
}
}


i cannot seem to get this to work... a player with ally faction cannot turn in 4 of the above items... the npc doesn't even return them... just eats them... any ideas or help? trying to make it so you must be at least amiable to complete this 4 item turn in.

Aramid
05-14-2008, 05:35 AM
Try it this way... It checks the faction first, then the item handin. Do you have other NPC's that return items? If not, check that your plugins are in the right place.


sub EVENT_ITEM {
if ($faction <5){
if (plugin::check_handin(\%itemcount, 55561 => 4)) {
quest::summonitem(29400); # Honorable reward
quest::say("Thankyou you have saved felwithe from death and destruction!");
quest::exp(100000);
}
else {
quest::emote("will not accept this item.");
plugin::return_items(\%itemcount);
return;
}
}
else {
quest::emote("You are not yet worthy of this quest!!!");
plugin::return_items(\%itemcount);
return;
}
}

SoTRichard
05-14-2008, 01:21 PM
Thankyou very much, that worked amazingly!

joligario
06-09-2008, 10:14 PM
FYI, the reason it wouldn't work is because your faction check was outside of your if() check.