SRL Archive - Reflection Help

tiles and stuff


austin2162

2010-05-22 02:09:58

ok the problem is i setup my wcer it uses reflection walking. it goes to the first tree fine but then after 1 or 2 trips between the trees it stops working and just keeps clicking by the first tree how do i go about naming it right now im using tpoint, before i was using ttiles, but then tile quit working so i switched to points

JPHamlett

2010-05-22 02:14:26

im not sure what your asking it would help to see the code

austin2162

2010-05-22 02:37:46

example

program treechop;
{incudees here}

var
tree1,tree2:tpoint;

procedure walkexample;
begin
tree1:= point(3088,3478)
tree2:= point(3088,3472)// it always goes to this one even though its set to
go to tree one
walktotile(tree1,0,0);
choping stuff
walktotile(tree2,0,0);
end;

begin
setup stuff
walkexample;
end.

this is not my script just example
i dont post my code cause its sloppy =(
it always walks to tree one after 1 or 2 trips between the two
then it never travels to tree2 and also it doesnt get to the bank right. but i fix that later.

masterBB

2010-05-22 07:49:23

I can't see:
The actual walking function.
A repeat until.
And a lot other code that could be the problem. This isn't usefull enough…

Sir R. M8gic1an

2010-05-22 07:54:14

Don't be affraid to post your actual code ;) It'll be mutually benficial, as we are able to see exactly what might going wrong, and therefore better able to help you ;)

~RM

austin2162

2010-05-22 16:28:02

ok the acutal code mind you i have horrible standerds…

procedure totree2;
begin
tree1:= point(3088,3472);// always walks to this one.
tree2:= point(3088,3479);
walktotile(tree1,0,0)
r_flag;
repeat
wait(950);
if findobjcustom(x,y,['ew'],[10076602,5207920],5) then
begin
smartclickmouse(x,y,true);
R_flag;
repeat
antiban;
wait(950);
if levelup then
begin
inc(b)
levelup;
end;
until not(getanimation = 875) or (invfull)
if invfull then
bank1;
walktotile(tree2,0,0);
r_flag;
end;
until invfull
end;

this is my secound tree function.
the part where it walks to the tree waits for it chops it and walks back
doesnt quite do it right

i think all it is is that i use points
but when i used tiles it didnt work
ehem help please =p

Sir R. M8gic1an

2010-05-23 05:51:17

[php]
procedure totree2;
begin

tree1:= point(3088,3472);// always walks to this one.
tree2:= point(3088,3479);
walktotile(tree1,0,0)
r_flag;

repeat
wait(950);

if findobjcustom(x,y,['ew'],[10076602,5207920],5) then
begin
Mouse(x, y, 3, 3, true); //SmartMouse -> SRLMouse
R_flag;

repeat
antiban;
wait(950);
if levelup then
begin
inc(b)
levelup; //why are you recalling this function?
end;
until not(getanimation = 875) or (invfull)

if invfull then
begin //added this
bank1; //I think this should be called afterwards… but can't check as I dont have the code..
walktotile(tree2, 2, 2);
r_flag;
walktotile(tree1, 2, 2);
end;

end; //if FindObj

until invfull
end;
[/php]

Give this a go; And do read up on standards ;) Everyone ends up developing his own style, but it's good to keep it as close to the norm as possible.

~RM

austin2162

2010-05-23 07:49:58

wow, im dumb i cant belevie i missed this… look at the error this is the secound part it repeats then walks but then it never returns to the first part
which in turn causes it to walk to the same point repeatedly
is that clear?

masterBB

2010-05-23 08:33:42

From: austin2162

is that clear?


not for me:confused:

austin2162

2010-05-23 08:43:21

i had it repeating the second procedure instead of exiting to the first procedure causing an endless loop on the same procedure which resulted in it repeating the same walk which means in only walked to the tree2 tile instead of both

Baked0420

2010-05-23 10:34:39

it seems kinda hard to follow that, but I'm pretty sure you're saying it would keep going to tree2 because you had a procedure to walk to tree1 and a procedure to walk to tree2 and you had an infinite loop and in it was the walking to tree2 and not tree1 and that's why it got stuck always walking to that tree. I tried to say that as clearly as possible incase anyone still didn't understand you. And if I didn't understand you correctly just tell me so I don't confuse people even more :p

austin2162

2010-05-23 17:13:57

Baked explained it better then I. So go by what he said thanks baked.