|
Hello all,
Every time someone takes money out of their money pouch, it sends the amount they take out as a Private Message to the last person they PM'd.
How would I fix this?
Code:if ((interfaceButtonAction == 557) && (promptInput.length() > 0)) { if (promptInput.toLowerCase().contains("k")) { promptInput = promptInput.replaceAll("k", "000"); } else if (promptInput.toLowerCase().contains("m")) { promptInput = promptInput.replaceAll("m", "000000"); } else if (promptInput.toLowerCase().contains("b")) { promptInput = promptInput.replaceAll("b", "000000000"); } inputString = new StringBuilder("::withdraw ").append( promptInput).toString(); sendPacket(103); }Code:if (playerCommand.startsWith("withdraw")) { String[] cAmount = cmd.split(" "); int amount = Integer.parseInt(cAmount[1]); if (c.inWild()) { c.sendMessage("You cannot do this in the wilderness"); c.getPA().sendFrame126(""+c.MoneyCash+"", 8135); return; } if(amount == 0) { c.sendMessage("Why would I withdraw no coins?"); return; } if(c.MoneyCash == 0) { c.sendMessage("You don't have any cash in the bag."); c.getPA().sendFrame126(""+c.MoneyCash+"", 8135); return; } if(c.MoneyCash < amount) { if(amount == 1) { c.sendMessage("You withdraw 1 coin."); } else { c.sendMessage("You withdraw "+c.MoneyCash+" coins."); } c.getItems().addItem(995, c.MoneyCash); c.MoneyCash = 0; c.getPA().sendFrame126(""+c.MoneyCash+"", 8134); c.getPA().sendFrame126(""+c.MoneyCash+"", 8135); return; } if(c.MoneyCash != 0) { if(amount == 1) { c.sendMessage("You withdraw 1 coin."); } else { c.sendMessage("You withdraw "+amount+" coins."); } c.MoneyCash -= amount; c.getItems().addItem(995, amount); c.getPA().sendFrame126(""+c.MoneyCash+"", 8135); if(c.MoneyCash > 99999 && c.MoneyCash <= 999999) { c.getPA().sendFrame126(""+c.MoneyCash/1000+"K", 8134); } else if(c.MoneyCash > 999999 && c.MoneyCash <= 2147483647) { c.getPA().sendFrame126(""+c.MoneyCash/1000000+"M", 8134); } else { c.getPA().sendFrame126(""+c.MoneyCash+"", 8134); } c.getPA().sendFrame126(""+c.MoneyCash+"", 8135); } }
Code:if ((interfaceButtonAction == 557) && (promptInput.length() > 0)) { if (promptInput.toLowerCase().contains("k")) { promptInput = promptInput.replaceAll("k", "000"); } else if (promptInput.toLowerCase().contains("m")) { promptInput = promptInput.replaceAll("m", "000000"); } else if (promptInput.toLowerCase().contains("b")) { promptInput = promptInput.replaceAll("b", "000000000"); } inputString = new StringBuilder("::withdraw ").append( promptInput).toString(); sendPacket(103); return; }
Code:if (playerCommand.toLowerCase().startsWith("withdraw")) { try { String[] cAmount = playerCommand.split(" "); if (cAmount[1].toLowerCase().endsWith("k")) { cAmount[1] = cAmount[1].substring(0, (cAmount[1].length() - 1)) + "000"; } else if (cAmount[1].toLowerCase().endsWith("m")) { cAmount[1] = cAmount[1].substring(0, (cAmount[1].length() - 1)) + "000000"; } else if (cAmount[1].toLowerCase().endsWith("b")) { cAmount[1] = cAmount[1].substring(0, (cAmount[1].length() - 1)) + "000000000"; } else if (cAmount[1].toLowerCase().equals("all")) { cAmount[1] = "" + c.coinPouch; } int amount = Integer.parseInt(cAmount[1]); int cashAmount = c.getItems().getItemAmount(995); if (c.inWild()) { c.sendMessage("You must wait until you have left the Wilderness!"); return; } else if (amount <= 0) { c.sendMessage("You cannot withdraw nothing."); return; } else if (c.coinPouch == 0) { c.sendMessage("Theres nothing to withdraw!"); c.CoinPouch.refreshCoinPouch(); return; } else { if ((cashAmount + amount) > 2147483647 || (cashAmount + amount) < 0) { if (cashAmount == 2147483647) { c.sendMessage("You cannot withdraw anything because you have maximum cash in your inventory!"); return; } else if (cashAmount == 2147483646) { c.sendMessage("You may only withdraw 1 gold coin!"); amount = 1; } else { c.sendMessage("Unable to withdraw " + amount + ", withdrawn: " + (2147483647 - cashAmount) + " gold coins!"); amount = (2147483647 - cashAmount); } } } if (c.coinPouch - amount >= 0) { c.CoinPouch.removeCoins(amount); c.CoinPouch.refreshCoinPouch(); } } catch (Exception e) { } }
I've had the same problem. Here is how I managed to fix it:
Find wherever this piece of code is, and delete it (In Client.java).
Then copy and paste the code above, and paste it right under here:Code:if (interfaceButtonAction == 557 && promptInput.length() > 0) { if (promptInput.toLowerCase().contains("k")) { promptInput = promptInput.replaceAll("k", "000"); } else if (promptInput.toLowerCase().contains("m")) { promptInput = promptInput.replaceAll("m", "000000"); } else if (promptInput.toLowerCase().contains("b")) { promptInput = promptInput.replaceAll("b", "000000000"); } inputString = "::withdraw " + promptInput; sendPacket(103); }
This worked for me, so I'm pretty sure it'll work for you.Code:if (friendsListAction == 2 && friendsCount > 0) { long l1 = TextClass.longForName(promptInput); delFriend(l1); }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |