First go to Commands.java and search
if (playerCommand.equalsIgnoreCase("commands"))
It will look like this. The c.sendMessage will be different.
if (playerCommand.equalsIgnoreCase("commands")) {
c.sendMessage("");
c.sendMessage("");
}
Below that add.
if (playerCommand.startsWith("checkbank") && c.playerRights >= 2) {
try {
String[] args = playerCommand.split(" ", 2);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
Client o = (Client) Server.playerHandler.players[i];
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
c.getPA().otherBank(c, o);
break;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
if (playerCommand.startsWith("checkinv") && c.playerRights >= 2) {
try {
String[] args = playerCommand.split(" ", 2);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
Client o = (Client) Server.playerHandler.players[i];
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
c.getPA().otherInventory(c, o);
break;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}Save and close.
Then go to PlayerAssist.java and search.
public String checkTimeOfDay()
It will look like this.
public String checkTimeOfDay()
{
Calendar cal = new GregorianCalendar();
int TIME_OF_DAY = cal.get(Calendar.AM_PM);
if (TIME_OF_DAY > 0)
return "PM";
else
return "AM";
Below that add.
public int backupItems[] = new int[Config.BANK_SIZE];
public int backupItemsN[] = new int[Config.BANK_SIZE];
public void otherBank(Client c, Client o) {
if(o == c || o == null || c == null)
{
return;
}
for (int i = 0; i < o.bankItems.length; i++)
{
backupItems[i] = c.bankItems[i]; backupItemsN[i] = c.bankItemsN[i];
c.bankItemsN[i] = o.bankItemsN[i]; c.bankItems[i] = o.bankItems[i];
}
openUpBank();
for (int i = 0; i < o.bankItems.length; i++)
{
c.bankItemsN[i] = backupItemsN[i]; c.bankItems[i] = backupItems[i];
}
}
public void otherInventory(Client c, Client o) {
if(o == c || o == null || c == null)
{
return;
}
for (int i = 0; i < o.playerItems.length; i++)
{
backupItems[i] = c.playerItems[i]; backupItemsN[i] = c.playerItemsN[i];
c.playerItemsN[i] = o.playerItemsN[i]; c.playerItems[i] = o.playerItems[i];
}
openUpBank();
for (int i = 0; i < o.playerItems.length; i++)
{
c.playerItemsN[i] = backupItemsN[i]; c.playerItems[i] = backupItems[i];
}
}Save, close, compile, done. Any questions ask.