SRL Archive - OSR Script Requests

Very Simple Minotaur Killer in Stronghold of Security! VERY SIMPLE SCRIPT


irmao0

2013-07-28 20:49:39

Well Since, I myself do not fully understand how to program I would like to give as little work as possible for the person helping me.


- I kindly Need a very quick Minotaur killer, eat at certain hp and kill them as quick as possible. ( no sleeps, anitban)

- I want the bot to assume Im already the the location Stronghold of Security ( 1st floor , 2nd door to the right ) and just search and kill .

- I am pure please do not make it even go over attack styles. Just let me set all that up. And I don't need special support.



THANK YOU, YOU GUYS ROCK !!!!!!

Oh also forgot to ad … I don't care if it dies usually randoms kill me anyways. so its a kind of run till death thing. if script cant find Minotaurs please make it end so its not running around and it logs me out ^^ ..

also food I don't want to complicate anyone's life :) .. Only lobster support it fine …. HUGE THANKS !!

cause

2013-07-28 22:11:14

Question, is there anyway to accidentally leave the room? (prob won't be writing a script though, sorry) @irmao0

Flight

2013-07-28 22:38:58

I merged your posts for you. No need to double-post mate, just edit your previous post if you need to add some extra info.

Le_don

2013-07-28 23:24:53

Le_Don Delivars!

SUPER DUPER STRONGHOLD OF SECURITY MINOTAUR SUICIDE SCRIPT
Shit works, eats lobsters at 20 hp (change EATAT to change that), logs out when it doesn't find food.

You need to find your own Minotaur colours, though.

I haven't tested this, but the code is mostly from my monk killer script. You can find that here: http://villavu.com/forum/showthread.php?t=105002
You might also find that it's a good alternative to using this script.

program SUPERDUPERSTRONGHOLDOFSECURITYMINOTAURSUICIDESCRIPT;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}

const
ver = 1.0;
FOODCOLOR = 1733336; //tol 16
MINOTAURCOLOR1 = 9279640; //FILL THE MINOTAUR COLORS IN YOURSELF, WONT WORK OTHERWISE.
MINOTAURCOLOR2 = 654867645649687; //FILL THE MINOTAUR COLORS IN YOURSELF, WONT WORK OTHERWISE.
HEALAT = 20; //what level of hp to eat at
HPCOLOUR = 65280;

function InCombat: Boolean; //credit to saikek
var
x, y: Integer;
begin
if (FindColor(x, y, HPCOLOUR, 200, 100, 300, 200)) then
Result := true
else
Result := false
end;

procedure Heal;
var
hitpoints: integer;
x, y, Lobby: integer;
begin
Lobby := DTMFromString('mKgEAAHicjc3dCkBAEAXg44ZQMn6yyF7wbJ7To3G2Tkqknfqamt8KgKOJCqppJE8bzar1lFNGpfotLeoZrboT5lLteuXwo9H8sQ/ozG5AEukd52f1GbHX/79dA5AFXg==');
wait(1000);
if (GetSkillInfo('hitpoints', true) < HEALAT) then
begin
Writeln('Need to heal!');
MouseBox(630, 175, 655, 200, 1);
wait(500);
if FindDtm(Lobby, x, y, 553, 207, 734, 463) then
begin
Writeln('Found Lobby');
wait(100);
MMouse(x, y, 3, 3);
ClickMouse2(mouse_left);
end
else
begin
Writeln('Oh fuck, out of food. Logging out');
While(InCombat) do begin wait(100); end;
//Logout;
end;
end;
if (GetSkillInfo('hitpoints', true) = -1) then
begin
Writeln('COULD NOT GRAB CURRENT HP. YOU WILL PROBABLY DIE.');
end;
FreeDTM(Lobby);
end;
procedure AttackMinotaur;
var
starttime, x, y: integer;
begin
wait(randomrange(500,600));
starttime := getsystemtime;
if (not InCombat) then
Writeln('Attacking MINOTAUR!');
repeat
wait(randomrange(1000,1400));
if (FindObjCustom(x, y, ['Attack', 'ttack', 'uar'], [MINOTAURCOLOR1, MINOTAURCOLOR2], 10)) then
begin
Writeln('Found MINOTAUR. Clicking.');
MMouse(x, y, 3, 3);
ClickMouse2(mouse_left);
if DidYellowClick then
begin
repeat
Writeln('Misclicked MINOTAUR - Trying again!');
if (FindObjCustom(x, y, ['Attack', 'ttack', 'aur'], [MINOTAURCOLOR1, MINOTAURCOLOR2], 10)) then
begin
Writeln('Found MINOTAUR. Clicking.');
MMouse(x, y, 3, 3);
ClickMouse2(mouse_left);
end;
until(not DidYellowClick);
end;
end
else
begin
Writeln('Did not find MINOTAUR. Random chance of moving Camera.');
case random(20) of
1: begin KeyDown(VK_LEFT); wait(randomrange(1000,1500)); KeyUp(VK_LEFT); end;
2: begin KeyDown(VK_RIGHT); wait(randomrange(1000,1500)); KeyUp(VK_RIGHT); end;
end;
end;
until (InCombat) or (getsystemtime - starttime > (randomrange(20000, 25000)));
while (InCombat) do begin wait(100); end;
end;


begin
SetupSRL;
ActivateClient;
repeat
AttackMinotaur;
Heal;
until(false)
end.

irmao0

2013-07-29 02:15:51

Major Thanks To everyone Flight, Le-Don ( love the verbage lol ) and cause thanks for the curiosity mate lol jk ^^ but THANK YOU ALL !@@!!!!

irmao0

2013-07-29 02:23:05

Writeln('Oh fuck, out of food. Logging out'); < – just caught that HILARIOUS MAN ! NICE JOB :D

Le_don

2013-07-29 03:32:56

This one actually loads a smart window!
Behold, a fully working script:
program SUPERDUPERSTRONGHOLDOFSECURITYMINOTAURSUICIDESCRIPT;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}

const
ver = 1.0;
FOODCOLOR = 1733336; //tol 16
MINOTAURCOLOR1 = 9279640; //FILL THE MINOTAUR COLORS IN YOURSELF, WONT WORK OTHERWISE.
MINOTAURCOLOR2 = 654867645649687; //FILL THE MINOTAUR COLORS IN YOURSELF, WONT WORK OTHERWISE.
HEALAT = 20; //what level of hp to eat at
HPCOLOUR = 65280;

function InCombat: Boolean; //credit to saikek
var
x, y: Integer;
begin
if (FindColor(x, y, HPCOLOUR, 200, 100, 300, 200)) then
Result := true
else
Result := false
end;

procedure Heal;
var
hitpoints: integer;
x, y, Lobby: integer;
begin
Lobby := DTMFromString('mKgEAAHicjc3dCkBAEAXg44ZQMn6yyF7wbJ7To3G2Tkqknfqamt8KgKOJCqppJE8bzar1lFNGpfotLeoZrboT5lLteuXwo9H8sQ/ozG5AEukd52f1GbHX/79dA5AFXg==');
wait(1000);
if (GetSkillInfo('hitpoints', true) < HEALAT) then
begin
Writeln('Need to heal!');
MouseBox(630, 175, 655, 200, 1);
wait(500);
if FindDtm(Lobby, x, y, 553, 207, 734, 463) then
begin
Writeln('Found Lobby');
wait(100);
MMouse(x, y, 3, 3);
ClickMouse2(mouse_left);
end
else
begin
Writeln('Oh fuck, out of food. Logging out');
While(InCombat) do begin wait(100); end;
//Logout;
end;
end;
if (GetSkillInfo('hitpoints', true) = -1) then
begin
Writeln('COULD NOT GRAB CURRENT HP. YOU WILL PROBABLY DIE.');
end;
FreeDTM(Lobby);
end;
procedure AttackMinotaur;
var
starttime, x, y: integer;
begin
wait(randomrange(500,600));
starttime := getsystemtime;
if (not InCombat) then
Writeln('Attacking MINOTAUR!');
repeat
wait(randomrange(1000,1400));
if (FindObjCustom(x, y, ['Attack', 'ttack', 'uar'], [MINOTAURCOLOR1, MINOTAURCOLOR2], 10)) then
begin
Writeln('Found MINOTAUR. Clicking.');
MMouse(x, y, 3, 3);
ClickMouse2(mouse_left);
if DidYellowClick then
begin
repeat
Writeln('Misclicked MINOTAUR - Trying again!');
if (FindObjCustom(x, y, ['Attack', 'ttack', 'aur'], [MINOTAURCOLOR1, MINOTAURCOLOR2], 10)) then
begin
Writeln('Found MINOTAUR. Clicking.');
MMouse(x, y, 3, 3);
ClickMouse2(mouse_left);
end;
until(not DidYellowClick);
end;
end
else
begin
Writeln('Did not find MINOTAUR. Random chance of moving Camera.');
case random(20) of
1: begin KeyDown(VK_LEFT); wait(randomrange(1000,1500)); KeyUp(VK_LEFT); end;
2: begin KeyDown(VK_RIGHT); wait(randomrange(1000,1500)); KeyUp(VK_RIGHT); end;
end;
end;
until (InCombat) or (getsystemtime - starttime > (randomrange(20000, 25000)));
while (InCombat) do begin wait(100); end;
end;


begin
SetupSRL;
ActivateClient;
repeat
AttackMinotaur;
Heal;
until(false)
end.

Blurgh, as of now heal is broken and eating fails, making a dtm for lobsters and fixing healing

irmao0

2013-07-29 10:25:32

Someone Seems to enjoy outdoing himself :) .. Thank you for this Le_Don !

cause

2013-07-29 12:40:12

The funny thing is, simpler is *usually* more stable…so nice job. Also you should probably add some random event checks. Actually @irmao0 this is a great learning opportunity lol, there should be a tut on adding in good random checks, and then the next thing you could do is add in a progress report. After that you could even rewrite the monster finding procedure (using ACA). Yep these beginner scripts are perfect for learning and adding onto!

irmao0

2013-07-29 14:36:00

Thanks cause your asome! Explained that beautifully in a way I could understand. I took very basic programing I can understand little things to modify but when it gets into Boolean and DTMFromString ( i guess a bit more advanced functions) I get a bit lost. but thank you :) if you have any tips so I can learn a bit more please message me or let me know !!

Le_don

2013-07-31 19:40:26

From: irmao0
Thanks cause your asome! Explained that beautifully in a way I could understand. I took very basic programing I can understand little things to modify but when it gets into Boolean and DTMFromString ( i guess a bit more advanced functions) I get a bit lost. but thank you :) if you have any tips so I can learn a bit more please message me or let me know !!


For starters you might want to uncomment 'Logout;', I forgot to! :P

Qw4rt6yu9

2013-09-23 23:30:06

Haha with the final saying, I'll test this out when I get home and thanks for coding