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 07-19-2009, 10:08 PM
merb
Sarnak
 
Join Date: Jul 2005
Location: Ohio
Posts: 72
Default Different Classes Get Different Messages

I'm working on a quest right now that all classes can do. However, after turning in the final item to the quest giver, if you are a Shadowknight, he:

1) Gives you the item back
2) Gives you experience
3) Tells you to find another NPC

BUT, if you are any other class, he:

1) Says some stuff
2) Gives you experience

Then, the next NPC that you are sent to if you are a sk, if you hand him the item as a sk, he:

1) Gives the item back
2) Says some text to begin another quest

Any other class just gets text. For the first quest mob, here's what I've got for the turn-in:

Code:
 if (($itemcount{8911} == 1)&&($uclass = 5)) {
  quest::say("Very good, but maybe you should keep this. I believe you will have more use for it than I. Maybe Dsarrik can help you.");
  quest::exp(10000);
  quest::summonitem("8911");
 }
 elsif ($itemcount{8911} == 1) {
  quest::say("Well now look at that! I believe you, $name, have done a great deed this day!");
  quest::exp(10000);
 }
}
I know on the "elsif" line, I should probably change it to something like:

Code:
elsif (($itemcount{8911} == 1)&&($uclass = <class #'s>))
However, I inserted all class numbers in the "$uclass =" line except 5, and any other class still returns the line as if you WERE a shadowknight.

So basically, for either npc, how would I get them to respond differently to a Shadowknight than any other class?
__________________
Building Server
Legends of Time - Full Custom/Legit Roleplay, need devs
Reply With Quote
  #2  
Old 07-19-2009, 10:45 PM
Sion
Fire Beetle
 
Join Date: Jun 2008
Location: -
Posts: 14
Default

The variable for the player's class is actually $class rather than $uclass. $class stores the name of the player's class as a string,
so if you wanted to check if the player was a shadowknight in your example, the first line would be:
Code:
if (($itemcount{8911} == 1) && $class eq "Shadowknight")
Reply With Quote
  #3  
Old 07-20-2009, 07:29 PM
merb
Sarnak
 
Join Date: Jul 2005
Location: Ohio
Posts: 72
Default

I changed the line to look like this:

Code:
 if (($itemcount{8911} == 1)&&($class eq = "Shadowknight")) {
  quest::say("Very good, but maybe you should keep this. I believe you will have more use for it than I. Maybe Dsarrik can help you.");
  quest::exp(10000);
  quest::summonitem("8911");
 }
 elsif ($itemcount{8911} == 1) {
  quest::say("Well now look at that! I believe you, $name, have done a great deed this day!");
  quest::exp(10000);
 }
}
And now I'm not getting a response at all when I do the turn in, shadowknight or otherwise. For the other quest mob involved, I changed it as well and he won't even respond to hails.
__________________
Building Server
Legends of Time - Full Custom/Legit Roleplay, need devs
Reply With Quote
  #4  
Old 07-20-2009, 09:08 PM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

This should take care of your handin problems. Using eq "Shadowknight" for the shadowknight part of the handin and ne "Shadowknight" for everyone else. In the skickies there should be links to the perl system here to make things easier.

Trevius has some good links to look at here: http://www.eqemulator.net/forums/showthread.php?t=26075

Code:
sub EVENT_ITEM { 

 if (plugin::check_handin(\%itemcount,8911=>1)) {
  
  if ($class eq "Shadowknight") {
   quest::say("Very good, but maybe you should keep this. I believe you will have more use for it than I. Maybe Dsarrik can help you.");
   quest::exp(10000);
   quest::summonitem("8911");
  }

  if ($class ne "Shadowknight") {
   quest::say("Well now look at that! I believe you, $name, have done a great deed this day!");
   quest::exp(10000);
  }

 }
 plugin::return_items(\%itemcount);
}
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:50 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3