SRL Archive - OSR Help

Applying Forms To my script?HElp!


wtf i sp4nk

2007-01-06 13:22:50

Well im curently working on my new authothiever (man melister) and i cnat quite figure out how to make the forms into the script Here are the 3 things entered into forms……

UserName and Password i put a text box to enter username and pass i normaly use declare players so would i have to make my own login procedure?

Active? I made a box that drops down with two options to choose wether players active true or false i stilll dont get how to apply this to the player array and its only 1 user

What to pickpocket? is another drop down box with 3 options and i cnat figure out how to make it say if it chooses guard then go to procedure pickpocket guard or if it chooses paladin go to procedure pickpocket paladin

I also added what normaly would be a variable which is how many times to pickpocket i cnat figure out how to declare this as a const and then make it put numbers entered as the amount to pickpocket.



Heres script i know all thats there is the forms and antiban ;)

program Man_Melestir;

{.include SRL\SRL.scar}

////Colors//////////
const //
ManColor=55; //
ManColor1=55; //
ManColor2=55; //
GuardColor=55; //
GuardColor1=55; //
GuardColor2=55; //
PaladinColor=55; //
PaladinColor1=55; //
PaladinColor2=55; //
////////////////////
var
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Edit1 : TEdit;
Edit2 : TEdit;
ComboBox1 : TComboBox;
ComboBox2 : TComboBox;
Button1 : TButton;
Edit3 : TEdit;
Username, Password : String;
PlayerActive : Boolean;


procedure ButtonClick(sender: TObject);
begin
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:=;
end;

procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 370;
frmDesign.Height := 423;
frmDesign.Caption := 'Wtf I Sp4nk'#39's Man Melister';
frmDesign.Color := clTeal;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 13;
Label1.Top := 14;
Label1.Width := 343;
Label1.Height := 37;
Label1.Caption := 'Sp4nk'#39's Man Melister';
Label1.Font.Color := clWindowText;
Label1.Font.Height := -32;
Label1.Font.Name := 'MS Sans Serif';
Label1.Font.Style := [fsBold, fsItalic];
Label1.ParentFont := False;
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 19;
Label2.Top := 89;
Label2.Width := 72;
Label2.Height := 16;
Label2.Caption := 'Username';
Label2.Font.Color := clWindowText;
Label2.Font.Height := -13;
Label2.Font.Name := 'MS Sans Serif';
Label2.Font.Style := [fsBold];
Label2.ParentFont := False;
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 19;
Label3.Top := 126;
Label3.Width := 73;
Label3.Height := 16;
Label3.Caption := 'PassWord';
Label3.Font.Color := clWindowText;
Label3.Font.Height := -13;
Label3.Font.Name := 'MS Sans Serif';
Label3.Font.Style := [fsBold];
Label3.ParentFont := False;
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 11;
Label4.Top := 271;
Label4.Width := 165;
Label4.Height := 16;
Label4.Caption := 'How Many To Thieve?';
Label4.Font.Color := clWindowText;
Label4.Font.Height := -13;
Label4.Font.Name := 'MS Sans Serif';
Label4.Font.Style := [fsBold, fsItalic];
Label4.ParentFont := False;
Edit1 := TEdit.Create(frmDesign);
Edit1.Parent := frmDesign;
Edit1.Left := 96;
Edit1.Top := 90;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 8;
Edit1.Text := 'Edit1';
Edit2 := TEdit.Create(frmDesign);
Edit2.Parent := frmDesign;
Edit2.Left := 96;
Edit2.Top := 123;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 9;
Edit2.Text := 'Edit2';
ComboBox1 := TComboBox.Create(frmDesign);
ComboBox1.Parent := frmDesign;
ComboBox1.Left := 19;
ComboBox1.Top := 179;
ComboBox1.Width := 153;
ComboBox1.Height := 21;
ComboBox1.ItemHeight := 13;
ComboBox1.TabOrder := 10;
ComboBox1.Text := 'Active?';
ComboBox1.Items.Add('True');
ComboBox1.Items.Add('False');
ComboBox2 := TComboBox.Create(frmDesign);
ComboBox2.Parent := frmDesign;
ComboBox2.Left := 186;
ComboBox2.Top := 180;
ComboBox2.Width := 160;
ComboBox2.Height := 21;
ComboBox2.ItemHeight := 13;
ComboBox2.TabOrder := 11;
ComboBox2.Text := 'Who to Thieve?';
ComboBox2.Items.Add('Men');
ComboBox2.Items.Add('Guards');
ComboBox2.Items.Add('Paladins');
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.OnClick := @ButtonClick;
Button1.Left := 127;
Button1.Top := 336;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Start!';
Button1.TabOrder := 12;
Edit3 := TEdit.Create(frmDesign);
Edit3.Parent := frmDesign;
Edit3.Left := 183;
Edit3.Top := 268;
Edit3.Width := 121;
Edit3.Height := 21;
Edit3.TabOrder := 13;
Edit3.Text := 'Edit3';
end;

procedure SetupAll;
begin
Username := Edit1.Text;
Password := Edit2.Text;
case ComboBox1.Text of
'True' : PlayerActive := True;
'False' : PlayerActive := True;
end;
SaveSetting('UserPassSaver', 'Username', Edit1.Text);
SaveSetting('UserPassSaver', 'Password', Edit2.Text);
SaveSetting('UserPassSaver', 'Active', ComboBox1.Text);
end;


procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;





Procedure beginscript;
Begin
cleardebug
DisguiseScar('Limewire:Enabling Walk It Out');
Writeln(' /==\ /==\ /| | | | / ')
Writeln('/ | | / | |\ | | / ')
Writeln('\===\ |__/ |__| | \ | |< ')
Writeln(' / | | | \| | \ ')
Writeln('\==/ | | | | | \ ')
Writeln('--->First Release')
Writeln('--->Man Melestir by WTF I SP4NK')
Writeln('--->Use in enclosed areas')
Writeln('--->Contact Me At [email]crazyirishman84@hotmail.com[/email]')
HighestAngle;
End;

Procedure Ban;
var
NoBan : Integer;
begin
if ( not ( LoggedIn )) then Exit;
NoBan:=Random(120)
case NoBan of
1: RandomRClickEvery(2 + Random(30));
2: hoverskill('Thieving', false);
3: hoverskill('random', false);
4: DoEmote(1 + Random(20));
5: BoredEvery(9 + Random (21));
6: PickUpMouse;
7: LeaveScreenEvery(10 + Random(5));
8: RotateEvery(20 + Random(5));
end;
end;













begin
setupsrl;
SafeInitForm;
SafeShowFormModal;
SetupAll;
WriteLn('Active = ' + Combobox1.Text);
WriteLn('Username = ' + Username);
WriteLn('Password = ' + Password);
beginscript;
end.

Pentti

2007-01-06 13:27:26

{.include SRL\SRL.scar}

////Colors//////////
const //
ManColor=55; //
ManColor1=55; //
ManColor2=55; //
GuardColor=55; //
GuardColor1=55; //
GuardColor2=55; //
PaladinColor=55; //
PaladinColor1=55; //
PaladinColor2=55; //
////////////////////
var
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Edit1 : TEdit;
Edit2 : TEdit;
ComboBox1 : TComboBox;
ComboBox2 : TComboBox;
Button1 : TButton;
Edit3 : TEdit;
Username, Password : String;
PlayerActive : Boolean;


procedure ButtonClick(sender: TObject);
begin
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:=MrOk;
end;

procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 370;
frmDesign.Height := 423;
frmDesign.Caption := 'Wtf I Sp4nk'#39's Man Melister';
frmDesign.Color := clTeal;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 13;
Label1.Top := 14;
Label1.Width := 343;
Label1.Height := 37;
Label1.Caption := 'Sp4nk'#39's Man Melister';
Label1.Font.Color := clWindowText;
Label1.Font.Height := -32;
Label1.Font.Name := 'MS Sans Serif';
Label1.Font.Style := [fsBold, fsItalic];
Label1.ParentFont := False;
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 19;
Label2.Top := 89;
Label2.Width := 72;
Label2.Height := 16;
Label2.Caption := 'Username';
Label2.Font.Color := clWindowText;
Label2.Font.Height := -13;
Label2.Font.Name := 'MS Sans Serif';
Label2.Font.Style := [fsBold];
Label2.ParentFont := False;
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 19;
Label3.Top := 126;
Label3.Width := 73;
Label3.Height := 16;
Label3.Caption := 'PassWord';
Label3.Font.Color := clWindowText;
Label3.Font.Height := -13;
Label3.Font.Name := 'MS Sans Serif';
Label3.Font.Style := [fsBold];
Label3.ParentFont := False;
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 11;
Label4.Top := 271;
Label4.Width := 165;
Label4.Height := 16;
Label4.Caption := 'How Many To Thieve?';
Label4.Font.Color := clWindowText;
Label4.Font.Height := -13;
Label4.Font.Name := 'MS Sans Serif';
Label4.Font.Style := [fsBold, fsItalic];
Label4.ParentFont := False;
Edit1 := TEdit.Create(frmDesign);
Edit1.Parent := frmDesign;
Edit1.Left := 96;
Edit1.Top := 90;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 8;
Edit1.Text := 'Edit1';
Edit2 := TEdit.Create(frmDesign);
Edit2.Parent := frmDesign;
Edit2.Left := 96;
Edit2.Top := 123;
Edit2.Width := 121;
Edit2.Height := 21;
Edit2.TabOrder := 9;
Edit2.Text := 'Edit2';
ComboBox1 := TComboBox.Create(frmDesign);
ComboBox1.Parent := frmDesign;
ComboBox1.Left := 19;
ComboBox1.Top := 179;
ComboBox1.Width := 153;
ComboBox1.Height := 21;
ComboBox1.ItemHeight := 13;
ComboBox1.TabOrder := 10;
ComboBox1.Text := 'Active?';
ComboBox1.Items.Add('True');
ComboBox1.Items.Add('False');
ComboBox2 := TComboBox.Create(frmDesign);
ComboBox2.Parent := frmDesign;
ComboBox2.Left := 186;
ComboBox2.Top := 180;
ComboBox2.Width := 160;
ComboBox2.Height := 21;
ComboBox2.ItemHeight := 13;
ComboBox2.TabOrder := 11;
ComboBox2.Text := 'Who to Thieve?';
ComboBox2.Items.Add('Men');
ComboBox2.Items.Add('Guards');
ComboBox2.Items.Add('Paladins');
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.OnClick := @ButtonClick;
Button1.Left := 127;
Button1.Top := 336;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Start!';
Button1.TabOrder := 12;
Edit3 := TEdit.Create(frmDesign);
Edit3.Parent := frmDesign;
Edit3.Left := 183;
Edit3.Top := 268;
Edit3.Width := 121;
Edit3.Height := 21;
Edit3.TabOrder := 13;
Edit3.Text := 'Edit3';
end;

procedure SetupAll;
begin
Username := Edit1.Text;
Password := Edit2.Text;
case ComboBox1.Text of
'True' : PlayerActive := True;
'False' : PlayerActive := True;
end;
SaveSetting('UserPassSaver', 'Username', Edit1.Text);
SaveSetting('UserPassSaver', 'Password', Edit2.Text);
SaveSetting('UserPassSaver', 'Active', ComboBox1.Text);
end;


procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;





Procedure beginscript;
Begin
cleardebug
DisguiseScar('Limewire:Enabling Walk It Out');
Writeln(' /==\ /==\ /| | | | / ')
Writeln('/ | | / | |\ | | / ')
Writeln('\===\ |__/ |__| | \ | |< ')
Writeln(' / | | | \| | \ ')
Writeln('\==/ | | | | | \ ')
Writeln('--->First Release')
Writeln('--->Man Melestir by WTF I SP4NK')
Writeln('--->Use in enclosed areas')
Writeln('--->Contact Me At <a href="mailto:crazyirishman84@hotmail.com">crazyirishman84@hotmail.com</a>')
HighestAngle;
End;

Procedure Ban;
var
NoBan : Integer;
begin
if ( not ( LoggedIn )) then Exit;
NoBan:=Random(120)
case NoBan of
1: RandomRClickEvery(2 + Random(30));
2: hoverskill('Thieving', false);
3: hoverskill('random', false);
4: DoEmote(1 + Random(20));
5: BoredEvery(9 + Random (21));
6: PickUpMouse;
7: LeaveScreenEvery(10 + Random(5));
8: RotateEvery(20 + Random(5));
end;
end;













begin
setupsrl;
SafeInitForm;
SafeShowFormModal;
SetupAll;
WriteLn('Active = ' + Combobox1.Text);
WriteLn('Username = ' + Username);
WriteLn('Password = ' + Password);
beginscript;
end.
Here you go. See line 34. :D

Ron

2007-01-06 14:11:39

Add this at the end of your InitForm; so that the password comes up as *******.

Edit2.PasswordChar := *;

~Ron :)

wtf i sp4nk

2007-01-06 14:25:15

thnx for the help but how do i save the variables? such as i want the script to work

until(# of pickpocketed=>pickpockted)

How do i tell the script the number of people the person wanted pickpocketed from the forms where they entered number?
Also how do i make it go to a certain procedure in the script form the user choosing the drop down option of like paladin or man?

WhiteShadow

2007-01-06 16:29:21

procedure ButtonClick(sender: TObject);
begin
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:=MrOk;
end;

Ok so you got down end form when script starts. So make an Edit box for the user to input the number to pickpocket.

PickPocketLimit:= StrToInt(Edit2.Text);


So make a new variable to hold the value then do String to Integer(forms are always string values) of Edit2.Text, or whatever your Edit box was called.

procedure ButtonClick(sender: TObject);
begin
frmDesign.ModalResult:=MrOk;
PickPocketLimit:= StrToInt(Edit2.Text);
end;

Edit and for 2nd question, easy. Set up a combo box and add 'paladin' and 'man'

Then you would do something like this. TypeOfMan.Text would equal what the user selected.

if(TypeOfMan.Text = 'paladin')then 
StealFromPaladin;
if(TypeOfMan.Text = 'man')then
StealFromMan;

wtf i sp4nk

2007-01-06 18:17:36

thnx white shadow that helped a ton i dont have time to update till later tongiht so ill post if i get any more problems thnx every1 :)