|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
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,498
|
|
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,498
|
|
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 ????
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
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:23 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |