im having trouble with my lesser demon killer which kills the demons in the wizard tower with any spell. Im having trouble with counting the spells using autocast, detecting when the lesser demon is dead, what level you can stop right clicking to attack lesser demon.
SCAR Code:
{-------------------------------------------------------------------]
[ _______ ______ ______ _____ _ _____ ___ ]
[ |_ _| | O _| | _ | |_ _| /O\ | |\ \ | | ]
[ | | | |\ \ | |_|| __|| / _ \ | | \ \| | ]
[ |_| |_| \_\ |____| |__| /_/ \_\ |_| \___| ]
[ ]
[-------------------------------------------------------------------]
[ Trojans Wizard Tower Lesser Demon Killer ]
[ ]
[ Title : Lesser Demon Killer ]
[ Authur : Trojan ]
[ Catagory : Magic ]
[ Smart : No (add if you want) ]
[ SRL Used : 4.0, Rev 31 ]
[ SCAR Used : 3.15b. ]
[-------------------------------------------------------------------]
[ Setup ]
[ ]
[ 1. Load Runescape 32-bit low detail. ]
[ 2. Place your character on the top ]
[ floor of the wizard tower next to ]
[ the fence with the lesser demon ]
[ with the runes needed in your ]
[ inventory. ]
[ 3. Declare Players fill lines 54-71 ]
[ 4. Drag the Crosshair then >> RUN ]
[ 5. Post Proggy at [website of post] ]
[ 6. For Defence Mode change line 213 from false to true ]
[-------------------------------------------------------------------]
[ Future Updates ]
[ ]
[ 1. Better Anitban ]
[ 2. Sleeping ]
[ 3. More Accurate ]
[-------------------------------------------------------------------]
[ Features ]
[ ]
[ o AntiBan ]
[ o Casts All Spells ]
[ o AntiRandoms ]
[ o Kills Lesser Demons ]
[-------------------------------------------------------------------}
program LesserDemonKiller;
{.include SRl/SRl.scar}
{.include srl/srl/skill/Magic.scar}
{.include srl/srl/skill/Fighting.scar}
var
TimeMin, TimeSec :integer;
x, y :integer;
SpellsDone :integer;
MagicLvl :integer;
LevelsGained :integer;
DemonsKilled :integer;
CbatLvl :integer;
Runes :boolean;
const
SpellsToDo = 5; //How many spells to do? DONT SET MORE THAN YOU CAN DO!!
DemonColor1 = 2832760; //The Color of the Lesser Demon (Only Change if Doesnt work)
MySRLID = '346'; //PLEASE FILL THIS find at [url]http://www.stats.srl-forums.com/[/url]
MySRLPassword = 'kieran';
//----------SETUP PLAYERS-------------//
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Your Runescape Username
Players[0].Pass := ''; // Your Runescape Password
Players[0].Nick := ''; // 3-4 letters of username
Players[0].Active := True; // Use this player?
Players[0].Booleans[0] := False; // AutoCast (staff needed)
Players[0].Strings[0] := 'Wind Strike' //Which Spell To use must be spelt correct!!!
{ Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''; // 3-4 letters of username
Players[1].Active := True; // Is the player active?
Players[1].Boolean := True; // AutoCast (staff needed)
Players[1].Strings[0] := 'Wind Strike' //Which Spell To use must be spelt correct!!!
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := ''; // 3-4 letters of username
Players[2].Active := True; // Is the player active?
Players[2].Boolean := True; // AutoCast (staff needed)
Players[2].Strings[0] := 'Wind Strike' //Which Spell To use must be spelt correct!!!
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := ''; // 3-4 letters of username
Players[3].Active := True; // Is the player active?
Players[3].Boolean := True; // AutoCast (staff needed)
Players[3].Strings[0] := 'Wind Strike' //Which Spell To use must be spelt correct!!!}
end;
procedure Proggy;
begin
writeln('---------------------------------------¬');
writeln('|Welcome To Trojans Lesser Demon Killer|');
writeln('|Casted ' + IntToStr(SpellsDone)+ ' Spells');
writeln('|Your Magic Level is ' + IntToStr(MagicLvl)+' :D |');
Writeln('Your Combat Level Is ' + IntToStr(CbatLvl));
TimeMin := (GetTimeRunning/60000);
TimeSec := (GetTimeRunning-(TimeMin * 60000))/1000;
Writeln('Ran For ' + IntToStr(TimeMin) + ' Minutes And ' + IntToStr(TimeSec)+ ' Seconds');
Writeln('Killed ' + IntToStr(DemonsKilled) +' Demons!');
Writeln('You Gained ' + IntToStr(LevelsGained) + ' Levels');
Writeln('---------------------------------------|');
end;
Procedure Signature;
begin
ClearDebug
WriteLn('Hello');
Wait(100)
WriteLn(' _______ ______ ______ _____ _ _____ ___ ');
Wait(100);
WriteLn(' |_ _| | O _| | _ | |_ _| /O\ | |\ \ | | ');
Wait(100);
WriteLn(' | | | |\ \ | |_|| __|| / _ \ | | \ \| | ');
Wait(100);
WriteLn(' |_| |_| \_\ |____| |__| /_/ \_\ |_| \___| ');
Wait(500);
if MySRLID = '' then
begin
writeln('Leacher, get your srl id/pass filled in');
writeln('Go to http://www.stats.srl-forums.com/');
ReportVars[3] := 1;
end;
end;
procedure GetLvl;
begin
if not LoggedIn then Exit;
Gametab(2);
MagicLvl := GetSkillInfo('Magic', false);
Gametab(1);
CbatLvl := GetCombatLevel;
end;
procedure TerminateScr1pt;
begin
GetLvl;
Proggy;
Logout;
TerminateScript;
Disguise('Script Terminated');
end;
procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(10) of
0: begin
RandomRClick;
wait(500 + Random(3000));
end;
1: begin
GameTab(2);
case Random(3) of
0: HoverSkill('Magic', false);
1: HoverSkill('Hitpoints', false);
2: HoverSkill('Runecraft', false);
end;
Wait(500 + Random(3000));
end;
2: begin
Gametab(1);
Wait(100 + Random(1000));
end;
3: DoEmote(1 + Random(10));
4: HoverSkill('Random', false);
5: begin
case random(3) of
0: MakeCompass('S');
1: MakeCompass('W');
2: MakeCompass('E');
end;
wait(200 + Random(1000));
end;
6: PickupMouse;
7: begin
GameTab(1 + Random(6));
end;
8: begin
SetAngle(false);
wait(100 + random(1000));
SetAngle(True);
end;
9: SetAudioOff;
end;
MakeCompass('n');
if Players[CurrentPlayer].Booleans[0] = True then
begin
Gametab(4);
end else
Gametab(7);
end;
procedure Antirandom;
begin
if not LoggedIn then Exit;
FindNormalRandoms
if (FindFight) then
begin
RunAway('W', true, 1, 5000+random(1000));
end;
end;
procedure EnoughRunes;
begin
if FindBlackChatMessage('unes') then
begin
writeln('Not enough runes for the selected spell');
Runes := False
TerminateScr1pt
end;
if FindBlackChatMessage('igh') then
begin
writeln('Your Magic level is not high enough for selected spell');
Runes := False
TerminateScr1pt
end;
end;
procedure Attack;
begin
if not LoggedIn then Exit;
Status('ATTACKING!!!');
repeat
if Players[CurrentPlayer].Booleans[0] = False then
begin
gametab(7);
CastOn(Players[CurrentPlayer].Strings[0], 'esser', DemonColor1, 5);
Wait(1000 + Random(1500))
EnoughRunes;
if Runes = True then
begin
SpellsDone := SpellsDone + 1;
if ClickContinue(true, true) then
Inc(LevelsGained);
end;
end else
Gametab(4);
if CbatLvl > 85 then //what combat level do you stop right clicking to kill lesser demon?
begin //dont know how to count spells done when staff used.
FightNPC([DemonColor1], 5, 10);
EnoughRunes;
if FindBlackChatMessage('reach') then
begin
writeln('You Don''t have a staff!!');
TerminateScr1pt;
end else
SpellsDone := SpellsDone + 1; // only counts once per killed demon
if ClickContinue(true, true) then
Inc(LevelsGained);
if (FindObj(x, y, 'options', DemonColor1, 5)) then
begin
Mouse(x, y, 3, 3, false);
ChooseOption('ttack');
EnoughRunes;
if FindBlackChatMessage('reach') then
begin
writeln('You Don''t have a staff!!');
TerminateScr1pt;
end else
SpellsDone := SpellsDone + 1; // only counts once per killed demon
if ClickContinue(true, true) then
Inc(LevelsGained);
end
end;
until; //need help
DemonsKilled := DemonsKilled + 1
ReportVars[2] := 1;
ReportVars[1] := TimeMin;
ReportVars[0] := SpellsDone;
end;
procedure Setup;
begin
SetupSRL;
ScriptID :='1151';
SRLID := MySRLID;
SRLPassword := MySRLPassword;
if (SRLID = '') or (SRLPassword = '') then
begin
SRLID := '2391'
SRLPassword := 'default';
end;
ActivateClient;
DeclarePlayers;
LoginPlayer;
SetupMagic;
makecompass('N');
SetAngle(True);
if Players[CurrentPlayer].Booleans[0] = True then
begin
Gametab(1);
SetUpAutoCast(Players[CurrentPlayer].strings[0], False); // False is for magic xp only. True for magic + defence xp
end;
GetLvl;
GetLvlBefore;
Disguise( + IntToStr(SpellsDone) + ' Spells Done');
end;
begin
Signature;
repeat
Setup;
repeat
Attack;
Antiban;
Antirandom;
Status('Waiting For Respawn');
repeat
wait(1000)
until(FindColor(x, y, DemonColor1, MSX1, MSY1, MSX2, MSY2))//not sure if this works either
until(SpellsDone = SpellsToDo);
GetLvl
Proggy;
Logout;
nextplayer(false);
until(false);
end.