Well what are you wanting? them to be able to make only combat skills 99? or what? I doubt anyones gunna set it to 30 or something.
|
I'm wanting to block regular players from using the :etlevel command for anything other than combat stats. Is there anyway to do this?
Here's my command:
Code:if (playerCommand.startsWith("setlevel")) { if (c.inWild() && !c.safeZone()) { c.sendMessage("You cannot set your level while in PVP."); } for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 0) { c.sendMessage("Please take all your armour and weapons off before using this command."); return; } } try { String[] args = playerCommand.split(" "); int skill = Integer.parseInt(args[1]); int level = Integer.parseInt(args[2]); if (level > 99) level = 99; else if (level < 0) level = 1; c.playerXP[skill] = c.getPA().getXPForLevel(level)+5; c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]); c.getPA().refreshSkill(skill); } catch (Exception e){} }
Well what are you wanting? them to be able to make only combat skills 99? or what? I doubt anyones gunna set it to 30 or something.
Code:if (playerCommand.startsWith("setlevel")) { if (c.inWild() && !c.safeZone()) { c.sendMessage("You cannot set your level while in PVP."); } for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 0) { c.sendMessage("Please take all your armour and weapons off before using this command."); return; } } try { String[] args = playerCommand.split(" "); int skill = Integer.parseInt(args[1]); int level = Integer.parseInt(args[2]); if (skill > 6) { c.sendMessage("You can only set your combat levels"); return; } if (level > 99) level = 99; else if (level < 0) level = 1; c.playerXP[skill] = c.getPA().getXPForLevel(level)+5; c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]); c.getPA().refreshSkill(skill); } catch (Exception e){} }
put it in process.
but thats a waste, youd better load it after changing the level so add this in the back of your command:getPA().sendFrame126("Combat Level: "+getCombatLevel()+"", 3983); //updates cb level for pvp/regular
getPA().sendFrame126("Combat Level: "+getCombatLevel()+"", 3983); //updates cb level for pvp/regular
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |