All pastes #44662 Raw Edit

Anonymous

public java v1 · immutable
#44662 ·published 2006-03-06 18:46 UTC
rendered paste body
[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_MIN 	= 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 = "<html><body>Come back here when you grow up a little. I will give you support magic then.</body></html>";            insertObjectIdAndShowChatWindow(player, content);            return;        }        if (lvl > Config.NEWBIE_MAX){            String content = "<html><body>Newbie Guide:<br>Your level is to high now and i wont give you my magic support.</body></html>";            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 bufferNewbieMax = 50NewbieMin = 5[/custom.properties]