[config.java]
/** Config for max newbie level **/
public static int NEWBIE_MAX;
/** Config for min newbie level **/
public static int NEWBIE_MIN;
======
NEWBIE_MAX = Integer.parseInt(customSettings.getProperty("NewbieMax", "0"));
NEWBIE_MAX = Integer.parseInt(customSettings.getProperty("NewbieMin", "0"));
======
else if (pName.equalsIgnoreCase("NewbieMax")) NEWBIE_MAX = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("NewbieMin")) NEWBIE_MIN = Integer.parseInt(pValue);
[/config.java]
=======
[L2NpcInstance.java]
public void makeSupportMagic(L2PcInstance player)
{
int lvl = player.getLevel();
L2Skill skill;
this.setTarget(player);
if (lvl < Config.NEWBIE_MIN){
String content = "
Come back here when you grow up a little. I will give you support magic then.";
insertObjectIdAndShowChatWindow(player, content);
return;
}
if (lvl > Config.NEWBIE_MAX){
String content = "Newbie Guide:
Your level is to high now and i wont give you my magic support.";
insertObjectIdAndShowChatWindow(player, content);
return;
}
//windwalk
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4322,1);
this.doCast(skill);
}
//shield
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4323,1);
this.doCast(skill);
}
if (!player.isMageClass()){
//blessofbody
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4324,1);
this.doCast(skill);
}
//vampirerage
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4325,1);
this.doCast(skill);
}
//regeneration
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4326,1);
this.doCast(skill);
}
//haste
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4327,1);
this.doCast(skill);
}
//lifecubic
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4338,1);
this.doCast(skill);
}
} else {
//blessthesoul
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4328,1);
this.doCast(skill);
}
//acumen
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4329,1);
this.doCast(skill);
}
//concentration
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4330,1);
this.doCast(skill);
}
//empower
if (lvl >= Config.NEWBIE_MIN && lvl <= Config.NEWBIE_MAX){
skill = SkillTable.getInstance().getInfo(4331,1);
this.doCast(skill);
}
}
[/L2NpcInstance.java]
================
[custom.properties]
#Min-Max Lvl required for newbie buffer
NewbieMax = 50
NewbieMin = 5
[/custom.properties]