Log in

View Full Version : Need Help



botter5214
02-08-2012, 01:50 PM
Trying to get the bot click the cows it just hovers over them when it finds, is there something im missing to activate the colors to be clicked?

Jagex_Fagex
02-08-2012, 01:53 PM
Please put simba tags around the script, then I will have a look at it.

botter5214
02-08-2012, 01:56 PM
{/////////////////////////////////////////
// Cow Killer //
// (by Botter5214) //
// //
// Version: 1.0 //
/////////////////////////////////////////}

Program CowKiller ;

{$define SMART}
{$i SRL/SRL.simba}
{$i SRL/SRL/Misc/Reports.simba}

Const

Break = True; // True=Break, False=NotBreak
BreakEvery = 120; // Break after x amount of minutes
BreakFor = 7; // Total amount of time you wish to break for
Version = 1.0; // First script ever LOL

Procedure DeclarePlayers;

Begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; // Runescape Username
Players[0].Pass := ''; // Runescape Password
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence', 'ithril', 'oal']; //Delete the ones you do not want or add uptext

End;

Procedure StatsGuise (Wat:string);

Begin
Status(Wat);
Disguise(Wat);

End;

Function CheckandClick (UpText, Option: String; x,y: Integer; RClick: Boolean): Boolean;

Begin

MMouse (x, y, 5, 5);
If WaitUpText (UpText, 1500 + Random(500)) Then

Begin

Result:= True;
GetMousePos(x, y);
If RClick Then

Begin

Mouse(x, y, 0, 0, False);
Result:= WaitOption (Option, 2000);
If Result Then FFlag (0);

End Else

Begin

Mouse(x, y, 0, 0, True);
Wait (100 + Random (50));
FFlag (0);

End;
End;
End;

Procedure Antiban;

Begin
Case Random (250) of
0: Begin StatsGuise ('AntiBan') GameTab (Tab_Stats) Hoverskill ('Attack', False); GameTab (28); End; // Hoverskill attack
1: Begin StatsGuise ('AntiBan') GameTab (Tab_Stats) Hoverskill ('Random', False); GameTab (28); End; // Hoverskill randomly
2: Begin StatsGuise ('AntiBan') GameTab (Tab_Stats) ;Wait (2000 + Random (1000)); GameTab (28); End; // Random Stat checked
3: Begin StatsGuise ('AntiBan') SleepandMoveMouse (2000 + Random (1000)); End; // Randomly Move Mouse
4: Begin StatsGuise ('AntiBan') GameTab (Tab_Inv) ExamineInv; GameTab (28); End; // Random Inventory
5: Begin StatsGuise ('AntiBan') RandomAngle (1); End; // Random Angle
End;
End;

Procedure FailSafe (Reason: String);

Begin
Players [CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;

End;

Function AttackCow: Boolean;

Var
SS, BB: Integer;

Begin

If FindObjCustom (SS, BB,['attack cow', 'tack cow', 'ack cow'], [1189161, 3292994, 2369583, 8101049, 2501170, 6257040], 25) Then

Begin
StatsGuise('O yeah found a cow')
GetMousePos (SS, BB);
Case Random (2) Of
0: Mouse (100, 100, 50, 50, True);
1: Begin
Mouse(100, 100, 50, 50, False);
WaitOption ('Attack', 100);
End;
End;
End;
End;





Begin
SetupSRL;
DeclarePlayers;
// Repeat
AttackCow;
//Until (False);
End.

botter5214
02-08-2012, 01:58 PM
Please put simba tags around the script, then I will have a look at it.

yea didnt realize sorry about that

Brandon
02-08-2012, 02:06 PM
GetMousePos (SS, BB); <---- That ruins it for you right there.. FindObjCustom stores values/co-ordinates in SS and BB of the colour found. Doing a GetMousePos will overwrite those values with the current mouse co-ordinates.

Not only that but you shouldn't be co-ordinate clicking by doing:
Mouse(100, 100.....)

Do something like:

MMouse(SS, BB, 5, 5);
if isUptextMultiCustom(['cow', 'att', 'attack', 'tack']) then
ClickMouse2(MOUSE_LEFT)
else
begin
ClickMouse2(MOUSE_RIGHT);
WaitOption('cow');
end;