Log in

View Full Version : Script Help



botter5214
02-09-2012, 12:39 AM
{/////////////////////////////////////////
// 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

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

End;





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



What am I doing wrong for this script to still not pick up on attacking cows, my first script attempt

x[Warrior]x3500
02-09-2012, 12:43 AM
ur attack cow doesnt have enough ends;

and if u want people to help u with your scripts, please use acceptable standards. :)

one last note, if you cant get FindObjCustom to work, dont use it. learn other ways of object finding.


EDIT: your waitOption is messed up

ryno101
02-09-2012, 03:05 AM
also i reccomend you use yohojos tut for ACA found here: http://villavu.com/forum/showthread.php?t=71074

it seems to be far more accurate

loser69
02-09-2012, 03:12 AM
MMouse (x, y, 5, 5);
If WaitUpText (UpText, 1500 + Random(500)) Then


X and Y havn't been defined so your basically moving the mouse to an unknown location?