maxime 0 Share Posted September 26, 2016 Hi i am looking for Method Depositall item in inventory and Withraw & Bank to the closest bankand also Looking for Npc combat methods Thanks you. Link to comment Share on other sites More sharing options...
Hashtag 8694 Share Posted September 26, 2016 They are all in the API! =) Link to comment Share on other sites More sharing options...
Dezval 44 Share Posted September 29, 2016 Maxime, use the chat Scripters hang out there, like myself, and I'm more than willing to lend a hand. I'm sure others would be willing as well. Link to comment Share on other sites More sharing options...
Koschei 147 Share Posted September 30, 2016 //Simple banking case that depositsAll & withdraws items If your still trying to figure it out. //Goes into your banking state if (getBank().isOpen()) { //Checks if bank is open or not, if it is it executes the code within there. getBank().depositAllItems();//Deposits all your items sleepUntil(() -> getInventory().isEmpty(), Calculations.random(950, 1300));//Sleeps until the Inventory is open or until sleep time is over sleep(400,800)//Sleeps getBank.withdraw("Name of item" or "Item id",Number you want taken out)//Withdraws the item you want withdrawn. break;//Breaks } else { // If the Bank is open is not true then this gets executed getBank().open();// Opens bank sleepUntil(() -> getBank.isopen, Calculations.random(600, 1400));//Sleeps until bank is open or until timer is up. } Link to comment Share on other sites More sharing options...
Hashtag 8694 Share Posted September 30, 2016 //Simple banking case that depositsAll & withdraws items If your still trying to figure it out. //Goes into your banking state if (getBank().isOpen()) { //Checks if bank is open or not, if it is it executes the code within there. getBank().depositAllItems();//Deposits all your items sleepUntil(() -> getInventory().isEmpty(), Calculations.random(950, 1300));//Sleeps until the Inventory is open or until sleep time is over sleep(400,800)//Sleeps getBank.withdraw("Name of item" or "Item id",Number you want taken out)//Withdraws the item you want withdrawn. break;//Breaks } else { // If the Bank is open is not true then this gets executed getBank().open();// Opens bank sleepUntil(() -> getBank.isopen, Calculations.random(600, 1400));//Sleeps until bank is open or until timer is up. } The ideal logic should be limited to 1 action per loop. If the deposit method fails you still try to withdraw items to your full inventory. Your logic might work when you try it but when your customer uses it for multiple hours, it will eventually fail and might cause the script to not function properly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.