this is my second script, my first was a Varrock Castle monk Curser, when i got a suggestion that to expand it i could add teleports also. so i did. I think it is a drastic enough change to deserve a new thread, as it is, in my opinion, a totally different script.
-----------------
The Mage Trainer will either Cast a spell on a chosen monster, or cast certain spells such as teleports.
Script should be self explainatory
Includes Anti-Randoms, FailSafes, and a Progress Report
-----------------
All I ask in Return are Progress reports posted here along with any Comments/Suggestions/Bug Reports
Here She is
//Drizzt's AutoMageTrain//
//Fill in PlayerArray (Lines 45-52)//
//Modify your NumberOfCasts//
//Place your player beside the monk cage in Varrock//
//Press Play//
SCAR Code:
program AutoCurse;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Magic.scar}
var
I : 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
FightOrTele = True; //True if needed to be cast on a monster, false for teleport
RunDirection = 'S'; //direction to run away in case of random (N,S,E,W)
CompassFacing = 'W'; //Direction for the compass to face (N,S,E,W)
Spell ='12'; //See Below for spell list
LampSkill = 'Magic' //Skill to use lamp on in case of genie random
{3 = 'Confuse';
8 = 'Weaken';
12 = 'Curse';
16 = 'Varrock Teleport';
19 = 'Lumbridge Teleport';
22 = 'Falador Teleport';
23 = 'Crumble Undead';
24 = 'House teleport';
27 = 'Camelot Teleport';
33 = 'Ardougne teleport';
38 = 'Watchtower Teleport';
42 = 'Saradomin Strike';
43 = 'Claws of Guthix';
44 = 'Flames of Zamorak';
45 = 'Trollheim Teleport';
48 = 'Ape Atoll teleport';
51 = 'Vulnerability';
54 = 'Enfeeble';
58 = 'Stun';}
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 ProgressReport;
begin
Writeln('#####################################');
Writeln('| ' + Players[CurrentPlayer].Name + ' has');
Writeln('| Casted ' + inttostr(i) + ' Spells');
Writeln('| Drizzts Auto Mage Train');
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(Lampskill); //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(RunDirection); //runs north (s, w, e)
Wait(10000+random(2000)); //waits
RunBack;//Runs back
end;
end;
Procedure CastFight;
Begin
MakeCompass(compassfacing);
Wait(450+Random(200));
CastOn(Spell,Monster,MonsterColor,200);
If (CastOn(Spell,Monster,MonsterColor,200))=false then
Begin
ProgressReport;
Logout;
Exit;
end
end;
Procedure CastTeleport;
Begin
Wait(800+random(300));
Cast(Spell);
if (Cast(Spell)) = False then
Begin
ProgressReport;
Logout;
TerminateScript;
end
end;
Procedure SetupPlayer;
Begin
If (not(Loggedin)) then LoginPlayer;
GameTab(7);
end;
Begin
SetupSRL;
SetupMagic;
Declareplayers;
SetupPlayer;
I := 0;
Begin
Repeat
if FightOrTele = True then
Begin
CastFight;
end
if FightOrTele = False then
Begin
CastTeleport;
end
I:=I + 1;
if ((I Mod 3) = 0) then
begin
Antirandom;
end
until(I=NumberOfCasts);
Begin
LogOut;
ProgressReport;
end
end
end.
it hasn't been tested yet, at all, so im going to guess there are some kinks in it, which is why i need those proggies! (yeh i know my report is really weak)
EDIT: just updated it a little, try it again? other than that i really dunno what to tell you, considering im a very noob scripter