SRL Archive - Archive

Solaire - SRL Member Application


Solaire

2014-08-01 22:12:10

How Long have You Played Runescape?
8 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
N/A


What is your general programming knowledge?
Pascalscript/Lape
I learned everything I know from here.


Are you a member of any other communities?
No


Tell us about yourself…
From: Solaire
I'm really bad at these kinds of things so I'll just go down the list and answer all of the suggested questions.

My name is Mark.
I'm from upstate New York.
My hobbies are solving jigsaw puzzles, playing Magic: The Gathering, and watching anime (mainly 80's stuff).
I'm not in school anymore, so I guess that makes me a NEET and I'm just NEET-ing around until I can find something to do in my life.



Please show us one (or multiple) of your scripts.
[simba]program Divination;
{$Define SMART}
{$I srl-6/srl.simba}
{$I sps/lib/sps-rs3.simba}
{$Define Debug_on}
type ColorStuff = record
CS:TColorSettings;
col, tol:integer;
area:TBox;
end;
type WispInfo = record
CS: TColorSettings;
Col, tol, lengthmod: integer;
UpText: TStringArray;
RegDTM, EnrDTM, NrgDTM : integer;
Area : TSPSArea;
AreaPath : string;
RiftLoc: Tpoint;
GoodBox: TBox;
end;
const
WispName = 'brilliant';
EnrichedConversion = 'enhanced'; //energy, regular, enhanced
RegularConversion = 'enhanced';
DoAntiban = true; //true/false
EnergySlot = 1; //slot energy is in
playerName = 'swag';
playerFile = 'default';
UseDirectX = false;
var
MSCP, MMCP: Tpoint;
Wisp: WispInfo;
Rift: ColorStuff;
x, y, StartXP, WispFails: integer;
ConvertButtonDTM: integer;
EnrichedConvertText, RegularConvertText: TStringArray;
AtRift: Boolean;
procedure WriteLnDebug(text: string);
begin
{$IFDEF debug_on}
writeLn(text);
{$ENDIF}
end;
procedure DrawBoxDebug(DrawArea: Tbox);
begin
{$IFDEF debug_on}
smartimage.Drawclippedbox(DrawArea, false, clred);
{$ENDIF}
end;
procedure SetWispInfo(WispType: string);
begin
case lowercase(WispType) of
'pale':
begin
WriteLnDebug('Pale wisps selected');
Wisp.CS.create(2, 1.05, 1.69);
Wisp.col := 9885303;
Wisp.tol := 21;
Wisp.uptext := ['Harvest', 'Enriched', 'Pale', 'wisp', 'spring'];
Wisp.areaPath := 'pale_composite';
Wisp.RiftLoc := point(209, 191);
Wisp.EnrDTM := DTMFromString('mWAAAAHicY2FgYPBhZGDwBeIQIHYH4itAfBuIzwPxNSBm4BFhYJE3ZWBgYmFg1fdnQAeMaBgEAFtfBZo=');
Wisp.RegDTM := DTMFromString('mWAAAAHicY2FgYPBhZGDwBeIQIHYH4itAfBuIzwPxNSBm4BFhYJE3ZWBgYmFg1fdnQAeMaBgEAFtfBZo=');
Wisp.GoodBox := intToBox(168, 160, 232, 231);
end;
'flickering':
begin
WriteLnDebug('Flickering wisps selected');
Wisp.CS.create(2, 0.36, 0.87);
Wisp.col := 11971439;
Wisp.tol := 20;
Wisp.uptext := ['Harvest', 'Enriched', 'Flickering', 'wisp', 'spring'];
Wisp.areaPath := 'flickering_composite';
Wisp.RiftLoc := point(195, 179);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYMhhZGDIB+IUIBZlYmCQBmJxIGbRtmBg90tn0O/dxMAPVAfDjEgYCACvrwRU');
Wisp.RegDTM := DTMFromString('mggAAAHicY2NgYHBiZGBwBmI7ILYGYlsgdgexmRgY7IHYiAnCdgBiSyBm0bZg4EqoZ2DkFWRgs/ZlYDWwZ+DwTWXgB5qFDTPiwBAAABk6BoY=');
Wisp.GoodBox := intToBox(162, 143, 229, 203);
end;

'glowing':
begin
WriteLnDebug('Glowing wisps selected');
Wisp.cs.create(2, 0.57, 1.52);
Wisp.col := 14343989;
Wisp.tol := 18;
Wisp.uptext := ['Harvest', 'Enriched', 'Glowing', 'wisp', 'spring'];
Wisp.AreaPath := 'glowing_composite';
Wisp.RiftLoc := point(150, 139);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYEhmZGBIA+J0IGZkYmBgB+K/QDZP3QwGm/qJDLqT1zDwA9XBMCMSBgIA+TcGSw==');
Wisp.RegDTM := DTMFromString('mQwAAAHicY2ZgYLBkZGCwhWIVJgYGXSCWB2KeuhkM7BKyDLIJhQz8QHUwzIiEgQAAksEDrA==');
Wisp.GoodBox := intToBox(124, 71, 208, 176);
end;
'sparkling':
begin
WriteLnDebug('Sparkling wisps selected');
Wisp.CS.create(2, 0.44, 1.85);
Wisp.col := 13685604;
Wisp.tol := 24;
Wisp.UpText := ['Harvest', 'Enriched', 'Sparkling', 'wisp', 'spring'];
Wisp.AreaPath := 'sparkling_composite';
Wisp.RiftLoc := point(206, 187);
Wisp.RegDTM := DTMFromString('mWAAAAHicY2FgYHgFxF+B+CMQPwdiDiYIFgRiISBm944CCnAxMHDxMDAIizEAWSiYEQ2DAABlgwUg');
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYAgH4ggg9gXiy4wMDHeB+DwQs5g6MHBXTWLgLu9n4AfKwTAjEgYCAAspBlM=');
Wisp.GoodBox := intToBox(185, 177, 256, 254);
end;
'gleaming':
begin
WriteLnDebug('Gleaming wisps selected');
Wisp.CS.create(2, 0.77, 2.71); //0.35, 2.71);//0.64, 1.33);
Wisp.col := 12896092;//13083996;//13484416;
Wisp.tol := 14;//14;//30;
Wisp.uptext := ['Harvest', 'Enriched', 'Gleaming', 'wisp', 'spring'];
Wisp.areaPath := 'gleaming_composite';
Wisp.RiftLoc := point(198, 180);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYNjCyMCwE4i3AfErIP4IxA+BmLumi0F9xnIGoaRsBn6gOhhmRMJAAAB2DAhv');
Wisp.RegDTM := DTMFromString('mbQAAAHicY2VgYOhmhOBJQFwPxFOBmJeJgYEZiIWAmAeIuYCYu6aLgUleiYHF3JaBUUSMgUlajoEfqB8dM2LBYAAArYAFiw==');
Wisp.GoodBox := intToBox(158, 135, 211, 210);
end;
'vibrant':
begin
WriteLnDebug('Vibrant wisps selected');
wisp.cs.create(2, 0.48, 0.74);//0.36, 1.55); //0.45, 1.68);//0.42, 1.96);//0.28, 1.54);
Wisp.Col := 9478243;//12373596;//12235103;//12630357;//13477990;
Wisp.tol := 18;//30;//19;//22;
Wisp.uptext := ['Harvest', 'Enriched', 'Vibrant', 'wisp', 'spring'];
Wisp.areaPath := 'vibrant_composite';
Wisp.RiftLoc := point(171, 90);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYGhjZGBoB+IaIL4FxA+B+AYQi5z9xhA8fwuDaX4dAz9QHQwzImEgAAB4pQj1');
Wisp.RegDTM := DTMFromString('mQwAAAHicY2ZgYIhlZGCIAuJUIM5gYmAoAOJsIBY9/5OByzOcgd3MgYEfqA6GGZEwEAAA7i0FoA==');
Wisp.GoodBox := intToBox(137, 57, 202, 124);

end;
'lustrous':
begin
WriteLnDebug('Lustrous wisps selected');
wisp.cs.create(2, 0.38, 0.95);//0.48, 0.74);//0.36, 1.55); //0.45, 1.68);//0.42, 1.96);//0.28, 1.54);
Wisp.Col := 11311715;//9478243;//12373596;//12235103;//12630357;//13477990;
Wisp.tol := 15;
Wisp.uptext := ['Harvest', 'Enriched', 'Lustrous', 'wisp', 'spring'];
Wisp.areaPath := 'lustrous_composite';
Wisp.RiftLoc := point(187, 187);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYOhnhOAOIG4B4j4oPfvZf4berXsZ/LdcYOAHqoNhRiQMBACK6gnI');
Wisp.RegDTM := DTMFromString('mWAAAAHicY2FgYEhjZGBIgGIQ+ywQHwPiy0B8FIinPPvHYJ1ayuA1exuDUUAEAz9QDzJmRMMgAABeMgsG');
Wisp.GoodBox := intToBox(120, 137, 209, 250);
end;
'brilliant':
begin
WriteLnDebug('Brilliant wisps selected');
wisp.cs.create(2, 0.16, 1.16);//38, 1.04);
wisp.col := 12166761;//10064980;
wisp.tol := 19;//13;
Wisp.uptext := ['Harvest', 'Enriched', 'brilliant', 'wisp', 'spring'];
Wisp.areaPath := 'brilliant_composite';
Wisp.RiftLoc := point(280, 231);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYHAD4kAg9gPiQkYGhgogzgJineRCBiXvMAa1kEQGfqAcDDMiYSAAANGeBQ0=');
Wisp.RegDTM := DTMFromString('mggAAAHicdcyxCoAgGEXh4x9IifQMTVHh5PMIrtHk4PvTBde68MGdjgcuB6ck2STLLrdBl2LjN6lylAf8DDZBiLLCEglqfXE/xl7CBAUF');
Wisp.GoodBox := inttobox(236, 137, 295, 263);
end;
'radiant':
begin
WriteLnDebug('Radiant wisps selected');
Wisp.CS.create(2, 0.23, 1.69);
Wisp.col := 12951618;
Wisp.tol := 20;
Wisp.uptext := ['Harvest', 'Enriched', '', 'wisp', 'spring'];
Wisp.areaPath := 'radiant_composite';
Wisp.RiftLoc := point(207, 199);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYLgBxA+h2JGRgcEbiK2B2H7CUgbToCiGwKY+Bn6gHAwzImEgAABBfAdO');
Wisp.RegDTM := DTMFromString('mQwAAAHicY2ZgYDgLxJehdCwTA0M6EAcCsVXnXAZGYXEGBnYOBn6gHAwzImEgAAADvAVW');
wisp.Goodbox := intToBox(172, 122, 285, 216);
end;
'luminous':
begin
WriteLnDebug('Luminous wisps selected');
Wisp.CS.create(2, 0.32, 0.75);
Wisp.col := 13750657;
Wisp.tol := 19;
Wisp.uptext := ['Harvest', 'Enriched', 'Luminous', 'wisp', 'spring'];
Wisp.areaPath := 'luminous_composite';
Wisp.RiftLoc := point(218, 180);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYLgFxI+A+D4QdzAxMHQCcR0Qu87YwcDhncygGZjAwA+Ug2FGJAwEAFY6B4k=');
Wisp.RegDTM := DTMFromString('mQwAAAHicY2ZgYLgFxBeB+AEQOzMyMFgDsRcQ203axMAkq8bArKDDwA+Ug2FGJAwEAAtVBaA=');
Wisp.GoodBox := intToBox(165, 119, 273, 236);


end;
'incandescent':
begin
WriteLnDebug('Incandeschent wisps selected');
Wisp.cs.create(2, 0.30, 1.44);
Wisp.col := 11835745;
Wisp.tol := 15;
Wisp.uptext := ['Harvest', 'Enriched', 'Luminous', 'wisp', 'spring'];
Wisp.AreaPath := 'incandescent_composite';
Wisp.RiftLoc := point(189, 220);
Wisp.EnrDTM := DTMFromString('mQwAAAHicY2ZgYDgLxNeB+BIQ8zIyMIgCMRcQz7j6liG3qZPBY/dTBn6gHAwzImEgAABifQiT');
Wisp.RegDTM := DTMFromString('mWAAAAHicY2FgYPgIxD+h+CkQ32UE0kB8GYjvA/Haux8ZuEQkGVg5uRl4JWQZ+IFqkDEjGgYBAJ3kCpI=');
Wisp.GoodBox := intToBox(101, 147, 272, 246);
end else
begin
Writeln('You didn''t use an appropriate wisp type');
players[currentplayer].logout();
terminatescript();
end;
end;
end;
procedure NoMoreDTMs();
begin
FreeDTM(Wisp.RegDTM);
FreeDTM(Wisp.EnrDTM);
FreeDTM(ConvertButtonDTM);
end;
procedure PrintProgress();
var
TotalXP, XPPerHour: integer;
begin
TotalXP := StartXP - chatbox.getxp();
XPPerHour := Round(TotalXP * (3600.0 / (GetTimeRunning / 1000.0)));
smartimage.clear();
smartimage.drawclippedbox(chatbox.getbounds, true, clblack);
smartImage.drawClippedText('Exp Gained : ' + toStr(TotalXP) + '', point(0, 0), 'LoginChars', true, clWhite);
smartimage.drawclippedtext('Exp Per Hour: ' + tostr(XPPerHour), point(0, 20), 'LoginChars', true, clwhite);
smartimage.drawclippedtext('Time running: ' + msToTime(GetTimeRunning, time_formal), point(0, 40), 'LoginChars', true, clwhite);

end;
procedure SetupStuff();
begin
SetWispInfo(WispName);
case lowercase(EnrichedConversion) of
'regular': EnrichedConvertText := ['to ex', 'to exper'];
'enhanced': EnrichedConvertText := ['ced exp'];
'energy' : EnrichedConvertText := ['energy'];
else
begin
writelnDebug('improper conversion selected');
TerminateScript();
end;
end;
Case lowercase(regularConversion) of
'regular': RegularConvertText := ['to ex', 'to exper'];
'enhanced': RegularConvertText := ['ced exp'];
'energy' : RegularConvertText := ['energy'];
else
begin
WriteLnDebug('Improper conversion selected');
TerminateScript();
end;
end;
Wisp.area.setup(Wisp.AreaPath, runescape_other);
MSCP := Mainscreen.getcenterpoint();
MMCP := Minimap.getcenterpoint();
Rift.CS.create(2, 0.36, 2.38);// 0.51, 0.01);
Rift.tol := 11;//14;
Rift.col := 7465663;//7339968;
ConvertButtonDTM := DTMFromString('mQwAAAHicY2ZgYPgDxAyMDAwfgBQXkP4LpDmB9LGejwzXD/9j2N3+kYEfKAbDjEgYCACY+QpB');
Players.Setup([PlayerName], PlayerFile);
SetLength(players,1);


with players[0] Do
begin
IsActive := True;
end;
CurrentPlayer := 0;

end;
function trschatbox.getXP: Integer; //created by Ashaman88
var
b: TBox;
s: String;
tpa : TPointArray;
atpa : T2DPointArray;
i,cts,p: Integer;
begin
b := self.getBounds();
b.edit(+(b.x2-b.x1)-140, +10, -5, -94);

findColorsTolerance(tpa, 14013909, b, 4,colorSetting(2, 0.00, 0.00));

if length(tpa) < 2 then
begin
print('chatBox.getXP(): No XP found', TDebug.SUB);
Exit;
end;

atpa := tpa.cluster(5);

b:= atpa.getbounds;
b.edit(-2,-2,+2,+3);

s:=Replace(tesseractgettext(b.x1,b.y1,b.x2,b.y2, FILTER_SMALL_CHARS), ' ', '', [rfReplaceAll]);

P := Pos('x', S);
if P > 0 then
Result := StrToIntDef(ExtractFromStr(Copy(s, P, Length(S)), Numbers), 0)
else
Result := StrToIntDef(ExtractFromStr(S, Numbers), 0);

print('chatBox.getXP(): XP found: ' + tostr(result), TDebug.SUB);
end;
function MMToSPS2(MMPos: tpoint; out res: tpoint): boolean;
var
a: extended;
newpt: tpoint;
begin
newpt := wisp.area.getplayerpos();
writeln(tostr(point(minimap.cx-mmpos.x, minimap.cy-mmpos.y)));
newpt := point((newpt.x - (Minimap.cx - MMPos.x)), (newpt.y - (minimap.cy - mmpos.y)));
res := newpt;
end;
(*function MMToSPS(MMPos: tpoint; out res: tpoint): boolean;
var
a: extended;
newpt, playerpos: tpoint;
begin
playerpos := Wisp.area.getplayerpos();
writeln(tostr(point(minimap.cx-mmpos.x, minimap.cy-mmpos.y)));
newpt := point((playerpos.x - (Minimap.cx - MMPos.x)), (playerpos.y - (minimap.cy - mmpos.y)));
res := newpt;

if (spsAnyAngle) then
begin
a := minimap.getAngleRadians();

if (not inRange(degrees(a), 8, 352)) then // no need to rotate
begin
res := newpt;
end else
begin
res := rotatePoint(newpt, a, minimap.cx, minimap.cy);
end;
end else
res := newpt;

result := minimap.isPointOn(res);

if (not result) then
res := [-1, -1];
end; *)
procedure TakeABreak;
begin
case random (3) of
1: Wait(randomrange(20000, 40000) + random(5000));
2: Wait(randomrange(60000, 90000) + random(30000));
end;
end;
procedure Antiban();
begin
if (DoAntiban = true) then
begin
Case Random(30000) Of
1: HoverSkill(random(26));
2: Wait(2500 + random(4500));
3: PickUpMouse;
4: mouseoffclient(off_client_random);
5: Boredhuman;
6: mousemovingobject;
7: takeAbreak();
end;
end;
end;
(*procedure FindChronicle();
var
ChronicleTPA: TPointArray;
ChronicleATPA : T2DPointArray;
i : integer;
begin
if FindColorsSpiralTolerance(MSCP.x, MSCP.y, ChronicleTPA, Chronicle.Col, mainscreen.getbounds(), Chronicle.Tol, Chronicle.CS) then
begin
WriteLnDebug('Found chronicle colors');
ChronicleATPA := SplitTPAEx(ChronicleTPA, 5, 5);
ChronicleATPA.sortFromMidpoint(MSCP);
for I := 0 to high(ChronicleATPA) do
begin
if length(ChronicleATPA[i]) >= 20 then
begin
MouseBox(ChronicleATPA *)
function IsHarvesting(maxwait: integer): boolean;
var
BeginXP, EndXP, BeginCount, EndCount, StartEnergyCount, EndEnergyCount: integer;
harvestTimer : TTimeMarker;
begin
if TabBackpack.isfull() then
begin
writelndebug('Backpack full, not harvesting');
result := false;
end;

if minimap.isplayermoving() then
Wait(500);

HarvestTimer.Start();
repeat
BeginXP := chatbox.getxp();
BeginCount := tabbackpack.count();
StartEnergyCount := getitemamount(tabbackpack.getslotbox(EnergySlot));
Antiban();
Wait(400 + random(250));
EndXP := Chatbox.GetXP();
EndCount := TabbackPack.count();
EndEnergyCount := getitemamount(tabbackpack.getslotbox(EnergySlot));
if (BeginXP < EndXP) or (StartEnergyCount <> endenergyCount)or (not BeginCount = EndCount) then
begin
HarvestTimer.reset();
harvestTimer.start();
writeLnDebug('we are harvesting');
PrintProgress();
end;
until (HarvestTimer.getTime >= maxwait) or tabbackpack.isfull();
result := false;

end;
(*procedure HarvestWait();
var
StartXP, EndXP, StartCount, EndCount: integer;
HarvestTimer: TTimeMarker;
begin
repeat
HarvestTimer.Start
until not (BeginXP <EndXP) or (BeginCount < EndCount);
*)

function CloseInterfaces(): boolean;
begin
if findDTM(ConvertButtonDTM, x, y, mainscreen.getbounds()) then
begin
WriteLnDebug('Closing convert interface');
multiType(VK_ESCAPE, randomRange(30, 50), 2);
end;
(*if chooseoption.isopen() then
begin
WriteLnDebug('Chooseoption is open, closing');
chooseoption.close();
end; *)
end;
procedure WalkToRift();
begin
if wisp.Area.walktopos(Wisp.RiftLoc, Wisp.area.getplayerpos()) then
begin
Wait(200);
end else
begin
Wisp.Area.blindwalk(wisp.riftloc);
end;
end;
function FastClickRift(ConvText: TStringArray): boolean;
var
RiftTPA : TPointArray;
RiftATPA : T2DPointArray;
CurrPos, RiftPos : Tpoint;
i : integer;
begin
WritelnDebug('Looking for rift');
CloseInterfaces();
result := false;
if chooseoption.isopen() then
begin
if chooseoption.select(ConvText) then
begin
writelndebug('found rift!');
exit;
end else
begin
chooseoption.close();
end;
end;
if FindColorsSpiralTolerance(MSCP.x, MSCP.y, RiftTPA, Rift.col, mainscreen.getbounds(), Rift.tol, Rift.CS) then
begin
WritelnDebug('May have found rift');
RiftATPA := SplitTPAEx(RiftTPA, 10, 10);
RiftATPA.sortfromMidpoint(MSCP);

//add more things in here as failsafes
for i := 0 to i = 2 do//high(RiftATPA) do
begin
writelndebug('in for to do loop');
if (length(RiftATPA[i]) >= 10) then
begin

DrawBoxDebug(RiftATPA[i].getbounds());
MiddleTPAEx(RiftATPA[i], x, y);
Mouse(point(x, y), mouse_right);
//MouseBox(RiftATPA[i].getbounds(), mouse_move);
if ismouseovertext(['nerg', 'Convert', 'rift', 'energy']) then
begin
fastclick(mouse_right);
if chooseoption.select(ConvText) then
begin
writelndebug('We found the rift');
result := true;
break;
end else
begin
writelndebug('We didn''t find the rift');
end;
end else
begin
if chooseoption.select(ConvText) then
begin
WriteLnDebug('we found the rift');
//if chooseoption.select(convtext) then
//begin
result := true;
end else
begin
result := false;
end;
end;
end else
begin
WriteLn('Tpa too short');
end;

end;
(*begin
WriteLn('tpa too short');
end; *)
end else
begin
WriteLnDebug('rift not found');
end;
end;
function FindWisp(): boolean;
var
WispTPA: TPointArray;
WispATPA: T2DPointArray;
WispPoint, CurrPos: Tpoint;
i: integer;
WispSearchTimer :TTimeMarker;
res: Tbox;
begin
CloseInterfaces();
WriteLnDebug('Looking for a wisp...'); //if it finds colors
repeat
WispSearchTimer.Start();
if FindColorsSpiralTolerance(MSCP.x, MSCP.y, WispTPA, Wisp.col, mainscreen.getbounds(), Wisp.tol, Wisp.CS) then
begin
WritelnDebug('May have found a wisp');
WispATPA := SplitTPAEx(WispTPA, 10, 10); //split the tpa
//FilterTPAsBetween(WispATPA, 0, 25); //arbitrary num, change later
//shows loc of wisk
//FilterTPAsBetween(WispATPA, 200, 99999);
WispATPA.sortfromMidpoint(MSCP);
//SortATPASize(WispATPA, true);
ClearDebug();
WriteLndebug('tpa length is '+ inttostr(length(WispATPA[0])));
for i := 0 to high(wispATPA) do
begin
if length(wispATPA[i]) > 30 then
drawboxdebug(wispATPA[i].getbounds);
end;

for i := 0 to high(WispATPA) do
begin
writelndebug('in for to do loop');
If WispSearchTimer.getTime >= 1000 then
begin
break();
end;

if Length(wispATPA[i]) > 30 then
begin
WritelnDebug('this may be a wisp');
(*if AtRift then
begin

end; *)
DrawBoxDebug(WispATPA[i].getbounds()); //shows loc of supposed wisp
MouseBox(WispATPA[i].getbounds, mouse_move);
Wait(100 + random(150));
if ismouseovertext(Wisp.Uptext) then
begin
fastclick(MOUSE_right);
if chooseoption.select(['Harvest']) then
begin
WritelnDebug('Found a Wisp');
repeat
Wait(100 + random(100));
until not minimap.isplayermoving();
Wait(650 + random(250));
result := true;
wispfails := 0;
end else
begin
WriteLnDebug('it moved');
result := false;
inc(WispFails);
if wispfails >= 7 then
begin
WAlkToRift();
wispfails := 0;
end;
end;
end else
begin
if isMouseOverMenuOpen(res) then
begin
fastclick(mouse_right);
//if chooseoption.optionsExist( //rift excluding stuff!
if chooseoption.select(Wisp.Uptext) then
begin
WriteLnDebug('Found a wisp!');
repeat
Wait(100 + random(100));
until not minimap.isplayermoving();
Wait(650 + random(250));
result := true;
WispFails := 0;
end else
begin
WritelnDebug('It must Have moved');
result := false;
end;
end else
begin
WriteLnDebug('Not a wisp');
result := false;
Inc(WispFails);
if Wispfails >= 7 then
begin
WalkToRift();
WispFails := 0;
end;
end;
end;




end else
begin
writelndebug('tpa size wrong');
if I = high(wispATPA) then
begin
WriteLnDebug('no wisps found');
result := false;
Inc(WispFails);
if WispFails >= 7 then
begin
WalkToRift();
WispFails := 0;
end;
exit;
end;
end;
end;


end else
begin
WriteLnDebug('Didn''t find any wisp colors');
result := false;
Inc(WispFails);
if WispFails >= 7 then
begin
WalkToRift();
WispFails := 0;
end;

exit;
end;
WispSearchTimer.reset();
until result
end;

function FindWispMM(): boolean;
var
DotArray: TpointArray;
i: integer;
p: tpoint;
begin
Inc(WispFails);
if WispFails >= 7 then
begin
WalkToRift();
WispFails := 0;
end;
DotArray := minimap.getDots(MM_DOT_NPC, minimap.getBounds());
SortTPAFrom(DotArray, MMCP);
for i := 0 to high(DotArray) do
begin
MMToSPS2(DotArray[i], p);
writelndebug(tostr(p));
if pointInBox(p, Wisp.Goodbox) then
begin
writelndebug('point is in box');
mouse(DotArray[i], mouse_left);//sps.walktoPos(p, spss.getplayerpos());
break;
end;
end;
Wait(300);
inc(WispFails);
repeat
Wait(100 + random(50))
until not minimap.isplayermoving();
end;


procedure RiftConvertWait((*MemoryType: String;*) DTMName: Integer);
var
DepositTimer : TTimeMarker;
maxTime : integer;
begin
maxTime := 2000* tabbackpack.countDTM(DTMName);
DepositTimer.start();
repeat
Wait(500);
Antiban();
PrintProgress();
until (tabbackpack.countDTM(DTMName) = 0) or (DepositTimer.getTime >= maxtime);//(tabbackpack.countDTM(MemDTM) = 0) or not IsHarvesting;
WritelnDebug('done converting');
DepositTimer.reset();
end;

procedure Convert();
var
BothThings : string; //add more failsafes here if rift not found
//added! maybe.
begin
BothThings := lowercase(EnrichedConversion) + lowercase(RegularConversion);
writeln(boththings);
repeat
(*if FindDTM(Wisp.enrDTM, x, y, tabbackpack.getbounds()) then
begin
writelndebug('enriched mems in inv');
if FastClickRift(EnrichedConvertText) then
begin
RiftConvertWait('enhanced', Wisp.EnrDTM);
end else
begin
WalkToRift();
Continue();
end;
end; *)
if FindDTM(Wisp.EnrDTM, x, y, tabbackpack.getbounds()) then
begin
if (StringMatch(lowercase(EnrichedConversion), lowercase(RegularConversion)) >= 1) then
begin
if FastClickRift(EnrichedConvertText) then
begin
RiftConvertWait(Wisp.RegDTM);
RiftConvertWait(Wisp.EnrDTM); //this thing will wait until dtm isnt found
end else
begin
WalkToRift();
Continue();
end;
end else
begin
(*if FastClickRift(RegularConvertText) then
begin
RiftConvertWait('regular', Wisp.RegDTM);
end else
begin
WalkToRift();
Continue();
end; *)
case lowercase(boththings) of
'enhancedregular', 'enhancedenergy':
begin
if FastClickRift(EnrichedConvertText) then
begin
RiftConvertWait(Wisp.EnrDTM);
mouse( mainscreen.getcenterpoint(), mouse_left);
if FastClickRift(RegularConvertText) then
begin
RiftConvertWait(Wisp.RegDTM);
mouse(mainscreen.getcenterpoint(), mouse_left);
end else
begin
WalkToRift();
Continue();
end;
end else
begin
WalkToRift();
Continue();
end;
end else
begin
if FastClickRift(RegularConvertText) then
begin
RiftConvertWait(Wisp.RegDTM);
mouse(mainscreen.getcenterpoint(), mouse_left);
if FastClickRift(EnrichedConvertText) then
begin
RiftConvertWait(Wisp.EnrDTM);
end else
begin
WalkToRift();
Continue();
end;
end else
begin
WalkToRift();
Continue();
end;
end;
end;
end;
end else
begin
if FastClickRift(RegularConvertText) then
begin
RiftConvertWait(Wisp.RegDTM);
end else
begin
WalkToRift();
Continue();
end;
end;
//end;
until (not (FindDTM(Wisp.RegDTM, x, y, tabbackpack.getbounds()))) and (not findDTM(Wisp.EnrDTM, x, y, tabbackpack.getbounds()));
end;

procedure MainLoop();
begin
repeat
repeat
if FindWisp() then
begin
smartimage.clear();
if not IsHarvesting(2500) then
begin
PrintProgress();
end;
end else
begin
FindWispMM();
end;
PrintProgress();
until TabBackPack.isfull();
WalkToRift();
Convert();
until not IsLoggedIn();
end;

begin
if UseDirectX then
smartplugins := ['d3d9.dll'];
smartenabledrawing := true;
spsanyangle := true;
mousespeed := 30;
AddOnTerminate('NoMoreDTMs');
SetupStuff();
SetupSRL();
if not IsLoggedIn then
players[currentplayer].login();

smartimage.clear();

StartXP := chatbox.getxp();
mainscreen.setangle(ms_angle_high);
//FindWispMM;
MainLoop();
WalkToRift();
//Convert();
end;

Ian

2014-08-01 22:58:53

The script has a few formatting errors like improper indentation in a few places, but it doesn't make it hard to read so it's not an issue. It might make it harder for you to find a bug later though, so keep that in mind. Other than that the script has all the necessary components.

You're quite new and haven't posted much, so that made it easy for me to review all your posts and I didn't see anything suggesting you wouldn't be a good member, but it wasn't much to go on.

While I haven't had time to test out any of your scripts yet, your script releases and script requesting thread are very nice to see.

Yes from me :)

Solaire

2014-08-01 23:35:38

From: BMWxi
The script has a few formatting errors like improper indentation in a few places


Could you please elaborate? :)

Wetish

2014-08-02 00:56:37

You have only been active here for little over two weeks. A no from me. Activity is just as important as your scripts.

The Mayor

2014-08-02 04:26:59

Yes you can write a half decent script. Created account 4 weeks ago, active for 2 weeks. 30 posts. I don't that is enough for the SRL member rank.

Ian

2014-08-02 04:42:11

From: Solaire
Could you please elaborate? :)


Forgot to indent in your first begin/end in the mainloop

Double indentation in your first begin/end in RiftConvertWait

Triple indentation on lines 655-658

Actually the whose findWisp function is really messy. If I were you I'd go over that whole procedure and make it line up with itself.


All this may seem nitpicky but if you're going to be an SRL Member you should know that people learning to script will use your scripts as a resource and you want them to be able to follow what is going on easily.

Solaire

2014-08-02 06:46:17

From: BMWxi
Forgot to indent in your first begin/end in the mainloop

Double indentation in your first begin/end in RiftConvertWait

Triple indentation on lines 655-658

Actually the whose findWisp function is really messy. If I were you I'd go over that whole procedure and make it line up with itself.


All this may seem nitpicky but if you're going to be an SRL Member you should know that people learning to script will use your scripts as a resource and you want them to be able to follow what is going on easily.


Okay, thank you very much!

slacky

2014-08-02 17:32:42

The following line (#474) is "wrong" / do not seem to act as you intended:
for i := 0 to i = 2 do//high(RiftATPA) do
That evaulates to:
>>> for i := 0 to False do

And since False evaluated as 0 in Lape, that means:
>>> for i := 0 to 0 do
Which is the same as no looping..


If you want the loop to go from 0..2 you do:
>>> for i := 0 to 2 do


On another note, you should leave much more breathing-room in the script. Meaning, at least separate functions by 2-3 lines. A small comment above each function is also nice, as it allows us, and others to see what's going on.

Daniel

2014-08-03 01:04:46

Yes from me. Good job! :)

Kevin

2014-08-04 10:50:25

Considering the fact that people whose scripting I actually trust have so far actually been mostly positive from you is impressive. And while I feel I'd find some more errors due to my perfectionist nature, I doubt any would be worthy enough for me to say no to your script.

That being said, the Member's rank is a community role first and foremost, albeit containing scripting requirements for all but the highest of the community members. Please spend some time making yourself visible to the community, help some people, just talk in general, and I'm sure you can come back in a month or so and I'll change my vote to a yes.

[XoL]

2014-08-05 12:41:17

From: Kevin
Considering the fact that people whose scripting I actually trust have so far actually been mostly positive from you is impressive. And while I feel I'd find some more errors due to my perfectionist nature, I doubt any would be worthy enough for me to say no to your script.

That being said, the Member's rank is a community role first and foremost, albeit containing scripting requirements for all but the highest of the community members. Please spend some time making yourself visible to the community, help some people, just talk in general, and I'm sure you can come back in a month or so and I'll change my vote to a yes.


This, sorry. SRL members is all about the community, then scripting. I just need to see consistent activity for a little bit before deciding.

Ashaman88

2014-08-05 18:47:18

Keep up the good work and next go around you will get in :)

Daniel

2014-08-11 06:22:15

Hi there Solaire!

Unfortunately, it looks like you won't be getting in this time :( But not to worry! If you heed the advice of fellow SRL members then you'll be sure to get in next time. :)

You may apply again in one month, or any time after when you feel ready.

Good luck!