Log in

View Full Version : Problem With Logging in in SMART.



Supertrent1
01-29-2012, 06:24 AM
How do I get the script to log in? My script is "over-powering" the log in so my script is searching for colors before is logs in. Help please :)
Note: Smart DOES start up but it keeps searching for colors before typing in your username and password and logging into a world.

Here is my script

Program SuperPowerChopper;

{.include/SRL/SRL.simba}
{.include SRL/SRL/Misc/SMART.simba}
{.include SRL\SRL.simba}
{.Include SRL\SRL\Misc\Debug.simba}

const
SmartWorld = 15; // Which World/Server do you want to use?
SmartMembers = True; // Is it a Members World?
SmartSigned = True; // Signed/UnSigned Client?
SmartSuperDetail = False; // Use Super Detail?
Version = '1.0 Alpha';
NumbOfPlayers = 1;
StartPlayer = 0;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ' '; //Username
Players[0].Pass := ' '; //Password
Players[0].Nick := ' '; //4 character Nickname for you character
Players[0].Active := True;
Players[0].Pin := ''; //Pin, leave blank if none
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Woodcutting', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

function TreeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 0.17);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 3162183, MMX1, MMY1, MMX2, MMY2, 3);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 3.03) and (X <= 7.51) and (Y >= 3.21) and (Y <= 7.94) and (Z >= 2.19) and (Z <= 5.16) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Function ChopDown:Boolean;
Var
x, y , PlusOne, TreeCounter: Integer;

Begin;
PlusOne:= InvCount + 1
x:= MSCX;
y:= MSCY;
If FindObjTPA(x, y, TreeColor, 3, 1, 15, 80, 600, ['Chop']) Then
Begin
StatsGuise('Horay, We found a tree');
Case Random(2) Of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
Wait(100+Random(100));
WaitOption('Chop', 500);
End;

end;

Flag;

MarkTime(TreeCounter);

Repeat;
FindNormalRandoms;
StatsGuise('Antiban, Please wait!');
Antiban;
wait(1000);
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 3500)


End;

End;
Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

Begin

LogDTM := DTMFromString('mwQAAAHic42RgYHBmYmBwBGIfIA4EYicgNg ZiEyA2B2IvIH4KVHcbiB8D8Ssgfg/Ebxgg4neB+CYQe5rJA0kmDOxmKAqmbXSlGAiB/0DMSASGAwDH/w0r');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];
StatsGuise('Dropping All Your Logs!');
For I:=0 To 27 Do
Begin
FindNormalRandoms;
SlotBox:=InvBox(LogPattern[I]);
If FindDtm(LogDTM, x, y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I], MOUSE_RIGHT);
ChooseOption('Drop');
End;
End;

FreeDTM(LogDTM);


End;





Begin
DeclarePlayers;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupSRL;
repeat
ChopDown;
if InvFull Then
DropLogs;
Until (false);

end.

It starts SMART but it doesn't log in. It sits there spamming "Failed to find the color, no result." as in this line


FindColorsSpiralTolerance(MMCX, MMCY, arP, 3162183, MMX1, MMY1, MMX2, MMY2, 3);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');

Because it is starting my script before it logs in, in SMART.

Spiker
01-29-2012, 06:34 AM
Just double checking: A: I'm going to assume you had your login information plugged in, and B: You need to add this: (in your main loop after SetupSRL, if you don't have a setup procedure)

If not (LoggedIn) then
LoginPlayer;

Supertrent1
01-29-2012, 06:39 AM
Just double checking: A: I'm going to assume you had your login information plugged in, and B: You need to add this: (in your main loop after SetupSRL, if you don't have a setup procedure)

If not (LoggedIn) then
LoginPlayer;

That worked, thanks a bunch. +Rep!
:spot: