SRL Archive - First Scripts

Drizzt Zamorak Monk AutoCurse


drizzt

2007-09-27 21:17:57

This is my first script, includes some AntiRandom, but i don't know how well it works. I would suggest you be watching your screen while running it, but my
tests have worked well.

SRL[4]
SCAR 3.12

Used in Varrock Castle at the Zamorak monk in the cage
meant for 1 player

please post comments/suggestions

V1.2 includes
Checks for random Every 3-5 Curses,
Automatically logs out if out of spells or can't find monster.
^This sometimes results in missing the monk totally and^
^logging out^
——————
if anyone has a suggestion on how to make it try one more time before logging it'd be greatly appreciated, or any other useful suggestion

i will add a proggy soon, maybe even some AntiBan also.

—————–

//Drizzt's Autocurse//
//Fill in PlayerArray (Lines 44-53)//
//Modify your NumberOfCasts//
//Place your player beside the monk cage in Varrock//
//Press Play//


program AutoCurse;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Magic.scar}
var
I , X: Integer;

Const
MonsterColor=14278451; //color of the monster you intend to Curse
Monster='onk'; //Letters to Identify the monster with, this case "monk"
NumberOfCasts=15; //number of casts you want to make

Procedure ProgressReport;
begin
Writeln('#####################################');
Writeln('| ' + Players[CurrentPlayer].Name + ' has');
Writeln('| Casted ' + inttostr(i) + ' curses');
Writeln('| and has');
Writeln('| Gained ' + inttostr(29 * i) + ' Experience');
Writeln('|Drizzts Auto curse Monk');
Writeln('|######################################');
end;

procedure AntiRandom;
begin
FindTalk; //looks for a few letters from characters name (Nick) for randoms
FindNormalRandoms; //looks for normal randoms and solves (mime, plant, etc.)
FindLamp('Magic'); //if finds the lamp, picks the skill
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);

if FindFight then //if finds that you're in a fight
begin
RunAwayDirection('S'); //runs north (s, w, e)
Wait(10000+random(2000)); //waits
RunBack;//Runs back
end;
end;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'Username'; //Username
Players[0].Pass := 'Password'; //Pass
Players[0].Nick := 'Nick'; //3 - 4 letters of username
Players[0].Active :=True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);

end;

Procedure DontLikeit;
begin
Const
DontLikeIt:='Dont like my script? Then write your own, gawd'

Writeln(DontLikeIt)
Writeln('yeh, I took my time to tell you that')


Begin
SetupSRL;
SetupMagic;
Declareplayers;
if Loggedin then Logout;
LoginPlayer;
GameTab(7);

I := 0;
Begin
Repeat
MakeCompass('W');
Wait(450+Random(200));
CastOn('12',Monster,MonsterColor,200)

If (CastOn('12',Monster,MonsterColor,200))=false then
Begin;
ProgressReport;
Logout;
DontLikeIt;
Exit;
end

I:=I + 1;

if (I = 3 * X)=true then
begin
Antirandom;
end



until(I=NumberOfCasts);
Begin
LogOut;
ProgressReport;
DontLikeIt;
end
end
end.

Economic Advancement

2007-09-27 23:43:48

Nice and simple, I like it. I don't have any magic proficient macro accounts so I can't try it, but I do have a suggestion.

And an idea for if you want to expand the script, I think teleports could be cast easily in a similar fashion so your program would end up as a magic trainer that can train by casting curse or by teleporting to a given city. And you should always consider fail safes. There are lots of tutorials here on them and they are very useful as I am discovering in my own script. Hope this helps you in some way. :)

drizzt

2007-09-28 06:42:09

i don't really want to add any teleports to THIS Script, maybe some others down the path, and two updates i think i'll make is to make the antiRandom run every 3-5 curses, so it doesnt slow it down as much, and a failsafe.

ty for the suggestions and comments