So it's finally coming. Never thought I'd work on this but meh..
Anyways, this will be a PUBLIC script, so no worries about it being a member/paid.
I've started working on a few tasks so far, i've gotten Greater Demons, Hellhounds, and Blue Dragons done.
Current Monster: Living Rock Creatures
Neat/Cool extracts from the script:
Abyssal Demons
Simba Code:
function OtherMonsterInFight(Box:TBox):Boolean;
var
tmpCTS:Integer;
x,y:Integer;
begin
tmpCTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.07,0.37);
if FindColorSpiralTolerance(x,y,4540023,Box.x1,Box.y1,Box.x2,Box.x2,5) then
begin
Result := True;
WriteLn('');
end;
SetColorToleranceSpeed(tmpCTS);
end;
The above function returns true if it finds a color in the given TBox (GetTPABounds). It works excellently and works almost 100% of the time.
Simba Code:
function FindAbyssalDemon:Boolean;
var
TPA:TPointArray;
x,y:Integer;
Center:TPoint;
tmpCTS,i:Integer;
ATPA:T2DPointArray;
DebugBox:TBox;
begin
Center.x := MSCX;
Center.y := MSCY;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.37,1.19);
if FindColorsSpiralTolerance(x,y,TPA,1843514,MSX1,MSY1,MSX2,MSY2,5) then
begin
SMART_DrawDots(TPA);
DebugBox := GetTPABounds(TPA);
SMART_DrawBox(DebugBox);
if OtherMonsterInFight(DebugBox) then
exit;
ATPA := TPAtoATPA(TPA,20);
SMART_DrawDotsMulti(False,ATPA);
SortATPASize(ATPA,True);
MiddleTPAEx(ATPA[0],x,y);
MMouse(x,y,5,5);
if WaitUptext('ttack',250) then
begin
ClickMouse2(True);
SMART_ClearCanvas;
Result := True;
end;
end;
ColorToleranceSpeed(tmpCTS);
end;
My first hand made TPA function, no ACA ripoffs, so I'm kinda proud.
Warped Tortoises
Simba Code:
Procedure CombatChecks;
var
DTM:Integer;
x,y:Integer;
begin
if HealthLow then
begin
TurnOnPrayers;
while not HPPercent > 80 do
begin
ReloadCannon('ire',False);
end;
end;
if PrayerLow then
DrinkPrayer;
if DecayedCannon then
begin
if ReloadCannon('ick',False) then
begin
DTM := DTMFromString('mlwAAAHicY2dgYKhhYmCoBuICIO4A4i4grofyjRgZGByAWAOKzYDYCohNgNjHzRGomwkrNmfADRjxYCgAAMxZBgg=');
Mouse(MMCX,MMCY,1,1,True);
FFlag(1);
if FindDTM(DTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,4,4,True);
Wait(1500);
end;
FreeDTM(DTM);
end;
end;
Exit;
end;
The above function is basically a while InFight, it'll handle everything that needs to be handled :)
Simba Code:
function WeInFight:Boolean; //by putonajonny
Var
Time, x, y, WaitFight_Shield, WaitFight_Damage : integer;
begin
Result := False;
WaitFight_Shield := DTMFromString('mrAAAAHic42BgYOAFYgEg5gdiHiBmB2I+IGaBijECMRMQs0LlQOJcUBqkl9XUCS8mBBgJYBgAAK0nBH8='); //Sets DTMs and Names
WaitFight_Damage := DTMFromString('mbQAAAHicY2VgYNBmhGAdINYDYn0glgZiBSBWBmI5IJYA4nQ2NoYEPj4wns3DA6a5gPrRMSMWDAYAIPEEVA==');
SetDTMName(WaitFight_Shield, 'WaitFight Shield DTM');
SetDTMName(WaitFight_Damage, 'WaitFight Damage DTM');
FFlag(0); //Incase you clicked a monster that isn't close by
MarkTime(Time); //marks the time
Repeat
Wait(50+Random(50));
if(FindDTM(WaitFight_Shield, x, y, MSX1, MSY1, MSX2, MSY2))then //if it finds the blue "shield" dtm it resets the time marker
begin
CombatChecks;
MarkTime(Time);
Result := True;
end;
if(FindDTM(WaitFight_Damage, x, y, MSX1, MSY1, MSX2, MSY2))then //if it finds the red "damage" dtm it resets the time marker
begin
CombatChecks;
MarkTime(Time);
Result := True;
end;
Until(TimeFromMark(Time) > 2000); //if it hasn't found either for 2000msec then it exits, (i don't play RS much, is there a very slow weapon that this wouldn't work for?)
FreeDTM(WaitFight_Shield);
FreeDTM(WaitFight_Damage);
end;
Putonajonny's code edited for my pleasure! :)
Update on Warped Tortoises:
Added Soulsplit healing
Will now replace cannon if decaying
Unicorn Stallion support soon
Mutated Jadinkos
Added in EEE and Soul Split healing
Simba Code:
function SpecialAttackFull:Boolean;
var
x,y:Integer;
TPA:TPointArray;
tmpCTS:Integer;
begin
MouseItem(1,1);
GameTab(tab_Combat);
Wait(500 + random(500));
FindColorsSpiralTolerance(x,y,TPA,5607012,582,416,703,427,78);
writeLn(Length(TPA));
Result := Length(TPA) > 720;
if Result then
CastAttack else
MouseItem(1,1);
end;
Hellhounds
Simba Code:
function FailsafeHellhound:Boolean;
var
TPA:TPointArray;
x,y,tmpCTS:Integer;
P:TPoint;
DBox:TBox;
ATPA:T2DPointArray;
begin
tmpCTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.17,1.23);
if not srl_InFight then
begin
if FindColorsSpiralTolerance(MSCX,MSCY,TPA,1582658,MSX1,MSY1,MSX2,MSY2,18) then
begin
ATPA := TPAtoATPA(TPA,10);
P := MiddleTPA(ATPA[0]);
DBox := GetTPABounds(ATPA[0]);
SMART_DrawBox(DBox);
SMART_DrawDotsMulti(False,ATPA);
MMouse(x,y,1,1);
If WaitUpTextMulti(['ttack','hound','Hell'],750) then
begin
ClickMouse2(False);
ChooseOption('ttack');
end;
end;
end;
end;
That's for the res dung, i'll add on Kuradels Dungeon later on.
Fire Giants
http://puu.sh/zQ3a
Completed entire tasks successfully @ 9th June, 2012
Bloodvelds
http://puu.sh/zSUV
http://puu.sh/zT7o
Can you please leave your suggestions/requests for each task that you want to see?
I will ONLY be doing the ones in Kuradel's Dungeon and/or the slightly easier ones such as Hellhounds, Dagganoths, etc.
Ciao!