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

10-13-2008, 02:19 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
You were closer with your first format. I haven't tested this for you, but something like this should work:
Code:
sub EVENT_SAY {
if($text=~/Hail/i) {
quest::say("Hail, $class. I am Luana, The God of Life. I am in this world to see to it that those that have proven themselves worthy will be rewarded. If you have proof that Hanvar is dead, hand it to me."); }
}
sub EVENT_ITEM {
if ($class eq 'Warrior' || $class eq 'Rogue' || $class eq 'Monk' || $class eq 'Berserker' || $class eq 'Shadowknight' || $class eq 'Paladin' || $class eq 'Ranger' || $class eq 'Bard' || $class eq 'Beastlord' || $class eq 'Cleric' || $class eq 'Druid' || $class eq 'Shaman' || $class eq 'Wizard' || $class eq 'Magician' || $class eq 'Enchanter' || $class eq 'Necromancer') {
if (plugin::check_handin(\%itemcount, 29294 => 1)) {
my %rewards = (
"Warrior" => 66177, 66176, 10908, "Paladin" => 10099, "Shadowknight" => 14383,
"Monk" => 10652, "Beastlord" => 6611, "Rogue" => 11057,
"Cleric" => 5532, "Bard" => 20542, "Ranger" => 20487, 20488,
"Druid" => 20490, "Shaman" => 10651, "Necromancer" => 20544,
"Wizard" => 14341, "Magician" => 28034, "Enchanter" => 10650
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
$client->Message(6, "Luana raises her hands and says a prayer quietly. You feel your whole body begin to tingle as she brings her hands down to your shoulders." );
quest::level(51);
quest::ding();
quest::shout2("Today $name has proved his worth to the gods of this world. He has now joined our ranks as a god himself and is a force to be reckoned with!");
}
}
else {
plugin::return_items(\%itemcount);
quest::say("I can't use this.");
}
}
}
|
 |
|
 |

10-13-2008, 02:26 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Thank you again trev, man I hate when I have to keep posting wrong stuff. I feel dumber with every post :(
Just tested and it appears to work great now. I swear about 5 more minutes with this one and I was gonna throw my computer out the window.
|

10-13-2008, 02:41 AM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
Quote:
if ($class eq 'Warrior' || $class eq 'Rogue' || $class eq 'Monk' || $class eq 'Berserker' || $class eq 'Shadowknight' || $class eq 'Paladin' || $class eq 'Ranger' || $class eq 'Bard' || $class eq 'Beastlord' || $class eq 'Cleric' || $class eq 'Druid' || $class eq 'Shaman' || $class eq 'Wizard' || $class eq 'Magician' || $class eq 'Enchanter' || $class eq 'Necromancer')
|
Is there a time that they would not be one of these classes? You are just doing a test, not defining anything.
|

10-13-2008, 03:03 AM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
from what I can see the the primary problem all along was that you kept using
$class == "Wizard"
instead of
$class eq 'Warrior'
|

10-13-2008, 03:33 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Quote:
Originally Posted by joligario
Is there a time that they would not be one of these classes? You are just doing a test, not defining anything.
|
You know, I would think the same thing, but I can not get it to work without setting it up that way. I think it needs to check the class first so it knows which reward to summon. Otherwise, it doesn't want to do the class check for my rewards after the rewards are defined.
And ya, if you aren't using a numeric value, you have to use eq instead of ==.
|

10-14-2008, 03:03 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Using the last code you posted Trevius, I can't seem to figure out why but...
Shadowknight = Quest works 100%
Druid = Nothing happens, Eats the item
Warrior = You get the first reward on the list for Warriors
Every other class tested = eats the item...tested Ranger, Mage, Necro
|

10-14-2008, 03:51 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
fixed using my earlier version of the quest, replaced all of the == with eq and it works fine.
|
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 09:17 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |