EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   faction turn in (https://www.eqemulator.org/forums/showthread.php?t=25231)

SoTRichard 05-14-2008 02:36 AM

faction turn in
 
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.

Code:

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
 
FYI, the reason it wouldn't work is because your faction check was outside of your if() check.


All times are GMT -4. The time now is 10:37 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.