Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2010, 02:36 AM
jkennedy
Hill Giant
 
Join Date: Dec 2009
Posts: 175
Default help with custom quest please

sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
}
}

sub EVENT_ITEM {

if(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Warrior") {
quest::say("Well done. Here are your Epic");
quest::summonitem(10909);
quest::summonitem(10910); }
}

elsif(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Ranger") {
quest::say("Well done. Here are your Epic");
quest::summonitem(20487);
quest::summonitem(2048;

}
}



Ok my problem is i cant give the npc to give the ranger his epic but the warrior can get his am i doing something wrong or maybe i need to change something but if i change the itemcount on the ranger to 2 of the 1387 it works just not one
Reply With Quote
  #2  
Old 01-14-2010, 09:38 AM
bthomsen0312
Fire Beetle
 
Join Date: Nov 2009
Posts: 21
Default

Quote:
Originally Posted by jkennedy View Post
sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
}
}

sub EVENT_ITEM {

if(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Warrior") {
quest::say("Well done. Here are your Epic");
quest::summonitem(10909);
quest::summonitem(10910); }
}

elsif(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Ranger") {
quest::say("Well done. Here are your Epic");
quest::summonitem(20487);
quest::summonitem(2048;

}
}



Ok my problem is i cant give the npc to give the ranger his epic but the warrior can get his am i doing something wrong or maybe i need to change something but if i change the itemcount on the ranger to 2 of the 1387 it works just not one
um your code was screwed up for one
Code:
sub EVENT_SAY {
  if($text=~/hail/i) {
    quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
  }
}

sub EVENT_ITEM {
 
  if (($itemcount {1387} == 1) && ($class eq "Warrior")) {
    quest::say("Well done. Here are your Epic");
    quest::summonitem(10909);
    quest::summonitem(10910); } 

 elsif(($itemcount {1387} == 1) && ($class eq "Ranger")) {
    quest::say("Well done. Here are your Epic");
    quest::summonitem(20487);
    quest::summonitem(20488); }
  }
there is a fixed copy of your code, you were screwing up your syntax and you don't really need to use the plugin to do item hand ins. use notepad++ or georges perl quest editor as it makes checking these things alot easier
Reply With Quote
  #3  
Old 01-14-2010, 02:02 PM
jkennedy
Hill Giant
 
Join Date: Dec 2009
Posts: 175
Default

thank you so much one last question is there a way to maek a npc check to see if a player has a item but not take it and also make it so u cant repeat a quest
Reply With Quote
  #4  
Old 01-14-2010, 04:30 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

You should use the plugin for checking items. And you can return unused items.

Code:
sub EVENT_SAY {
  if($text=~/hail/i) {
    quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
  }
}

sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 1387 => 1)) {
    if ($class eq "Warrior") {
      quest::say("Well done. Here are your Epic");
      quest::summonitem(10909);
      quest::summonitem(10910);
    }
    elsif ($class eq "Ranger") {
      quest::say("Well done. Here are your Epic");
      quest::summonitem(20487);
      quest::summonitem(20488);
    }
    else {
      quest::say("Sorry, your class does not get an epic on this server.");
      quest::summonitem(1387);
    }
  }
  else {
    quest::say("I do not need this.");
    plugin::return_items(\%itemcount);
  }
}
Reply With Quote
  #5  
Old 01-14-2010, 06:19 PM
bthomsen0312
Fire Beetle
 
Join Date: Nov 2009
Posts: 21
Default

that else won't work there man
Reply With Quote
  #6  
Old 01-14-2010, 06:45 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Sure it will. Try it.
Reply With Quote
  #7  
Old 01-15-2010, 06:45 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by bthomsen0312 View Post
that else won't work there man
That else is for the other if, read the brackets :P
Reply With Quote
  #8  
Old 01-15-2010, 07:09 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by bthomsen0312 View Post
um your code was screwed up for one
Code:
sub EVENT_SAY {
  if($text=~/hail/i) {
    quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
  }
}

sub EVENT_ITEM {
 
  if (($itemcount {1387} == 1) && ($class eq "Warrior")) {
    quest::say("Well done. Here are your Epic");
    quest::summonitem(10909);
    quest::summonitem(10910); } 

 elsif(($itemcount {1387} == 1) && ($class eq "Ranger")) {
    quest::say("Well done. Here are your Epic");
    quest::summonitem(20487);
    quest::summonitem(20488); }
  }
there is a fixed copy of your code, you were screwing up your syntax and you don't really need to use the plugin to do item hand ins. use notepad++ or georges perl quest editor as it makes checking these things alot easier
edit: too tired. can't read posts.

Last edited by Secrets; 01-15-2010 at 07:19 AM..
Reply With Quote
  #9  
Old 01-15-2010, 09:16 AM
jkennedy
Hill Giant
 
Join Date: Dec 2009
Posts: 175
Default

bthomsen0312 got it right and thank you
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 04:25 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3