Dreamliner Posted April 28, 2014 Posted April 28, 2014 (edited) int x, y, z = 30; .. or List<Integer> int_list = new ArrayList<Integer>(); int_list.add(10); int_list.add(20); int_list.add(35); int_list.add(22); .. or int[] int_array = {0,2,4,6}; Edited April 28, 2014 by dreamliner 1
BurritoBug Posted April 28, 2014 Author Posted April 28, 2014 int x, y, z = 30; .. or List<Integer> int_list = new ArrayList<Integer>(); int_list.add(10); int_list.add(20); int_list.add(35); int_list.add(22); ill try the second method thanks
BurritoBug Posted April 28, 2014 Author Posted April 28, 2014 How are you an SDN scripter? i have scripts on the SDN duh.
Dreamliner Posted April 28, 2014 Posted April 28, 2014 i have scripts on the SDN duh. But you don't know what arrays and lists are used for? sketchy
BurritoBug Posted April 28, 2014 Author Posted April 28, 2014 you expect to a SDN scripter to know everything? thats was an Official Scripter is.
Dreamliner Posted April 28, 2014 Posted April 28, 2014 (edited) you expect to a SDN scripter to know everything? thats was an Official Scripter is. I disagree. Any SDN scripter should be the same caliber as an official scripter. The only difference is # of scripts one has edit: No I don't expect SDN scripter to know everything. Nor do I expect official scripter to know everything. Should both know at the very least the basics of java? Yes. Edited April 28, 2014 by dreamliner
Isolate Posted April 28, 2014 Posted April 28, 2014 or he could do: RS2Interface Parent; int[] ParentIDs = 1,2,3,4; RS2InterfaceChild; int[] ChildIDs = 5,6,7,8; public boolean parentIsValid(){ for(int i = 0; i < parent.length(); i++){ if(client.getInterface(ParentIDs[i]).isVisible && client.getInterface(ParentIDs[i]). isValid){ return true; } } return false; } Loop(){ if(parentIsValid){ handleChildren(); }else{ //talk to that bitch; } } public void handleChildren(){ //similar to handle children }
BurritoBug Posted April 28, 2014 Author Posted April 28, 2014 I disagree. Any SDN scripter should be the same caliber as an official scripter. The only difference is # of scripts one has Thats your opinion, also its just that this is the first time i've had to use an array list, i learn as i go or he could do: RS2Interface Parent; int[] ParentIDs = 1,2,3,4; RS2InterfaceChild; int[] ChildIDs = 5,6,7,8; public boolean parentIsValid(){ for(int i = 0; i < parent.length(); i++){ if(client.getInterface(ParentIDs[i]).isVisible && client.getInterface(ParentIDs[i]). isValid){ return true; } } return false; } Loop(){ if(parentIsValid){ handleChildren(); }else{ //talk to that bitch; } } public void handleChildren(){ //similar to handle children } this looks like you're doing it right
Dreamliner Posted April 28, 2014 Posted April 28, 2014 Thats your opinion, also its just that this is the first time i've had to use an array list, i learn as i go this looks like you're doing it right Welcome to the wonderful world of arrays and lists! Now every script you make will be filled with them
Isolate Posted April 28, 2014 Posted April 28, 2014 Thats your opinion, also its just that this is the first time i've had to use an array list, i learn as i go this looks like you're doing it right oh wait im a dope XD int[] parentIDs = 1,2,3,4; public boolean parentIsValid{ for(int i : parentIDs){ if(client.getInterface(i).isValid || client.getInterface(i.isVisible){ return true; } } return false; }
Dreamliner Posted April 28, 2014 Posted April 28, 2014 (edited) int[] parentIDs = {1,2,3,4}; public boolean parentIsValid() { boolean result = false; for(int i : parentIDs){ if(client.getInterface(i).isValid() || client.getInterface(i.isVisible()){ result = true; break; } } return result; } Edited April 28, 2014 by dreamliner