i am having problems with my form and i was hoping i could get some help
here is the problem
how can i get wat is in the form into setting in the script(hope that makes sense)for example get what is typed in the username box into the username spot in declare players
thanksCode:{ BBRI06's Draynor Willow Chopper VERSION 2 SETUP LINES 28-31 START BY DRAYNOR WILLOWS FEATURES 1. SOME ANTI RANDOMS THINGS TO ADD IN THE FEATURE } program autowcbankandchop; {.include SRL/SRL.scar} {.include/SRL/SRL/bank.scar} {.include/SRL/SRL/Core/Mouseflag.scar} {.include/SRL/SRL/Core/Object.scar} {.include/SRL/SRL/Core/Color.scar} {.include SRL/SRL/Skill/WoodCutting.scar} var a,b:integer; banked:integer; powerchop:boolean; bbri06form : TForm; username : TLabel; password : TLabel; timestobank : TLabel; nicknamelabel : TLabel; passwordbox : TEdit; startbutton : TButton; powerchopcheck : TCheckBox; timestobankbox : TEdit; usernamebox1 : TEdit; timestobankbox1 : TEdit; nicknamebox : TEdit; username1,password1,nickname1 : string; const banksymbol=4634589;//reset numbers fishingsymbol=16078084;//reset numbers bankdepositbox=6713464;//the grey color of the bank deposit box procedure ButtonClick(sender: TObject); begin WriteLn('You have clicked the button'); bbri06form.Caption:= bbri06form.Caption + '.'; bbri06form.ModalResult:= mrOk; end; procedure initform; begin bbri06form := CreateForm; bbri06form.Left := 566; bbri06form.Top := 112; bbri06form.Width := 375; bbri06form.Height := 151; bbri06form.Caption := 'SETUP BBRI06 DRAYNOR CHOPPER'; bbri06form.Color := clBtnFace; bbri06form.Font.Color := clWindowText; bbri06form.Font.Height := -11; bbri06form.Font.Name := 'MS Sans Serif'; bbri06form.Font.Style := []; bbri06form.Visible := false; bbri06form.PixelsPerInch := 96; username := TLabel.Create(bbri06form); username.Parent := bbri06form; username.Left := 22; username.Top := 17; username.Width := 61; username.Height := 13; username.Caption := ' username'; password := TLabel.Create(bbri06form); password.Parent := bbri06form; password.Left := 22; password.Top := 45; password.Width := 60; password.Height := 13; password.Caption := ' password'; timestobank := TLabel.Create(bbri06form); timestobank.Parent := bbri06form; timestobank.Left := 123; timestobank.Top := 74; timestobank.Width := 63; timestobank.Height := 13; timestobank.Caption := 'times to bank'; nicknamelabel := TLabel.Create(bbri06form); nicknamelabel.Parent := bbri06form; nicknamelabel.Left := 37; nicknamelabel.Top := 101; nicknamelabel.Width := 49; nicknamelabel.Height := 13; nicknamelabel.Caption := ' nickname'; passwordbox := TEdit.Create(bbri06form); passwordbox.Parent := bbri06form; passwordbox.Left := 93; passwordbox.Top := 40; passwordbox.Width := 121; passwordbox.Height := 21; passwordbox.TabOrder := 9; passwordbox.passwordchar:='*'; startbutton := TButton.Create(bbri06form); startbutton.Parent := bbri06form; startbutton.OnClick := @ButtonClick; startbutton.Left := 243; startbutton.Top := 19; startbutton.Width := 90; startbutton.Height := 35; startbutton.Caption := 'START!'; startbutton.TabOrder := 10; powerchopcheck := TCheckBox.Create(bbri06form); powerchopcheck.Parent := bbri06form; powerchopcheck.Left := 38; powerchopcheck.Top := 72; powerchopcheck.Width := 97; powerchopcheck.Height := 17; powerchopcheck.Caption := ' powercut?'; powerchopcheck.TabOrder := 11; timestobankbox := TEdit.Create(bbri06form); timestobankbox.Parent := bbri06form; timestobankbox.Left := 1101; timestobankbox.Top := -80; timestobankbox.Width := 18; timestobankbox.Height := 21; timestobankbox.TabOrder := 12; usernamebox1 := TEdit.Create(bbri06form); usernamebox1.Parent := bbri06form; usernamebox1.Left := 94; usernamebox1.Top := 13; usernamebox1.Width := 121; usernamebox1.Height := 21; usernamebox1.TabOrder := 14; timestobankbox1 := TEdit.Create(bbri06form); timestobankbox1.Parent := bbri06form; timestobankbox1.Left := 190; timestobankbox1.Top := 71; timestobankbox1.Width := 24; timestobankbox1.Height := 21; timestobankbox1.TabOrder := 13; nicknamebox := TEdit.Create(bbri06form); nicknamebox.Parent := bbri06form; nicknamebox.Left := 95; nicknamebox.Top := 96; nicknamebox.Width := 121; nicknamebox.Height := 21; nicknamebox.TabOrder := 14; nicknamebox.Text := '3 letters from username'; end; procedure SafeInitForm; var v: TVariantArray; begin setarraylength(V, 0); ThreadSafeCall('InitForm', v); end; procedure ShowFormModal; begin bbri06form.ShowModal; end; procedure SafeShowFormModal; var v: TVariantArray; begin setarraylength(V, 0); ThreadSafeCall('ShowFormModal', v); end; procedure setupall; begin username1:=usernamebox1.text; password1:=passwordbox.text; nickname1:=nicknamebox.text; if(powerchopcheck.state=cbchecked)then powerchop:=true; if(powerchopcheck.state=cbchecked)then powerchop:=false; end; Procedure DeclarePlayers; begin HowManyPlayers :=2; // Set Number of Players here. NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length; CurrentPlayer:=0; // CurrentPlayer = Array Index Players[0].Name :='username1'; Players[0].Pass :='password1'; Players[0].Nick :='nickname1'; Players[0].Active:=True; Players[1].Name :=''; Players[1].Pass :=''; Players[1].Nick :=''; Players[1].Active:=false; end; procedure setup; begin DeclarePlayers; LoginPlayer; end; procedure findtrees; begin setupsrl; activateclient; makecompass('west') if(findobj(a,b,'Deposit Bank Deposit Box',bankdepositbox,1))then mouse(a,b,10,10,true) wait(1000+random(100)) mouse(431,41,10,10,true) if(findmmcolor(a,b,fishingsymbol))then mouse(a,b,10,10,true) WaitTillFlag; if(findnormalrandoms)then srlrandomsreport; end; procedure bankfind; begin clickmmcolortol(banksymbol,50) WaitTillFlag if(findnormalrandoms)then srlrandomsreport; openbank3; deposit(2,28,2) closebank; bankscreen; if(bankscreen=false)and(powerchop=false)then banked:=banked+1 wait(1000+random(500)) begin findtrees; end if(bankscreen=true)and(powerchop=true)then wait(1000+random(500)) begin findtrees; end end; procedure drop; begin dropto(2,28) end; procedure chop; begin repeat findfight; if(findfight=true)then begin bankfind; end findobj(a,b,'Chop',3962992,1) mouse(a,b,20,20,true) wait(5000+random(1000)) findhead; if(findnormalrandoms)then srlrandomsreport; if(InChat('wc lvls') or InChat('wc lvls?') or InChat('woodcut lvls') or Inchat('woodcutting lvls'))then begin TypeSend(IntToStr(GetSkillLevel('woodcutting'))) end until(invfull) if(invfull=true)and(powerchop=false)then begin bankfind; end if(invfull=true)and(powerchop=true)then begin drop; end end; begin safeinitform; safeshowformmodal; setupsrl; repeat setup; chop; until(banked=1) writeln('-@-@-@-@-@-@-@-@-@-@-@-@-@-@') writeln('---BBRI06 DRAYNOR CHOPPER---') writeln('WORKED FOR :'+scripttime2(2)) writeln('BANKED '+inttostr(banked)+ ' TIME'); writeln('-@-@-@-@-@-@-@-@-@-@-@-@-@-@') end.
~bbri06





Reply With Quote





