Log in

View Full Version : Wierd Bug??



gerauchert
06-20-2007, 05:25 PM
Ok so whenever my powerchopper completes chopping one load of logs then mouse FLIPS OUT :eek: and goes out of the client window and starts moving up and down really fast. It used to do the same thing upon the start of the script after it did my setup...which i fixed after i made my chop procedure more basic. I have no idea what is causing this and any help would be great :D

program Powerchopper;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}

var LoadsA: Integer; LoadsB: Integer;

//SETUP HERE//
const

TreeColor1= 1718320 ; //set tree colors here
TreeColor2= 2572344;
TreeColor3= 1853504;

ChopTime= 5000;

Loads= 1;

RunDirection= 'N';

procedure DeclarePlayers;
begin
HowManyPlayers := 5;//Dont touch (just state whether active or not)
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'UserName';
Players[0].Pass := 'Password';
Players[0].Nick := 'Nick'; //3 - 4 letters of YOUR username
Players[0].Active :=True; //Auto with this account?

Players[1].Name := 'UserName';
Players[1].Pass := 'Password';
Players[1].Nick := 'Nick'; //3 - 4 letters of YOUR username
Players[1].Active :=True; //Auto with this account?

Players[2].Name := 'UserName';
Players[2].Pass := 'Password';
Players[2].Nick := 'Nick'; //3 - 4 letters of YOUR username
Players[2].Active :=False; //Auto with this account?

Players[3].Name := 'UserName';
Players[3].Pass := 'Password';
Players[3].Nick := 'Nick'; //3 - 4 letters of YOUR username
Players[3].Active :=False; //Auto with this account?

NickNameBMP:= CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;

//STARTING UP//
procedure ScriptSetup;
begin
ClearDebug;
SetupSRL;
DeclarePlayers;
ActivateClient;
end;

procedure Setup;
begin
Wait(500 + random(250));
SetRun(True);
Wait(500 + random(150));
GameTab(4);
end;

//ANTIBAN//

procedure DontGetBanned;
begin
if(not(LoggedIn))then
Exit;
case Random(16) of
0: begin
GameTab(5);
Wait(2000 + random(1200));
GameTab(4);
end;
1: begin
HoverSkill('Random', False);
Wait(500+ random (250));
HoverSkill('Woodcutting', False);
end;
2: begin
GameTab(5);
MMouse(x,y,590,304);
Wait(500 + random(300));
Mouse(x,y,590,304,False);
ChooseOption(x,y,'xamine');
Wait(1500 + random(1300));
MMouse(x,y,610,261);
Mouse(x,y,610,261,False);
ChooseOption(x,y,'xamine');
Wait(700 + random(200));
GameTab(4);
end;
3: begin
GameTab(6);
Wait(400 + random(200));
MouseBox(566,209,734,455,3);
Sleep(2000 + random(500));
HoverSkill('random',False);
Wait(500 + random(150));
GameTab(4);
end;
4: begin
GameTab(7);
Wait(500 + random(100));
MouseBox(566,209,734,455,3);
Sleep(3000 + random(1000));
Wait(300 + random(125));
GameTab(4);
end;
5: begin
GameTab(8);
MouseBox(566,209,734,455,3);
Sleep(2000 + random(700));
Wait(500 + random(230));
GameTab(9);
Wait(1000 + random(800));
GameTab(1);
Wait(3000 + random(750));
GameTab(3);
Wait(2500 + random(1200));
GameTab(11);
Wait(1000 + random(250));
GameTab(4);
end;
6: begin
TypeSend('sooooo bored omg');
Wait(2000 + random(575));
TypeSend('muahahhahahha chop dem treeeeez');
Wait(1000 + random(125));
TypeSend('ok im done...need 2 focus...');
end;
7: begin
TypeSend('wow these autoers r swarming');
Wait(500 + random(400));
TypeSend('i want to murder them idiot lvl 3 defaults');
TypeSend('Die die die noooobs rawr');
Wait(2000 + random(300));
TypeSend('*sigh*');
end;
8: begin
TypeSend('wc lvls?');
Wait(2000 + random(750));
TypeSend('=p');
TypeSend('*yawn* boring');
Wait(500 + random(300));
end;
9: PickUpMouse;
10: MouseBox(MSX1,MSY1,MSX2,MSY2,3);
11: MouseBox(MMX1,MMY1,MMX2,MMY2,3);
12: RandomRClick;
13: BoredEvery(2 + random(1));
14: SleepAndMoveMouse(5000 + random(1500));
15: RotateEvery(2 + random(1));
end;
end;




//PROGRESS REPORT//
procedure Proggy;
begin
ClearDebug;
Writeln('*************************************');
Writeln('=========== PROGRESS REPORT =========');
Writeln('Chopped: ' + IntToStr(Loads) + ' Loads');
Writeln('Ran For: ' + TimeRunning + ' Minutes');
Writeln('*************************************');
end;

//ANTIRANDOMZ//

Function FindFastRandoms: Boolean; // By WT-Fakawi.

Var
i: Integer;

Begin
For I := 1 To 11 Do
Begin
Case I Of
1: If FindDead Then
Result := True;

2: If FindMod Then
Result := True;

3: If FindMime Then
Result := True;

4: If FindMaze Then
Result := True;

5: If FindQuiz Then
Result := True;

6: If FindDemon Then
Result := True;

7: Begin
If NoGameTab Then
Begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
End;
End;

8 : If RC Then
Result := True;

9 : If FindFight Then
Begin
Result := True;
RunTo('S', True);
End;

10: If FindTalk Then
Result := True;

11: If FindTrade Then
Result := True;
End;
Wait(1);
End;
End;

procedure Randoms;
begin
FindFastRandoms;
FindNormalRandoms;
if FindFight then
RunAwayDirection(RunDirection);
Wait(10000 + random (2000));
RunBack;
end;

//CHOPPING PROCEDURE//
procedure Chop;
begin
repeat
if(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX 2,MSY2,3))or
(FindColorTolerance(x,y,TreeColor2,MSX1,MSY1,MSX2, MSY2,3))or
(FindColorTolerance(x,y,TreeColor3,MSX1,MSY1,MSX2, MSY2,3))then
begin
MMouse(x,y,3,3);
if IsUpText('illow') then
Mouse(x,y,3,3,True);
Wait(ChopTime + random(300));
end;
until(InvFull);
end;


//DROPPING PROCEDURE//
procedure Drop;
begin
GameTab(4);
if(InvFull)then
begin
DropTo(2,28)
LoadsA:=Loads+1;
LoadsB:=Loads+1;
TimeRunning;
end;
end;

//MAIN LOOP//
begin
ScriptSetup;
if (not(LoggedIn)) then
LogInPlayer;
Setup;
repeat
if (not(LoggedIn)) then
LogInPlayer;
Chop;
Drop;
Proggy;
Randoms;
DontGetBanned;
if (LoadsB = Loads) then
begin
NextPlayer(True);
LoadsB:= 0;
Writeln('w00t switched players');
end;
until(False);
end.



thanks

legendaryhero90
06-20-2007, 05:49 PM
im betting on your dontgetbanned procedure. i dont think you set your anti-bans correctly. Look at other scripts and see they are set up.

gerauchert
06-21-2007, 05:56 PM
i based my anti ban off of looking at other scripts lol and then added some extra cases to it to make mine unique/not leeched

hmm

could it be that i have my antiban in the main loop instead of chopping procedure? idk im still really new to all of this, it just confuses me when something like this happens in my script and it isnt a straightforward answer.

ill take a look at more scripts but i would still like to know what the direct cause of this problem is =/

Buckleyindahouse
06-21-2007, 06:01 PM
Chances are its this procedure part.
2: begin
GameTab(5);
MMouse(x,y,590,304);
Wait(500 + random(300));
Mouse(x,y,590,304,False);
ChooseOption(x,y,'xamine');
Wait(1500 + random(1300));
MMouse(x,y,610,261);
Mouse(x,y,610,261,False);
ChooseOption(x,y,'xamine');
Wait(700 + random(200));
GameTab(4);
end;
3: begin
GameTab(6);
Wait(400 + random(200));
MouseBox(566,209,734,455,3);
Sleep(2000 + random(500));
HoverSkill('random',False);
Wait(500 + random(150));
GameTab(4);
end;
4: begin
GameTab(7);
Wait(500 + random(100));
MouseBox(566,209,734,455,3);
Sleep(3000 + random(1000));
Wait(300 + random(125));
GameTab(4);
end;
5: begin
GameTab(8);
MouseBox(566,209,734,455,3);
Sleep(2000 + random(700));
Wait(500 + random(230));
GameTab(9);
Wait(1000 + random(800));
GameTab(1);
Wait(3000 + random(750));
GameTab(3);
Wait(2500 + random(1200));
GameTab(11);
Wait(1000 + random(250));
GameTab(4);
end;

I see your moving the mouse X,Y and plus a random 500 or so pixels and looking for examine. So that keep move it off of the client onto the desktop and keep clicking till it finds examine.also I suggest you remove the typing in that procedure too, kinda easy to tell if your autoing saying the same thing over and over and over.

gerauchert
06-21-2007, 06:10 PM
wow i feel like an idiot lol....

i forgot that those were random pixels not coords ffs :redface:

i can plug those into the x,y part and still have it work right? (without 500 random pixels) lol

ok and ill probably just get rid of the talking then...maybe change it to an autoresponder

thanks for your help!! :p

Buckleyindahouse
06-21-2007, 07:06 PM
no problem and replace the MMouse(x,y,500,500); with Mmouse(x,y,10,10);

legendaryhero90
06-21-2007, 08:00 PM
i based my anti ban off of looking at other scripts lol and then added some extra cases to it to make mine unique/not leeched

hmm

could it be that i have my antiban in the main loop instead of chopping procedure? idk im still really new to all of this, it just confuses me when something like this happens in my script and it isnt a straightforward answer.

ill take a look at more scripts but i would still like to know what the direct cause of this problem is =/

lol it looks like i was right after all lolz :D

randy marsh
06-21-2007, 09:37 PM
Why have you set your loads to one?

gerauchert
06-22-2007, 03:37 AM
@Kingmatt--- I have loads set to 1 b/c i am testing to see if the multi player was working...never got to that point lol

W00t i figured out what was wrong....the antiban wasnt the problem....
the findrandoms procedure in the the mainloop shouldnt have been there cuz after i took it out everything went smooth, multi and everything =D

thanks for your help guys hoping to finish this thing soon...............