ugpjosh Posted September 27, 2014 Share Posted September 27, 2014 Could someone help me with the code needed here? I used the thieving script tutorial for the tea stall and everytime it goes to click the stall it clicks about 3 times before it actually picks up the tea. When the camera moves to a certain point it makes me walk behind the stall to the person who wont let you steal from it. HOW can i make it so that it wont do this and if it does happen, it identifies hes yelling at me and makes me run back to the spot out front of the stall. Link to comment Share on other sites More sharing options...
Swaq Posted September 28, 2014 Share Posted September 28, 2014 I say you contact a willing scripter to help you with something, via Skype. Link to comment Share on other sites More sharing options...
Apaec Posted September 28, 2014 Share Posted September 28, 2014 Well theres a handful of ways of doing it. The simplest way for you would be to create an area around the are you dont want to stand in while attempting to steal from the tea stall: Area DANGER_AREA = new Area(int top right x, int top right y, int bottom left x, int bottom left y); and then just in your getState call: if (DANGER_AREA.contains(myPlayer())) return State.returnToStealPos; and in your switch statement: localWalker.walk(STEAL_POS); where STEAL_POS is the position you want to steal at (You can define STEAL_POS at the top like so: ) Position STEAL_POS = new Position(x,y); I hope I made myself clear, if not just quote this post and i'll gladly help out further. PS hope the tutorial helped! Link to comment Share on other sites More sharing options...
Hayden Posted September 28, 2014 Share Posted September 28, 2014 Make your rs character black.problem solved Link to comment Share on other sites More sharing options...
Joseph Posted September 28, 2014 Share Posted September 28, 2014 (edited) Well theres a handful of ways of doing it. The simplest way for you would be to create an area around the are you dont want to stand in while attempting to steal from the tea stall: Area DANGER_AREA = new Area(int top right x, int top right y, int bottom left x, int bottom left y); the area is bottom left x, bottom left y, top right x, top right y Edited September 28, 2014 by josedpay Link to comment Share on other sites More sharing options...
Apaec Posted September 28, 2014 Share Posted September 28, 2014 the area is bottom left x, bottom left y, top right x, top right y I think they are actually commutative parameters (ie if you have your second x larger than your first one, it switches the two, likewise with y, but I could be wrong - all my areas are written like I posted xD) Link to comment Share on other sites More sharing options...
ugpjosh Posted September 28, 2014 Author Share Posted September 28, 2014 Well theres a handful of ways of doing it. The simplest way for you would be to create an area around the are you dont want to stand in while attempting to steal from the tea stall: Area DANGER_AREA = new Area(int top right x, int top right y, int bottom left x, int bottom left y); and then just in your getState call: if (DANGER_AREA.contains(myPlayer())) return State.returnToStealPos; and in your switch statement: localWalker.walk(STEAL_POS); where STEAL_POS is the position you want to steal at (You can define STEAL_POS at the top like so: ) Position STEAL_POS = new Position(x,y); I hope I made myself clear, if not just quote this post and i'll gladly help out further. PS hope the tutorial helped! I'm coming up with problems with the coordinate thing. Could you Team View me? Link to comment Share on other sites More sharing options...