SRL Archive - Archive

lalaji - SRL Member Application Form


Lalaji

2007-10-14 08:11:55

<!– BEGIN TEMPLATE: formanswers –>
lalaji - SRL Member Application Form
lalaji

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
Very Little Pascal

Other Communitys
sythe, runekeep

How Long have You Played Runescape
4 Years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

Hello, Its been 6 months since i have been a member of this community, and I thinks it was great 6 months. In the 6 months I also managed to quit Runescape, dont know why or how but I now dont even auto much.


I am actually postig this script as an opportunity to improve it. I know it still has buggs in it. The biggest bug that you guys could help me with is that i cant use my procedure "LoadChar". Besides that please feel free to comment and critic anypart of the script.

I think besides the bugs it passes all other qualifications, lol

Thank you for reading
Lalaji

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

{SRL 4, Scar 3.11}

program New;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Woodcutting.scar}

Var Willow, BrokenAxeDTM, Bank, WillowBMP : Integer;
Ents, TotalWillows, Chopped : Integer;
K, p, LoadTime, Time, I, KRP : Integer;
BrokenAxe, CouldNotFindColor : Boolean;
Angle : Extended;
StartTime : String;
Var // Main Form
Mainfrm : TForm;
Labe1 : TLabel;
Labe2 : TLabel;
Button1 : TButton;
Button2 : TButton;
Button3 : TButton;
Var // New user set up
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
LblUser : TLabel;
Label4 : TLabel;
Label5 : TLabel;
Label6 : TLabel;
Label7 : TLabel;
EdUser : TEdit;
Edpass : TEdit;
EdNick : TEdit;
Memo1 : TMemo;
edlocation : TEdit;
CbActive : TCheckBox;
ComboBox2 : TComboBox;
GroupBox1 : TGroupBox;
btnBack : TButton;
btnDelete : TButton;
btnCreate : TButton;
btnNext : TButton;

Const
CutTime = 3; //Time to cut a load in mins.
TheMouseSpeed = 7; //MouseSpeed.

Procedure LoadDTMs;
Begin
Willow := DTMFromString('78DA6354606060906140019E4E52609A11CA6' +
'7940312220C688011558D20905025A0461148A8A3AA3050504055' +
'A30D24540898A38DE9660C351A404298801A4920A1895F0D00326' +
'9032B');
BrokenAxeDTM := DTMFromString('78DA637CC7C4C0308F910104202484C58FC46' +
'7FC0854D34340CD0FA09A2E026AFE03D5F41250C3C0CCC0D04E40' +
'CD6FA039AD04D47C05AA69C1ADE63F100000CD040E2F');
Bank := DTMFromString('78DA636C666260486140016FDEBC61F80FA41' +
'981F83F1030B603D5E4A0AA79FB96814103AA060418EB816AB251' +
'D57CFD8AAA0600B6210EA4');
End;


Procedure AntiRandoms;
Begin
FindNormalRandoms;
FindTalk;
FindLamp('Woodcutting');
UseBoxSolver := True
UseCerterSolver := True
UseSandwichSolver :=True
FindMod;
FindMime;
FindDead;
FindMaze;
DwarfItem;
FindDemon;
OpenBox;
SolveBox;
Solvepinball;
if (findfight) then
begin
WriteLn('We are in a fight, running away.');
SetRun(True);
RunAwayDirection('E');
SleepAndMoveMouse(9500+Random(2500));
RunBack;
End;
if InBlack then
begin
Players[CurrentPlayer].Active := false;
Players[CurrentPlayer].Loc := 'Random';
Writeln(Players[CurrentPlayer].Name + ' is stuck in a random event!');
NextPlayer(True);
Wait(3000 + random(3000));
end;
if FindDead then
begin
Players[CurrentPlayer].Active := false;
Players[CurrentPlayer].Loc := 'Dead';
Writeln(Players[CurrentPlayer].Name + ' has died!');
NextPlayer(True);
Wait(3000 + random(3000));
end;
If (DetectFrogCave) Then SolveFrogSwamp;
If(TalkToRand)then
begin
repeat
ClickToContinue;
until(not(TalkToRand));
end;
end;
Procedure randomness;
Begin
case Random(7) of
0 : Begin MakeCompass('N');SetChat('friends', 1);SetChat('on', 2);SetChat('friends', 3);End;
1 : Begin MakeCompass('E');SetChat('Hide', 1); SetChat('On', 2);SetChat('friends', 3);End;
2 : Begin MakeCompass('S');SetChat('Off', 1);SetChat('On', 2);SetChat('On', 3); End;
3 : Begin MakeCompass('e');SetChat('On', 1);SetChat('Off', 2);SetChat('Off', 3); End;
4 : Begin MakeCompass('w');SetChat('Hide', 1);SetChat('Friends', 2);SetChat('Friends', 3); End;
5 : Begin MakeCompass('n');SetChat('Friends', 1);SetChat('Off', 2);SetChat('On', 3); End;
6 : Begin MakeCompass('s');SetChat('off', 1);SetChat('On', 2);SetChat('Off', 3); End;
End;
End;

Procedure ToWillows;
Var ax,ay : Integer;
Begin
MouseSpeed := TheMouseSpeed - Random(5) + Random(3);
If Not LoggedIn Then Exit;
If (GetSkillLevel('Woodcutting') >= 30) Then
Begin
HighestAngle;
MakeCompass('N');
SetRun(true);
IF (FindSymbol(ax, ay, 'fish')) Then
Begin
MMouse(ax,ay,5,5);
Wait(100+Random(100));
Mouse(aX,aY,5,5,true);
Flag;
Players[CurrentPlayer].loc := 'InWillows';
SetRun(False);
End Else
Begin
K := 0
Repeat
Players[CurrentPlayer].Active := True;
NextPlayer(true);
Writeln('Cannot find fishing symbol. Will try again.');
K := K + 1
Until (K = 3);
End;
If (K = 3) Then
Begin
WriteLn(Players[CurrentPlayer].Name + ' = Could Not find the fishing symbol')
WriteLn('Make Sure Player Is At The South Most Bank Booth.');
WriteLn('Next Player');
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Loc := 'Unknown';
NextPlayer(True);
K := 0
End;
End Else
Begin
WriteLn(Players[CurrentPlayer].Name + ' Woodcutting Level Is Too Low To Cut Willows');
Players[CurrentPlayer].loc := 'Below 30';
Players[CurrentPlayer].Active := False;
NextPlayer(True);
End;
End;

Procedure Report;
Begin
For I := 0 to HowManyPlayers - 1 Do
Begin
WriteLn( (IntToStr(I))+' : '+Players[I].Name + ' : Loc = '+Players[I].Loc + ' : WC lvl = '+IntToStr(GetSkillLevel('Woodcutting')));
End;
End;

Procedure ProgressReport;
Begin
WriteLn('------------ Lalaji Willow Banker ------------')
WriteLn('');
WriteLn(' Script Started At ' + StartTime);
If TotalWillows > 0 Then WriteLn(' Chopped And Banked ' + IntToStr(TotalWillows) + ' Willows.');
If Ents > 0 Then WriteLn(' Encountered ' + IntToStr(Ents) + ' Ents.');
Writeln(' Worked for '+ TimeRunning);
WriteLn('');
WriteLn('-----------------------------------------------')
Report;
End;

Procedure BankTheLogs; // <- From Town, But modified a little bit. Thank You Town
Var bx,by : Integer;
Begin
WillowBMP := BitmapFromString(17, 4, 'z78DA8D90410AC0200C04' +
'BFD4349B048FB5EAFF9F5488169416F5320496CC86D8A1C659938' +
'29328129505A3D0246504BA51207421E07C69DED273E1D9310B67' +
'321007328E0CC2E0DF36CF9D756EF4F4A7C56FABAC5B3DBF8681D' +
'D97DA25CE07B46F58EA');

If (Not(loggedIn)) Then Exit;
MouseSpeed := TheMouseSpeed + Random(5) - Random(3);
Begin
GameTab(4);
If(FindColor(bx,by,4999248,3,3,634,535)) Then
Begin
Mouse(bx,by,3,3,false)
OpenBank3;
If(BankScreen) Then
Begin
Wait(500+Random(500))
End Else
Begin
OpenBank
Wait(500+Random(300))
end
Chopped := CountItemBmpTol(WillowBMP, 100)
TotalWillows := TotalWillows + Chopped;
FindDTM(Willow,bx,by,569,212,637,343);
Mouse(bx,by,3,3,False);
Wait(100 + random(100));
ChooseOption('tore All');
Wait(100 + random(100));
CloseBank;
End Else
Begin
If(FindColor(bx,by,607580,3,3,515,338)) Then
Begin
Mouse(bx,by,3,3,false)
OpenBank3;
BankScreen;
If(BankScreen) Then
Begin
Wait(500+Random(500))
End Else
Begin
OpenBank
Wait(500+Random(300))
End
Chopped := CountItemBmpTol(WillowBMP, 100)
TotalWillows := TotalWillows + Chopped;
FindDTM(Willow,bx,by,558,206,735,462);
Mouse(bx,by, 3, 3,False);
Wait(100 + random(100));
ChooseOption('tore All');
Wait(100 + random(100));
CloseBank;
End Else
Begin
WriteLN(Players[CurrentPlayer].Name + ' = Could Not Open Bank');
WriteLn('Next Player');
Players[CurrentPlayer].Active := false;
NextPlayer(True);
end
end
end
Players[CurrentPlayer].Loc := 'InBank';
Report;
ProgressReport;
FreeBitmap(WillowBMP);
end;

Procedure ToBank;
Var cx,cy : Integer;
Begin
MouseSpeed := TheMouseSpeed + Random(3) - Random(5);
If FindSymbol(cx, cy, 'Bank') Or
FindDTMRotated(Bank,cX,cY,695, 230, 820,338,-1.0, 2.0, 0.05, Angle) Then
Begin
WriteLn('Bank Symbol Found');
Mouse(cx,cy,3,3,true);
Players[CurrentPlayer].Loc := 'RToStore';
End Else
Begin
FindColorTolerance(cx,cy,7105909,577,12,709,129,80);
Mouse(cx,cy,5,5,True);
If FindSymbol(cx,cy, 'Bank') Or
FindDTMRotated(Bank,cX,cY,695, 230, 820,338,-1.0, 2.0, 0.05, Angle) Then
Begin
Mouse(cx,cy,3,3,true);
Players[CurrentPlayer].Loc := 'RToStore';
End Else
Begin
WriteLn(Players[CurrentPlayer].Name + ' = Could Not Find Bank ')
WriteLn('Next Player');
Players[CurrentPlayer].Active := False;
NextPlayer(True);
End;
End;
End;

function CheckForEnt: Boolean; // <- All Thanks To Jad
var TPA: TPointArray;
dx,dy : Integer;
begin
if(not(LoggedIn))then
Exit;
if(FindColorTolerance(dx,dy,55255,6,6,117,27,10))or
(FindColorTolerance(dx,dy,976101,6,6,117,27,10))then
begin
if(not(IsUpText('op'))) and (not(IsUpText('own')))then
Exit;
wait(1);
FindColorsSpiralTolerance(dx,dy,TPA,55255,6,6,117,27,10);
if(GetArrayLength(TPA) - 1 > 4)then
begin
Result := True;
Writeln('We found an ent!! Trying to avoid now..');
Mouse(648,84,3,3,true);
FTWait(60+random(5));
Ents := Ents + 1;
Exit;
end else
begin
if(FindDTM(dx,dy,BrokenAxeDTM,MIX1,MIY1,MIX2,MIY2))then
begin
Writeln('Oh darn... We broke an axe.');
Players[CurrentPlayer].Active := False;
NextPlayer(True);
BrokenAxe := True;
Exit;
end;
end;
end;
Result := False;
end;

Function GetTreeColor : Integer;
Var
Tol, ex, ey, Tcolor: Integer;
Begin
Repeat
Begin
If(not(LoggedIn))then Break;
Tol:= Tol + 5;
If(FindColorSpiralTolerance(eX, eY, 4415576, 90, 11, 512, 332, Tol)) then
Begin
MMouse(eX,eY,3,3);
If (IsUpTextMulti('hop down Will', 'down Willow', 'own Wil')) or (IsUpTextMulti('illow', 'low', 'Will'))then
Begin
TColor:= GetColor(eX, eY);
Result:= TColor;
End Else
Begin
{WriteLn(Players[CurrentPlayer].Name + ' = Could Not Find Tree Color' );
Players[CurrentPlayer].Active := False;
NextPlayer(True);}
End;
End;
End;
Until(Result > 0) or (Tol > 75);

If(Result= 0)then
Begin
CouldNotFindColor := True;
End else
Begin
CouldNotFindColor := False;
WriteLn('TreeColor - '+IntToStr(Tcolor));
FindColorSpiralTolerance(eX, eY, TColor, 6, 6, 512, 332,10);
Mouse(ex, ey, 3, 3, True);
End;
End;

Procedure ClickWillows;
Var Xe , Ye : Integer;
Begin
MouseSpeed := TheMouseSpeed - Random(4);
If Not LoggedIn Then Exit;
GetTreeColor
FindNormalRandoms;
If CouldNotFindColor Then
Begin
If(FindColorSpiralTolerance(Xe, Ye, 2582616, 6, 6, 512, 332, 20))or
(FindColorSpiralTolerance(Xe, Ye, 4026472, 6, 6, 512, 332, 20))or
(FindColorSpiralTolerance(Xe, Ye, 4415576, 6, 6, 512, 332, 20))then
Begin
MMouse(Xe,Ye,3,3);
If (IsUpTextMulti('hop down Will', 'down Willow', 'own Wil')) or
(IsUpTextMulti('illow', 'low', 'Will'))then
Begin
CheckForEnt;
Mouse(Xe,Ye,3,3,True);
CheckForEnt;
End Else
Begin
WriteLn(Players[CurrentPlayer].Name + ' = Could Not Find Tree Color Atall');
End;
End Else;
Begin
WriteLn(Players[CurrentPlayer].Name + ' Cutting Willows.');
End;
End;
If(Not(CouldNotFindColor)) Then
Begin
Wait(1);
End;
End;

Procedure CutWillows;
Begin
MouseSpeed := TheMouseSpeed + Random(5);
If Not LoggedIn Then Exit;
LoadTime := CutTime * 60 * 1000
MarkTime(Time);
Repeat
Begin
FindNormalRandoms;
ClickWillows;
AntiRandoms;
FindNormalRandoms;
Wait(10000 + Random (5000));
GameTab(4);
End;
Until (InvFull) Or (TimeFromMark(Time) >= LoadTime)
Players[CurrentPlayer].Loc := 'Loaded';
End;

Procedure siggy;
begin
Wait(1000);
cleardebug;
Writeln(' ~Lalaji Willow Banker~ ');
Writeln(' _ Thank you for useing Lalaji Willow Banker ');
Writeln(' | | ______ _ ______ _______ _ ');
Writeln(' | | | __ | | | | __ | |__ __| | | ');
Writeln(' | | | |__| | | | | |__| | | | | | ');
Writeln(' | | | __ | | | | __ | | | | | ');
Writeln(' | | | | | | | | | | | | _ | | | | ');
Writeln(' | |____ | | | | | |___ | | | | | |__/ / | | ');
Writeln(' |______| |_| |_| |_____| |_| |_| \____/ |_| ');
end;
/////////////////////////
Procedure SavePlayers;
Begin
Players[CurrentPlayer].Name := EdUser.Text;
Players[CurrentPlayer].Pass := EdPass.Text;
Players[CurrentPlayer].Active := CbActive.Checked;
Players[CurrentPlayer].Nick := edNick.Text;
Players[CurrentPlayer].Loc := edLocation.Text;
end;

Procedure LoadPlayers;
Begin
try
EdUser.text := Players[CurrentPlayer].Name;
EdPass.Text := Players[CurrentPlayer].Pass;
CbActive.Checked := Players[CurrentPlayer].Active;
EdNick.text := Players[CurrentPlayer].Nick;
EdLocation.Text := Players[CurrentPlayer].Loc;
except
end;
end;

Procedure PressBackButton(sender: tobject);
begin
if (CurrentPlayer <> 0) then
begin
SavePlayers;
CurrentPlayer := CurrentPlayer - 1;
Label1.Caption := IntToStr(CurrentPlayer) +'. Username';
Label2.Caption := IntToStr(CurrentPlayer) +'. Password';
Label4.Caption := IntToStr(CurrentPlayer) +'. Nick';
Label5.Caption := IntToStr(CurrentPlayer) +'. Loc';
LblUser.Caption := IntToStr(CurrentPlayer);
LoadPlayers;
end
end;

Procedure PressNextButton(sender: TObject);
begin
try
players[currentplayer + 1].name := players[currentplayer + 1].name
except
Exit;
end
SavePlayers;
CurrentPlayer := CurrentPlayer + 1;
Label1.Caption := IntToStr(CurrentPlayer) + '. Username';
Label2.Caption := IntToStr(CurrentPlayer) + '. Password';
Label4.Caption := IntToStr(CurrentPlayer) + '. Nick';
Label5.Caption := IntToStr(CurrentPlayer) + '. Loc';
LblUser.Caption := IntToStr(CurrentPlayer);
LoadPlayers;
end;

Procedure DeleteAPlayer(sender: tobject);
var
n : integer;
Begin
n := GetArrayLength(Players);
if (n <= 1) then Exit;
SetArrayLength(players, n - 1);
CurrentPlayer := n - 2;
//WriteLn('Players: ' + IntToStr(GetArrayLength(Players)) + ' | Current: ' + IntToStr(CurrentPlayer));
label1.Caption := IntToStr(CurrentPlayer) + '. Username';
Label2.Caption := IntToStr(CurrentPlayer) + '. Password';
Label4.Caption := IntToStr(CurrentPlayer) + '. Nick';
Label5.Caption := IntToStr(CurrentPlayer) + '. Loc';
LblUser.Caption := IntToStr(CurrentPlayer);
LoadPlayers;
end;

Procedure AddUser2(sender: Tobject);
var
n : integer;
begin
SavePlayers;
n := GetArrayLength(Players);
SetArrayLength(Players, n + 1)
CurrentPlayer := n;
//WriteLn('Players: ' + IntToStr(GetArrayLength(Players)) + ' | Current: ' + IntToStr(CurrentPlayer));
Label1.Caption := IntToStr(CurrentPlayer) +'. Username';
Label2.Caption := IntToStr(CurrentPlayer) +'. Password';
Label4.Caption := IntToStr(CurrentPlayer) +'. Nick';
LblUser.Caption := IntToStr(CurrentPlayer);
Label5.Caption := IntToStr(CurrentPlayer) +'. Loc';
LoadPlayers;
end;

procedure SaveChar;
var
f, CharFile: Integer;
begin
If (FileName = '') then FileName := 'Lalaji Willower.Dat'
CharFile := RewriteFile(ScriptPath + FileName, False)
For f := 0 to GetArrayLength(players) - 1 do
begin
WriteFileString(CharFile, 'name' +IntToStr(f)+ '=' +players[f].name+ Chr(13))
WriteFileString(CharFile, 'pass' +IntToStr(f)+ '=' +players[f].pass+ Chr(13))
WriteFileString(CharFile, 'nick' +IntToStr(f)+ '=' +players[f].nick + Chr(13))
WriteFileString(CharFile, 'loc' +IntToStr(f)+ '=' +players[f].loc + Chr(13))
WriteFileString(CharFile, 'active' +IntToStr(f)+ '=' +BoolToStr(players[f].Active) + Chr(13))
end;
CloseFile(charfile)
end;

procedure LoadChar;
var
f, CharFile2, Temp: Integer;
CharsFileString: String;
begin
if (FileName = '') then FileName := 'Lalaji Willower.Dat';
CharFile2 := OpenFile(ScriptPath + FileName, False)
if (CharFile2 < 0) then
begin
SaveChar;
CharFile2 := OpenFile(AppPath + Filename, False)
if (CharFile2 < 0) then
begin
WriteLn('Error Loading Chars');
Exit;
end
end
ReadFileString(CharFile2, CharsFileString, FileSize(CharFile2))
CloseFile(CharFile2)
{ Temp := CountPlayers(CharsFileString);
If (Temp <= 0) then Temp:= 1;}
SetArrayLength(players, Temp);
HowManyPlayers := GetArrayLength(players)
for f := 0 to HowManyPlayers - 1 do
begin
players[f].Name := Between('name' + IntToStr(f) + '=', chr(13), CharsFileString);
players[f].Pass := Between('pass' + IntToStr(f) + '=', chr(13), CharsFileString);
players[f].Nick := Between('nick' + IntToStr(f) + '=', chr(13), CharsFileString);
players[f].Loc := Between('loc' + IntToStr(f) + '=', chr(13), CharsFileString);
players[f].Active := StrToBool(Between('active' + IntToStr(f) + '=', chr(13), CharsFileString));
end;
CloseFile(CharFile2);
end;

procedure Close(sender: TObject; var CanClose: Boolean);
begin
SavePlayers;
SaveChar;
HowManyPlayers := GetArrayLength(players);
CanClose := True
end;
//////////////////////////
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('Showsetup', v);
end;
procedure SafInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('Setupform', v);
end;
procedure Usersetup(sender: TObject);
begin
Mainfrm.Caption:= Mainfrm.Caption + '.';
SafInitForm;
SafeShowFormModal;
end;
procedure Startscript(sender: TObject);
begin
Writeln('Starting Script...');
Mainfrm.Caption:= Mainfrm.Caption + '.';
Mainfrm.ModalResult:= mrOk;
KRP := 0
end;
procedure Post(sender: TObject);
begin
Writeln('ThankYou for your post');
Mainfrm.Caption:= Mainfrm.Caption + '.';
//GetPage('www.SRl-Forms.com') Waiting
end;

Procedure Main;
begin
Mainfrm := CreateForm;
Mainfrm.Left := 424;
Mainfrm.Top := 150;
Mainfrm.Width := 298;
Mainfrm.Height := 172;
Mainfrm.Caption := 'Lalaji Production';
Mainfrm.Color := clBtnFace;
Mainfrm.Font.Color := clWindowText;
Mainfrm.Font.Height := -11;
Mainfrm.Font.Name := 'MS Sans Serif';
Mainfrm.Font.Style := [];
Mainfrm.Visible := False;
Mainfrm.PixelsPerInch := 96;
Labe1 := TLabel.Create(Mainfrm);
Labe1.Parent := Mainfrm;
Labe1.Left := 20;
Labe1.Top := 3;
Labe1.Width := 116;
Labe1.Height := 24;
Labe1.Caption := 'WillowBanker';
Labe1.Font.Color := clWindowText;
Labe1.Font.Height := -20;
Labe1.Font.Name := 'MS Sans Serif';
Labe1.Font.Style := [];
Labe1.ParentFont := False;
Labe2 := TLabel.Create(Mainfrm);
Labe2.Parent := Mainfrm;
Labe2.Left := 115;
Labe2.Top := 25;
Labe2.Width := 39;
Labe2.Height := 13;
Labe2.Caption := 'By Lalaji';
Button1 := TButton.Create(Mainfrm);
Button1.OnClick := @Usersetup;
Button1.Parent := Mainfrm;
Button1.Left := 20;
Button1.Top := 40;
Button1.Width := 120;
Button1.Height := 40;
Button1.Hint := 'Declaring Players';
Button1.Caption := 'Set - Up Players';
Button1.Font.Color := clWindowText;
Button1.Font.Height := -13;
Button1.Font.Name := 'MS Sans Serif';
Button1.Font.Style := [];
Button1.ParentFont := False;
Button1.TabOrder := 8;
Button2 := TButton.Create(Mainfrm);
Button2.OnClick:= @post
Button2.Parent := Mainfrm;
Button2.Left := 161;
Button2.Top := 40;
Button2.Width := 120;
Button2.Height := 40;
Button2.Hint := 'Suggestion/Progress report';
Button2.Caption := 'Post a comment';
Button2.Font.Color := clWindowText;
Button2.Font.Height := -13;
Button2.Font.Name := 'MS Sans Serif';
Button2.Font.Style := [];
Button2.ParentFont := False;
Button2.TabOrder := 9;
Button3 := TButton.Create(Mainfrm);
Button3.Parent := Mainfrm;
Button3.Left := 20;
Button3.Top := 90;
Button3.Width := 261;
Button3.Height := 41;
Button3.OnClick:= @startscript
Button3.Caption := 'Start Script';
Button3.Font.Color := clWindowText;
Button3.Font.Height := -27;
Button3.Font.Name := 'MS Reference Sans Serif';
Button3.Font.Style := [];
Button3.ParentFont := False;
Button3.TabOrder := 10;
end;

Procedure Setupform;
Begin
frmDesign := CreateForm;
frmDesign.Left := 478;
frmDesign.Top := 98;
frmDesign.Width := 501;
frmDesign.Height := 245;
frmDesign.Caption := 'Player Set-up';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
frmDesign.OnCloseQuery := @Close;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 10;
Label1.Top := 15;
Label1.Width := 50;
Label1.Height := 13;
Label1.Caption := 'UserName';
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 10;
Label2.Top := 58;
Label2.Width := 46;
Label2.Height := 13;
Label2.Caption := 'Password';
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 197;
Label3.Top := 8;
Label3.Width := 39;
Label3.Height := 13;
Label3.Caption := 'Player #';
LblUser := TLabel.Create(frmDesign);
LblUser.Parent := frmDesign;
LblUser.Left := 242;
LblUser.Top := 9;
LblUser.Width := 6;
LblUser.Height := 13;
LblUser.Caption := '0';
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 10;
Label4.Top := 101;
Label4.Width := 22;
Label4.Height := 13;
Label4.Caption := 'Nick';
Label5 := TLabel.Create(frmDesign);
Label5.Parent := frmDesign;
Label5.Left := 335;
Label5.Top := 15;
Label5.Width := 41;
Label5.Height := 13;
Label5.Caption := 'Location';
Label6 := TLabel.Create(frmDesign);
Label6.Parent := frmDesign;
Label6.Left := 335;
Label6.Top := 58;
Label6.Width := 36;
Label6.Height := 13;
Label6.Caption := 'Active?';
Label7 := TLabel.Create(frmDesign);
Label7.Parent := frmDesign;
Label7.Left := 335;
Label7.Top := 101;
Label7.Width := 66;
Label7.Height := 13;
Label7.Caption := 'Axe Wielded?';
EdUser := TEdit.Create(frmDesign);
EdUser.Parent := frmDesign;
EdUser.Left := 10;
EdUser.Top := 30;
EdUser.Width := 121;
EdUser.Height := 21;
EdUser.TabOrder := 0;
EdUser.Text := 'User Name';
Edpass := TEdit.Create(frmDesign);
Edpass.Parent := frmDesign;
Edpass.Left := 10;
Edpass.Top := 73;
Edpass.Width := 121;
Edpass.Height := 21;
Edpass.TabOrder := 1;
Edpass.Text := 'Password';
EdNick := TEdit.Create(frmDesign);
EdNick.Parent := frmDesign;
EdNick.Left := 10;
EdNick.Top := 116;
EdNick.Width := 121;
EdNick.Height := 21;
EdNick.TabOrder := 2;
EdNick.Text := 'New Nick';
Memo1 := TMemo.Create(frmDesign);
Memo1.Parent := frmDesign;
Memo1.Left := 141;
Memo1.Top := 30;
Memo1.Width := 185;
Memo1.Height := 106;
Memo1.Lines.Add('Set-Up Users Here.');
Memo1.TabOrder := 3;
edlocation := TEdit.Create(frmDesign);
edlocation.Parent := frmDesign;
edlocation.Left := 335;
edlocation.Top := 30;
edlocation.Width := 121;
edlocation.Height := 21;
edlocation.TabOrder := 4;
edlocation.Text := 'Bank';
cbActive := TCheckBox.Create(frmDesign);
cbActive.Parent := frmDesign;
cbActive.Left := 335;
cbActive.Top := 73;
cbActive.Width := 145;
cbActive.Height := 21;
cbActive.Caption := 'Active'
cbActive.TabOrder := 5;
cbActive.Checked := Players[0].Active;
ComboBox2 := TComboBox.Create(frmDesign);
ComboBox2.Parent := frmDesign;
ComboBox2.Left := 335;
ComboBox2.Top := 116;
ComboBox2.Width := 145;
ComboBox2.Height := 21;
ComboBox2.ItemHeight := 13;
ComboBox2.TabOrder := 6;
ComboBox2.Text := 'True';
ComboBox2.Items.Add('True');
ComboBox2.Items.Add('False');
GroupBox1 := TGroupBox.Create(frmDesign);
GroupBox1.Parent := frmDesign;
GroupBox1.Left := 20;
GroupBox1.Top := 143;
GroupBox1.Width := 451;
GroupBox1.Height := 53;
GroupBox1.Caption := 'Player Controls';
GroupBox1.TabOrder := 7;
btnBack := TButton.Create(GroupBox1);
btnBack.Parent := GroupBox1;
btnBack.Left := 14;
btnBack.Top := 18;
btnBack.Width := 75;
btnBack.Height := 25;
btnBack.Caption := '<----';
btnBack.TabOrder := 0;
btnBack.ONCLICK := @PressBackButton;
btnDelete := TButton.Create(GroupBox1);
btnDelete.Parent := GroupBox1;
btnDelete.Left := 114;
btnDelete.Top := 13;
btnDelete.Width := 87;
btnDelete.Height := 35;
btnDelete.Caption := 'Delete';
btnDelete.TabOrder := 1;
btnDelete.OnClick := @DeleteAPlayer;
btnCreate := TButton.Create(GroupBox1);
btnCreate.Parent := GroupBox1;
btnCreate.Left := 242;
btnCreate.Top := 13;
btnCreate.Width := 87;
btnCreate.Height := 35;
btnCreate.Caption := 'Create';
btnCreate.TabOrder := 2;
btnCreate.OnClick := @AddUser2;
btnNext := TButton.Create(GroupBox1);
btnNext.Parent := GroupBox1;
btnNext.Left := 360;
btnNext.Top := 18;
btnNext.Width := 75;
btnNext.Height := 25;
btnNext.Caption := '---->';
btnNext.TabOrder := 3;
btnNext.OnClick := @PressNextButton;
End;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('main', v);

end;
procedure ShowFormModal;
begin
Mainfrm.ShowModal;
end;

procedure afeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
procedure ShowSetup;
begin
frmDesign.ShowModal;
end;
// ----- Main Loop ----- \\
Begin
Siggy;
SetupSRL;
//LoadChar;
SafeInitForm;
AfeShowFormModal;
ActivateClient;
StartTime := TheTime ;
FindWindowBySize(766,504)
If (LoggedIn) Then Players[CurrentPlayer].Loc := 'Bank';
If Not (LoggedIn) Then LogInPlayer;
Repeat
Siggy;
If (Players[CurrentPlayer].Loc = 'Bank') Then
Begin
Wait(500);
ToWillows;
End;
If Players[CurrentPlayer].Loc = 'InWillows' Then
Begin
Wait(500);
CutWillows;
End;
If Players[CurrentPlayer].Loc = 'Loaded' Then
Begin
Wait(500);
ToBank;
End;
P := p + 1
If Players[CurrentPlayer].Loc = 'RToStore' Then
Begin
Wait(500);
BankTheLogs;
End;
Until(False);
End.

——————————————————
<!– END TEMPLATE: formanswers –>

MasterKill

2007-10-14 08:19:58

This is what we want to see! yes.

Hugolord

2007-10-14 08:21:44

yes from me maybe put some instructinos at the beginning of script and release it?

meh good enough for me yes.

Lalaji

2007-10-14 08:25:07

Oh yeah.. i havent done that yet. I still need to add a link (for the thread i release it at ) and put on me proggy button.

Thanks guys…

Rikje

2007-10-14 08:36:38

A lot of the script is form :p.

but imo you know enough to become a member. :)

Lalaji

2007-10-14 08:41:43

Thanks. Also forgot to mention its a draynor willow banker, lol. i think you figured it out though…

Santa_Clause

2007-10-14 09:11:57

To be honest it doesn't look that complicated. I'm holding my vote for now. Good job on this though.

MasterKill

2007-10-14 09:49:44

I found 1 small thing,

when you switch player, you do this:
Players[CurrentPlayer].Active := false;
NextPlayer(True);
that's not good couse you set the activety False, and then with the nextplayer you make it True again
It should be:
NextPlayer(False);

so it's like this:
NextPlayer(True); //switch player and make the 'activety' True
NextPlayer(False); //swithc player and make the 'activety' False

still great script, 1 of the best aply's I saw


EDIT:

olso found this now:
' : WC lvl = '+IntToStr(GetSkillLevel('Woodcutting')));

that's not working couse you can't get all wc levels when not all players are logged in =)
so if 1 player is logged in, it would get that wc level for all players

Lalaji

2007-10-14 10:18:47

Oh ok i get the nextplayer thing.

And about the wc lvl thing can i use this
GetAllLevels
Writeln( 'Level is : ' IntToStr(Players[x].level[20]))

Right?

Tim0suprem0

2007-10-14 11:55:13

From: Santa_Clause
To be honest it doesn't look that complicated. I'm holding my vote for now. Good job on this though.


Who said it needs to be complicated? He seems to know how to script. And he knows more about forms than I do! :p Yes from me.



From: lalaji
Oh ok i get the nextplayer thing.

And about the wc lvl thing can i use this
GetAllLevels
Writeln( 'Level is : ' IntToStr(Players[x].level[20]))

Right?
I'm pretty sure that works, but you could just do
Writeln( 'Level is : '+Inttostr(GetSkillLevel('Woodcutting')))

Tails111

2007-10-14 11:55:55

I am pretty sure you can.

MasterKill

2007-10-14 12:10:42

From: Tim0suprem0
I'm pretty sure that works, but you could just do
Writeln( 'Level is : '+Inttostr(GetSkillLevel('Woodcutting')))


I'm talking about the PlayerReport;
he is getting 1 of the same level for all players

Procedure Report;
Begin
For I := 0 to HowManyPlayers - 1 Do
Begin
WriteLn( (IntToStr(I))+' : '+Players.Name + ' : Loc = '+Players.Loc + ' : WC lvl = '+IntToStr(GetSkillLevel('Woodcutting')));
End;
End;

Macrosoft

2007-10-14 12:54:04

YES!

nice work, you should get in for sure

some mistakes (mentioned by masterkill) but still very nice script

GoF

2007-10-14 12:59:23

Meh. The form is almost identical to powerskills one? Atleast seems similar. Not sure if you copied stuff though.

E: Alot of form procedures etc. are exactly same or with a bit of editing than in powerskills.. Atleast some old version of powerskills..

the scar noob

2007-10-14 14:05:53

I agree with what GoF haave said, also it even doesn't compile due to OpenBank3; which isn't anymore in SRL..
Also, Duplicate Indentifier "SAVEPLAYERS" because of the new kick asPlayers.scar by Sumilion.

So I don't think so, holding my vote.

Macrosoft

2007-10-14 14:09:29

im starting to regret my vote…If he is one of those copy and edit people…

Lalaji

2007-10-14 15:15:16

I haven't looked at powerskills. But i have used it for a short period of time but that way before i even started making this script. I did like his player number idea as the username and pass label. Is that what you are talking about?

Negaal

2007-10-15 01:42:21

Looks good though, should work good, got failsafes, i like your plan B
if findsymbol('bank') or (dtm) then
mouse(x,y,0,0,true)
end else
findcolor(blahblah)
mouse(blahblah);


never been sure about it, does it work? colors changes a lot in each world

and this is kinda useless
Players[CurrentPlayer].Active := False;
NextPlayer(True);


should be:
nestplayer(false);



you have worked with it i think, if you fix some litle bugs then it should be good script ,yes

GoF

2007-10-15 05:55:34

I'll vote no, as so many parts are either by other people or too similar to powerskills, and those are pretty much the "best parts". Also, the script doesn't compile even though you say it's for SRL 4 you've used a procedure that isn't in SRL 4 meaning you probably haven't even tested this..?

BobboHobbo

2007-10-15 06:04:55

From: GoF
I'll vote no, as so many parts are either by other people or too similar to powerskills, and those are pretty much the "best parts". Also, the script doesn't compile even though you say it's for SRL 4 you've used a procedure that isn't in SRL 4 meaning you probably haven't even tested this..?


Mmm i agree with you.

Lalaji

2007-10-15 16:47:08

Dude, it compiles with srl 4 and scar 3.11.

I dont mean Srl #5 just srl 4 i have tested it.

WT-Fakawi

2007-10-16 10:01:39

In.