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 02-12-2013, 04:21 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

Why'd you do this?: Shouldn't it be elsif? Just try using the syntax checker, errors below. I pasted exactly what you posted and got those errors, nothing extra, nothing less.
Code:
else ($npc->GetClass == 'Necromancer') {
@SpellList = ("Dead Men Floating");
@SpellCost = ("10");
@SpellID =   ("1391");
}
Code:
syntax error at Test.pl line 12, near "else ("
syntax error at Test.pl line 18, near "}"
syntax error at Test.pl line 33, near ") &&"
syntax error at Test.pl line 40, near "}"
syntax error at Test.pl line 47, near "}"
syntax error at Test.pl line 50, near "}"
syntax error at Test.pl line 61, near "}"
syntax error at Test.pl line 68, near "}"
syntax error at Test.pl line 71, near "}"
If you want to keep using else, I think this will work, haven't tested.
Code:
else
{
@SpellList = ("Dead Men Floating");
@SpellCost = ("10");
@SpellID =   ("1391");
}
Reply With Quote
  #2  
Old 02-12-2013, 05:58 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

[QUOTE=Zamthos;218075]Why'd you do this?: Shouldn't it be elsif? Just try using the syntax checker, errors below. I pasted exactly what you posted and got those errors, nothing extra, nothing less.
Code:
else ($npc->GetClass == 'Necromancer') {
@SpellList = ("Dead Men Floating");
@SpellCost = ("10");
@SpellID =   ("1391");
}
I can use elsif, I am still learning. I will be adding more classes than enchanter and necro, but this was just a starting point.

I tested it with elsif and if neither worked, the NPC doesnt talk so I think im missing a link calling the proper list somewhere down in sub EVENT_SAY but im still tryen to find it lol
Here is with 3 class options for more clarification.

Code:
sub EVENT_SPAWN {
my $Ench = ($npc->GetClass() == 'Enchanter');
my $Necro = ($npc->GetClass() == 'Necromancer');
my $Cleric = ($npc->GetClass() == 'Cleric');

if ($npc->GetClass() == 'Enchanter') {
@SpellList = ("Bind Affinity","Breeze","Clarity","Clarity II","Alacrity","Augment","Aanya's Quickening","Rune I");
@SpellCost = ("10","25","50","200","10","30","100","5");
@SpellID =   ("35","697","174","1693","170","1729","1708","481");
}

if ($npc->GetClass == 'Necromancer') {
@SpellList = ("Dead Men Floating");
@SpellCost = ("10");
@SpellID =   ("1391");
}

if ($npc->GetClass == 'Cleric') {
@SpellList = ("Daring");
@SpellCost = ("5");
@SpellID =   ("89");
}

}
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:18 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3