Jump to content
Amberleaf

[PRSC]Karajama skele fighter

Recommended Posts

Karajama skele fighter V0.2

 

Head to the level25 skeletons in the karajama volcano dungeon and start the script facing roughly NE, don't face it SE or it'll try collecting the fire rune that's beside the lesser demons. It'll collect bones and bury them/collects all types of runes/drops junk items.

 

You'll need to place this .wav file in your C:\ directory in order for the fatigue alarm to work correctly, if your directory is a different letter then you can adjust this on line 29 PlaySound('c:\siren.wav');

I've hosted it here you'll have to rename it to siren.wav sorry.

http://upit.cc/f/62695f6e.wav

 

V0.2 updates.

Better detection of runes

Faster skeleton detection

Bone bury is off as default remove comment marks from the bottom to enable, it slows you down if you're after combat exp.

 

Let me know how you get on with this.

 

[sCAR]//AmberRSCSkeleFighter

 

{.include OSI\OSI.scar}

 

var xp: Integer;

 

procedure ScriptTerminate;

begin

FreeOSI;

end;

 

procedure FindTarget;

var x, y: Integer;

begin

If FindColor(x, y, 16447223, 0, 0, 509, 327) then

begin

MMouse(x, y, 0, 0);

Wait(10);

Mouse(x, y, 0, 0, False);

end;

end;

 

procedure Atttack;

var x, y: Integer;

begin

If FindColor(x, y, 65280, 23, 28, 490, 301) then

begin

MMouse(x, y, 1, 1);

GetMousePos(x, y);

Mouse(x, y, 0, 0, false);

Wait(4500);

xp := xp + 250;

Writeln('XP so far...');

Writeln(xp);

end else

begin

MMouse(456, 149, 15, 15);

end;

end;

 

procedure InCombat;

var x, y: Integer;

Bmp: TSCARBitmap;

begin

repeat

If FindColor(x, y, 16777215, 57, 21, 126, 32) then

begin

If FindColor(x, y, 16447223, 0, 0, 509, 327) then

begin

If FindColors(x, y, [11839904, 10787216, 9602946, 11050646, 11905698], 12, 41, 509, 327) then

begin

Bmp := TSCARBitmap.Create('deNpjZ2Bi+D/BAQ0xMDDAGchsAM9CEiA=');

MMouse(x, y, 0, 0);

Wait(100);

Mouse(x, y, 0, 0, False);

If FindBitmap(x, y, Bmp, 12, 41, 509, 327) then

begin

MMouse(x, y, 0, 0)

GetMousePos(x, y);

Wait(3500);

Mouse(x, y, 0, 0, True);

Wait(3500);

end;

end;

end;

end;

If GetKeyState(VK_F12) then

begin

TerminateScript;

end;

until (FindColor(x, y, 16777215, 57, 21, 126, 32) = False);

Wait(500);

end;

 

procedure LootBones;

var x, y: Integer;

begin

If FindColorSpiral(RandomRange(234, 122), RandomRange(282, 166), x, y, 16579836, 23, 28, 490, 301) then

begin

Writeln('Finding loot...');

repeat

Mouse(x, y, 0, 0, False);

If FindColor(x, y, 4231423, 23, 28, 490, 301) then

begin

Mouse(x, y, 0, 0, True);

Wait(3500);

end;

until (FindColor(x, y, 4231423, 23, 28, 490, 301) = False);

end;

end;

 

procedure BuryBones;

var x, y: Integer;

begin

MMouse(498, 19, 3, 3);

Wait(350);

repeat

If FindColor(x, y, 16775143, 267, 36, 504, 236) then

begin

Mouse(x, y, 0, 0, True);

Wait(250);

end;

until (FindColor(x, y, 16775143, 267, 36, 504, 236) = False);

 

repeat

If FindColors(x, y, [532561, 14342891, 2245762, 12303305, 6974066],267, 36, 504, 236) then

begin

Mouse(x, y, 0, 0, False);

Wait(100);

Mouse(x, y+45, 0, 0, True);

Wait(100);

MMouse(498, 19, 3, 3);

Wait(350);

end else

Break;

until true;

 

MMouse(255, 184, 0, 0);

Wait(200);

end;

 

procedure Alarm;

var x, y: Integer;

begin

If FindColor(x, y, 65280, 242, 250, 300, 321) then

begin

PlaySound('c:\siren.wav');

Wait(1000);

TerminateScript;

end;

end;

 

begin

SetupOSI;

MouseSpeed := 25;

repeat

Alarm;

FindTarget;

Atttack;

InCombat;

//LootBones;

//BuryBones;

until GetKeyState(VK_F12);

end.

[/sCAR]

Edited by Amberleaf
Link to comment
Share on other sites

glad to see scripts =p I did soem minor editing to your code i believe this way is more effiecnt than your method because it eliminates alot of code plus searches for all of the colors within the same loop.

 

[scar]//AmberRSCSkeleFighter

 

{.include OSI\OSI.scar}

 

var xp: Integer;

 

procedure ScriptTerminate;

begin

FreeOSI;

end;

 

procedure FindTarget;

var x, y: Integer;

begin

If FindColor(x, y, 16447223, 0, 0, 509, 327) then

begin

MMouse(x, y, 0, 0);

Wait(10);

Mouse(x, y, 0, 0, False);

end;

end;

 

procedure Atttack;

var x, y: Integer;

begin

If FindColor(x, y, 65280, 23, 28, 490, 301) then

begin

MMouse(x, y, 1, 1);

GetMousePos(x, y);

Mouse(x, y, 0, 0, false);

Wait(2800);

xp := xp + 250;

Writeln('XP so far...');

Writeln(xp);

end else

begin

MMouse(456, 149, 15, 15);

end;

end;

 

procedure InCombat;

var x, y: Integer;

begin

repeat

If FindColorTol(x, y, 16777215, 57, 21, 126, 32, 4) then

begin

If FindColor(x, y, 16447223, 0, 0, 509, 327) then

begin

MMouse(x, y, 0, 0);

end;

If GetKeyState(VK_F12) then

TerminateScript;

end else

Break;

until True;

Wait(500);

end;

 

procedure LootRunes;

var x, y: Integer;

begin

If FindColorTol(x, y, 11379610, 12, 41, 509, 327, 14) then

begin

MMouse(x, y, 0, 0);

Wait(100);

Mouse(x, y, 0, 0, False);

If FindColor(x, y, 4231423, 12, 41, 509, 327) then

begin

MMouse(x, y, 0, 0)

GetMousePos(x, y);

Mouse(x, y, 0, 0, True);

Wait(2000);

end;

end;

end;

 

procedure LootBones;

var x, y: Integer;

begin

If FindColorSpiral(RandomRange(234, 122), RandomRange(282, 166), x, y, 16579836, 23, 28, 490, 301) then

begin

Writeln('Finding loot...');

repeat

Mouse(x, y, 0, 0, False);

If FindColor(x, y, 4231423, 23, 28, 490, 301) then

begin

Mouse(x, y, 0, 0, True);

Wait(2000 + Random(1000));

end;

until (FindColor(x, y, 4231423, 23, 28, 490, 301) = False);

end;

end;

 

procedure BuryBones;

var x, y: Integer;

begin

MMouse(498, 19, 3, 3);

Wait(350);

repeat

If FindColor(x, y, 16775143, 267, 36, 504, 236) then

begin

Mouse(x, y, 0, 0, True);

Wait(250);

end;

until (FindColor(x, y, 16775143, 267, 36, 504, 236) = False);

 

repeat

If FindColors(x, y, [532561, 14342891, 2245762, 12303305, 6974066],267, 36, 504, 236) then

begin

Mouse(x, y, 0, 0, False);

Wait(100);

Mouse(x, y+45, 0, 0, True);

Wait(100);

MMouse(498, 19, 3, 3);

Wait(350);

end else

Break; // This will break the loop if none of the colors are found

until true;

 

MMouse(255, 184, 0, 0);

Wait(200);

end;

 

procedure Alarm;

var x, y: Integer;

begin

If FindColor(x, y, 65280, 242, 250, 300, 321) then

begin

PlaySound('c:\siren.wav');

Wait(1000);

TerminateScript;

end;

end;

 

begin

SetupOSI;

MouseSpeed := 25;

repeat

Alarm;

LootRunes;

FindTarget;

Atttack;

InCombat;

LootRunes;

Alarm;

FindTarget;

Atttack;

InCombat;

LootRunes;

LootBones;

BuryBones;

until GetKeyState(VK_F12);

end.[/scar]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...