ugpjosh Posted September 27, 2014 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.
Swaq Posted September 28, 2014 Posted September 28, 2014 I say you contact a willing scripter to help you with something, via Skype.
Apaec Posted September 28, 2014 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!
Hayden Posted September 28, 2014 Posted September 28, 2014 Make your rs character black.problem solved
Joseph Posted September 28, 2014 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
Apaec Posted September 28, 2014 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)
ugpjosh Posted September 28, 2014 Author 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?