weequ
2012-02-21 18:00:31
Weequ's SeagullKiller
Hey I made this script to train level 3's :) Been tested for hours, should be pretty stable now. Please keep in SSRL+ ;)
Start at the northern seagulls of port sharim.
- Fast
- Reliable
- Walks back to the center if too far.
- Antiban
- Multiplayer
- Failsafes
- No progress report yet.
Hey I made this script to train level 3's :) Been tested for hours, should be pretty stable now. Please keep in SSRL+ ;)
Start at the northern seagulls of port sharim.
program SeagulKiller;
{$i srl/srl/misc/Smart.simba}
{$i SRL/SRL.simba}
{$i SRL/SRL/misc/paintsmart.simba}
const
SmartWorld = 11;
MaxCombatTime = 10000;
procedure DeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Active := True;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Active := True;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Active := True;
end;
procedure AntiBan;
begin
case Random(8) of
0..3: SleepAndMoveMouse(500+Random(Random(7000)));
3..6: PickUpMouse;
7: GameTab(RandomRange(tab_Combat, tab_Notes));
end;
if Random(2) = 0 then GameTab(tab_Inv);
end;
Function GridCoords16ExMOD(Xmod, Ymod: integer; Grid16: TPoint): TPoint;//Modified from SRL
var
Yh, yM, X, Y: Extended;
begin
X := Grid16.x+0.0;
Y := Grid16.y+0.0;
yM := 36.0;
Yh := Abs(Y + yM);
Result.x := Round( (263.5+Xmod) + (X*9.75/(12.8-(Yh/yM*3.15))) * 9.75);
Result.y := Round( (182.0+Ymod) + Y * (6.3 + ((Yh/yM)*2.4)));
end;
Function MMtoMSExMOD(Xmod, Ymod: integer; MM: TPoint): TPoint;//Modified from SRL
begin
Result := GridCoords16ExMOD(Xmod, Ymod, Point(MM.x-MMCX, MM.y-MMCY));
end;
function FindCenter(var x: Integer; var y: Integer): Boolean;
var
DTM: Integer;
begin
DTM := DTMFromString('mWAAAAHicY2FgYOACYmEGCOCC0mxAzA7ETEAcHBTA0NE3B4wj7GQYRIFiyJgBqg6GQQAAABsFoA==');
Result := FindDTM(DTM, x, y, mmx1, mmy1, mmx2, mmy2);
FreeDTM(DTM);
if Result then
begin
x := x+2;
y := y+23;
end;
end;
function WalkCenter: Boolean;
var
x, y: Integer;
begin
Result := FindCenter(x, y);
if not Result then Exit;
if Distance(x, y, MMCX, MMCY) < 13 then Exit;
Mouse(X-3, Y-3, 7, 7, True);
Wait(600);
Flag;
Wait(500+Random(1000));
end;
function Attack: Boolean;
var
I, x, y, ax, ay: Integer;
Dots, TPA: TPointArray;
MSDot: TPoint;
MSBox2: TBox;
begin
if not FindCenter(x, y) then Exit;
Dots := GetMiniMapDotsIn('npc', Max(x-14, MMX1), Max(y-23, MMY1), Min(x+22, MMX2), Min(y+25, MMY2));
if Length(Dots) = 0 then Exit;
SortTPAFrom(Dots, IntToPoint(MMCX, MMCY));
MSBox2 := IntToBox(MSX1-20, MSY1-20, MSX2+20, MSY2+20);
for I := 0 to Length(Dots) -1 do
begin
MSDot := MMtoMSExMod(1, -13, Dots[I]);
if not PointInBox(MSDot, MSBox2) then Continue;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.47, 0.13);
SMART_DrawBox(IntToBox(MSDot.X-25, MSDot.Y-25, MSDot.X+25, MSDot.Y+25));
FindColorsTolerance(TPA, 9278612, Max(MSDot.X-20, MSX1), Max(MSDot.Y-20, MSY1), Min(MSDot.X+20, MSX2), Min(MSDot.Y+20, MSY2), 6);
SetColorToleranceSpeed(1);
If Length(TPA) < 3 then Continue;
MiddleTPAEx(TPA, x, y);
if FindColor(ax, ay, 10240, Max(X-5, MSX1), Max(Y-30, MSY1), Min(X+5, MSX2), Min(Y-10, MSY2))
or FindColor(ax, ay, 132923, Max(X-5, MSX1), Max(Y-30, MSY1), Min(X+5, MSX2), Min(Y-10, MSY2)) then Continue;
MMouse(X, Y, 0, 0);
if not WaitUptext('eagul', 200) then Continue;
Mouse(X, Y, 0, 0, True);
Result := DidClick(True, 400);
Break;
end;
end;
procedure CombatWait;
var
HPBarDTM, x, y, TimeMark: Integer;
begin
HPBarDTM := DTMFromString('mQwAAAHicY2ZgYGAEYnMGTJADxNbsTGCMBwAAL94BMA==');
TimeMark := GetSystemTime;
while not FindDTM(HPBarDTM, x, y, MSCX-110, MSCY-90, MSCX+110, MSCY+80) do
begin
if GetSystemTime-TimeMark > MaxCombatTime then Break;
if Random(200) = 0 then AntiBan;
if (GetSystemTime-TimeMark > 1000) and not FindColor(x, y, 10240, MSCX-80, MSCY-80, MSCX+80, MSCY+80) then Break;
Wait(100);
end;
FreeDTM(HPBarDTM);
end;
function LoginPlaya: Boolean;
begin
Result := LoginPlayer;
if not Result then Exit;
ClickNorth(SRL_ANGLE_HIGH);
SetRun(True);
end;
function MainLoop: Boolean;
var
WalkCenterFails: Integer;
begin
Result := False;
if IsFKeyDown(9) then TerminateScript;
if Attack then
begin
if Random(16) = 0 then AntiBan;
Wait(3600);
CombatWait;
end else
begin
Wait(200);
if (GetColor(487, 40) = 2994685) then Mouse(485, 38, 5, 5, True);//Close p2p advert
while not WalkCenter do
begin
if WalkCenterFails > 9 then Exit;
WriteLn('WalkCenter Failed! Attempt '+IntToStr(WalkCenterFails+1)+'/10');
Wait(1000);
case (WalkCenterFails mod 4) of
0:
begin
if not WaitFunc(@LoggedIn, 50, 3000) then LoginPlaya;
end;
1:
begin
MakeCompass('N');
end;
2:
begin
FindNormalRandoms;
end;
3:
begin
if ExitToLobby then LoginPlaya;
end;
end;
Inc(WalkCenterFails);
end;
end;
Result := True;
end;
procedure CrashSMART;
begin
Writeln('You are using CRASHSMART, so we are going to reload your client after the RS update!');
SmartgetFieldObject(1488,'crash'); // will crash SMART (and Simba).
// IF THIS DOES NOT CRASH YOUR SIMBA, YOU ARE NOT USING THE PROPER PLUGIN
// AN ACCESS VIOLATION HERE IS NOT THE CRASH; MAKE SURE YOU MOVED THE EDITED PLUGIN
Wait(5000);
WriteLn('CRASHSMART Failed: Make sure you are using the proper plugin!');
WriteLn('Read more about this feature at villavu.com/forum/showthread.php?t=67864');
TerminateScript;
end;
begin
Smart_Server := SmartWorld;
SRL_Procs[srl_OnRSUpdate] := @CrashSMART;
SetupSRL;
SmartSetRefresh(100);
DeclarePlayers;
MouseSpeed := 15;
repeat
LoginPlaya;
Retaliate(True);
repeat
until(not MainLoop);
Logout;
Players[CurrentPlayer].Active := False;
CurrentPlayer := NextPlayerIndex;
until(AllPlayersInActive);
end.