Updated script, just need more bitmaps. Be sure to update RSPS include:
Simba Code:
{$I RSPS/srlRSPS.Simba}
// VERSION 1.00
const
timeout = 30000;
fails = 30;
stall = 'spice';
{*baker * spice * gem * fur * silk * silver*}
logOutChatMessage = [''];
{Logout if text appears in chat, Leave blank if you don't want to use}
{
Example form:
timeout = 10000;
fails = 10;
stall = 'Fur';
logOutChatMessage = ['r u botting','bot?'];
}
var
e:_rsps_server;
uptexts:TStringArray;
failSafeTimer, failCount, steals, randoms:integer;
startXP:integer;
bmpArray:TIntegerArray;
procedure loadUptext(stallType:string);
begin
case lowerCase(stallType) of
'baker' : uptexts := ['aker','Bake','Bak'];
'spice' : uptexts := ['pice','Spice','Spi'];
'gem' : uptexts := ['Gem','em'];
'fur' : uptexts := ['Fur'];
'silk' : uptexts := ['Silk','ilk'];
'silver': uptexts := ['ilver','lver','Silver'];
end;
setLength(bmpArray, 3);
bmpArray[0] := BitmapFromString(20, 10, 'meJyTO/xebt8Lma33ZNZfk1xyUmzmbkYGBgUFAyApd+iN3NGPcqe+aZz7LbPrMUh20iZkBFQgs+MBRKPk7H1iE9YDdUGQ3PEvQF1yB14BZcW6V6JpBCKoxuVn+NLrMGXRFW++DVK/6zHQqSBLYU7Fr0uoeQFfSpXM7qcQBNK77wW6smk7QOYDFQDNB9oCNHn1RZCrCjr5ovNBgmB7IQhkNUTlphsya68IVU+TnHcAJAIMPbAIUCNQBCjOF1sEsQ4ktfUe0ExQUIA1gsxfclKobQlQPUgv0FK4xrYlfLltnP5JoLA98ApiAtQcWHCJ9a4BBqzi2d9yp39AbUdzeUoVyEcQNwOlwFZIrjwnueAwUBwaO0c/AlXCXQ7RCFQA9DWe8IToBRkOcTlEL9DkRccgXgY6DIKAsgAufCLU');
bmpArray[1] := BitmapFromString(11, 9, 'meJzz3XzZYcMls3UXTVacNll+Qnfyeq2OJXCk0TjLd/Nl6w2XTFadgSjQm7ZFd8JaiKx29zKt1gVAWbM150AKwGoMZm4HGgKUgiCgAqDhQAVwNQZz9upN3gRV0LNCq32h+XqQA+DKDBceANoClIIgiAJkNcaLj4AMgajpWw10CdANyGqA7jSct09vxjagLFwBXA0QAZ1hvPAw0KlAWaB3gC4BBoIDWA1EGdAQkC2zdwFlIQoAwPqZxQ==');
bmpArray[2] := BitmapFromString(18, 8, 'meJyTO/BK7vgXmd1PZdZfk9n1WGbTDcmV5yQXHOZLr2NkYFBQMACSIKlNN2Q235ZcfkZy9j6x3jVyh9/Lnf4hs+OB5JKTyLqEqqdBdBk7uEE1br0HkoLoOvoRpGv9Ncl5B/hy20Aa114B6gJKCZVNAKo3tHaG6tp8G2T46otAlWKTNkEQSGXHcpBT4Y4s6EQ4EujCHQ9A1i0/IzZtB0QLp38SUAqI5Pa9QDiyeQFCF9giiNfEZu4GqVlwmDM8GyS19orcoTcg2bVXxKZuRbFr6z2orkXHQA5bfRFoI19sEciiw+9BLgRKAR2/5CREC1QX0L9AjUArlpwEqod4jS+lCqTr6Eeof2fvE6qbBXEzBEF1AQMNGIYT1gMA6TCvBQ==');
end;
function findStall:boolean;
var
tentTPA:TPointArray;
tentATPA:T2DPointArray;
i:integer;
move:TPoint;
begin
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.13, 0.69);
FindColorsTolerance(tentTPA, 9150895, mainscreen.bounds, 6);
SetToleranceSpeed2Modifiers(0.2, 0.2);
SetColorToleranceSpeed(1);
if length(tentTPA) > 0 then
begin
tentATPA := clusterTPA(tentTPA, 2);
filterTpasBetween(tentATPA, 0, 50);
sortATPAFromFirstpoint(tentATPA, point(258, 219));
for i := 0 to high(tentATPA) do
begin
move := middleTPA(tentATPA[i]);
mmouse(move.x, move.y, 0, 0);
if e.waitUpTextMulti(uptexts, 300) then
exit(true);
end;
end;
end;
function checkMarkExists:boolean;
begin
result := (countColorTolerance(3051090, 238, 434, 280, 471, 61) > 90)
end;
function selectOptionExists:boolean;
var
text:string;
begin
text := getSimpleText([128], 202, 410, 327, 433, 'charsnpc07');
result := text.contains(['elect','ption','Opti']);
end;
function valDrop:boolean;
begin
result := checkMarkExists or selectOptionExists;
end;
procedure clickYes;
begin
if checkMarkExists then
mouse(296, 454, 0, 0, mouse_left)
else if selectOptionExists then
mouse(258, 454, 0, 0, mouse_left)
else
end;
function _rsps_server.dropValauble:boolean;
var
i, c, k:integer;
begin
c := inventory.count();
if (c = 0) then
exit(true);
for i := 0 to 27 do
if inventory.slotFull(i) then
begin
inventory.interactItem(i, mouse_right);
if self.waitOption('rop', 200) then
if waitFunc(@valDrop, 50, 700) then
clickYes;
end;
exit(k = c);
end;
function getInterfaceText:string;
var
textTPA:TPointArray;
textATPA:T2DPointArray;
begin
findColorsTolerance(textTPA, 65535, 430, 69, 504, 82, 1);
textATPA := splitTPAEx(textTPA, 1, 10);
filtertpasbetween(textatpa, 0, 1);
SortATPAFromFirstPointX(textATPA, Point(0, 0));
result := getTextATPA(textATPA, 3, 'smallchars07');
end;
function interfaceEvent:boolean;
begin
result := getInterfaceText = 'close window';
end;
procedure findRandoms;
begin
if interfaceEvent then
begin
mmouse(455, 76, 0, 0);
if e.waitUpTextMulti(['Close','lose'], 300) then
begin
clickMouse2(mouse_left);
randoms := randoms + 1;
end;
end;
end;
function ss_loggedin:boolean;
begin
result := (getColor(426, 543) = 16777215);
end;
procedure ss_login;
begin
if not ss_loggedin then
begin
mouse(480, 469);
waitFunc(@ss_loggedin, 40, 5000);
wait(1200);
end;
end;
procedure ss_logout;
begin
mouse(753, 64);
wait(1200);
mouse(643, 429);
end;
procedure terminate(message:String;screenshot:boolean);
var
bmp, i:integer;
begin
if screenshot then
begin
bmp := bitmapFromClient(1, 54, 762, 554);
DisplayDebugImgWindow(762, 500);
DrawBitmapDebugImg(Bmp);
end;
writeln('=======================================');
writeln('Script stopped, error message : ' );
writeln(message);
writeln('=======================================');
ss_logout;
for i := 0 to high(bmpArray) do
freeBitmap(bmpArray[i]);
terminateScript();
end;
function perHour(what:integer):integer;
begin
result := Round(what * (3600.0 / (GetTimeRunning / 1000.0)));
end;
function progress:boolean;
var
steals_PH:integer;
begin
steals_PH := Round(steals * (3600.0 / (GetTimeRunning / 1000.0)));
clearDebug;
writeln('=======================================');
writeln('Time running ' , timeRunning);
Writeln('Steals : ', steals, ' Per hour ', steals_PH);
writeln('XP : ' , (ss_GetXPBarTotal - startXP) , ' Per hour ', perHour(ss_GetXpBarTotal - startXP));
writeln('Randoms : ' , randoms );
if steals > 0 then
writeln('Random :: steals ratio : ' , (randoms / steals));
writeln('=======================================');
result := not isKeyDown(113);
end;
// didClick <> mine
procedure loop;
begin
if (timeFromMark(failSafeTimer) > timeout) then
terminate('Ran out of time , last action : ' + toStr(TimeFromMark(failSafeTimer)), true);
if (failCount > fails) then
terminate('Too many fails , show the debug screeny on the script thread, fails: ' + toStr(failCount), true);
ss_login;
findRandoms;
if (inventory.full) then
begin
e.dropAllExcept(inventory.bitmapPositionMulti(bmpArray, [50, 50, 50]));
// e.dropValauble;
end;
if e.isUpTextMulti(uptexts) then
begin
clickMouse2(mouse_left);
if DidClick(true, 200) then
begin
steals := steals + 1;
wait(1900);
end;
end
else
if not (e.IsUpTextMulti(['1 more'])) then
begin
if not findStall() then
failCount := failCount + 1
else
begin
if DidClick(true, 200) then
begin
steals := steals + 1;
failCount := 0;
markTime(failSafeTimer);
wait(1900);
end;
end;
end;
if (logOutChatMessage[0] <> '') then
if e.chatTextExists(logOutChatMessage) then
terminate('Found chat text , chatlog ' + toStr(e.getChat), true);
end;
begin
e.init('soulsplit');
mainscreen.bounds := intToBox(2, 57, 514, 392);
loadUptext(stall);
inventory.setUp(intToBox(563, 266, 721, 513));
startXP := ss_getXpBarTotal();
while progress() do
loop;
end.