okay so i added this code for a spawn tab thing and once u click it it will take the amount that u set away
but the problem is if u have max cash it will take all the cash away and give u the same amount of pots. how do you make it so you only pay 50k for 200 pots??
Code:
case 93101: //Saradomin Brews and Restores
if (c.inWild())
return;
if (c.getItems().playerHasItem(995, 50000)) {
c.getItems().addItem(6686, 100);
c.getItems().addItem(3025, 100);
c.getItems().deleteItem(995, 50000);
} else {
c.sendMessage("You need 50,000 coins to get these items");
}