Simba Code:
program New;
{.include SRL/SRL.scar}
var
DemonColor: integer;
var
SpellColor: integer;
const
SpellType = '';
procedure DeclarePlayers;
begin
HowManyPlayers := 2;
CurrentPlayer := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := False;
end;
procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;
case Random(60) of
0: RandomRClick;
1: GameTab(1 + Random(12));
2: PickUpMouse;
3: RandomMovement;
4: BoredHuman;
end;
end;
procedure FindRandoms;
begin
FindNormalRandoms;
RunAway('n', True, 1, 3000);
end;
procedure SetStun;
begin
case lowercase(SpellType) of
'stun': SpellColor := 13091512;
end;
end;
procedure CastStun;
var
X, Y: Integer;
begin
if FindColorSpiral(X, Y, SpellColor, MSX1, MSY1, MSX2, MSY2) then
begin
mmouse( x, y, 4, 4 );
wait(80+random(60));
if isuptext('ast') then
begin
GetMousePos(X, Y);
Wait(50+random(50));
Mouse(X, Y, 4, 4, True);
end;
end;
end;
procedure SetDemon;
begin
case lowercase(SpellType) of
'demon': DemonColor := 2702687;
end;
end;
procedure StunDemon;
var
X, Y: Integer;
begin
if FindColorSpiral(X, Y, DemonColor, MSX1, MSY1, MSX2, MSY2) then
begin
mmouse( x, y, 4, 4 );
wait(80+random(60));
if isuptext('emon') then
begin
GetMousePos(X, Y);
Wait(50+random(50));
Mouse(X, Y, 4, 4, True);
end;
end;
end;
procedure WhileCasting;
var
C: Integer;
begin
if not (LoggedIn) then
Exit;
MarkTime(C);
begin
While (TimeFromMark(c)) < 6000 do
begin
FindRandoms;
Wait(100+random(50));
AntiBan;
Wait(500+random(500));
if FindBlackChatMessage('anage') then
Exit;
end;
end;
end;
procedure MainLoop;
begin
if not LoggedIn then
LogInPlayer;
SetDemon;
//repeat Random repeat that isn't closed.
repeat
StunDemon;
Until False
end;//Until doesn't close the procedure end; does.
begin
SetupSRL;
MainLoop;
end.
Progress Report:
Compiled successfully in 717 ms.
I have marked the issues that stopped you from compiling. As for anything else try it out and see. You have a lot to learn.
As for your other issue about getting to the magic tab. Try this will switch to the spell tab. Then for finding the spell you can use your current method or DTMs(judging by your skill level). Call GameTab befoer your spell casting procedure.