|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
07-16-2008, 04:30 PM
|
Fire Beetle
|
|
Join Date: Jul 2007
Posts: 16
|
|
class and level specific quest.. not working at all
I am in the proccess of trying to make a quest for every class to get spells every 4, 9 or how ever many levels they are able to get spells. I know I could make a spell scriber quest, but I don't want some spells to be used, and I want the spells they do use to be earned.
What I've been trying to sets a level range for the quest, in this one I was trying to make it if the player is equal to or greater than 4, and less than or equal to level 7, and the player must be a wizard.
To my dismay, nothing works. The npc just stands there and eats the items. I think I may be making it over complicated or just flat out doing everything wrong.. lol.
Hopefully someone has some suggestions .
Code:
#Spell Scriber - level And Class Specific - Wizard
sub EVENT_SAY
{
if (($text = ~/hail/i) && ($ulevel >= 4) && ($ulevel <= 7) && ($class eq == "Wizard"))
{
quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
}
else ($text = ~/hail/i)
{
quest::say ("I have nothing to teach you at this time.");
}
if (($text = ~/teach/i) && ($ulevel >= 4) && ($ulevel <= 7) && ($class eq = "Wizard"))
{
quest::say ("I knew you would be interested. Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
}
}
sub EVENT_ITEM
{
if (plugin::check_handin(\%itemcount, 1079 => 1) && ($gold == 15) && ($class eq == "Wizard"))
{
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else
{
(plugin::return_items(\%itemcount);
quest::say("You are no Wizard, And I know a wizard when I see one!");
}
}
|
|
|
|
|
|
|
07-16-2008, 05:54 PM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Try this
For the text, it's your "eq" and "else" statements. I rearranged it so you could add in any specific class by using "elsif" statements later. As for the turn-in, I am not sure if you will need to split up the items and the gold. I've never dealt with turning in both before. You could try this and see if it works:
Code:
#Spell Scriber - level And Class Specific - Wizard
sub EVENT_SAY
{
if ($text = ~/hail/i) {
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard")) {
quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
}
else {
quest::say ("I have nothing to teach you at this time.");
}
}
if ($text = ~/teach/i) {
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard")) {
quest::say ("I knew you would be interested. Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
}
else {
quest::say ("I have nothing to teach you at this time.");
}
}
sub EVENT_ITEM
{
if($class eq "Wizard") {
if (plugin::check_handin(\%itemcount, 1079 => 1) && ($gold == 15)) {
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else {
quest::say("I have no use for this, $name.");
plugin::return_items(\%itemcount);
}
else {
quest::say("You are no Wizard, And I know a Wizard when I see one!");
plugin::return_items(\%itemcount);
}
}
Last edited by Cripp; 07-17-2008 at 02:57 AM..
Reason: :)
|
|
|
|
|
|
|
07-16-2008, 07:02 PM
|
Fire Beetle
|
|
Join Date: Jul 2007
Posts: 16
|
|
Making Porgress
He definitely responds to hails now, but both if statements fire off.
When you hail him he says, "Ah, $name..." followed directly by a "I knew you would be interested."
Even though I never said teach.
I copy pasted the code from above and made sure it all looked okay in George S. Quest Editor.
Code:
sub EVENT_SAY
{
if ($text = ~/hail/i)
{
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard"))
{
quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
}
else
{
quest::say ("I have nothing to teach you at this time.");
}
}
if ($text = ~/teach/i)
{
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard"))
{
quest::say ("I knew you would be interested! Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
}
else
{
quest::say ("I have nothing to teach you at this time.");
}
}
}
sub EVENT_ITEM
{
if($class eq "Wizard")
{
if (plugin::check_handin(\%itemcount, 1079 => 1) && ($gold == 15))
{
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else
{
quest::say("I have no use for this item!");
plugin::return_items(\%itemcount);
}
else
{
quest::say("You are no Wizard, And I know a Wizard when I see one!");
plugin::return_items(\%itemcount);
}
}
Also, I think you were right with the gold. I have to figure out a way to seperate them into two statements, cause he still eats all items and doesnt give a reward for the right ones. Just trying to get the text figured out first though.
Thanks for the help so far!
|
|
|
|
07-16-2008, 07:06 PM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Ah
Oh, he is probably picking up the "teach" in his own text. Here is a fix:
Code:
sub EVENT_SAY
{
if ($text = ~/hail/i)
{
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard"))
{
quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
}
else
{
quest::say ("I have nothing to teach you at this time.");
}
}
elsif ($text = ~/teach/i)
{
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard"))
{
quest::say ("I knew you would be interested! Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
}
else
{
quest::say ("I have nothing to teach you at this time.");
}
}
}
Going to work, so I can look at rest later if noone else replies by the time I get back.
|
07-16-2008, 10:46 PM
|
Fire Beetle
|
|
Join Date: Jul 2007
Posts: 16
|
|
hmm
Elsif definitely stopped him from firing off both strings of text, but now when you tell him "teach" he simply says the first if repeatedly.
I changed sub EVENT_ITEM to:
Code:
sub EVENT_ITEM
{
if($class eq "Wizard")
{
if (plugin::check_handin(\%itemcount, 1079 => 1))
{
if ($gold == 15)
{
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else
{
quest::say("I have no use for this item!");
plugin::return_items(\%itemcount);
}
else
{
quest::say("You are no Wizard, And I know a Wizard when I see one!");
plugin::return_items(\%itemcount);
}
}
Yet, he still remains to be the hungry little item eater I've came to know him as.
|
07-16-2008, 11:01 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
from my experience if quest plugin check involves both cash and items- you must be EXTRA specific with it.
for once i belvie they have to be inside same If statement, and what si important if you give him 15 gold and 1 copper - he will just eat the items cuase the cash specified did not match
overall- AVOID using cash give in at all, cuase plugin return does not work for wrong cash given
also you may want to check for items BEFORE you check if he is wizard, cuase otherwise he will eat the items first, determine that you nto wizard and wihout plugin return- you won't get anything back
|
07-16-2008, 11:08 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
oh yeah i think you have a missing parentesis. like A LOT of them
Code:
sub EVENT_ITEM
{ - OPENED 1
if($class eq "Wizard")
{ - OPENED 2
if (plugin::check_handin(\%itemcount, 1079 => 1))
{ - OPENED 3
if ($gold == 15)
{ - OPENED 4
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
} - CLOSED 4
else
{ OPENED 5
quest::say("I have no use for this item!");
plugin::return_items(\%itemcount);
} CLOSED 5
else
{ OPENED 6
quest::say("You are no Wizard, And I know a Wizard when I see one!");
plugin::return_items(\%itemcount);
} CLOSED 6
} CLOSED ????
|
07-17-2008, 07:39 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Copy/Paste Bug
There seems to be something wrong with the way we are pasting the code in to your .pl file. You are getting extra spaces (possibly CRs). Try this text for the say event and after you paste it in, try to make it look like it does on the board.
Code:
sub EVENT_SAY {
if ($text=~/hail/i) {
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard")) {
quest::say ("Ah, $name, you have returned, and growing stronger. I can [teach] you more, but this time for a price.");
}
else {
quest::say ("I have nothing to teach you at this time.");
}
}
elsif ($text=~/teach/i) {
if (($ulevel >= 4) && ($ulevel <= 7) && ($class eq "Wizard")) {
quest::say ("I knew you would be interested! Simply return to me with an Untranslated Initiate's Tome from a monster in the Feerrott and 15 gold. Then you shall feel the embrace of knowledge.");
}
else {
quest::say ("I have nothing to teach you at this time.");
}
}
}
|
07-17-2008, 09:22 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Part 2
Ok, so you can try this. You might just consider the 15 gold as a donation if they are not wizard or they turn in the wrong item... That's what they get for trying to buck the system!!
Code:
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 1079 => 1) && ($gold==15)) {
if($class eq "Wizard") {
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else {
quest::say("You are no Wizard, and I know a Wizard when I see one!");
quest::summonitem(1079);
}
}
else {
quest::say("I have no use for this, $name.");
plugin::return_items(\%itemcount);
}
}
|
07-17-2008, 10:59 AM
|
Fire Beetle
|
|
Join Date: Jul 2007
Posts: 16
|
|
hmn
The text part is working great now .
|
07-17-2008, 04:46 PM
|
Fire Beetle
|
|
Join Date: Jul 2007
Posts: 16
|
|
sub EVENT_ITEM
Seems like I might of had a plugin problem, I grabbed updated versions and placed them in EQemu\plugins.
I then reduced sub EVENT_ITEM all the way him just wanting the item and then work my way up from there, but he still just eats everything, even if it's the right item.
Code:
sub EVENT_ITEM { #1 open
if (plugin::check_handin(\%itemcount, 1079 => 1)) { #2 open
quest::exp(11);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
} #2 closed
elsif { #3 opened
quest::say("I cannot provide the knowledge you seek, $name.");
quest::summonitem(1079); }
} #3 closed
else { #4 opened
quest::say("You are no Wizard, and I know a Wizard when I see one!");
plugin::return_items(\%itemcount);
} #4 closed
} #1 closed
|
07-17-2008, 05:05 PM
|
Fire Beetle
|
|
Join Date: Jul 2007
Posts: 16
|
|
!
It seems the elsif was breaking the sub EVENT_ITEM!
|
|
|
|
07-17-2008, 05:37 PM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Quote:
Originally Posted by JLB2414
Seems like I might of had a plugin problem, I grabbed updated versions and placed them in EQemu\plugins.
I then reduced sub EVENT_ITEM all the way him just wanting the item and then work my way up from there, but he still just eats everything, even if it's the right item.
Code:
sub EVENT_ITEM { #1 open
if (plugin::check_handin(\%itemcount, 1079 => 1)) { #2 open
quest::exp(11);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
} #2 closed
elsif { #3 opened
quest::say("I cannot provide the knowledge you seek, $name.");
quest::summonitem(1079); }
} #3 closed
else { #4 opened
quest::say("You are no Wizard, and I know a Wizard when I see one!");
plugin::return_items(\%itemcount);
} #4 closed
} #1 closed
|
Nope, relook at your code above... you didn't account for a closed bracket. What happens when you do my last event code? And yes, your elsif won't work like that. You must have a condition for an elsif.
|
|
|
|
07-17-2008, 05:43 PM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Removing Gold
From my last item event, if you want to remove the gold part, try this:
Code:
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 1079=>1)) {
if($class eq "Wizard") {
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else {
quest::say("You are no Wizard, and I know a Wizard when I see one!");
quest::summonitem(1079);
}
}
else {
quest::say("I have no use for this, $name.");
plugin::return_items(\%itemcount);
}
}
|
|
|
|
07-17-2008, 06:09 PM
|
Fire Beetle
|
|
Join Date: Jul 2007
Posts: 16
|
|
using your last code
Using your last EVENT_ITEM he simply just stands there as always what I did was used your code with the exception of one bracket I took out.
Code:
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 1079 => 1) && ($gold==15)) {
if($class eq "Wizard") {
quest::exp(15);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else {
quest::say("You are no Wizard, and I know a Wizard when I see one!");
quest::summonitem(1079);
}
} ########### REMOVED
else {
quest::say("I have no use for this, $name.");
plugin::return_items(\%itemcount);
}
}
Removing that bracket makes the quest work, but if you just turn in the book, he simply keeps it, and says "I have no use for this, $name." Giving him any other item he returns.
Since you posted I've tried:
Code:
elsif (plugin::check_handin(\%itemcount, 1079 => 1)) {
quest::say("I cannot provide the knowledge you seek, $name.");
quest::summonitem(1079);
}
and I've tried,
Code:
if (plugin::check_handin(\%itemcount, 1079 => 1)) {
quest::say("I cannot provide the knowledge you seek, $name.");
quest::summonitem(1079);
}
... basically im just trying to figure out how the player can get the book back if the money isn't handed in with it.
Everything else works.
This is what I have in the .pl right now for sub EVENT_ITEM for the time being.
Code:
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 1079 => 1))
{
quest::exp(11);
quest::summonitem(15036);
quest::summonitem(15377);
quest::summonitem(15378);
quest::summonitem(15230);
quest::summonitem(15376);
}
else
{
quest::say("Don't waste my time, $race!");
plugin::return_items(\%itemcount);
}
}
I found out about #reloadquest... and that has been really helpful in actually testing the script so far.
I thought I had to completely reboot the server everytime I tried a new script... no wonder my first script took 6 hours lol!
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 03:42 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|