Bigpoppa21 Posted February 28, 2015 Share Posted February 28, 2015 (edited) case BUY: if (inventory.isEmptyExcept("Coins")){ RS2Object Chest = objects.closest("Chest"); if (Chest.interact("Buy-food")){ sleep(random(600,800)); if (mouse.move(377, 130)){ sleep(random(600,900)); mouse.click(true); sleep(1000); mouse.move(364, 198); mouse.click(false); sleep(random(200,800)); } } }break; It just opens the chest, moves the mouse to destination and then hovers it for a few seconds and then closes the chest interface and keeps looping through it. Any ideas on how I would be able to fix this? Again..sorry for the every other white line...Still not quite sure on how to make them go away lulz. Edited February 28, 2015 by Bigpoppa21 Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted February 28, 2015 Share Posted February 28, 2015 (edited) case BUY: if (inventory.isEmptyExcept("Coins")){ RS2Object Chest = objects.closest("Chest"); if (Chest.interact("Buy-food")){ sleep(random(600,800)); if (mouse.move(377, 130)){ sleep(random(600,900)); mouse.click(true); sleep(1000); mouse.move(364, 198); mouse.click(false); sleep(random(200,800)); } } }break; Readable code ^ Edited February 28, 2015 by Mysteryy Quote Link to comment Share on other sites More sharing options...
Alek Posted February 28, 2015 Share Posted February 28, 2015 case BUY: if (inventory.isEmptyExcept("Coins")){ RS2Object Chest = objects.closest("Chest"); if (Chest.interact("Buy-food")){ sleep(random(600,800)); if (mouse.move(377, 130)){ sleep(random(600,900)); mouse.click(true); sleep(1000); mouse.move(364, 198); mouse.click(false); sleep(random(200,800)); } } }break; Readable code ^ This is so hard-coded that scientists have recently identified it as the new hardest substance known to man. On a serious note, I believe you copied the incorrect code. If you didn't, you should be analyzing each if statement. 3 Quote Link to comment Share on other sites More sharing options...
AresScripts Posted February 28, 2015 Share Posted February 28, 2015 (edited) This is so hard-coded that scientists have recently identified it as the new hardest substance known to man. On a serious note, I believe you copied the incorrect code. If you didn't, you should be analyzing each if statement. its so hard that they added a new block to minecraft thats stronger than diamondEDIT: I cant tell if that was a funny joke or just really nerdy... Edited February 28, 2015 by AresScripts Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted February 28, 2015 Share Posted February 28, 2015 This is so hard-coded that scientists have recently identified it as the new hardest substance known to man. On a serious note, I believe you copied the incorrect code. If you didn't, you should be analyzing each if statement. Not gonna lie, I couldnt force myself to read it so I just pasted it so someone else could. l0l Quote Link to comment Share on other sites More sharing options...
Bigpoppa21 Posted February 28, 2015 Author Share Posted February 28, 2015 I'm just looking for help because I'm still learning. I am far from great at it and that was the original code, I did not paste it incorrectly. If you aren't interested in helping then please, poke fun somewhere else. Quote Link to comment Share on other sites More sharing options...
Lemons Posted February 28, 2015 Share Posted February 28, 2015 For the hard-coded they mean you should not be using mouse.move(x, y) without randomization. That will get banned very quickly, as no human can hit the same spot over and over. I suggest reading through the API (its boring, but very informative) and learn about things like Interfaces, dynamic sleeps, etc. Also dig around for any source code available on here and read it, granted not all of it will be written well :p. The API is your best resource though when making scripts. Quote Link to comment Share on other sites More sharing options...
Bigpoppa21 Posted February 28, 2015 Author Share Posted February 28, 2015 Oh very true! I just wanted to see if I would beable to make a simple bot, I wont actually use this until I make it better. Im experimenting with different things and seeing what I can get to work and what I cant. I do have the API opened on the other monitor to help me while I'm writing a script. Thank you for the advice I'll keep searching around and looking at other codes for quick and easy help Quote Link to comment Share on other sites More sharing options...
Joseph Posted February 28, 2015 Share Posted February 28, 2015 Oh very true! I just wanted to see if I would beable to make a simple bot, I wont actually use this until I make it better. Im experimenting with different things and seeing what I can get to work and what I cant. I do have the API opened on the other monitor to help me while I'm writing a script. Thank you for the advice I'll keep searching around and looking at other codes for quick and easy help case BUY: if (inventory.isEmptyExcept("Coins")){ RS2Object Chest = objects.closest("Chest"); if (Chest.interact("Buy-food")){ sleep(random(600,800)); if (mouse.move(377, 130)){ sleep(random(600,900)); mouse.click(true); sleep(1000); mouse.move(364, 198); mouse.click(false); sleep(random(200,800)); } } }break; Readable code ^ it so hard code because of after interacting with the chest. Most likely you should be checking into interfaces. If not check out mouse Destination class Also im not sure why it keeps looping try debugging it Quote Link to comment Share on other sites More sharing options...