Hello, i've been trying to add pure skills to my Archer Master npc,
CODE 1
CODE 2:
the difference between the 2 codes is
can you please help me? i'm confused
CODE 1
PHP Code:
/* this one gives the skill only to pure archers, but doesn't have (you already know this skill*/
case 40:
{
if (client.Entity.Class == 45 && client.Entity.FirstRebornClass == 45 && client.Entity.SecondRebornClass == 45)
{
client.AddSpell(LearnableSpell(10313));
dialog.Text("Congratulations! you have learned StarArrow.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You are not allowed, I think your not promoted yet or your not pure Archer.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
CODE 2:
PHP Code:
/*this one gives the spell to all archers even if i put that only pure archers are allowed*/
case 40:
{
if (client.Entity.Class == 45 && client.Entity.FirstRebornClass == 45 && client.Entity.SecondRebornClass == 45)
{
if (!client.AddSpell(LearnableSpell(10313)))
{
dialog.Text("You already know this skill.");
dialog.Option("Thank you master.", 255);
dialog.Send();
break;
}
dialog.Text("Congratulations! you have learned StarArrow.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You are not allowed, I think your not promoted yet or your not pure Archer.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
the difference between the 2 codes is
PHP Code:
if (!client.AddSpell(LearnableSpell(10313)))