|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
09-12-2008, 11:08 AM
|
The Solo Server
|
|
Join Date: May 2007
Posts: 416
|
|
Perl Quest Script Help
OK, I'm trying to do this quest for spell turn ins...its not working...any help?
Code:
sub EVENT_ITEM {
if((plugin::check_handin(\%itemcount, 11622 => 1)) ||
(plugin::check_handin(\%itemcount, 94071 => 1)) ||
(plugin::check_handin(\%itemcount, 11602 => 1))
)
{
quest::emote("Congratulations! You will now get one of your lvl 66 spells!");
If($class = 'Druid')
{quest::summonitem(quest::ChooseRandom(77084,77085,77087,77088,77852));}
if($class = 'Bard')
{quest::summonitem(quest::ChooseRandom(77111,77112,77113));}
if($class = 'Beastlord')
{quest::summonitem(quest::ChooseRandom(77255,77256));}
if($class = 'Cleric')
{quest::summonitem(quest::ChooseRandom(77001,77002,77003,77004,77005,77275,77843));}
if($class = 'Enchanter')
{quest::summonitem(quest::ChooseRandom(77233,77234,77235,77238,77272));}
if($class = 'Magician')
{quest::summonitem(quest::ChooseRandom(77202,77203,77208,77209,77210));}
if($class = 'Necromancer')
{quest::summonitem(quest::ChooseRandom(77157,77158,77159,77846));}
if($class = 'Ranger')
{quest::summonitem(quest::ChooseRandom(77047,77048,77049));}
if($class = 'Shadowknight')
{quest::summonitem(quest::ChooseRandom(77065,77066,77067,77849));}
if($class = 'Shaman')
{quest::summonitem(quest::ChooseRandom(77129,77130,77131,77132,77133));}
if($class = 'Paladin')
{quest::summonitem(quest::ChooseRandom(77028,77029,77031));}
if($class = 'Wizard')
{quest::summonitem(quest::ChooseRandom(77178,77179,77180,77182));}
}
else
{
quest::say("I don't need this or your class hasn't been implemented yet so check the forums.");
plugin::return_items(\%itemcount);
return 1;
}
}#Done
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
|
|
|
|
09-12-2008, 11:23 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Are you checking for typos , etc, with something like Engine Site Perl Editor?
|
09-12-2008, 11:30 AM
|
The Solo Server
|
|
Join Date: May 2007
Posts: 416
|
|
Hah, nope...I'm an old mainframe programmer...so do the compile and go...but will check that out!
I was thinking perhaps I wasn't using the $class correctly or something...
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
|
09-12-2008, 11:51 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Always start with the easy stuff first (like typos), I've wasted days on stupid stuff because I didn't, and thought it was OK.
I'm not saying it is, but I just like to narrow things down.
|
09-12-2008, 11:54 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
I just remembered something ; replace the '=' with 'eq' as in
Code:
If($class eq 'Druid')
|
09-12-2008, 12:26 PM
|
Dragon
|
|
Join Date: Feb 2007
Posts: 659
|
|
Quote:
Originally Posted by Angelox
I just remembered something ; replace the '=' with 'eq' as in
Code:
If($class eq 'Druid')
|
If is capitalized. So make that lower cased. To do what Angelox said, you should use " instead of '. While it will probably work with the single quote, it is much more efficient to use the ".
|
09-12-2008, 12:40 PM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
I don't hardly look at the script they're having problems with, until I know they checked for typos, which is usually the case.
That's why you hardly ever see me stung up with a problem and posting for a solution. I look for the dumbest of mistakes first, which usually if not always, thats what it is.
My scripts get all screwy and don't work too
My favorite mistake is when I copy/paste a script (to save time), then get hidden characters that break the script; always happens when I forget to check for it, always takes me a day or two to figure it out again (I really saved a lot of time!).
|
09-12-2008, 12:42 PM
|
The Solo Server
|
|
Join Date: May 2007
Posts: 416
|
|
Well, the combination of all reccomendations fixed the problem! Thank you very much!
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
|
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 08:33 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|