mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Fixed Abusive Client Command Privileges & Added myxprate/checkxprate
This commit is contained in:
@@ -5021,12 +5021,12 @@ public class Game extends RSApplet {
|
||||
if (inputString.equals("::gfxtgl") || inputString.equals("::tglgfx") || inputString.equals("::togglerender") || inputString.equals("::togglegfx")) {
|
||||
graphicsEnabled = !graphicsEnabled;
|
||||
}
|
||||
if (myPrivilege >= 0) {
|
||||
if(inputString.equals("::noclip"))
|
||||
for(int k1 = 0; k1 < 4; k1++)
|
||||
for(int i2 = 1; i2 < 103; i2++)
|
||||
for(int k2 = 1; k2 < 103; k2++)
|
||||
aClass11Array1230[k1].anIntArrayArray294[i2][k2] = 0;
|
||||
if (myPrivilege >= 2) {
|
||||
if (inputString.equals("::noclip"))
|
||||
for (int k1 = 0; k1 < 4; k1++)
|
||||
for (int i2 = 1; i2 < 103; i2++)
|
||||
for (int k2 = 1; k2 < 103; k2++)
|
||||
aClass11Array1230[k1].anIntArrayArray294[i2][k2] = 0;
|
||||
if (inputString.equals("::clientdrop")) {
|
||||
dropClient();
|
||||
}
|
||||
@@ -5060,6 +5060,7 @@ public class Game extends RSApplet {
|
||||
onDemandFetcher.method563((byte) 1, 2, j1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (inputString.startsWith("::dd")) {
|
||||
String[] args = inputString.split(" ");
|
||||
int distance = 25;
|
||||
@@ -5078,7 +5079,6 @@ public class Game extends RSApplet {
|
||||
if (inputString.equals("::dataon")) {
|
||||
showInfo = !showInfo;
|
||||
}
|
||||
}
|
||||
if (inputString.startsWith("::")) {
|
||||
stream.createFrame(103);
|
||||
stream.writeWordBigEndian(inputString.length() - 1);
|
||||
|
||||
@@ -44,6 +44,12 @@ public class Commands implements PacketType {
|
||||
|
||||
public static void playerCommands(Player player, String playerCommand, String[] arguments) {
|
||||
switch (playerCommand.toLowerCase()) {
|
||||
case "myxprate":
|
||||
case "checkxprate":
|
||||
if(GameConstants.VARIABLE_XP_RATE) {
|
||||
player.getPacketSender().sendMessage("Your current XP rate is x" + player.getXPRate());
|
||||
break;
|
||||
}
|
||||
case "xprate":
|
||||
if(GameConstants.VARIABLE_XP_RATE) {
|
||||
if (player.getXPRate() == GameConstants.PLAYER_XP_RATES[0]) {
|
||||
@@ -299,6 +305,7 @@ public class Commands implements PacketType {
|
||||
"::snow",
|
||||
"Add some snow in your mainscreen(works only in december)",
|
||||
(GameConstants.VARIABLE_XP_RATE ? "\\n" + "::xprate\\n" + "Opens dialogue for the player to set/increase their XP rate." : ""),
|
||||
(GameConstants.VARIABLE_XP_RATE ? "\\n" + "::checkxprate(::myxprate)\\n" + "Displays the players currently set XP rate.." : ""),
|
||||
};
|
||||
|
||||
// Clear all lines
|
||||
|
||||
Reference in New Issue
Block a user