hajar424 Posted July 12, 2015 Share Posted July 12, 2015 (edited) NEW TITE: Are you interested to work with me? Al Kharid Warrior Hello i am working on my Al kharid warrior bot but i need someone who knows how to use STATES and making a form where you can type food you would like to eat and get from bank. Right now my bot is a bit slower then kwarrior and i would like to improve that My bot can: Attack Warrior Open doors if there is a warrior inside. Show info about Time,Xp and so on... I Wish to: Go to Bank for food Having a form for the kind of food you would like to get in bank Faster or as fast as Kwarrior Edited July 12, 2015 by hajar424 Quote Link to comment Share on other sites More sharing options...
Twin Posted July 12, 2015 Share Posted July 12, 2015 So are you asking for someone to do the work for you? Look up how to use window builder/whatever jframe builder you prefer. Check to see if a warrior is around, and if he is, check if he's reachable, and if he's not reachable open the nearest door. Look at pugs guide for learning paint, it's on the scripting help section, and I'm sure you can find a snippet on te scripting help forum for banking and walking a path. Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted July 12, 2015 Share Posted July 12, 2015 For your GUI, look up JFrame. For states: public enum States { ATTACK, RUN, BANK }; public States getState() { if (....) { return States.ATTACK; } return States.RUN; } public void onLoop() throws InterruptedException { switch (getState()) { case ATTACK: //Attack //code break; case RUN: //Run //code break; // repeat etc } } Quote Link to comment Share on other sites More sharing options...
hajar424 Posted July 12, 2015 Author Share Posted July 12, 2015 (edited) For your GUI, look up JFrame. For states: public enum States { ATTACK, RUN, BANK }; public States getState() { if (....) { return States.ATTACK; } return States.RUN; } public void onLoop() throws InterruptedException { switch (getState()) { case ATTACK: //Attack //code break; case RUN: //Run //code break; // repeat etc } } I have already made a STAT but i have to improve it, i am not so good at Java And i know JFrame i just dont know how to start with adding a button and implement it to my bot. What i need is someone who have time to just show me how to begin Edited July 12, 2015 by hajar424 Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted July 12, 2015 Share Posted July 12, 2015 I have already made a STAT but i have to improve it, i am not so good at Java And i know JFrame i just dont know how to start with adding a button Just about every IDE has a form designer, so you can drag and drop buttons. Just look up "JFrame add components" or something Quote Link to comment Share on other sites More sharing options...
hajar424 Posted July 12, 2015 Author Share Posted July 12, 2015 (edited) Just about every IDE has a form designer, so you can drag and drop buttons. Just look up "JFrame add components" or something i have used JFrame alot but the problem is how do i start.. Edited July 12, 2015 by hajar424 Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted July 12, 2015 Share Posted July 12, 2015 i have used JFrame alot but the problem is how do i start.. You make the JFrame class, and then in the designer you literally drop the components you want on to the form. It's not that hard dude. 1 Quote Link to comment Share on other sites More sharing options...
itzDot Posted July 12, 2015 Share Posted July 12, 2015 for GUI aka form its simple create a seperate class just for GUI which extends JFrame public class GUI extends JFrame { //fields go here //constructor public GUI() { } } ////on main script class in start method envoke the GUI class Quote Link to comment Share on other sites More sharing options...
Gold Scripts Posted July 20, 2015 Share Posted July 20, 2015 An alternative to using a built in form designer is also creating your GUI from scratch using Java Swing components. Doing it this way allows a lot of room for customization, design, and teaches you how to build a Java Swing GUI. Look up "A visual guide to Swing Components" for reference/tuts 1 Quote Link to comment Share on other sites More sharing options...