SRL Archive - Help and Support

still getting this form error


RudeBoiAlex

2007-06-18 12:04:03

program Rudeboiautofighter;
{.include SRL/SRL.scar}
{---------------------------------------------------------------------------------------------

_____ __ ___________.__ .__ __
/ _ \ __ ___/ |_ ____\_ _____/|__| ____ | |___/ |_ ___________
/ /_\ \| | \ __\/ _ \| __) | |/ ___\| | \ __\/ __ \_ __ \
/ | \ | /| | ( <_> ) \ | / /_/ > Y \ | \ ___/| | \/
\____|__ /____/ |__| \____/\___ / |__\___ /|___| /__| \___ >__|
\/ A Poonage Production \/ /_____/ \/ \/
Thanks The_Rs_Monkey For Makeing My Forms Work.
Thanks Dark_Sniper For Lots Of Form Help.
----------------------------------------------------------------------------------------------}

Const
Loads = 10;//How Many Monsters To Kill Per Player.
NumberOfUsers = 5;//How Many Players Are You Using.
StartPlayer = 0;// What Player To Start Remember Theres A Player 0 Before 1.
BuryBones = True;//Do You Want To Bury Bones.
HpToEat = 30;//Hp to eat at.

var
frmDesign : TForm;
FoodToEat : TLabel;
Image1 : TImage;
FightStyle : TLabel;
Color1 : TEdit;
Color2 : TEdit;
Color3 : TEdit;
MonstersName : TEdit;
StartFighting : TButton;
Attack : TCheckBox;
Strength : TCheckBox;
Shared : TCheckBox;
Defence : TCheckBox;
Pick : TButton;
Select : TButton;
Choose : TButton;
Lobsters : TCheckBox;
Trout : TCheckBox;
Shrimp : TCheckBox;
Herring : TCheckBox;
NotEating : TCheckBox;

Procedure DeclarePlayers;
//If Not Using Any Left Over Players Delete There Forms.


Begin
HowManyPlayers:= NumberOfUsers;
NumberOfPlayers( HowManyPlayers );
CurrentPlayer := StartPlayer;


Players[0].Name :='Username';
Players[0].Pass :='Password';
Players[0].Nick :='3 Leters Of Youre Name';
Players[0].Integer1 := 5;//this is How many chickens to kill
Players[0].Active:=True;


Players[1].Name :='Username';
Players[1].Pass :='Password';
Players[1].Nick :='3 Leters Of Youre Name';
Players[1].Integer1 := 5;//this is How many chickens to kill
Players[1].Active:=True;


Players[2].Name :='Username';
Players[2].Pass :='Password';
Players[2].Nick :='3 Leters Of Youre Name';
Players[2].Integer1 := 5;//this is the loads!!
Players[2].Active:=True;


Players[3].Name :='Username';
Players[3].Pass :='Password';
Players[3].Nick :='3 Leters Of Youre Name';
Players[3].Integer1 := 5;//this is How many chickens to kill
Players[3].Active:=True;


Players[4].Name :='Username';
Players[4].Pass :='Password';
Players[4].Nick :='3 Leters Of Youre Name';
Players[4].Integer1 := 5;//this is How many chickens to kill
Players[4].Active:=True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
End;


Procedure Start;
Begin
Writeln('----------------------------------------------------------')
Writeln(' _ _ _ _ ')
Writeln(' | | | | (_) | | ')
Writeln(' _ __ _ _ __ | | ___| |__ ___ _ __ _| | _____ __ ')
Writeln(' | __| | | |/ _` |/ _ \ _ \ / _ \| |/ _ | |/ _ \ \/ / ')
Writeln(' | | | |_| | (_| | __/ |_) | (_) | | (_| | | __/> < ')
Writeln(' |_| \__,_|\__,_|\___|_.__/ \___/|_|\__,_|_|\___/_/\_\ ')
Writeln('----------------------------------------------------------')
Writeln(' You Are Using Rudebois AutoFighter ')
Writeln(' "£$%^Please Enjoy^%$£" ')
Writeln(' ---Post Proggies Please--- ')
Writeln('----------------------------------------------------------')
if (not(Loggedin)) then LoginPlayer;
SetChat('hide', 1);
DeclarePlayers;
End;


Procedure SetupForm;
Begin
frmDesign := CreateForm;
frmDesign.Left := 259;
frmDesign.Top := 115;
frmDesign.Width := 696;
frmDesign.Height := 480;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := True;
frmDesign.PixelsPerInch := 96;
FoodToEat := TLabel.Create(frmDesign);
FoodToEat.Parent := frmDesign;
FoodToEat.Left := 554;
FoodToEat.Top := 34;
FoodToEat.Width := 85;
FoodToEat.Height := 28;
FoodToEat.Hint := 'Tick the food you want to eat';
FoodToEat.Caption := 'FoodToEat';
FoodToEat.Font.Color := clTeal;
FoodToEat.Font.Height := -16;
FoodToEat.Font.Name := 'Segoe Print';
FoodToEat.Font.Style := [fsBold];
FoodToEat.ParentFont := False;
FoodToEat.ParentShowHint := False;
FoodToEat.ShowHint := True;
FoodToEat.WordWrap := True;
FightStyle := TLabel.Create(frmDesign);
FightStyle.Parent := frmDesign;
FightStyle.Left := 277;
FightStyle.Top := 188;
FightStyle.Width := 77;
FightStyle.Height := 13;
FightStyle.Caption := 'FightStyle';
FightStyle.Font.Color := clWindowText;
FightStyle.Font.Height := -11;
FightStyle.Font.Name := 'Copperplate Gothic Bold';
FightStyle.Font.Style := [fsBold];
FightStyle.ParentFont := False;
Color1 := TEdit.Create(frmDesign);
Color1.Parent := frmDesign;
Color1.Left := 28;
Color1.Top := 55;
Color1.Width := 121;
Color1.Height := 21;
Color1.Hint := 'First color of monster';
Color1.Font.Color := clTeal;
Color1.Font.Height := -11;
Color1.Font.Name := 'MS Sans Serif';
Color1.Font.Style := [];
Color1.ParentFont := False;
Color1.ParentShowHint := False;
Color1.ShowHint := True;
Color1.TabOrder := 8;
Color1.Text := 'Color1';
Color2 := TEdit.Create(frmDesign);
Color2.Parent := frmDesign;
Color2.Left := 28;
Color2.Top := 100;
Color2.Width := 121;
Color2.Height := 21;
Color2.Hint := 'Second color of monster';
Color2.Font.Color := clGreen;
Color2.Font.Height := -11;
Color2.Font.Name := 'MS Sans Serif';
Color2.Font.Style := [];
Color2.ParentFont := False;
Color2.ParentShowHint := False;
Color2.ShowHint := True;
Color2.TabOrder := 9;
Color2.Text := 'Color2';
Color3 := TEdit.Create(frmDesign);
Color3.Parent := frmDesign;
Color3.Left := 27;
Color3.Top := 141;
Color3.Width := 121;
Color3.Height := 21;
Color3.Hint := 'Third color of monster';
Color3.Font.Color := clGray;
Color3.Font.Height := -11;
Color3.Font.Name := 'MS Sans Serif';
Color3.Font.Style := [];
Color3.ParentFont := False;
Color3.ParentShowHint := False;
Color3.ShowHint := True;
Color3.TabOrder := 10;
Color3.Text := 'Color3';
MonstersName := TEdit.Create(frmDesign);
MonstersName.Parent := frmDesign;
MonstersName.Left := 27;
MonstersName.Top := 185;
MonstersName.Width := 121;
MonstersName.Height := 23;
MonstersName.Hint := 'Must include capital for first letter';
MonstersName.Font.Color := clRed;
MonstersName.Font.Height := -13;
MonstersName.Font.Name := 'Times New Roman';
MonstersName.Font.Style := [fsBold];
MonstersName.ParentFont := False;
MonstersName.ParentShowHint := False;
MonstersName.ShowHint := True;
MonstersName.TabOrder := 11;
MonstersName.Text := 'MonstersName';
StartFighting := TButton.Create(frmDesign);
StartFighting.Parent := frmDesign;
StartFighting.Left := 249;
StartFighting.Top := 326;
StartFighting.Width := 95;
StartFighting.Height := 43;
StartFighting.Caption := 'StartFighting';
StartFighting.Font.Color := clWindowText;
StartFighting.Font.Height := -13;
StartFighting.Font.Name := 'Sylfaen';
StartFighting.Font.Style := [fsBold];
StartFighting.ParentFont := False;
StartFighting.TabOrder := 12;
Attack := TCheckBox.Create(frmDesign);
Attack.Parent := frmDesign;
Attack.Left := 276;
Attack.Top := 207;
Attack.Width := 97;
Attack.Height := 17;
Attack.Caption := 'Attack';
Attack.TabOrder := 13;
Strength := TCheckBox.Create(frmDesign);
Strength.Parent := frmDesign;
Strength.Left := 276;
Strength.Top := 235;
Strength.Width := 97;
Strength.Height := 17;
Strength.Caption := 'Strength';
Strength.TabOrder := 14;
Shared := TCheckBox.Create(frmDesign);
Shared.Parent := frmDesign;
Shared.Left := 276;
Shared.Top := 269;
Shared.Width := 97;
Shared.Height := 17;
Shared.Caption := 'Shared';
Shared.TabOrder := 15;
Defence := TCheckBox.Create(frmDesign);
Defence.Parent := frmDesign;
Defence.Left := 276;
Defence.Top := 299;
Defence.Width := 97;
Defence.Height := 17;
Defence.Caption := 'Defence';
Defence.TabOrder := 16;
Pick := TButton.Create(frmDesign);
Pick.Parent := frmDesign;
Pick.Left := 154;
Pick.Top := 55;
Pick.Width := 75;
Pick.Height := 25;
Pick.Caption := 'Pick';
Pick.TabOrder := 17;
Select := TButton.Create(frmDesign);
Select.Parent := frmDesign;
Select.Left := 153;
Select.Top := 100;
Select.Width := 75;
Select.Height := 25;
Select.Caption := 'Select';
Select.TabOrder := 18;
Choose := TButton.Create(frmDesign);
Choose.Parent := frmDesign;
Choose.Left := 154;
Choose.Top := 142;
Choose.Width := 75;
Choose.Height := 25;
Choose.Caption := 'Choose';
Choose.TabOrder := 19;
Lobsters := TCheckBox.Create(frmDesign);
Lobsters.Parent := frmDesign;
Lobsters.Left := 549;
Lobsters.Top := 74;
Lobsters.Width := 97;
Lobsters.Height := 17;
Lobsters.Caption := 'Lobsters';
Lobsters.TabOrder := 20;
Trout := TCheckBox.Create(frmDesign);
Trout.Parent := frmDesign;
Trout.Left := 549;
Trout.Top := 105;
Trout.Width := 97;
Trout.Height := 17;
Trout.Caption := 'Trout';
Trout.TabOrder := 21;
Shrimp := TCheckBox.Create(frmDesign);
Shrimp.Parent := frmDesign;
Shrimp.Left := 549;
Shrimp.Top := 138;
Shrimp.Width := 97;
Shrimp.Height := 17;
Shrimp.Caption := 'Shrimp';
Shrimp.TabOrder := 22;
Herring := TCheckBox.Create(frmDesign);
Herring.Parent := frmDesign;
Herring.Left := 549;
Herring.Top := 167;
Herring.Width := 97;
Herring.Height := 17;
Herring.Caption := 'Herring';
Herring.TabOrder := 23;
NotEating := TCheckBox.Create(frmDesign);
NotEating.Parent := frmDesign;
NotEating.Left := 549;
NotEating.Top := 196;
NotEating.Width := 97;
NotEating.Height := 17;
NotEating.Caption := 'NotEating';
NotEating.TabOrder := 24;
End;


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


function ShowFormModal: Boolean;
begin
Result:= False;
if(frmDesign.ShowModal = mrOk)then
Result:= True;
end;


function SafeShowFormModal: Boolean;
var
v: TVariantArray;
begin
setarraylength(V, 0);
result:= ThreadSafeCall('ShowFormModal', v);
end;


Procedure EatLobbies;
Var
Checkbox1: TCheckbox;
Begin
If (GetHp < HpToEat) And (Checkbox1.checked) Then
Begin
If (FindColorTolerance(x,y,1334448,MIX1,MIY1,MIX2,MIY2,15)) Or
(FindColorTolerance(x,y,1733852,MIX1,MIY1,MIX2,MIY2,15)) Then
MMouse(x,y,1,1)
If (IsUpText('Eat')) Then
Mouse(x,y,1,1,True);
End;
End;


Procedure EatTrout;
Var
Checkbox2: TCheckbox;
Begin
If (GetHp < HpToEat) And (Checkbox2.checked) Then
Begin
If (FindColorTolerance(x,y,7501455,MIX1,MIY1,MIX2,MIY2,15)) Or
(FindColorTolerance(x,y,6580094,MIX1,MIY1,MIX2,MIY2,15)) Then
MMouse(x,y,1,1);
If(IsUpText('Eat')) Then
Mouse(x,y,1,1,True);
End;
End;


Procedure EatShrimp;
Var
Checkbox3: TCheckbox;
Begin
If (GetHp < HpToEat) And (Checkbox3.checked) Then
Begin
If (FindColorTolerance(x,y,1540542,MIX1,MIY1,MIX2,MIY2,15)) Or
(FindColorTolerance(x,y,1340330,MIX1,MIY1,MIX2,MIY2,15)) Then
MMouse(x,y,1,1);
If(IsUpText('Eat')) Then
Mouse(x,y,1,1,True);
End;
End;


Procedure EatHerring;
Var
Checkbox4: TCheckbox;
Begin
If (GetHp < HpToEat) And (Checkbox4.checked)Then
Begin
If(FindColorTolerance(x,y,7501455,MIX1,MIY1,MIX2,MIY2,15)) Or
(FindColorTolerance(x,y,9475766,MIX1,MIY1,MIX2,MIY2,15)) Then
MMouse(x,y,1,1);
If(IsUpText('Eat')) Then
Mouse(x,y,1,1,True);
End;
End;


Procedure NotEatingFood;
Var
Checkbox5: TCheckbox;
Begin
If(Checkbox5.checked) Then
Writeln('Not Eating')
End;


Procedure AllFood;
Begin
EatLobbies;
EatTrout;
EatShrimp;
EatHerring;
NotEatingFood;
End;


begin
SetupSRL;
safeInitForm;
SafeShowFormModal;
end.


[Runtime Error] : Exception: Cannot make a visible window modal in line 355 in script C:\Users\Alex\Desktop\Runescape\AutoFighter by rudeboialex.scar

Bobarkinator

2007-06-18 12:12:25

Change visible to false on line 125

RudeBoiAlex

2007-06-18 12:16:37

woot thanks

Dark_Sniper

2007-06-18 22:15:06

lol i told you that in my other post XD!!!

HAHAHAHA! :

# This forum requires that you wait 60 seconds between posts. Please try again in 1 seconds.


wow by one second that blows.

RudeBoiAlex

2007-06-19 11:32:27

lol i didnt get wat u ment

Jagex_Fagex

2007-06-22 23:45:53

lol, if you read the help file with SCAR (f1) it explains the basic troubles you might go through, so if you need anything to work urgently check it there, or add someone on MSN :)

RudeBoiAlex

2007-06-23 04:41:47

thanks i got bobark on msn hes a great help :)