program newerLapeFisher; {$DEFINE SMART} {$DEFINE FISHER} {$i Reflection/Reflection.Simba} {$i [Reflection] ineedbot's functions.simba} const Version = 6.01; PicturePage = 'http://pastebin.com/raw/xX7dC2tk'; ScriptPage = 'https://raw.githubusercontent.com/ineedbots/Scripts/master/%5BReflection%5D%20ineedbot''s%20AIO%20Fisher.simba'; Widget_Cook_Container = 307; Cook_Options = 4; //Feel free to use code, MAKE SURE TO GIVE CREDIT WHERE DUE! -ineedbot type TreeObject = record Tile : TPoint; Offset : array[0..2] of integer; TileOffset : array[0..1] of integer; AliveIDs, DeadIDs : TIntegerArray; Options : TStringArray; Name : String; Plane : integer; end; type BankLocation = record Tile : TPoint; Name : String; Plane : integer; Offset : array[0..2] of integer; TileOffset : array[0..1] of integer; Options : TStringArray; end; type FireLocation = record Tile : TPoint; Name : String; Plane : integer; Offset : array[0..2] of integer; TileOffset : array[0..1] of integer; Options : TStringArray; end; type workedFish = record caught, ID, price : integer; end; type BankNPC = record Locations : TPointArray; Options, Names : TStringArray; IDs : TIntegerArray; Plane : Integer; Offset : array[0..2] of integer; end; type FishNPC = record IDs, AnimationIDs, EquipmentIDs, BaitIDs : TIntegerArray; RawFishes, CookedFishes, BurntFishes : array of workedFish; Options, Names : TStringArray; Locations : TPointArray; Plane : integer; end; type Location = record Name : string; RunDirections : TStringArray; ID : integer; canCook, canBank, isDynamic, isSell : boolean; PathToBank, PathToFish : TPointArray; customIDs : array of TIntegerArray; customTPAs : array of TPointArray; FishNPCs : array of FishNPC; FireLocations : array of FireLocation; BankLocations : array of BankLocation; TreeObjects : array of TreeObject; DoorObjects : array of TReflectDoor; BankNPCs : array of BankNPC; end; var graphicOpti: TMufasaBitmap; statsServer: TStats; daLocation: Location; statsTimer,LastXPCheck: TReflectTimer; fireOptions: TStringArray; playNum,job,RunAmount,AmountAmount,cpuLoadOften,cpuLoadWait, updateScreenOften,ItemCheckDistance,deadObjID,statsProfit,statsFishXP, statsTime,statsCookXP,statsFireXP,statsAgilXP,statsSTRxp, statsWoodXP,FishspotIndice,nullINT,startFishXP,startFishLevel,startCookXP, startAgilXp,startStrXp,startWoodXp,LastXPXP,StartFireXP: integer; WorldList,CookingAnimationIDs,FiremakingAnimationIDs,WoodcuttingAnimationIDs, AxeIDs,TinderIDs,CoinsIDs,KnifeIDs,FireIDs,LogIDs: TIntegerArray; started,loading,saving,MouseKeys,DisableBank,DisableCook,useBreaks, dropOnly,useStats: boolean; sdrop,sbrin,sbreak,sbin,sbrfor,sbfor,swait,schat,sname,spass,spin,samount, sloc,stype,santi,srun,sworld,scook,sbank,smouse,ssound,schatt,swaitt,swaito, supdatet,sscreent,slchatt,slevelt,scloset,sdismisst,sitemd,scriptstatus: string; TFormMain,TFormBreak,TFormExtra: TForm; TLabelPin,TLabelWorld,TLabelRun,TLabelAnti,TLabelAmount,TLabelPlayNum, TLabelbIn,TLabelbrIn,TLabelbFor,TLabelItemDis,TLabelLookForChatTime, TLabelCloseTime,TLabelLevelUpTime,TLabelUpdateTime,TLabelDismissTime, TLabelWaitTime,TLabelWaitOften,TLabelbrFor,TLabelScreenTime,TLabelSound, TLabelChatTime: TLabel; TEditUser,TEditPass,TEditPin,TEditWorld,TEditRun,TEditAnti,TEditAmount, TEditPlayNum,TEditbIn,TEditbrIn,TEditItemDis,TEditLookForChatTime, TEditCloseTime,TEditLevelUpTime,TEditUpdateTime,TEditDismissTime, TEditWaitTime,TEditWaitOften,TEditbFor,TEditbrFor,TEditScreenTime, TEditSound,TEditChatTime: TEdit; TButtonPlay,TButtonLoad,TButtonSave,TButtonBreak,TButtonExtra: TButton; TCheckBoxBreak,TCheckBoxTalk,TCheckBoxWait,TCheckBoxMouse,TCheckBoxCook, TCheckBoxBank,TCheckBoxDropOnly: TCheckBox; TComboBoxLoc,TComboBoxType: TComboBox; TMainImage: TImage; TMainBMP: TBitmap; procedure doUpdate; //thanks shuttleu var NetworkVersion : extended; FileNew, script : string; ThisFile : integer; begin if DirectoryExists(ScriptPath + '.git\') then exit; script := Reflect.Misc.GetPage(scriptPage); try NetworkVersion := strToFloat(between('Version = ', ';', script)); except begin daLogger.Error('Failed get update version.', []); exit; end; end; daLogger.Status('ineedbot''s Fisher: Local Version: '+FloatToStr(Version)+' Network Version: '+FloatToStr(NetworkVersion), []); if(Version < NetworkVersion)then begin FileNew := ScriptPath + '[Reflection] ineedbot''s AIO Fisher.simba'; ThisFile := Rewritefile(FileNew, true); try WriteFileString(ThisFile, script); except begin daLogger.Error('Failed writing to: '+FileNew, []); CloseFile(ThisFile); exit; end; end; CloseFile(ThisFile); daLogger.Status('Successfully downloaded new script to '+FileNew+'. Please reopen this script.', []); TerminateScript; end else begin if(Version = NetworkVersion)then begin end else begin end; end; end; procedure YourClickProcedure(Sender: TObject); {$IFNDEF CODEINSIGHT} native; {$ENDIF} begin case sender of TButtonBreak:begin TFormBreak.ShowModal(); end; TButtonExtra:begin TFormExtra.ShowModal(); end; TButtonPlay:begin started := true; TFormMain.Close; end; TButtonLoad:begin loading := true; TFormMain.Close; end; TButtonSave:begin schat := tostr(TCheckBoxTalk.getstate); swait := tostr(TCheckBoxWait.getstate); sname := TEditUser.Gettext; spass := TEditPass.gettext; spin := TEditPin.gettext; samount := TEditAmount.gettext; stype := tostr(TComboBoxType.getitemindex); sloc := tostr(TComboBoxLoc.getitemindex); santi := TEditAnti.gettext; srun := TEditRun.gettext; sworld := TEditWorld.gettext; scook := tostr(TCheckBoxCook.getstate); sbank := tostr(TCheckBoxBank.getstate); smouse := tostr(TCheckBoxMouse.getstate); sbreak := tostr(TCheckBoxBreak.getstate); sbfor := TEditbFor.gettext; sbrfor := TEditbrFor.gettext; sbin := TEditbin.gettext; sbrin := TEditbrin.gettext; ssound := TEditSound.getText; sdismisst := TEditDismissTime.getText; slchatt := TEditLookForChatTime.getText; schatt := TEditChatTime.getText; supdatet := TEditUpdateTime.getText; sscreent := TEditScreenTime.getText; slevelt := TEditLevelUpTime.getTExt; swaitt := TEditWaitTime.getText; swaito := TEditWaitOften.getText; scloset := TEditCloseTime.getTExt; sitemd := TEditItemDis.getText; sdrop := tostr(TCheckBoxDropOnly.getstate); saving := true; TFormMain.Close; end; end; end; procedure _OnChange2; var i : integer; begin TComboBoxType.Clear; TComboBoxType.setText('Type of fish:'); i := -1; case TComboBoxLoc.getItemIndex of (i:=i+1):begin//draynor TComboBoxType.AddItem('Small net (cook) (bank)', nil); TComboBoxType.AddItem('Bait (cook) (bank)', nil); end; (i:=i+1):begin//Barb TComboBoxType.AddItem('Lure (cook) (bank)', nil); TComboBoxType.AddItem('Bait (cook) (bank)', nil); end; (i:=i+1):begin//fishg TComboBoxType.AddItem('Big net (cook) (bank)', nil); TComboBoxType.AddItem('Cage (cook) (bank)', nil); TComboBoxType.AddItem('Harpoon (cook) (bank)', nil); TComboBoxType.AddItem('Harpoon (shark) (cook) (bank)', nil); end; (i:=i+1):begin//cather TComboBoxType.AddItem('Small net (cook) (bank)', nil); TComboBoxType.AddItem('Bait (cook) (bank)', nil); TComboBoxType.AddItem('Big net (cook) (bank)', nil); TComboBoxType.AddItem('Cage (cook) (bank)', nil); TComboBoxType.AddItem('Harpoon (cook) (bank)', nil); TComboBoxType.AddItem('Harpoon (shark) (cook) (bank)', nil); end; (i:=i+1):begin//karm TComboBoxType.AddItem('Cage (cook) (bank)', nil); TComboBoxType.AddItem('Harpoon (cook) (bank)', nil); TComboBoxType.AddItem('Small net (cook) (sell)', nil); TComboBoxType.AddItem('Bait (cook) (sell)', nil); TComboBoxType.AddItem('Cage (cook) (sell)', nil); TComboBoxType.AddItem('Harpoon (cook) (sell)', nil); TComboBoxType.AddItem('Proggresive fishing', nil); end; (i:=i+1):begin//rasolo TComboBoxType.AddItem('Lure (cook) (sell)', nil); TComboBoxType.AddItem('Bait (cook) (sell)', nil); end; (i:=i+1):begin//Shilo TComboBoxType.AddItem('Lure (bank)', nil); TComboBoxType.AddItem('Bait (bank)', nil); end; (i:=i+1):begin//otto TComboBoxType.AddItem('Heavy Rod (knife)', nil); end; (i:=i+1):begin//pic TComboBoxType.AddItem('Small net (bank)', nil); TComboBoxType.AddItem('Harpoon (bank)', nil); end; (i:=i+1):begin//zul TComboBoxType.AddItem('Sacred Eels (knife)', nil); end; (i:=i+1):begin//power TComboBoxType.AddItem('Small net', nil); end; end; end; procedure breakCheck; begin TButtonBreak.setEnabled(toStr(TCheckBoxBreak.getState) = 'cbChecked'); end; procedure OnChange(Sender: TObject); {$IFNDEF CODEINSIGHT} native; {$ENDIF} begin _OnChange2; end; procedure brakeHandle(Sender: TObject); {$IFNDEF CODEINSIGHT} native; {$ENDIF} begin breakCheck; end; procedure OnlyPostiveNumbers(Sender: TObject; var Key:Char); {$IFNDEF CODEINSIGHT} native; {$ENDIF} begin case toStr(key) of #8, '0'..'9':begin end; else begin Key := #0; end; end; end; procedure OnlyNumbers(Sender: TObject; var Key: Char); {$IFNDEF CODEINSIGHT} native; {$ENDIF} var _sender : TEdit; begin _sender := sender; case toStr(key) of #8, '0'..'9', '-':begin if(toStr(key) = '-')then begin if(_sender.getSelStart <> 0)then begin Key := #0; end; end; end; else begin Key := #0; end; end; end; procedure NoKeys(Sender: TObject; var Key: Char); {$IFNDEF CODEINSIGHT} native; {$ENDIF} begin Key := #0; end; procedure OnlyPostiveNumbers2(Sender: TObject; var Key:Char); {$IFNDEF CODEINSIGHT} native; {$ENDIF} begin case toStr(key) of #8, ',', '0'..'9':begin end; else begin Key := #0; end; end; end; procedure InitForm; var tempFont : TFont; begin tempFont.Init; tempFont.setColor(0); //TFormMain\\ TFormMain.Init(nil); with TFormMain do begin SetCaption('ineedbot''s AIO Fisher'); setBorderStyle(bsSingle); SetBounds(0,0,374,208); SetPosition(poScreenCenter); end; TMainImage.init(TFormMain); with TMainImage do begin setParent(TFormMain); SetBounds(0,0,374,208); setPicture(TMainBMP); end; //TLabelPin\\ TLabelPin.Init(TFormMain); with TLabelPin do begin SetParent(TFormMain); SetCaption('Pin:'); SetBounds(2,57,53,16); setFont(tempFont); end; //TLabelWorld\\ TLabelWorld.Init(TFormMain); with TLabelWorld do begin SetParent(TFormMain); SetCaption('World:'); SetBounds(2,82,68,16); setFont(tempFont); end; //TLabelRun\\ TLabelRun.Init(TFormMain); with TLabelRun do begin SetParent(TFormMain); SetCaption('When to run:'); SetBounds(2,107,57,16); setFont(tempFont); end; //TLabelAnti\\ TLabelAnti.Init(TFormMain); with TLabelAnti do begin SetParent(TFormMain); SetCaption('Antiban often:'); SetBounds(2,132,58,16); setFont(tempFont); end; //TLabelAmount\\ TLabelAmount.Init(TFormMain); with TLabelAmount do begin SetParent(TFormMain); SetCaption('Amount to fish:'); SetBounds(2,157,80,16); setFont(tempFont); end; //TLabelPlayNum\\ TLabelPlayNum.Init(TFormMain); with TLabelPlayNum do begin SetParent(TFormMain); SetCaption('Player number:'); SetBounds(116,182,85,16); setFont(tempFont); end; //TEditUser\\ TEditUser.Init(TFormMain); with TEditUser do begin SetParent(TFormMain); SetText('Username or email'); SetBounds(2,27,219,23); setFont(tempFont); end; //TEditPass\\ TEditPass.Init(TFormMain); with TEditPass do begin SetParent(TFormMain); SetText('Password'); SetBounds(225,27,147,23); setFont(tempFont); setPasswordChar('*'); setMaxLength(20); end; //TEditPin\\ TEditPin.Init(TFormMain); with TEditPin do begin SetParent(TFormMain); SetText(''); SetBounds(26,52,36,23); setFont(tempFont); setPasswordChar('*'); setMaxLength(4); setONKEYPRESS(OnlyPostiveNumbers); end; //TEditWorld\\ TEditWorld.Init(TFormMain); with TEditWorld do begin SetParent(TFormMain); SetText(''); SetBounds(40,77,80,23); setFont(tempFont); setONKEYPRESS(OnlyPostiveNumbers2); end; //TEditRun\\ TEditRun.Init(TFormMain); with TEditRun do begin SetParent(TFormMain); SetText('75'); SetBounds(75,102,30,23); setFont(tempFont); setMaxLength(3); setONKEYPRESS(OnlyPostiveNumbers); end; //TEditAnti\\ TEditAnti.Init(TFormMain); with TEditAnti do begin SetParent(TFormMain); SetText('1000'); SetBounds(82,127,48,23); setFont(tempFont); setMaxLength(6); setONKEYPRESS(OnlyPostiveNumbers); end; //TEditAmount\\ TEditAmount.Init(TFormMain); with TEditAmount do begin SetParent(TFormMain); SetText('-1'); SetBounds(88,152,48,23); setFont(tempFont); setMaxLength(6); setONKEYPRESS(OnlyPostiveNumbers); end; //TEditPlayNum\\ TEditPlayNum.Init(TFormMain); with TEditPlayNum do begin SetParent(TFormMain); SetText('0'); SetBounds(200,180,20,23); setFont(tempFont); setMaxLength(2); setONKEYPRESS(OnlyPostiveNumbers); end; //TButtonPlay\\ TButtonPlay.Init(TFormMain); with TButtonPlay do begin SetParent(TFormMain); SetCaption('Play'); SetBounds(296,180,75,25); setFont(tempFont); setOnClick(YourClickProcedure); end; //TButtonLoad\\ TButtonLoad.Init(TFormMain); with TButtonLoad do begin SetParent(TFormMain); SetCaption('Load'); SetBounds(2,180,50,25); setFont(tempFont); setOnClick(YourClickProcedure); end; //TButtonSave\\ TButtonSave.Init(TFormMain); with TButtonSave do begin SetParent(TFormMain); SetCaption('Save'); SetBounds(54,180,50,25); setFont(tempFont); setOnClick(YourClickProcedure); end; //TButtonBreak\\ TButtonBreak.Init(TFormMain); with TButtonBreak do begin SetParent(TFormMain); SetCaption('Break handler'); SetBounds(160,152,85,25); setFont(tempFont); setOnClick(YourClickProcedure); setEnabled(false); end; //TButtonExtra\\ TButtonExtra.Init(TFormMain); with TButtonExtra do begin SetParent(TFormMain); SetCaption('Extras'); SetBounds(304,152,60,25); setFont(tempFont); setOnClick(YourClickProcedure); end; //TCheckBoxBreak\\ TCheckBoxBreak.Init(TFormMain); with TCheckBoxBreak do begin SetParent(TFormMain); SetCaption(''); SetBounds(140,154,23,19); setState(0); setOnChange(brakeHandle); setFont(tempFont); end; //TCheckBoxTalk\\ TCheckBoxTalk.Init(TFormMain); with TCheckBoxTalk do begin SetParent(TFormMain); SetCaption('Use auto responder?'); SetBounds(140,52,101,19); setState(0); setFont(tempFont); end; //TCheckBoxWait\\ TCheckBoxWait.Init(TFormMain); with TCheckBoxWait do begin SetParent(TFormMain); SetCaption('Force waits after actions?'); SetBounds(140,72,103,19); setState(0); setFont(tempFont); end; //TCheckBoxMouse\\ TCheckBoxMouse.Init(TFormMain); with TCheckBoxMouse do begin SetParent(TFormMain); SetCaption('Use mouse keys?'); SetBounds(140,92,115,19); setState(0); setFont(tempFont); end; //TCheckBoxCook\\ TCheckBoxCook.Init(TFormMain); with TCheckBoxCook do begin SetParent(TFormMain); SetCaption('Force disable cooking?'); SetBounds(140,112,107,19); setState(0); setFont(tempFont); end; //TCheckBoxBank\\ TCheckBoxBank.Init(TFormMain); with TCheckBoxBank do begin SetParent(TFormMain); SetCaption('Force disable banking?'); SetBounds(140,132,105,19); setState(0); setFont(tempFont); end; //TComboBoxLoc\\ TComboBoxLoc.Init(TFormMain); with TComboBoxLoc do begin SetParent(TFormMain); SetBounds(2,2,219,23); setCaption('Location:'); //add your items here AddItem('Draynor', nil); AddItem('Barb. Village', nil); AddItem('Fish Guild', nil); AddItem('Catherby', nil); AddItem('Karamja', nil); AddItem('Rasolo', nil); AddItem('Shilo', nil); AddItem('Ottos', nil); AddItem('Piscatoris', nil); AddItem('Zul-Andra', nil); AddItem('Powerfish', nil); //End items setFont(tempFont); setONKEYPRESS(NoKeys); setOnExit(OnChange); end; //TComboBoxType\\ TComboBoxType.Init(TFormMain); with TComboBoxType do begin SetParent(TFormMain); SetBounds(225,2,147,23); setCaption('Type of fish:'); setFont(tempFont); setONKEYPRESS(NoKeys); end; TFormBreak.init(nil); with TFormBreak do begin SetCaption('Break Handler'); setBorderStyle(bsSingle); SetBounds(0,0,255,120); SetPosition(poScreenCenter); end; TLabelbIn.init(TFormBreak); with TLabelbIn do begin setParent(TFormBreak); setCaption('Break after/every/within:'); SetBounds(5,5,68,16); setFont(tempFont); end; TLabelbrIn.init(TFormBreak); with TLabelbrIn do begin setParent(TFormBreak); setCaption('Random:'); SetBounds(5,30,68,16); setFont(tempFont); end; TLabelbFor.init(TFormBreak); with TLabelbFor do begin setParent(TFormBreak); setCaption('Break for:'); SetBounds(5,65,68,16); setFont(tempFont); end; TLabelbrFor.init(TFormBreak); with TLabelbrFor do begin setParent(TFormBreak); setCaption('Random:'); SetBounds(5,90,68,16); setFont(tempFont); end; TEditbIn.init(TFormBreak); with TEditbIn do begin setParent(TFormBreak); setText('90'); SetBounds(150,2,100,23); setONKEYPRESS(OnlyPostiveNumbers); setMaxLength(9); setFont(tempFont); end; TEditbrIn.init(TFormBreak); with TEditbrIn do begin setParent(TFormBreak); setText('30'); SetBounds(150,30,100,23); setONKEYPRESS(OnlyPostiveNumbers); setMaxLength(9); setFont(tempFont); end; TEditbFor.init(TFormBreak); with TEditbFor do begin setParent(TFormBreak); setText('10'); SetBounds(150,67,100,23); setONKEYPRESS(OnlyPostiveNumbers); setMaxLength(9); setFont(tempFont); end; TEditbrFor.init(TFormBreak); with TEditbrFor do begin setParent(TFormBreak); setText('5'); SetBounds(150,92,100,23); setONKEYPRESS(OnlyPostiveNumbers); setMaxLength(9); setFont(tempFont); end; TFormExtra.init(nil); with TFormExtra do begin setCaption('Extras'); setBorderStyle(bsSingle); SetBounds(0,0,255,300); SetPosition(poScreenCenter); end; TLabelSound.init(TFormExtra); with TLabelSound do begin setParent(TFormExtra); setCaption('Sound:'); SetBounds(5,5,68,16); setFont(tempFont); end; TEditSound.init(TFormExtra); with TEditSound do begin setParent(TFormExtra); setText('C:\Windows\Media\Windows Notify.wav'); SetBounds(150,5,100,23); setFont(tempFont); end; TLabelChatTime.init(TFormExtra); with TLabelChatTime do begin setParent(TFormExtra); setCaption('Chat time often:'); SetBounds(5,30,68,16); setFont(tempFont); end; TEditChatTime.init(TFormExtra); with TEditChatTime do begin setParent(TFormExtra); setText('200000'); SetBounds(150,30,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelScreenTime.init(TFormExtra); with TLabelScreenTime do begin setParent(TFormExtra); setCaption('Screen time often:'); SetBounds(5,55,68,16); setFont(tempFont); end; TEditScreenTime.init(TFormExtra); with TEditScreenTime do begin setParent(TFormExtra); setText('1000'); SetBounds(150,55,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelWaitTime.init(TFormExtra); with TLabelWaitTime do begin setParent(TFormExtra); setCaption('Wait time:'); SetBounds(5,80,68,16); setFont(tempFont); end; TEditWaitTime.init(TFormExtra); with TEditWaitTime do begin setParent(TFormExtra); setText('-1'); SetBounds(150,80,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelWaitOften.init(TFormExtra); with TLabelWaitOften do begin setParent(TFormExtra); setCaption('Wait often:'); SetBounds(5,105,68,16); setFont(tempFont); end; TEditWaitOften.init(TFormExtra); with TEditWaitOften do begin setParent(TFormExtra); setText('250'); SetBounds(150,105,100,23); setONKEYPRESS(OnlyPostiveNumbers); setMaxLength(9); setFont(tempFont); end; TLabelDismissTime.init(TFormExtra); with TLabelDismissTime do begin setParent(TFormExtra); setCaption('Dismiss time:'); SetBounds(5,130,68,16); setFont(tempFont); end; TEditDismissTime.init(TFormExtra); with TEditDismissTime do begin setParent(TFormExtra); setText('10000'); SetBounds(150,130,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelUpdateTime.init(TFormExtra); with TLabelUpdateTime do begin setParent(TFormExtra); setCaption('Update time:'); SetBounds(5,155,68,16); setFont(tempFont); end; TEditUpdateTime.init(TFormExtra); with TEditUpdateTime do begin setParent(TFormExtra); setText('45000'); SetBounds(150,155,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelLevelUpTime.init(TFormExtra); with TLabelLevelUpTime do begin setParent(TFormExtra); setCaption('Level up time:'); SetBounds(5,180,68,16); setFont(tempFont); end; TEditLevelUpTime.init(TFormExtra); with TEditLevelUpTime do begin setParent(TFormExtra); setText('2500'); SetBounds(150,180,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelCloseTime.init(TFormExtra); with TLabelCloseTime do begin setParent(TFormExtra); setCaption('Close stuff time:'); SetBounds(5,205,68,16); setFont(tempFont); end; TEditCloseTime.init(TFormExtra); with TEditCloseTime do begin setParent(TFormExtra); setText('10000'); SetBounds(150,205,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelLookForChatTime.init(TFormExtra); with TLabelLookForChatTime do begin setParent(TFormExtra); setCaption('Look for chat time:'); SetBounds(5,230,68,16); setFont(tempFont); end; TEditLookForChatTime.init(TFormExtra); with TEditLookForChatTime do begin setParent(TFormExtra); setText('2000'); SetBounds(150,230,100,23); setONKEYPRESS(OnlyNumbers); setMaxLength(9); setFont(tempFont); end; TLabelItemDis.init(TFormExtra); with TLabelItemDis do begin setParent(TFormExtra); setCaption('Fire check distance:'); SetBounds(5,255,68,16); setFont(tempFont); end; TEditItemDis.init(TFormExtra); with TEditItemDis do begin setParent(TFormExtra); setText('20'); SetBounds(150,255,100,23); setONKEYPRESS(OnlyPostiveNumbers); setMaxLength(3); setFont(tempFont); end; TCheckBoxDropOnly.init(TFormExtra); with TCheckBoxDropOnly do begin setFont(tempFont); setParent(TFormExtra); setCaption('Drop only?'); setState(0); SetBounds(5,280,68,16); end; tempFont.Free; end; procedure ShowFormModal; {$IFNDEF CODEINSIGHT} native; {$ENDIF} var i, h : integer; strings : TStringArray; begin InitForm; if loading or saving then begin saving := false; loading := false; TEditUser.setText(sname); TEditPass.setText(spass); TEditPin.setText(spin); TEditWorld.setText(sworld); if (Length(santi) > 0) then TEditAnti.setText(santi) else TEditAnti.setText('0'); if (Length(srun) > 0) then TEditRun.setText(srun) else TEditRun.setText('0'); if (Length(samount) > 0) then TEditAmount.setText(samount) else TEditAmount.setText('0'); if (Length(sloc) > 0) then TComboBoxLoc.setItemIndex(StrToInt(sloc)) else TComboBoxLoc.setItemIndex(0); _OnChange2; if (Length(stype) > 0) then TComboBoxType.setItemIndex(StrToInt(stype)) else TComboBoxType.setItemIndex(0); if(sbank = 'cbUnchecked')then TCheckBoxBank.setState(0) else TCheckBoxBank.setState(1); if(scook = 'cbUnchecked')then TCheckBoxCook.setState(0) else TCheckBoxCook.setState(1); if(schat = 'cbUnchecked')then TCheckBoxTalk.setState(0) else TCheckBoxTalk.setState(1); if(swait = 'cbUnchecked')then TCheckBoxWait.setState(0) else TCheckBoxWait.setState(1); if(smouse = 'cbUnchecked')then TCheckBoxMouse.setState(0) else TCheckBoxMouse.setState(1); if(sbreak = 'cbUnchecked')then TCheckBoxBreak.setState(0) else TCheckBoxBreak.setState(1); breakCheck; TEditbin.setText(sbin); TEditbrin.setText(sbrin); TEditbfor.setText(sbfor); TEditbrfor.setText(sbrfor); if(sdrop = 'cbUnchecked')then TCheckBoxDropOnly.setState(0) else TCheckBoxDropOnly.setState(1); TEditSound.setText(ssound); TEditCloseTime.setText(scloset); TEditWaitOften.setText(swaito); TEditWaitTime.setText(swaitt); TEditLevelUpTime.setText(slevelt); TEditScreenTime.setText(sscreent); TEditUpdateTime.setText(supdatet); TEditChatTime.setText(schatt); TEditLookForChatTime.setText(slchatt); TEditDismissTime.setText(sdismisst); TEditItemDis.setText(sitemd); TEditPlayNum.setText(tostr(playNum)); end; TFormMain.ShowModal; i := -1; h := -1; case TComboBoxLoc.getItemIndex of (i:=i+1):begin//draynor case TComboBoxType.getItemIndex of (h:=h+1):Job:=0;//net (h:=h+1):Job:=1;//bait end; end; (i:=i+1):begin//barb case TComboBoxType.getItemIndex of (h:=h+1):Job:=2;//lure (h:=h+1):Job:=3;//bait end; end; (i:=i+1):begin//fishg case TComboBoxType.getItemIndex of (h:=h+1):Job:=4;//bignet (h:=h+1):Job:=5;//cage (h:=h+1):Job:=6;//harp (h:=h+1):Job:=7;//harpsh end; end; (i:=i+1):begin//cath case TComboBoxType.getItemIndex of (h:=h+1):Job:=8;//small (h:=h+1):Job:=9;//bait (h:=h+1):Job:=10;//bignet (h:=h+1):Job:=11;//cage (h:=h+1):Job:=12;//harp (h:=h+1):Job:=13;//harpsh end; end; (i:=i+1):begin//karm case TComboBoxType.getItemIndex of (h:=h+1):Job:=14;//cageb (h:=h+1):Job:=15;//harpb (h:=h+1):Job:=16;//small (h:=h+1):Job:=17;//bait (h:=h+1):Job:=18;//cage (h:=h+1):Job:=19;//harp (h:=h+1):Job:=28;//prog end; end; (i:=i+1):begin//rasolo case TComboBoxType.getItemIndex of (h:=h+1):Job:=20;//lure (h:=h+1):Job:=21;//bait end; end; (i:=i+1):begin//shilo case TComboBoxType.getItemIndex of (h:=h+1):Job:=22;//lure (h:=h+1):Job:=23;//bait end; end; (i:=i+1):begin//otto case TComboBoxType.getItemIndex of (h:=h+1):Job:=24;//heavy end; end; (i:=i+1):begin//pic case TComboBoxType.getItemIndex of (h:=h+1):Job:=25;//small (h:=h+1):Job:=26;//harpoon end; end; (i:=i+1):begin//zul case TComboBoxType.getItemIndex of (h:=h+1):Job:=29;//eel end; end; (i:=i+1):begin//power case TComboBoxType.getItemIndex of (h:=h+1):Job:=27;//small end; end; end; ReflectPlayer.Username := TEditUser.getText; ReflectPlayer.Password := TEditPass.getText; ReflectPlayer.Pin := TEditPin.getText; ReflectPlayer.Active := true; SmartShowConsole := false; case random(8) of 0:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0'; 1:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'; 2:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0'; 3:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'; 4:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0'; 5:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0'; 6:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0'; 7:SmartUserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0'; end; strings := GetWordsEx(TEditWorld.getText, '1234567890'); if (length(strings) > 0) then SmartWorld := StrToInt(Strings[0]); setLength(WorldList, length(strings)); for i := 0 to high(strings) do WorldList[i] := StrToInt(strings[i]); MouseKeys := (toStr(TCheckBoxMouse.getState) = 'cbChecked'); DisableBank := (toStr(TCheckBoxBank.getState) = 'cbChecked'); DisableCook := (toStr(TCheckBoxCook.getState) = 'cbChecked'); useBreaks := (toStr(TCheckBoxBreak.getState) = 'cbChecked'); useAutoResponder := (toStr(TCheckBoxTalk.getState) = 'cbChecked'); useFakeWaitTime := (toStr(TCheckBoxWait.getState) = 'cbChecked'); dropOnly := (toStr(TCheckBoxDropOnly.getState) = 'cbChecked'); if (Length(TEditRun.getText) > 0) then RunAmount := StrToInt(TEditRun.getText) else RunAmount := 0; if (Length(TEditAmount.getText) > 0) then AmountAmount := StrToInt(TEditAmount.getText) else AmountAmount := 0; if (Length(TEditAnti.getText) > 0) then AntiAmount := StrToInt(TEditAnti.getText) else AntiAmount := 0; if (Length(TEditPlayNum.getText) > 0) then playNum := StrToInt(TEditPlayNum.getText) else playNum := 0; if (Length(TEditCloseTime.getText) > 0) then closeAllOften := StrToInt(TEditCloseTime.GetText) else closeAllOften := 0; if (Length(TEditDismissTime.getText) > 0) then dismissAllOften := StrToInt(TEditDismissTime.GetText) else dismissAllOften := 0; if (Length(TEditLookForChatTime.getText) > 0) then lookForChatOften := StrToInt(TEditLookForChatTime.GetText) else lookForChatOften := 0; if (Length(TEditLevelupTime.getText) > 0) then checkForLevelOften := StrToInt(TEditLevelupTime.GetText) else checkForLevelOften := 0; if (Length(TEditChatTime.getText) > 0) then chatTimeOften := StrToInt(TEditChatTime.GetText) else chatTimeOften := 0; if (Length(TEditUpdateTime.getText) > 0) then updateAllOften := StrToInt(TEditUpdateTime.GetText) else updateAllOften := 0; if (Length(TEditWaitOften.getText) > 0) then cpuLoadOften := StrToInt(TEditWaitOften.GetText) else cpuLoadOften := 0; if (Length(TEditWaitTime.getText) > 0) then cpuLoadWait := StrToInt(TEditWaitTime.GetText) else cpuLoadWait := 0; if (Length(TEditScreenTime.getText) > 0) then updateScreenOften := StrToInt(TEditScreenTime.GetText) else updateScreenOften := 0; if (Length(TEditbin.getText) > 0) then breakIn := StrToInt(TEditbin.getText) else breakIn := 0; if (Length(TEditbrin.getText) > 0) then breakInRandom := StrToInt(TEditbrin.getText) else breakInRandom := 0; if (Length(TEditbfor.getText) > 0) then breakFor := StrToInt(TEditbfor.getText) else breakFor := 0; if (Length(TEditbrfor.getText) > 0) then breakForRandom := StrToInt(TEditbrfor.getText) else breakForRandom := 0; if (Length(TEditItemDis.getText) > 0) then ItemCheckDistance := StrToInt(TEditItemDis.GetText) else ItemCheckDistance := 0; SoundString := TEditSound.getText; breakIn := breakIn*60000; breakInRandom := breakInRandom*60000; breakFor := breakFor*60000; breakForRandom := breakForRandom*60000; breakInTimer.restart; breakInFinal := breakIn + randomRange(-breakInRandom, breakInRandom); TFormBreak.Free; TFormExtra.Free; TFormMain.Free; end; procedure ShowForm(); var tempBMP : integer; IniString, picString, crypt : string; begin daLogger.Init('Script', TReflectLoggerLevel.Status); picString := GetPage(PicturePage); tempBMP := BitmapFromString(374, 208, picString); TMainBMP.Init; TMainBMP := GetMufasaBitmap(tempBMP).ToTBitmap; freeBitmap(tempBMP); started := false; saving := false; loading := false; job := -1; playNum := 0; IniString := scriptPath+'ineedbot''s AIO Fisher user details.ini'; sync(ShowFormModal); while saving or loading do begin if saving then begin writeini('chat', intToStr(playNum), schat, IniString); writeini('wait', intToStr(playNum), swait, IniString); writeini('name', intToStr(playNum), sname, IniString); crypt := spass; rc2_encrypt('ineedbotsfish', htMD5, crypt); writeini('pass', intToStr(playNum), crypt, IniString); writeini('pin', intToStr(playNum), spin, IniString); writeini('world', intToStr(playNum), sworld, IniString); writeini('amount', intToStr(playNum), samount, IniString); writeini('run', intToStr(playNum), srun, IniString); writeini('anti', intToStr(playNum), santi, IniString); writeini('type', intToStr(playNum), stype, IniString); writeini('loc', intToStr(playNum), sloc, IniString); writeini('mouse', intToStr(playNum), smouse, IniString); writeini('bank', intToStr(playNum), sbank, IniString); writeini('cook', intToStr(playNum), scook, IniString); writeini('bfor', intToStr(playNum), sbfor, IniString); writeini('brfor', intToStr(playNum), sbrfor, IniString); writeini('bin', intToStr(playNum), sbin, IniString); writeini('brin', intToStr(playNum), sbrin, IniString); writeini('brake', intToStr(playNum), sbreak, IniString); writeini('sound', intToStr(playNum), ssound, IniString); writeini('dismisst', intToStr(playNum), sdismisst, IniString); writeini('lchatt', intToStr(playNum), slchatt, IniString); writeini('chatt', intToStr(playNum), schatt, IniString); writeini('updatet', intToStr(playNum), supdatet, IniString); writeini('screent', intToStr(playNum), sscreent, IniString); writeini('levelt', intToStr(playNum), slevelt, IniString); writeini('waitt', intToStr(playNum), swaitt, IniString); writeini('waito', intToStr(playNum), swaito, IniString); writeini('closet', intToStr(playNum), scloset, IniString); writeini('itemd', intToStr(playNum), sitemd, IniString); writeini('drop', intToStr(playNum), sdrop, IniString); end; if (loading or saving) and FileExists(IniString) then begin schat := ReadINI('chat', intToStr(playNum), IniString); swait := ReadINI('wait', intToStr(playNum), IniString); sname := ReadINI('name', intToStr(playNum), IniString); crypt := ReadINI('pass', intToStr(playNum), IniString); rc2_decrypt('ineedbotsfish', htMD5, crypt); spass := crypt; spin := ReadINI('pin', intToStr(playNum), IniString); sworld := ReadINI('world', intToStr(playNum), IniString); samount := ReadINI('amount', intToStr(playNum), IniString); srun := ReadINI('run', intToStr(playNum), IniString); santi := ReadINI('anti', intToStr(playNum), IniString); stype := ReadINI('type', intToStr(playNum), IniString); sloc := ReadINI('loc', intToStr(playNum), IniString); smouse := ReadINI('mouse', intToStr(playNum), IniString); sbank := ReadINI('bank', intToStr(playNum), IniString); scook := ReadINI('cook', intToStr(playNum), IniString); sbfor := ReadINI('bfor', intToStr(playNum), IniString); sbrfor := ReadINI('brfor', intToStr(playNum), IniString); sbin := ReadINI('bin', intToStr(playNum), IniString); sbrin := ReadINI('brin', intToStr(playNum), IniString); sbreak := ReadINI('brake', intToStr(playNum), IniString); ssound := ReadINI('sound', intToStr(playNum), IniString); sdismisst := ReadINI('dismisst', intToStr(playNum), IniString); slchatt := ReadINI('lchatt', intToStr(playNum), IniString); schatt := ReadINI('chatt', intToStr(playNum), IniString); supdatet := ReadINI('updatet', intToStr(playNum), IniString); sscreent := ReadINI('screent', intToStr(playNum), IniString); slevelt := ReadINI('levelt', intToStr(playNum), IniString); swaitt := ReadINI('waitt', intToStr(playNum), IniString); swaito := ReadINI('waito', intToStr(playNum), IniString); scloset := ReadINI('closet', intToStr(playNum), IniString); sitemd := ReadINI('itemd', intToStr(playNum), IniString); sdrop := ReadINI('drop', intToStr(playNum), IniString); end; sync(showFormModal); end; TMainBMP.free; end; function Location.getRawFishIDs : TIntegerArray; var i, h : integer; begin for i:=0 to high(self.FishNPCs) do for h:=0 to high(self.FishNPCs[i].RawFishes) do begin setLength(result, length(result)+1); result[high(result)] := self.FishNPCs[i].RawFishes[h].ID; end; end; function Location.getBurntFishIDs : TIntegerArray; var i, h : integer; begin for i:=0 to high(self.FishNPCs) do for h:=0 to high(self.FishNPCs[i].BurntFishes) do begin setLength(result, length(result)+1); result[high(result)] := self.FishNPCs[i].BurntFishes[h].ID; end; end; function Location.getCookedFishIDs : TIntegerArray; var i, h : integer; begin for i:=0 to high(self.FishNPCs) do for h:=0 to high(self.FishNPCs[i].CookedFishes) do begin setLength(result, length(result)+1); result[high(result)] := self.FishNPCs[i].CookedFishes[h].ID; end; end; function Location.getBaitIDs : TIntegerArray; var i : integer; begin for i:=0 to high(self.FishNPCs) do result := combineIntArray(result, self.FishNPCs[i].BaitIDs); end; function Location.getAnimationIDs : TIntegerArray; var i : integer; begin for i:=0 to high(self.FishNPCs) do result := combineIntArray(result, self.FishNPCs[i].AnimationIDs); end; function Location.getEquipmentIDs : TIntegerArray; var i : integer; begin for i:=0 to high(self.FishNPCs) do result := combineIntArray(result, self.FishNPCs[i].EquipmentIDs); end; function Location.getFishIDs : TIntegerArray; var i : integer; begin for i:=0 to high(self.FishNPCs) do result := combineIntArray(result, self.FishNPCs[i].IDs); end; function Location.getFishLocations : TPointArray; var i, h : integer; begin for i:=0 to high(self.FishNPCs) do for h:=0 to high(self.FishNPCs[i].Locations) do begin setLength(result, length(result)+1); result[high(result)] := self.FishNPCs[i].Locations[h]; end; end; procedure doCount; var _items : TReflectInvItemArray; i, h, j, _id : integer; _name : string; begin statsServer.IncreaseVariable('43', 1); _items.GetAll; for i:=0 to high(_items) do begin _name := _items[i].getname; _id := _items[i].getID; for h:=0 to high(daLocation.FishNPCs) do begin for j:=0 to high(daLocation.FishNPCs[h].RawFishes) do if daLocation.FishNPCs[h].RawFishes[j].ID = _id then daLocation.FishNPCs[h].RawFishes[j].caught := daLocation.FishNPCs[h].RawFishes[j].caught + _items[i].getQuantity; for j:=0 to high(daLocation.FishNPCs[h].CookedFishes) do if daLocation.FishNPCs[h].CookedFishes[j].ID = _id then daLocation.FishNPCs[h].CookedFishes[j].caught := daLocation.FishNPCs[h].CookedFishes[j].caught + _items[i].getQuantity; for j:=0 to high(daLocation.FishNPCs[h].BurntFishes) do if daLocation.FishNPCs[h].BurntFishes[j].ID = _id then daLocation.FishNPCs[h].BurntFishes[j].caught := daLocation.FishNPCs[h].BurntFishes[j].caught + _items[i].getQuantity; end; //hope item.name always works, and item.id doesnt change if (pos('shrimp', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('109', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('115', 1); end else begin if (pos('anchovie', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('110', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('116', 1); end else begin if (pos('leaping trout', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('120', 1); end else begin if (pos('leaping salmon', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('121', 1); end else begin if (pos('lobster', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('106', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('97', 1); end else begin if (pos('tuna', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('105', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('98', 1); end else begin if (pos('swordfish', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('103', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('100', 1); end else begin if (pos('shark', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('102', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('101', 1); end else begin if (pos('monkfish', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('104', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('99', 1); end else begin if (pos('fish', lowercase(_name)) > 0) then begin if inIntArray([7954], _id) then statsServer.IncreaseVariable('110', 1) else if inIntArray([323], _id) then statsServer.IncreaseVariable('109', 1) else if inIntArray([343], _id) then statsServer.IncreaseVariable('108', 1) //default to trout i guess... else if inIntArray([367], _id) then statsServer.IncreaseVariable('105', 1); //default to tuna i guess... end else begin if (pos('trout', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('108', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('95', 1); end else begin if (pos('salmon', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('107', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('96', 1); end else begin if (pos('leaping sturgeon', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('122', 1); end else begin if (pos('sardine', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('126', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('125', 1); end else begin if (pos('herring', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('113', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('114', 1); end else begin if (pos('bass', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('123', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('124', 1); end else begin if (pos('mackerel', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('127', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('128', 1); end else begin if (pos('cod', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('112', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('118', 1); end else begin if (pos('pike', lowercase(_name)) > 0) then begin statsServer.IncreaseVariable('111', 1); if (pos('raw', lowercase(_name)) <= 0) and (pos('burn', lowercase(_name)) <= 0) then statsServer.IncreaseVariable('117', 1); end; end; end; end; end; end; end; end; end; end; end; end; end; end; end; end; end; end; end; end; end; procedure doUpdateScreen; var TimeRunning, tempCheck, tempCheck2, currentFishXP, currentFishLevel, currentCookXP, currentAgilXP, currentStrXP, currentFireXP, currentWoodXP, tempInt, h, i, rawCaught, cookedCaught, burntCaught, myPlane : integer; _items : TReflectInvItemArray; tempObject : TReflectObject; _eitems : TReflectWornEquipmentArray; _objects : TReflectObjectArray; perHour : extended; _npcs : TReflectNPCArray; rsTIle, rsTile2 : TPoint; FishLocations : TPointArray; tempBox : TBox; BaitIDs, EquipmentIDs, rawFishIDs, cookedFishIDs, burntFishIDs, FishspotIDs, BankNPCIDs : TIntegerArray; begin graphicOpti.DrawClear(0); currentFishXP := ReflectPlayer.GetSkillExp(SKILL_FISHING); currentFishLevel := ReflectPlayer.GetMaxSkillLevel(SKILL_FISHING); currentCookXP := ReflectPlayer.GetSkillExp(SKILL_COOKING); currentWoodXP := ReflectPlayer.GetSkillExp(SKILL_WOODCUTTING); currentFireXP := ReflectPlayer.GetSkillExp(SKILL_FIREMAKING); currentAgilXP := ReflectPlayer.GetSkillExp(SKILL_AGILITY); currentStrXP := ReflectPlayer.GetSkillExp(SKILL_STRENGTH); BaitIDs := daLocation.getBaitIDs; EquipmentIDs := daLocation.getEquipmentIDs; rawFishIDs := daLocation.getRawFishIDs; cookedFishIDs := daLocation.getCookedFishIDs; burntFishIDs := daLocation.getBurntFishIDs; TimeRunning := GetTimeRunning; perHour := 3600000/TimeRunning; myPlane := Reflect.Tiles.GetPlane; tempInt := Reflect.Gametab.CurrentColor; if(tempInt = Gametab_Inventory)then begin _items.GetAll; for i:=0 to high(_items) do begin h := _items[i].GetID; if(inIntArray(AxeIDs, h))then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Axe', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if(inIntArray(BaitIDs, h))then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Bait', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if(inIntArray(EquipmentIDs, h))then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Equip', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if(inIntArray(TinderIDs, h))then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Tind', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if(inIntArray(KnifeIDs, h))then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Knife', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if(inIntArray(CoinsIDs, h))then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Coins', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if inIntArray(LogIDs, h) then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Log', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if inIntArray(burntFishIds, h) then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Burnt', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if inIntArray(cookedFishIds, h) then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Cook', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if inIntArray(rawFishIds, h) then begin tempBox := _items[i].GetBox; graphicOpti.DrawClippedText('Raw', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end; end; end; end; end; end; end; end; end; end; end; end else begin if(tempInt = Gametab_WornEquipment)then begin _eitems.GetAll; for i:=0 to high(_eitems) do begin h := _eitems[i].getID; if(inIntArray(EquipmentIDs, h))then begin tempBox := _eitems[i].GetBox; graphicOpti.DrawClippedText('Equip', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end else begin if(inIntArray(AxeIDs, h))then begin tempBox := _eitems[i].GetBox; graphicOpti.DrawClippedText('Axe', 'upchars07', Point(tempBox.x1 - 5, tempBox.y1), true, 65280); end; end; end; end; end; _objects.GetAll(ObjGame, ItemCheckDistance); for i:=0 to high(_objects) do begin if inIntArray(FireIDs, _objects[i].getid) then begin rsTile2 := _objects[i].gettile; if R_TileOnMM(rsTile2, RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clOrange, false); if R_TileOnMS(rsTile2, RSTile) then graphicOpti.DrawClippedText('Fire', 'upchars07', RSTile, true, clOrange); end; end; end; for i:=0 to high(daLocation.BankLocations) do begin if (myPlane = daLocation.BankLocations[i].Plane) and R_TileOnMM(daLocation.BankLocations[i].Tile, RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clBlue, false); if R_TileOnMS(daLocation.BankLocations[i].Tile, RSTile, daLocation.BankLocations[i].Offset[0], daLocation.BankLocations[i].Offset[1], daLocation.BankLocations[i].Offset[2]) then graphicOpti.DrawClippedText(daLocation.BankLocations[i].Name, 'upchars07', RSTile, true, clBlue); end; end; for i:=0 to high(daLocation.FishNPCs) do if (myPlane = daLocation.FishNPCs[i].Plane) then for h:=0 to high(daLocation.FishNPCs[i].Locations) do if R_TileOnMM(daLocation.FishNPCs[i].Locations[h], RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clAqua, false); if R_TileOnMS(daLocation.FishNPCs[i].Locations[h], RSTile) then graphicOpti.DrawClippedText('Fishies', 'upchars07', RSTile, true, clAqua); end; for i:=0 to high(daLocation.FireLocations) do begin if (myPlane = daLocation.FireLocations[i].Plane) and R_TileOnMM(daLocation.FireLocations[i].Tile, RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clOrange, false); if R_TileOnMS(daLocation.FireLocations[i].Tile, RSTile, daLocation.FireLocations[i].Offset[0], daLocation.FireLocations[i].Offset[1], daLocation.FireLocations[i].Offset[2]) then graphicOpti.DrawClippedText(daLocation.FireLocations[i].Name, 'upchars07', RSTile, true, clOrange); end; end; FishspotIDs := daLocation.getFishIDs; for i:=0 to high(daLocation.BankNPCs) do for h:=0 to high(daLocation.BankNPCs[i].IDs) do begin setLength(BankNPCIDs, length(BankNPCIDs)+1); BankNPCIDs[high(BankNPCIDs)] := daLocation.BankNPCs[i].IDs[h]; end; _npcs.GetAll; for i:=0 to high(_npcs) do begin tempInt := _npcs[i].getid; if(inIntArray(FishspotIDs, tempInt))then begin rsTile2 := _npcs[i].gettile; if R_TileOnMM(rsTile2, RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clYellow, false); if R_TileOnMS(rsTile2, RSTile) then graphicOpti.DrawClippedText(_npcs[i].getname, 'upchars07', RSTile, true, clYellow); end; end else if(inIntArray(BankNPCIDs, tempInt))then begin rsTile2 := _npcs[i].gettile; if R_TileOnMM(rsTile2, RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clBlue, false); if R_TileOnMS(rsTile2, RSTile) then graphicOpti.DrawClippedText(_npcs[i].getname, 'upchars07', RSTile, true, clBlue); end; end; end; for i:=0 to high(daLocation.DoorObjects) do begin if (myPlane = daLocation.DoorObjects[i].Plane) and R_TileOnMM(daLocation.DoorObjects[i].Tile, RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clGray, false); if R_TileOnMS(daLocation.DoorObjects[i].Tile, RSTile, daLocation.DoorObjects[i].Offset[0], daLocation.DoorObjects[i].Offset[1], daLocation.DoorObjects[i].Offset[2]) then begin tempObject.GetAt(ObjBoundary, daLocation.DoorObjects[i].Tile); if not Reflect.Smart.IsNull(tempObject.Reference) then begin graphicOpti.DrawClippedText('Closed door', 'upchars07', RSTile, true, clGray); end else begin graphicOpti.DrawClippedText('Opened door', 'upchars07', RSTile, true, clGray); end; end; end; end; for i:=0 to high(daLocation.TreeObjects) do begin if (myPlane = daLocation.TreeObjects[i].Plane) and R_TileOnMM(daLocation.TreeObjects[i].Tile, RSTile) then begin graphicOpti.DrawEllipse(RSTile, 5, 5, clLime, false); if R_TileOnMS(daLocation.TreeObjects[i].Tile, RSTile, daLocation.TreeObjects[i].Offset[0], daLocation.TreeObjects[i].Offset[1], daLocation.TreeObjects[i].Offset[2]) then begin tempObject.GetAt(ObjGame, daLocation.TreeObjects[i].Tile); if not Reflect.Smart.IsNull(tempObject.Reference) then tempInt := tempObject.GetId else tempInt := -1; if inIntArray(daLocation.TreeObjects[i].AliveIDs, tempInt) then begin graphicOpti.DrawClippedText('Alive '+daLocation.TreeObjects[i].name, 'upchars07', RSTile, true, clLime); end else begin if inIntArray(daLocation.TreeObjects[i].DeadIDs, tempInt) then begin graphicOpti.DrawClippedText('Dead '+daLocation.TreeObjects[i].name, 'upchars07', RSTile, true, clLime); end else begin graphicOpti.DrawClippedText('Unknown '+daLocation.TreeObjects[i].name+'('+intToStr(tempInt)+')', 'upchars07', RSTile, true, clLime); end; end; end; end; end; tempInt:=20; graphicOpti.DrawClippedText('Status: '+scriptStatus, 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; tempCheck := currentFishXP-startFishXP; if (tempCheck > 0) then begin tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Fishing XP gained: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+'), level: '+intToStr(currentFishLevel)+'('+InttoStr(CurrentFishLevel-StartFishLevel)+') TTL: '+Reflect.Time.MsToTime(Round(varExpToGoal(currentFishXP, CurrentFishLevel+1)/(tempCheck/GetTimeRunning)), Time_Bare), 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; tempCheck := currentCookXP-startCookXP; if (tempCheck > 0) then begin tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Cooking XP gained: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+')', 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; tempCheck := currentWoodXP-startWoodXP; if (tempCheck > 0) then begin tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Woodcutting XP gained: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+')', 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; tempCheck := currentFireXP-startFireXP; if (tempCheck > 0) then begin tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Firemaking XP gained: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+')', 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; tempCheck := currentAgilXP-startAgilXP; if (tempCheck > 0) then begin tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Agility XP gained: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+')', 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; tempCheck := currentStrXP-startStrXP; if (tempCheck > 0) then begin tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Strength XP gained: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+')', 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; for i := 0 to high(daLocation.FishNPCs) do begin for h:=0 to high(daLocation.FishNPCs[i].RawFishes) do rawCaught := rawCaught + daLocation.FishNPCs[i].RawFishes[h].caught; for h:=0 to high(daLocation.FishNPCs[i].CookedFishes) do cookedCaught := cookedCaught + daLocation.FishNPCs[i].CookedFishes[h].caught; for h:=0 to high(daLocation.FishNPCs[i].BurntFishes) do burntCaught := burntCaught + daLocation.FishNPCs[i].BurntFishes[h].caught; end; tempCheck := rawCaught + cookedCaught + burntCaught; if (tempCheck > 0) then begin tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Caught: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+')', 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; if daLocation.canBank and not daLocation.isSell then begin tempCheck := 0; for i := 0 to high(daLocation.FishNPCs) do begin for h:=0 to high(daLocation.FishNPCs[i].RawFishes) do tempCheck := tempCheck + (daLocation.FishNPCs[i].RawFishes[h].price * rawCaught); for h:=0 to high(daLocation.FishNPCs[i].burntFishes) do tempCheck := tempCheck + (daLocation.FishNPCs[i].burntFishes[h].price * burntCaught); for h:=0 to high(daLocation.FishNPCs[i].cookedFishes) do tempCheck := tempCheck + (daLocation.FishNPCs[i].cookedFishes[h].price * cookedCaught); end; tempCheck2 := round(tempCheck*perHour); graphicOpti.DrawClippedText('Profit: '+intToStr(tempCheck)+'('+InttoStr(tempCheck2)+')', 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; end; if useBreaks then begin graphicOpti.DrawClippedText('Breaks taken: '+intToStr(breaks)+', next break in: '+Reflect.Time.msToTime(breakInFinal-breakInTimer.Elapsedtime, Time_Bare), 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; end; graphicOpti.DrawClippedText('Current job: '+daLocation.Name+', bank:'+boolToStr(daLocation.canBank)+', cook:'+boolToStr(daLocation.canCook), 'upchars07', Point(5, tempInt), true, 65280); tempInt:=tempInt+15; graphicOpti.DrawClippedText('Ran for '+Reflect.Time.msToTime(TimeRunning, TIME_FORMAL)+'. Script version: '+floatToStr(version)+'('+floatToStr(fversion)+')', 'upchars07', Point(5, tempInt), true, 65280); Reflect.Smart.Graphics.DrawBitmap(graphicOpti, Point(0, 0), true); end; procedure sleepScript(tim:integer);override; var _t : treflecttimer; begin if cpuLoadWait < 0 then begin sleep(tim); end else begin if cpuLoadWait = 0 then begin end else begin _t.restart; while (_t.Elapsedtime < tim) do sleep(cpuLoadWait); end; end; end; procedure updateScreen(_string:string);override; begin if (_string <> '') then scriptStatus := _string; if cpuLoadOften > 0 then sleepScript(cpuLoadOften); if updateScreenTimer.Elapsedtime > updateScreenOften then begin doUpdateScreen; updateScreenTimer.restart; end; end; procedure dynFishing; var curLevel : integer; begin case job of 28:begin daLocation.PathToBank := [Point(2944, 3146), Point(2939, 3146), Point(2934, 3146), Point(2929, 3148), Point(2924, 3148), Point(2919, 3150), Point(2914, 3150), Point(2909, 3150), Point(2905, 3147)]; //from tree daLocation.PathToFish := [Point(2905, 3149), Point(2910, 3149), Point(2915, 3150), Point(2915, 3155), Point(2919, 3159), Point(2923, 3162), Point(2923, 3167), Point(2923, 3172), Point(2924, 3177)]; //from store daLocation.canCook := true; daLocation.canBank := true; daLocation.isSell := true; setLength(daLocation.customTPAs, 2); daLocation.customTPAs[1] := [Point(2924, 3179), Point(2924, 3174), Point(2920, 3171), Point(2920, 3166), Point(2920, 3161), Point(2917, 3157), Point(2914, 3153), Point(2909, 3150), Point(2905, 3147)];//path from fish to store daLocation.customTPAs[0] := [Point(2925, 3179), Point(2925, 3174), Point(2923, 3169), Point(2918, 3169), Point(2914, 3166), Point(2914, 3161), Point(2914, 3156), Point(2916, 3151), Point(2921, 3151), Point(2926, 3151), Point(2931, 3151), Point(2936, 3148), Point(2940, 3145), Point(2945, 3147)];//path to tree from fish setLength(daLocation.BankNPCs, 1); with daLocation.BankNPCs[0] do begin Locations := [Point(2904, 3148)]; Names := []; Plane := 0; IDs := [518, 519{general store salesmen}]; Options := ['Trade']; Offset := [0, 0, 50]; end; setLength(daLocation.TreeObjects, 2); with daLocation.TreeObjects[0] do begin Offset := [30, 50, 200]; TileOffset := [0, -1]; Tile := Point(2943, 3153); AliveIDs := [1276]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; with daLocation.TreeObjects[1] do begin Offset := [30, 50, 200]; TileOffset := [0, -1]; Tile := Point(2944, 3148); AliveIDs := [1276]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; curLevel := ReflectPlayer.GetMaxSkillLevel(SKILL_FISHING); daLocation.FishNPCs := []; if curLevel >= 35 then begin if curLevel >= 40 then begin daLocation.ID := 18; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [619]; EquipmentIDs := [311, 303, 301, 10129]; IDs := [1522]; Locations := [Point(2924, 3178)]; Options := ['Cage']; setLength(RawFishes, 5); with RawFishes[0] do ID := 377; with RawFishes[1] do ID := 317; with RawFishes[2] do ID := 321; with RawFishes[3] do ID := 371; with RawFishes[4] do ID := 359; setLength(CookedFishes, 5); with CookedFishes[0] do ID := 379; with CookedFishes[1] do ID := 315; with CookedFishes[2] do ID := 319; with CookedFishes[3] do ID := 361; with CookedFishes[4] do ID := 373; setLength(BurntFishes, 5); with BurntFishes[0] do ID := 381; with BurntFishes[1] do ID := 323; with BurntFishes[2] do ID := 7954; with BurntFishes[3] do ID := 375; with BurntFishes[4] do ID := 367; end; end else begin daLocation.ID := 19; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; EquipmentIDs := [311, 303, 301, 10129]; AnimationIDs := [618, 5108, 6709, 6707, 6708, 6710, 6711, 6703, 6704]; IDs := [1522]; Locations := [Point(2924, 3178)]; Options := ['Harpoon']; setLength(RawFishes, 5); with RawFishes[0] do ID := 377; with RawFishes[1] do ID := 317; with RawFishes[2] do ID := 321; with RawFishes[3] do ID := 371; with RawFishes[4] do ID := 359; setLength(CookedFishes, 5); with CookedFishes[0] do ID := 379; with CookedFishes[1] do ID := 315; with CookedFishes[2] do ID := 319; with CookedFishes[3] do ID := 361; with CookedFishes[4] do ID := 373; setLength(BurntFishes, 5); with BurntFishes[0] do ID := 381; with BurntFishes[1] do ID := 323; with BurntFishes[2] do ID := 7954; with BurntFishes[3] do ID := 375; with BurntFishes[4] do ID := 367; end; end; end else begin daLocation.ID := 16; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [621]; EquipmentIDs := [311, 303, 301, 10129]; IDs := [1521]; Locations := [Point(2924, 3178)]; Options := ['Net']; setLength(RawFishes, 5); with RawFishes[0] do ID := 377; with RawFishes[1] do ID := 317; with RawFishes[2] do ID := 321; with RawFishes[3] do ID := 371; with RawFishes[4] do ID := 359; setLength(CookedFishes, 5); with CookedFishes[0] do ID := 379; with CookedFishes[1] do ID := 315; with CookedFishes[2] do ID := 319; with CookedFishes[3] do ID := 361; with CookedFishes[4] do ID := 373; setLength(BurntFishes, 5); with BurntFishes[0] do ID := 381; with BurntFishes[1] do ID := 323; with BurntFishes[2] do ID := 7954; with BurntFishes[3] do ID := 375; with BurntFishes[4] do ID := 367; end; end; if disableCook then daLocation.canCook := false; if disableBank then daLocation.canBank := false; end; end; end; procedure setupScript; var i, h : integer; begin graphicOpti.Init(Client.GetMBitmaps); graphicOpti.SetSize(765, 503); graphicOpti.SetTransparentColor(0); AddOnTerminate('FreeDTMZ'); Reflect.Interfaces.CloseAll; updateAllRefVars; updateScreen('Setting up...'); useStats := true; if useStats then statsServer.Setup('7'); StartFishXP := ReflectPlayer.GetSkillExp(SKILL_FISHING); StartFishLevel := ReflectPlayer.GetMaxSkillLevel(SKILL_FISHING); StartCookXP := ReflectPlayer.GetSkillExp(SKILL_COOKING); statsCookXP := startCookXP; StartWoodXP := ReflectPlayer.GetSkillExp(SKILL_WOODCUTTING); statsWoodXP := StartWoodXP; StartFireXP := ReflectPlayer.GetSkillExp(SKILL_FIREMAKING); statsFireXP := StartFireXP; StartAgilXP := ReflectPlayer.GetSkillExp(SKILL_AGILITY); statsAgilXP := StartAgilXP; StartStrXP := ReflectPlayer.GetSkillExp(SKILL_STRENGTH); statsStrXP := startSTRXP; statsFishXP := StartFishXP; statsProfit := 0; LastXPXP := StartFishXP; LastXPCheck.restart; StatsTime := 50000 + random(400000); StatsTimer.restart; wasWorking := false; FishspotIndice := ReflectPlayer.GetInteractingIndex; TinderIDs := [590]; AxeIDs := [1351, 1349, 1357, 1359, 6739, 1355, 1361, 1353]; CoinsIDs := [995]; KnifeIDs := [946]; LogIDs := [1511, 1521, 1519, 1517, 1515, 1513]; CookingAnimationIDs := [897, 896]; FiremakingAnimationIDs := [733]; WoodcuttingAnimationIDs := [879, 877, 875, 873, 871, 869, 867, 2846]; fireOptions := ['Fire']; FireIDs := [26185];//game fire object ids on ground created by players deadObjID := 2048; daLocation.BankLocations := []; daLocation.BankNPCs := []; daLocation.customIDs := []; daLocation.customTPAs := []; daLocation.DoorObjects := []; daLocation.FireLocations := []; daLocation.FishNPCs := []; daLocation.ID := -1; daLocation.Name := ''; daLocation.PathToBank := []; daLocation.PathToFish := []; daLocation.RunDirections := []; daLocation.TreeObjects := []; daLocation.canBank := false; daLocation.canCook := false; daLocation.isDynamic := false; daLocation.isSell := false; case Job of 0..1:begin daLocation.canBank := true; daLocation.canCook := true; daLocation.RunDirections := ['n', 's', 'e']; case job of 0:begin daLocation.Name := 'Draynor small netting'; daLocation.ID := 0; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [621]; EquipmentIDs := [303]; IDs := [1525]; Locations := [Point(3087, 3235)]; Options := ['Net']; setLength(RawFishes, 2); with RawFishes[0] do ID := 317; with RawFishes[1] do ID := 321; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 315; with CookedFishes[1] do ID := 319; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 323; with BurntFishes[1] do ID := 7954; end; end; 1:begin daLocation.Name := 'Draynor baiting'; daLocation.ID := 1; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [313]; AnimationIDs := [622, 623]; EquipmentIDs := [307]; IDs := [1525]; Locations := [Point(3087, 3235)]; Options := ['Bait']; setLength(RawFishes, 2); with RawFishes[0] do ID := 327; with RawFishes[1] do ID := 345; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 325; with CookedFishes[1] do ID := 347; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 357; with BurntFishes[1] do ID := 369; end; end; end; setLength(daLocation.BankLocations, 1); with daLocation.BankLocations[0] do begin Offset := [0, 0, 50]; TileOffset := [1, -1]; Tile := Point(3091, 3245); Options := ['Bank Bank booth']; Plane := 0; Name := 'Bank'; end; daLocation.PathToBank := [Point(3087, 3233), Point(3087, 3238), Point(3087, 3243), Point(3090, 3247), Point(3093, 3245)]; daLocation.PathToFish := [Point(3092, 3245), Point(3087, 3247), Point(3087, 3242), Point(3087, 3237), Point(3087, 3233)]; setLength(daLocation.TreeObjects, 1); with daLocation.TreeObjects[0] do begin Offset := [50, 50, 200]; TileOffset := [0, -1]; Tile := Point(3083, 3242); AliveIDs := [1278]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; end; 2..3:begin daLocation.canBank := true; daLocation.canCook := true; daLocation.RunDirections := ['n', 's', 'w']; daLocation.PathToBank := [Point(3104, 3434), Point(3096, 3437), Point(3092, 3444), Point(3090, 3453), Point(3088, 3459), Point(3087, 3465), Point(3082, 3477), Point(3086, 3485), Point(3094, 3491)]; daLocation.PathToFish := [Point(3094, 3491), Point(3086, 3486), Point(3082, 3477), Point(3087, 3464), Point(3091, 3458), Point(3090, 3449), Point(3091, 3443), Point(3096, 3438), Point(3102, 3435), Point(3106, 3434), Point(3109, 3433)]; setLength(daLocation.BankLocations, 2); with daLocation.BankLocations[0] do begin Offset := [0, 0, 50]; TileOffset := [-2, 0]; Tile := Point(3095, 3491); Options := ['Bank Bank booth']; Plane := 0; Name := 'Bank'; end; with daLocation.BankLocations[1] do begin Offset := [0, 0, 50]; TileOffset := [-2, 0]; Tile := Point(3095, 3489); Options := ['Bank Bank booth']; Plane := 0; Name := 'Bank'; end; setLength(daLocation.FireLocations, 1); with daLocation.FireLocations[0] do begin Offset := [0, 0, 5]; TileOffset := [0, 0]; Tile := Point(3105, 3432); Options := ['Fire']; Plane := 0; Name := 'Fire'; end; case job of 2:begin daLocation.Name := 'Barb. Village luring'; daLocation.ID := 2; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [314]; AnimationIDs := [622, 623]; EquipmentIDs := [309]; IDs := [1526]; Locations := [Point(3104, 3431)]; Options := ['Lure']; setLength(RawFishes, 2); with RawFishes[0] do ID := 335; with RawFishes[1] do ID := 331; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 329; with CookedFishes[1] do ID := 333; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 343; end; end; 3:begin daLocation.Name := 'Barb. Village baiting'; daLocation.ID := 3; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [313]; AnimationIDs := [622, 623]; EquipmentIDs := [307]; IDs := [1526]; Locations := [Point(3104, 3431)]; Options := ['Bait']; setLength(RawFishes, 2); with RawFishes[0] do ID := 335; with RawFishes[1] do ID := 331; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 349; with CookedFishes[1] do ID := 351; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 343; end; end; end; end; 4..7:begin daLocation.canCook := true; daLocation.canBank := true; daLocation.RunDirections := ['rand']; daLocation.PathToBank := [Point(2603, 3420), Point(2598, 3420), Point(2594, 3417), Point(2589, 3417), Point(2588, 3419)]; daLocation.PathToFish := [Point(2588, 3419), Point(2592, 3415), Point(2594, 3420), Point(2599, 3420), Point(2604, 3420)]; setLength(daLocation.TreeObjects, 1); with daLocation.TreeObjects[0] do begin Offset := [30, 50, 200]; TileOffset := [2, 1]; Tile := Point(2580, 3422); AliveIDs := [1276]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; setLength(daLocation.BankLocations, 1); with daLocation.BankLocations[0] do begin Offset := [0, 0, 50]; TileOffset := [2, 1]; Tile := Point(2585, 3419); Options := ['Bank Bank booth']; Plane := 0; Name := 'Bank'; end; case job of 4:begin daLocation.Name := 'Fish Guild big netting'; daLocation.ID := 4; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [620]; EquipmentIDs := [305]; IDs := [1511]; Locations := [Point(2604, 3420)]; Options := ['Net']; setLength(RawFishes, 3); with RawFishes[0] do ID := 363; with RawFishes[1] do ID := 341; with RawFishes[2] do ID := 353; setLength(CookedFishes, 3); with CookedFishes[0] do ID := 355; with CookedFishes[1] do ID := 365; with CookedFishes[2] do ID := 339; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 343; with BurntFishes[1] do ID := 367; end; end; 5:begin daLocation.Name := 'Fish Guild caging'; daLocation.ID := 5; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [619]; EquipmentIDs := [301]; IDs := [1510]; Locations := [Point(2604, 3420)]; Options := ['Cage']; setLength(RawFishes, 1); with RawFishes[0] do ID := 377; setLength(CookedFishes, 1); with CookedFishes[0] do ID := 379; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 381; end; end; 6:begin daLocation.Name := 'Fish Guild harpooning'; daLocation.ID := 6; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [618, 5108, 6709, 6707, 6708, 6710, 6711, 6703, 6704]; EquipmentIDs := [311, 10129]; IDs := [1510]; Locations := [Point(2604, 3420)]; Options := ['Harpoon']; setLength(RawFishes, 2); with RawFishes[0] do ID := 371; with RawFishes[1] do ID := 359; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 361; with CookedFishes[1] do ID := 373; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 375; with BurntFishes[1] do ID := 367; end; end; 7:begin daLocation.Name := 'Fish Guild harpooning(shark)'; daLocation.ID := 7; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [618, 5108, 6705, 6709, 6706, 6704, 6703]; EquipmentIDs := [311, 10129]; IDs := [1511]; Locations := [Point(2604, 3420)]; Options := ['Harpoon']; setLength(RawFishes, 1); with RawFishes[0] do ID := 383; setLength(CookedFishes, 1); with CookedFishes[0] do ID := 385; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 387; end; end; end; end; 8..13:begin daLocation.canBank := true; daLocation.canCook := true; daLocation.RunDirections := ['w', 'e', 'n']; daLocation.PathToBank := [Point(2844, 3430), Point(2840, 3433), Point(2835, 3435), Point(2830, 3436), Point(2825, 3436), Point(2820, 3436), Point(2815, 3436), Point(2810, 3436), Point(2809, 3439)]; daLocation.PathToFish := [Point(2809, 3439), Point(2813, 3436), Point(2818, 3436), Point(2823, 3436), Point(2828, 3436), Point(2833, 3436), Point(2838, 3436), Point(2842, 3433)]; setLength(daLocation.BankLocations, 1); with daLocation.BankLocations[0] do begin Offset := [0, 0, 50]; TileOffset := [0, -2]; Tile := Point(2809, 3442); Options := ['Bank Bank booth']; Plane := 0; Name := 'Bank'; end; setLength(daLocation.FireLocations, 1); with daLocation.FireLocations[0] do begin Offset := [0, 0, 25]; TileOffset := [-1, -2]; Tile := Point(2817, 3444); Options := ['Range']; Plane := 0; Name := 'Range'; end; case job of 8:begin daLocation.Name := 'Catherby small netting'; daLocation.ID := 8; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [621]; EquipmentIDs := [303]; IDs := [1518]; Locations := [Point(2846, 3430)]; Options := ['Net']; setLength(RawFishes, 2); with RawFishes[0] do ID := 317; with RawFishes[1] do ID := 321; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 315; with CookedFishes[1] do ID := 319; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 323; with BurntFishes[1] do ID := 7954; end; end; 9:begin daLocation.Name := 'Catherby baiting'; daLocation.ID := 9; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [313]; AnimationIDs := [622, 623]; EquipmentIDs := [307]; IDs := [1518]; Locations := [Point(2846, 3430)]; Options := ['Bait']; setLength(RawFishes, 2); with RawFishes[0] do ID := 327; with RawFishes[1] do ID := 345; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 325; with CookedFishes[1] do ID := 347; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 357; with BurntFishes[1] do ID := 369; end; end; 10:begin daLocation.Name := 'Catherby big netting'; daLocation.ID := 10; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [620]; EquipmentIDs := [305]; IDs := [1520]; Locations := [Point(2846, 3430)]; Options := ['Net']; setLength(RawFishes, 3); with RawFishes[0] do ID := 363; with RawFishes[1] do ID := 341; with RawFishes[2] do ID := 353; setLength(CookedFishes, 3); with CookedFishes[0] do ID := 355; with CookedFishes[1] do ID := 365; with CookedFishes[2] do ID := 339; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 343; with BurntFishes[1] do ID := 367; end; end; 11:begin daLocation.Name := 'Catherby caging'; daLocation.ID := 11; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [619]; EquipmentIDs := [301]; IDs := [1519]; Locations := [Point(2846, 3430)]; Options := ['Cage']; setLength(RawFishes, 1); with RawFishes[0] do ID := 377; setLength(CookedFishes, 1); with CookedFishes[0] do ID := 379; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 381; end; end; 12:begin daLocation.Name := 'Catherby harpooning'; daLocation.ID := 12; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [618, 5108, 6709, 6707, 6708, 6710, 6711, 6703, 6704]; EquipmentIDs := [311, 10129]; IDs := [1519]; Locations := [Point(2846, 3430)]; Options := ['Harpoon']; setLength(RawFishes, 2); with RawFishes[0] do ID := 371; with RawFishes[1] do ID := 359; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 361; with CookedFishes[1] do ID := 373; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 375; with BurntFishes[1] do ID := 367; end; end; 13:begin daLocation.Name := 'Catherby harpooning(shark)'; daLocation.ID := 13; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [618, 5108, 6705, 6709, 6706, 6704, 6703]; EquipmentIDs := [311, 10129]; IDs := [1520]; Locations := [Point(2846, 3430)]; Options := ['Harpoon']; setLength(RawFishes, 1); with RawFishes[0] do ID := 383; setLength(CookedFishes, 1); with CookedFishes[0] do ID := 385; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 387; end; end; end; end; 14..15:begin daLogger.status('Be sure to start near the fishing spot or deposit box...', []); daLocation.canBank := true; daLocation.canCook := true; daLocation.RunDirections := ['s']; case job of 14:begin daLocation.Name := 'Karamja caging'; daLocation.ID := 14; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [619]; EquipmentIDs := [301]; IDs := [1522]; Locations := [Point(2924, 3178)]; Options := ['Cage']; setLength(RawFishes, 1); with RawFishes[0] do ID := 377; setLength(CookedFishes, 1); with CookedFishes[0] do ID := 379; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 381; end; end; 15:begin daLocation.Name := 'Karamja harpooning'; daLocation.ID := 15; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [618, 5108, 6709, 6707, 6708, 6710, 6711, 6703, 6704]; EquipmentIDs := [311, 10129]; IDs := [1522]; Locations := [Point(2924, 3178)]; Options := ['Harpoon']; setLength(RawFishes, 2); with RawFishes[0] do ID := 371; with RawFishes[1] do ID := 359; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 361; with CookedFishes[1] do ID := 373; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 375; with BurntFishes[1] do ID := 367; end; end; end; setLength(daLocation.BankLocations, 1); with daLocation.BankLocations[0] do begin Offset := [0, 0, 50]; TileOffset := [0, 2]; Tile := Point(3045, 3234); Options := ['Deposit']; Plane := 0; Name := 'Depo'; end; daLocation.PathToBank := [Point(3028, 3217), Point(3027, 3222), Point(3027, 3227), Point(3027, 3232), Point(3030, 3236), Point(3035, 3236), Point(3040, 3236), Point(3045, 3236)]; daLocation.PathToFish := [Point(2951, 3147), Point(2946, 3147), Point(2941, 3146), Point(2936, 3146), Point(2931, 3148), Point(2926, 3148), Point(2921, 3150), Point(2916, 3150), Point(2915, 3155), Point(2919, 3159), Point(2920, 3164), Point(2920, 3169), Point(2923, 3173), Point(2924, 3178)]; setLength(daLocation.TreeObjects, 2); with daLocation.TreeObjects[0] do begin Offset := [30, 50, 200]; TileOffset := [0, -1]; Tile := Point(2943, 3153); AliveIDs := [1276]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; with daLocation.TreeObjects[1] do begin Offset := [30, 50, 200]; TileOffset := [0, -1]; Tile := Point(2944, 3148); AliveIDs := [1276]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; setLength(daLocation.customTPAs, 3); daLocation.customTPAs[0] := [Point(2925, 3179), Point(2925, 3174), Point(2923, 3169), Point(2918, 3169), Point(2914, 3166), Point(2914, 3161), Point(2914, 3156), Point(2916, 3151), Point(2921, 3151), Point(2926, 3151), Point(2931, 3151), Point(2936, 3148), Point(2940, 3145), Point(2945, 3147)];//path to tree from fish daLocation.customTPAs[1] := [Point(3047, 3234), Point(3042, 3236), Point(3037, 3236), Point(3032, 3236), Point(3028, 3233), Point(3028, 3228), Point(3028, 3223), Point(3027, 3218)]; //path from depo to payfare daLocation.customTPAs[2] := [Point(3027, 3219){payfare sarim}, Point(2956, 3144){'Cross' at karma}, Point(3031, 3217){'Cross' at sarim}, Point(2955, 3146){payfare karam}]; setLength(daLocation.customIDs, 1); daLocation.customIDs[0] := [3644, 3646, 3645{these 3 are 'Pay-fare' NPC sarim}, 3648{'Pay-Fare' NPC karma}]; end; 16..19:begin daLocation.PathToBank := [Point(2944, 3146), Point(2939, 3146), Point(2934, 3146), Point(2929, 3148), Point(2924, 3148), Point(2919, 3150), Point(2914, 3150), Point(2909, 3150), Point(2905, 3147)]; //from tree daLocation.PathToFish := [Point(2905, 3149), Point(2910, 3149), Point(2915, 3150), Point(2915, 3155), Point(2919, 3159), Point(2923, 3162), Point(2923, 3167), Point(2923, 3172), Point(2924, 3177)]; //from store daLocation.canCook := true; daLocation.canBank := true; daLocation.isSell := true; setLength(daLocation.customTPAs, 2); daLocation.customTPAs[1] := [Point(2924, 3179), Point(2924, 3174), Point(2920, 3171), Point(2920, 3166), Point(2920, 3161), Point(2917, 3157), Point(2914, 3153), Point(2909, 3150), Point(2905, 3147)];//path from fish to store daLocation.customTPAs[0] := [Point(2925, 3179), Point(2925, 3174), Point(2923, 3169), Point(2918, 3169), Point(2914, 3166), Point(2914, 3161), Point(2914, 3156), Point(2916, 3151), Point(2921, 3151), Point(2926, 3151), Point(2931, 3151), Point(2936, 3148), Point(2940, 3145), Point(2945, 3147)];//path to tree from fish setLength(daLocation.BankNPCs, 1); with daLocation.BankNPCs[0] do begin Locations := [Point(2904, 3148)]; Names := []; Plane := 0; IDs := [518, 519{general store salesmen}]; Options := ['Trade']; Offset := [0, 0, 50]; end; setLength(daLocation.TreeObjects, 2); with daLocation.TreeObjects[0] do begin Offset := [30, 50, 200]; TileOffset := [0, -1]; Tile := Point(2943, 3153); AliveIDs := [1276]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; with daLocation.TreeObjects[1] do begin Offset := [30, 50, 200]; TileOffset := [0, -1]; Tile := Point(2944, 3148); AliveIDs := [1276]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; case job of 16:begin daLocation.Name := 'Karamja small netting (sell)'; daLocation.ID := 16; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [621]; EquipmentIDs := [303]; IDs := [1521]; Locations := [Point(2924, 3178)]; Options := ['Net']; setLength(RawFishes, 2); with RawFishes[0] do ID := 317; with RawFishes[1] do ID := 321; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 315; with CookedFishes[1] do ID := 319; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 323; with BurntFishes[1] do ID := 7954; end; end; 17:begin daLocation.Name := 'Karamja small baiting (sell)'; daLocation.ID := 17; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [313]; AnimationIDs := [622, 623]; EquipmentIDs := [307]; IDs := [1521]; Locations := [Point(2924, 3178)]; Options := ['Bait']; setLength(RawFishes, 2); with RawFishes[0] do ID := 327; with RawFishes[1] do ID := 345; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 325; with CookedFishes[1] do ID := 347; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 357; with BurntFishes[1] do ID := 369; end; end; 18:begin daLocation.Name := 'Karamja caging(sell)'; daLocation.ID := 18; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [619]; EquipmentIDs := [301]; IDs := [1522]; Locations := [Point(2924, 3178)]; Options := ['Cage']; setLength(RawFishes, 1); with RawFishes[0] do ID := 377; setLength(CookedFishes, 1); with CookedFishes[0] do ID := 379; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 381; end; end; 19:begin daLocation.Name := 'Karamja harpooning(sell)'; daLocation.ID := 19; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [618, 5108, 6709, 6707, 6708, 6710, 6711, 6703, 6704]; EquipmentIDs := [311, 10129]; IDs := [1522]; Locations := [Point(2924, 3178)]; Options := ['Harpoon']; setLength(RawFishes, 2); with RawFishes[0] do ID := 371; with RawFishes[1] do ID := 359; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 361; with CookedFishes[1] do ID := 373; setLength(BurntFishes, 2); with BurntFishes[0] do ID := 375; with BurntFishes[1] do ID := 367; end; end; end; end; 20..21:begin daLocation.canCook := true; daLocation.canBank := true; daLocation.isSell := true; setLength(daLocation.TreeObjects, 1); with daLocation.TreeObjects[0] do begin Offset := [50, 50, 200]; TileOffset := [-1, -1]; Tile := Point(2535, 3413); AliveIDs := [1278]; DeadIDs := [1342]; Options := ['Chop down Tree']; Name := 'Tree'; Plane := 0; end; setLength(daLocation.BankNPCs, 1); with daLocation.BankNPCs[0] do begin Locations := [Point(2535, 3430)]; Names := []; Plane := 0; IDs := [679{Rasolo guy who 'Trade'}]; Options := ['Trade R']; Offset := [0, 0, 50]; end; case job of 20:begin daLocation.Name := 'Rasolo luring (sell)'; daLocation.ID := 20; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [314]; AnimationIDs := [622, 623]; EquipmentIDs := [309]; IDs := [1508]; Locations := [Point(2533, 3411)]; Options := ['Lure']; setLength(RawFishes, 2); with RawFishes[0] do ID := 335; with RawFishes[1] do ID := 331; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 329; with CookedFishes[1] do ID := 333; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 343; end; end; 21:begin daLocation.Name := 'Rasolo baiting (sell)'; daLocation.ID := 21; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [313]; AnimationIDs := [622, 623]; EquipmentIDs := [307]; IDs := [1508]; Locations := [Point(2533, 3411)]; Options := ['Bait']; setLength(RawFishes, 2); with RawFishes[0] do ID := 335; with RawFishes[1] do ID := 331; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 349; with CookedFishes[1] do ID := 351; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 343; end; end; end; end; 22..23:begin daLocation.canBank := true; setLength(daLocation.BankNPCs, 1); with daLocation.BankNPCs[0] do begin Locations := [Point(2852, 2954)]; Names := []; Plane := 0; IDs := [399]; Options := ['Bank B']; Offset := [0, 0, 50]; end; case job of 22:begin daLocation.Name := 'Shilo luring'; daLocation.ID := 22; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [314]; AnimationIDs := [622, 623]; EquipmentIDs := [309]; IDs := [1515]; Locations := [Point(2835, 2969), Point(2862, 2969)]; Options := ['Lure']; setLength(RawFishes, 2); with RawFishes[0] do ID := 335; with RawFishes[1] do ID := 331; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 329; with CookedFishes[1] do ID := 333; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 343; end; end; 23:begin daLocation.Name := 'Shilo baiting'; daLocation.ID := 23; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [313]; AnimationIDs := [622, 623]; EquipmentIDs := [307]; IDs := [1515]; Locations := [Point(2835, 2969), Point(2862, 2969)]; Options := ['Bait']; setLength(RawFishes, 2); with RawFishes[0] do ID := 335; with RawFishes[1] do ID := 331; setLength(CookedFishes, 2); with CookedFishes[0] do ID := 349; with CookedFishes[1] do ID := 351; setLength(BurntFishes, 1); with BurntFishes[0] do ID := 343; end; end; end; end; 24:begin daLocation.canCook := true; daLocation.Name := 'Otto''s Grotto heavy rodding'; daLocation.ID := 24; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [314]; AnimationIDs := [622, 623]; EquipmentIDs := [11323]; IDs := [1542]; Locations := [Point(2499, 3509)]; Options := ['Use-rod']; setLength(RawFishes, 3); with RawFishes[0] do ID := 11328; with RawFishes[1] do ID := 11330; with RawFishes[2] do ID := 11332; setLength(CookedFishes, 3); with CookedFishes[0] do ID := 11326; with CookedFishes[1] do ID := 11324; with CookedFishes[2] do ID := 11334; end; end; 25..26:begin daLocation.canBank := true; setLength(daLocation.BankNPCs, 1); with daLocation.BankNPCs[0] do begin Locations := [Point(2330, 3689)]; Names := []; Plane := 0; IDs := [4293]; Options := ['Bank A']; Offset := [0, 0, 50]; end; case job of 25:begin daLocation.Name := 'Piscatoris small netting'; daLocation.ID := 25; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [621]; EquipmentIDs := [303]; IDs := [4316]; Locations := [Point(2317, 3698), Point(2335, 3697), Point(2349, 3698)]; Options := ['Net']; setLength(RawFishes, 1); with RawFishes[0] do ID := 7944; end; end; 26:begin daLocation.Name := 'Piscatoris harpooning'; daLocation.ID := 26; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [618, 5108, 6709, 6707, 6708, 6710, 6711, 6703, 6704]; EquipmentIDs := [311, 10129]; IDs := [4316]; Locations := [Point(2317, 3698), Point(2335, 3697), Point(2349, 3698)]; Options := ['Harpoon']; setLength(RawFishes, 2); with RawFishes[0] do ID := 359; with RawFishes[1] do ID := 371; end; end; end; end; 27:begin daLocation.Name := 'Powerfish small netting'; daLocation.ID := 27; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := [621]; EquipmentIDs := [303]; IDs := [1525, 1518, 1521, 1544, 1530, 1523]; Locations := []; Options := ['Net']; setLength(RawFishes, 2); with RawFishes[0] do ID := 317; with RawFishes[1] do ID := 321; end; end; 28:begin daLocation.isDynamic := true; daLocation.Name := 'Progressive fishing'; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := []; AnimationIDs := []; EquipmentIDs := []; IDs := []; Locations := []; Options := []; setLength(RawFishes, 5); with RawFishes[0] do ID := 377; with RawFishes[1] do ID := 317; with RawFishes[2] do ID := 321; with RawFishes[3] do ID := 371; with RawFishes[4] do ID := 359; setLength(CookedFishes, 5); with CookedFishes[0] do ID := 379; with CookedFishes[1] do ID := 315; with CookedFishes[2] do ID := 319; with CookedFishes[3] do ID := 361; with CookedFishes[4] do ID := 373; setLength(BurntFishes, 5); with BurntFishes[0] do ID := 381; with BurntFishes[1] do ID := 323; with BurntFishes[2] do ID := 7954; with BurntFishes[3] do ID := 375; with BurntFishes[4] do ID := 367; end; end; 29:begin daLocation.Name := 'Zulrah Eels'; daLocation.ID := 29; daLocation.canCook := true; setLength(daLocation.FishNPCs, 1); with daLocation.FishNPCs[0] do begin Plane := 0; Names := []; BaitIDs := [313]; AnimationIDs := [623, 622]; EquipmentIDs := [307]; IDs := [6488]; Locations := [Point(2192, 3069)]; Options := ['Bait']; setLength(RawFishes, 1); with RawFishes[0] do ID := 13339; setLength(CookedFishes, 1); with CookedFishes[0] do ID := 12934; end; end; end; for i:=0 to high(daLocation.FishNPCs) do begin for h:=0 to high(daLocation.FishNPCs[h].RawFishes) do daLocation.FishNPCs[i].RawFishes[h].price := getPriceGE(daLocation.FishNPCs[i].RawFishes[h].ID); for h:=0 to high(daLocation.FishNPCs[h].BurntFishes) do daLocation.FishNPCs[i].BurntFishes[h].price := getPriceGE(daLocation.FishNPCs[i].BurntFishes[h].ID); for h:=0 to high(daLocation.FishNPCs[h].CookedFishes) do daLocation.FishNPCs[i].CookedFishes[h].price := getPriceGE(daLocation.FishNPCs[i].CookedFishes[h].ID); end; for i:=0 to 1000 do if not FileExists(ScriptPath+'ineedbot''s AIO Fisher proggy '+inttoStr(i)+'.png') then begin ProggieLocation := ScriptPath+'ineedbot''s AIO Fisher proggy '+inttoStr(i)+'.png'; break; end; doProggy(ProggieLocation); if disableCook then daLocation.canCook := false; if disableBank then daLocation.canBank := false; end; procedure setupPlayer; begin Reflect.Compass.Make('n'); Reflect.Compass.MakePitch(10); LastXPCheck.restart; end; procedure FreeDTMZ; begin graphicOpti.Free; daLogger.Status('Thanks for using ineedbot''s AIO Fisher v'+FloatToStr(Version)+'('+floatToStr(fversion)+')'+'! Please post your progress reports! Run time: '+Reflect.Time.msToTime(getTimeRunning(), TIME_FORMAL), []); if useStats then if statsServer.Commit then daLogger.Status('Successfully sent heartbeat to ''stats.grats.pw''.', []); end; procedure goToBank; var RsTIle, nearestNPCTile : TPoint; i, h : integer; nearestBank : BankLocation; didPath : boolean; label normal; begin if not daLocation.canBank or ((length(daLocation.BankLocations) = 0) and (length(daLocation.BankNPCs) = 0)) then exit; if Reflect.Bank.IsOpen or Reflect.Bank.IsPinOpen or Reflect.Bank.IsDepositBoxOpen or Reflect.Shop.IsOpen then exit; case daLocation.ID of 14..15:begin //karm depo if Reflect.Tiles.NearTile(daLocation.customTPAs[2][3], 50) and (Reflect.Tiles.GetPlane = 0) then begin UpdateScreen('Going to go pay-fare.'); RsTIle := Reflect.Tiles.TileToMM(daLocation.customTPAs[0][0]); if R_TileOnMM(daLocation.customTPAs[0][0], RSTile) then begin ReflectPlayer.WalkPathMM(daLocation.customTPAs[0], false); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(random(2000)); end; if not R_TileOnMS(daLocation.customTPAs[2][3], RSTile) then begin ReflectPlayer.BlindWalkMM(daLocation.customTPAs[2][3], 5); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(random(2000)); end; UpdateScreen('Paying fare...'); R_TryInteractNPC([daLocation.customIDs[0][3]], ['Pay-Fare'], 5, 0, 0, 50); ReflectPlayer.FFlag(0, 5000+random(500)); Reflect.Chat.doConversation(['Can I journey on this ship?', 'Search away, I have nothing to hide.', 'Ok.', 'Yes please.']); sleepScript(3500+random(500)); end; if Reflect.Tiles.NearTile(daLocation.customTPAs[2][1], 50) and (Reflect.Tiles.GetPlane = 1) then begin UpdateScreen('Crossing plank...'); if not R_TileOnMS(daLocation.customTPAs[2][1], RSTile) then begin ReflectPlayer.BlindWalkMM(daLocation.customTPAs[2][1], 5); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; if R_InteractTile(daLocation.customTPAs[2][1], ['Cross']) then begin ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; end; if Reflect.Tiles.NearTile(daLocation.customTPAs[2][2], 50) and (Reflect.Tiles.GetPlane = 1) then begin UpdateScreen('Crossing plank...'); if not R_TileOnMS(daLocation.customTPAs[2][2], RSTile) then begin ReflectPlayer.BlindWalkMM(daLocation.customTPAs[2][2], 5); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; if R_InteractTile(daLocation.customTPAs[2][2], ['Cross']) then begin ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; end; if Reflect.Tiles.NearTile(daLocation.customTPAs[2][0], 50) and (Reflect.Tiles.GetPlane = 0) then begin goto normal; end; end; else begin normal: if (length(daLocation.BankNPCs) = 0) then begin nearestBank.Tile.x := -1; for i:=0 to high(daLocation.BankLocations) do if (Reflect.Tiles.DistanceFromTile(daLocation.BankLocations[i].Tile) < Reflect.Tiles.DistanceFromTile(nearestBank.Tile)) or (nearestBank.Tile.x = -1) then nearestBank := daLocation.BankLocations[i]; if R_TileOnMS(nearestBank.Tile, RSTile, nearestBank.Offset[0], nearestBank.Offset[1], nearestBank.Offset[2]) then exit; end else begin nearestNPCTile.x := -1; for i:=0 to high(daLocation.BankNPCs) do for h:=0 to high(daLocation.BankNPCs[i].Locations) do if (Reflect.Tiles.DistanceFromTile(daLocation.BankNPCs[i].Locations[h]) < Reflect.Tiles.DistanceFromTile(nearestNPCTile)) or (nearestNPCTile.x = -1) then nearestNPCTile := daLocation.BankNPCs[i].Locations[h]; if R_TileOnMS(nearestNPCTile, RSTile) then exit; end; if (length(daLocation.PathToBank) <> 0) and not didPath then begin if R_TileOnMM(daLocation.PathToBank[0], RSTile) then begin updateScreen('Going to bank.'); ReflectPlayer.WalkPathMM(daLocation.PathToBank, false); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); exit; end; end; if (length(daLocation.BankNPCs) = 0) then begin nearestBank.Tile.x := -1; for i:=0 to high(daLocation.BankLocations) do if (Reflect.Tiles.DistanceFromTile(daLocation.BankLocations[i].Tile) < Reflect.Tiles.DistanceFromTile(nearestBank.Tile)) or (nearestBank.Tile.x = -1) then nearestBank := daLocation.BankLocations[i]; updateScreen('Going to bank.'); ReflectPlayer.BlindWalkMM(Point(nearestBank.Tile.x + nearestBank.TileOffset[0], nearestBank.Tile.y + nearestBank.TileOffset[1]), 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); end else begin nearestNPCTile.x := -1; for i:=0 to high(daLocation.BankNPCs) do for h:=0 to high(daLocation.BankNPCs[i].Locations) do if (Reflect.Tiles.DistanceFromTile(daLocation.BankNPCs[i].Locations[h]) < Reflect.Tiles.DistanceFromTile(nearestNPCTile)) or (nearestNPCTile.x = -1) then nearestNPCTile := daLocation.BankNPCs[i].Locations[h]; updateScreen('Going to bank npc.'); ReflectPlayer.BlindWalkMM(nearestNPCTile, 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); end; end; end; end; procedure openBank; var RsTIle, nearestNPCTile : TPoint; i, h : integer; nearestBank : BankLocation; nearestNPC : BankNPC; timer : TReflectTimer; label normal; begin if not daLocation.canBank or ((length(daLocation.BankLocations) = 0) and (length(daLocation.BankNPCs) = 0)) then exit; if Reflect.Bank.IsOpen or Reflect.Bank.IsPinOpen or Reflect.Bank.IsDepositBoxOpen or Reflect.Shop.IsOpen then exit; case daLocation.ID of else begin normal: if (length(daLocation.BankNPCs) = 0) then begin Reflect.Compass.Make('n'); Reflect.Compass.MakePitch(10); nearestBank.Tile.x := -1; for i:=0 to high(daLocation.BankLocations) do if (Reflect.Tiles.DistanceFromTile(daLocation.BankLocations[i].Tile) < Reflect.Tiles.DistanceFromTile(nearestBank.Tile)) or (nearestBank.Tile.x = -1) then nearestBank := daLocation.BankLocations[i]; if (Reflect.Tiles.GetPlane <> nearestBank.Plane) then exit; if not R_TileOnMS(nearestBank.Tile, RSTile, nearestBank.Offset[0], nearestBank.Offset[1], nearestBank.Offset[2]) then begin updateScreen('Going to bank.'); ReflectPlayer.BlindWalkMM(Point(nearestBank.Tile.x + nearestBank.TileOffset[0], nearestBank.Tile.y + nearestBank.TileOffset[1]), 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); end; if R_TileOnMS(nearestBank.Tile, RSTile, nearestBank.Offset[0], nearestBank.Offset[1], nearestBank.Offset[2]) then begin updateScreen('Opening bank.'); if R_InteractTile(nearestBank.Tile, nearestBank.Options, nearestBank.Offset[0], nearestBank.Offset[1], nearestBank.Offset[2], true) then begin ReflectPlayer.FFlag(0, 5000+random(500)); Timer.Restart; while not Reflect.Bank.IsOpen and not Reflect.Bank.IsPinOpen and not Reflect.Bank.IsDepositBoxOpen and not Reflect.Shop.IsOpen and (timer.ElapsedTime < 2500) do sleepScript(50); end; end; end else begin nearestNPCTile.x := -1; for i:=0 to high(daLocation.BankNPCs) do for h:=0 to high(daLocation.BankNPCs[i].Locations) do if (Reflect.Tiles.DistanceFromTile(daLocation.BankNPCs[i].Locations[h]) < Reflect.Tiles.DistanceFromTile(nearestNPCTile)) or (nearestNPCTile.x = -1) then begin nearestNPCTile := daLocation.BankNPCs[i].Locations[h]; nearestNPC := daLocation.BankNPCs[i]; end; if (Reflect.Tiles.GetPlane <> nearestNPC.Plane) then exit; updateScreen('Opening bank npc.'); if R_TryInteractNPC(nearestNPC.IDs, nearestNPC.Options, 5, nearestNPC.Offset[0], nearestNPC.Offset[1], nearestNPC.Offset[2]) then begin ReflectPlayer.FFlag(0, 5000+random(500)); Timer.Restart; while not Reflect.Bank.IsOpen and not Reflect.Bank.IsPinOpen and not Reflect.Bank.IsDepositBoxOpen and not Reflect.Shop.IsOpen and (timer.ElapsedTime < 2500) do sleepScript(50); end; end; end; end; end; procedure goToFish; var RsTIle, farest : TPoint; i, h : integer; didPath : boolean; label normal; begin if length(daLocation.FishNPCs) = 0 then exit; case daLocation.ID of 14..15:begin //karm depo if daLocation.canBank then begin if Reflect.Tiles.NearTile(daLocation.customTPAs[2][0], 50) and (Reflect.Tiles.GetPlane = 0) then begin UpdateScreen('Going to go pay-fare.'); if R_TileOnMM(daLocation.customTPAs[1][0], RSTile) then begin ReflectPlayer.WalkPathMM(daLocation.customTPAs[1], false); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(random(2000)); end; if not R_TileOnMS(daLocation.customTPAs[2][0], RSTile) then begin ReflectPlayer.BlindWalkMM(daLocation.customTPAs[2][0], 5); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(random(2000)); end; UpdateScreen('Paying fare...'); R_TryInteractNPC([daLocation.customIDs[0][0], daLocation.customIDs[0][1], daLocation.customIDs[0][2]], ['Pay-fare'], 5, 0, 0, 50); ReflectPlayer.FFlag(0, 5000+random(500)); Reflect.Chat.doConversation(['Can I journey on this ship?', 'Search away, I have nothing to hide.', 'Ok.', 'Yes please.']); sleepScript(3500+random(500)); end; if Reflect.Tiles.NearTile(daLocation.customTPAs[2][1], 50) and (Reflect.Tiles.GetPlane = 1) then begin UpdateScreen('Crossing plank...'); if not R_TileOnMS(daLocation.customTPAs[2][1], RSTile) then begin ReflectPlayer.BlindWalkMM(daLocation.customTPAs[2][1], 5); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; if R_InteractTile(daLocation.customTPAs[2][1], ['Cross']) then begin ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; end; if Reflect.Tiles.NearTile(daLocation.customTPAs[2][2], 50) and (Reflect.Tiles.GetPlane = 1) then begin UpdateScreen('Crossing plank...'); if not R_TileOnMS(daLocation.customTPAs[2][2], RSTile) then begin ReflectPlayer.BlindWalkMM(daLocation.customTPAs[2][2], 5); ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; if R_InteractTile(daLocation.customTPAs[2][2], ['Cross']) then begin ReflectPlayer.FFlag(2+randomrange(-2,2), 5000+random(500)); sleepScript(2500+random(500)); end; end; end; if Reflect.Tiles.NearTile(daLocation.customTPAs[2][3], 50) and (Reflect.Tiles.GetPlane = 0) then begin goto normal; end; end; else begin normal: if (length(daLocation.PathToFish) <> 0) and not didPath then begin if R_TileOnMM(daLocation.PathToFish[0], RSTile) then begin updateScreen('Going to fishies.'); ReflectPlayer.WalkPathMM(daLocation.PathToFish, false); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); exit; end; end; farest.x := -1; for i:=0 to high(daLocation.FishNPCs) do for h:=0 to high(daLocation.FishNPCs[i].Locations) do if (Reflect.Tiles.DistanceFromTile(daLocation.FishNPCs[i].Locations[h]) > Reflect.Tiles.DistanceFromTile(farest)) or (farest.x = -1) then farest := daLocation.FishNPCs[i].Locations[h]; updateScreen('Going to fish spots.'); ReflectPlayer.BlindWalkMM(farest, 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); end; end; end; procedure doFishing; var _npcs : TReflectNPCArray; i, h : integer; rsTile, npcTile : TPoint; found : boolean; Timer : TReflectTimer; begin if wasWorking then begin if useFakeWaitTime then begin updateScreen('Doing fake ''antiban'' wait.'); sleepScript(1250+random(7500)); end else begin sleepScript(1250+random(250));//wait for fishspot to change end; end wasWorking := false; levelUpCheck; case daLocation.ID of end; for h:=0 to high(daLocation.FishNPCs) do begin _npcs.GetAll; for i:=0 to high(_npcs) do begin if inIntArray(daLocation.FishNPCs[h].IDs, _npcs[i].GetID) then begin npcTile := _npcs[i].gettile; found := true; if not R_TileOnMS(npcTile, RSTile) then begin R_TryMakeTileOnMS(npcTile); if not R_TileOnMS(npcTile, RSTile) then begin updateScreen('Going to fishing spot.'); ReflectPlayer.BlindWalkMM(npcTile, 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1000)); end; end; Reflect.Interfaces.CloseAll; if R_TileOnMS(npcTile, RSTile) then begin updateScreen('Going to fish...'); if R_InteractTile(npcTile, daLocation.FishNPCs[h].Options, 0, 0, 0, false) then begin Timer.Restart; while (timer.ElapsedTime < 15000) and ReflectPlayer.IsMoving and (ReflectPlayer.GetInteractingIndex > 0) do sleepScript(50); sleepScript(1500+random(1000)); FishspotIndice := ReflectPlayer.GetInteractingIndex; if(random(round(AntiAmount/350)) <> 0)then Reflect.Antiban.MMouseOffClient('rand'); end; end; break; end; end; if found then break; end; if not found then GoToFish; end; procedure doDropping(forced:boolean=false); var _items : TReflectInvItemArray; i, _id, _slot : integer; tB : TBox; tP : TPoint; firstTim, didFirstInRow : boolean; rawFishIds, burntFishIDs, cookedFishIds, fishIDs, EquipmentIDs, BaitIDs, dropPattern : TIntegerArray; begin if not forced then doCount; updateScreen('Dropping items.'); doProggy(ProggieLocation); firstTim := true; rawFishIds := daLocation.getRawFishIDs; BurntFishIds := daLocation.getBurntFishIDs; CookedFishIds := daLocation.getCookedFishIDs; fishIDs := combineIntArray(CookedFishIDs, BurntFishIDs); fishIDs := combineIntArray(fishIDs, rawFishIds); BaitIDs := daLocation.getBaitIDs; EquipmentIDs := daLocation.getEquipmentIDs; exitMenu; dropPattern := [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]; while ReflectPlayer.isLoggedIn and (firstTim or Reflect.Inv.Contains(fishIDs)) and not ReflectPlayer.IsUnderAttack and not anySlotActivated do begin updateScreen('Dropping items.'); if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); randomHandler; _items.GetAll(true); for i:=0 to high(dropPattern) do begin if not ReflectPlayer.isLoggedIn then break; if ReflectPlayer.IsUnderAttack then break; if anySlotActivated then break; _slot := dropPattern[i]-1; case _slot of 0..3: didFirstInRow := false; end; _id := _items[_slot].getid; if _id <= 0 then continue; if not itemInSlot(_items[_slot].getinvslot) then continue; if dropOnly then begin if not inIntArray(fishIDs, _id) then continue; end else begin if inIntArray(KnifeIDs, _id) then continue; if inIntArray(EquipmentIDs, _id) then continue; if inIntArray(BaitIDs, _id) then continue; if inIntArray(TinderIDs, _id) then continue; if inIntArray(CoinsIDs, _id) then continue; if inIntArray(AxeIDs, _id) then continue; end; tB := _items[_slot].GetBox; getMousePos(tP.x, tP.y); if not MouseKeys then begin if not PointInBox(tP, tB) then Reflect.Mouse.Move(tB); fastClick(Mouse_right); Reflect.Text.ChooseOption('Drop', 2500); end else begin if not didFirstInRow then begin didFirstInRow := true; if not PointInBox(tP, tB) then begin Reflect.Mouse.Move(tB); getMousePos(tP.x, tP.y); end; end; if not PointInBox(tP, tB) then MoveMouse(Reflect.Math.iGaussRange(tb.X1, tb.X2), Reflect.Math.iGaussRange(tb.y1, tb.y2)); fastClick(Mouse_right); Reflect.Text.chooseOptionFast('Drop'); end; end; firstTim := false; end; end; procedure doBank; var _items : TReflectInvItemArray; i, count, _id : integer; tim : TReflectTimer; tB : TBox; firstTim : Boolean; rawFishIds, burntFishIDs, cookedFishIds, fishIDs, EquipmentIDs, BaitIDs : TIntegerArray; begin if not daLocation.canBank then exit; firstTim := true; rawFishIds := daLocation.getRawFishIDs; BurntFishIds := daLocation.getBurntFishIDs; CookedFishIds := daLocation.getCookedFishIDs; fishIDs := combineIntArray(CookedFishIDs, BurntFishIDs); fishIDs := combineIntArray(fishIDs, rawFishIds); BaitIDs := daLocation.getBaitIDs; EquipmentIDs := daLocation.getEquipmentIDs; if daLocation.isSell then begin if not Reflect.Shop.IsOpen then exit; doCount; updateScreen('Selling items.'); doProggy(ProggieLocation); while ReflectPlayer.isLoggedIn and (Reflect.Inv.Contains(fishIDs) or firstTim) and Reflect.Shop.IsOpen do begin updateScreen('Selling items.'); _items.GetAll; for i:=0 to high(_items) do begin if not ReflectPlayer.IsLoggedIn then break; if not Reflect.Shop.IsOpen then break; if not itemInSlot(_items[i].getinvslot) then continue; _id := _items[i].getId; if dropOnly then begin if not inIntArray(fishIDs, _id) then continue; end else begin if inIntArray(KnifeIDs, _id) then continue; if inIntArray(AxeIDs, _id) then continue; if inIntArray(CoinsIDs, _id) then continue; if inIntArray(TinderIDs, _id) then continue; if inIntArray(EquipmentIDs, _id) then continue; if inIntArray(BaitIDs, _id) then continue; end; count := Reflect.Inv.Count; tB := _items[i].getbox; Reflect.Mouse.Move(tB, mouse_right); sleepScript(100+random(100)); Reflect.Text.ChooseOption('Sell 50'); tim.restart; while (tim.Elapsedtime < 2500) and (Reflect.Inv.Count = count) do sleepScript(20 + Random(20)); sleepScript(500+random(250)); if pos('highly over-stocked', Reflect.Chat.GetTextOnLine(1)) > 1 then begin Reflect.Interfaces.Close(Interface_ShopMenu); sleepScript(1000+random(1500)); doDropping(true); exit; end; end; firstTim := false; end; if(random(2) = 1)then Reflect.Interfaces.Close(Interface_ShopMenu); sleepScript(random(1500)); doFishing; end else begin if not Reflect.Bank.IsOpen and not Reflect.Bank.IsDepositBoxOpen and not Reflect.Bank.IsPinOpen then exit; if Reflect.Bank.IsPinOpen then begin if length(ReflectPlayer.Pin) = 4 then Reflect.Bank.EnterPin(ReflectPlayer.Pin) else begin Reflect.Bank.Close; daLogger.Status('Invalid pin.', []); UpdateScreen('Invalid pin.'); ReflectPlayer.Active := false; ReflectPlayer.Logout; sleepScript(2500); exit; end; sleepScript(random(2500)); end; if not Reflect.Bank.IsOpen and not Reflect.Bank.IsDepositBoxOpen then exit; doCount; updateScreen('Banking items.'); doProggy(ProggieLocation); while ReflectPlayer.isLoggedIn and (Reflect.Inv.Contains(fishIDs) or firstTim) and (Reflect.Bank.IsOpen or Reflect.Bank.IsDepositBoxOpen) do begin updateScreen('Banking items.'); if not Reflect.Inv.Contains(KnifeIDs) and not Reflect.Inv.Contains(AxeIDs) and not Reflect.Inv.Contains(CoinsIDs) and not Reflect.Inv.Contains(TinderIDs) and not Reflect.Inv.Contains(BaitIDs) and not Reflect.Inv.Contains(EquipmentIDs) and (random(2) = 0) then begin Reflect.Bank.DepositAll('inv'); sleepScript(1000+random(1000)); end else begin _items.GetAll; for i:=0 to high(_items) do begin if not ReflectPlayer.IsLoggedIn then break; if not Reflect.Bank.IsOpen and not Reflect.Bank.IsDepositBoxOpen then break; if not itemInSlot(_items[i].getinvslot) then continue; _id := _items[i].getId; if dropOnly then begin if not inIntArray(fishIDs, _id) then continue; end else begin if inIntArray(KnifeIDs, _id) then continue; if inIntArray(AxeIDs, _id) then continue; if inIntArray(CoinsIDs, _id) then continue; if inIntArray(TinderIDs, _id) then continue; if inIntArray(EquipmentIDs, _id) then continue; if inIntArray(BaitIDs, _id) then continue; end; if not Reflect.Bank.IsDepositBoxOpen then tB := _items[i].GetBox else tB := Reflect.Bank.DepositBoxBox(_items[i].GetInvSlot); count := Reflect.Inv.Count; Reflect.Mouse.Move(tB, mouse_right); sleepScript(100+random(100)); Reflect.Text.ChooseOption('Deposit-All'); tim.restart; while (tim.Elapsedtime < 2500) and (Reflect.Inv.Count = count) do sleepScript(20 + Random(20)); sleepScript(500+random(250)); end; end; firstTim := false; end; if(random(2) = 1)then begin Reflect.Bank.Close; end; sleepScript(random(1500)); doFishing; end; end; procedure goToTree; var rsTile : TPoint; i : integer; tempO : TReflectObject; label normal; begin if not daLocation.canCook or (length(daLocation.TreeObjects) = 0) then exit; case daLocation.ID of 14..19:begin if R_TileOnMM(daLocation.customTPAs[0][0], RSTile) then begin updateScreen('Going to tree.'); ReflectPlayer.WalkPathMM(daLocation.customTPAs[0], false); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); exit; end; goTo normal; end; else begin normal: updateScreen('Looking for tree...'); for i:=0 to high(daLocation.TreeObjects) do begin if(Reflect.Tiles.GetPlane = daLocation.TreeObjects[i].Plane)then begin tempO.GetAt(ObjGame, daLocation.TreeObjects[i].Tile); if not Reflect.Smart.IsNull(tempO.Reference) then begin if inIntArray(daLocation.TreeObjects[i].AliveIDs, tempO.getID) then begin if not R_TileOnMS(daLocation.TreeObjects[i].Tile, RSTile, daLocation.TreeObjects[i].Offset[0], daLocation.TreeObjects[i].Offset[1], daLocation.TreeObjects[i].Offset[2]) then begin updateScreen('Going to tree spot.'); ReflectPlayer.BlindWalkMM(Point(daLocation.TreeObjects[i].Tile.x+daLocation.TreeObjects[i].TileOffset[0], daLocation.TreeObjects[i].Tile.y+daLocation.TreeObjects[i].TileOffset[1]), 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1000)); end; break; end; end; end; end; end; end; end; function isInvFullScript:boolean; begin if daLocation.canCook then begin case daLocation.ID of 24:begin //otto result := Reflect.Inv.IsFull; end; 29:begin //zul result := Reflect.Inv.IsFull; end; 8..13:begin//cath result := Reflect.Inv.IsFull; end; 2..3:begin //barb result := Reflect.Inv.IsFull; end; else begin if Reflect.Inv.Contains(LogIDs) then begin result := Reflect.Inv.IsFull; end else begin result := (Reflect.Inv.Count >= 27); end; end; end; end else begin result := Reflect.Inv.IsFull; end; end; procedure dropARawFish; var i, count :integer; _item : TReflectInvItem; rawFishIDs, cookedFishIDs : TIntegerArray; tB : TBox; timer : TReflectTimer; label normal; begin if not daLocation.canCook then exit; case daLocation.ID of 24:begin //otto cookedFishIDs := daLocation.getCookedFishIDs; if not Reflect.Inv.Contains(cookedFishIDs) then goto normal; end; 29:begin //zul cookedFishIDs := daLocation.getCookedFishIDs; if not Reflect.Inv.Contains(cookedFishIDs) then goto normal; end; 8..13,2..3:begin //cath //barb end; else begin normal: rawFishIDs := daLocation.getRawFishIDs; for i:=0 to high(rawFishIDs) do begin updateScreen('Dropping a raw fish...'); if(_item.Find(rawFishIDs[i]))then begin if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); sleepScript(500+random(500)); tB := _item.getbox; Reflect.Mouse.Move(tB, mouse_right); count := Reflect.Inv.Count; Reflect.Text.ChooseOption('Drop', 2500); timer.Restart; while timer.ElapsedTime < 2500 and count = Reflect.Inv.Count do sleepScript(50); break; end; end; end; end; end; procedure chopTree; var rsTile : TPoint; tempO : TReflectObject; i, objectID : integer; label normal; begin if not daLocation.canCook or (length(daLocation.TreeObjects) = 0) or Reflect.Inv.IsFull then exit; case daLocation.ID of else begin normal: updateScreen('Looking for tree...'); for i:=0 to high(daLocation.TreeObjects) do begin if(Reflect.Tiles.GetPlane = daLocation.TreeObjects[i].Plane)then begin tempO.GetAt(ObjGame, daLocation.TreeObjects[i].Tile); if not Reflect.Smart.IsNull(tempO.Reference) then begin if inIntArray(daLocation.TreeObjects[i].AliveIDs, tempO.getID) then begin if R_TileOnMS(daLocation.TreeObjects[i].Tile, RSTile, daLocation.TreeObjects[i].Offset[0], daLocation.TreeObjects[i].Offset[1], daLocation.TreeObjects[i].Offset[2]) then begin updateScreen('Going to chop tree.'); if R_InteractTile(daLocation.TreeObjects[i].Tile, daLocation.TreeObjects[i].Options, daLocation.TreeObjects[i].Offset[0], daLocation.TreeObjects[i].Offset[1], daLocation.TreeObjects[i].Offset[2]) then begin ReflectPlayer.FFlag(0, 5000+random(500)); sleepScript(1000+random(1000)); if(random(round(AntiAmount/1000)) = 1)then Reflect.Antiban.MMouseOffClient('rand'); tempO.GetAt(ObjGame, daLocation.TreeObjects[i].Tile); if not Reflect.Smart.IsNull(tempO.Reference) then objectID := tempO.getId else objectID := -1; while ReflectPlayer.isLoggedIn and inIntArray(daLocation.TreeObjects[i].AliveIDs, objectID) and ReflectPlayer.isDoingAnim(WoodcuttingAnimationIDs, 1000) and not Reflect.Inv.Contains(LogIDs) and not ReflectPlayer.IsUnderAttack do begin randomHandler; updateScreen('Chopping tree...'); tempO.GetAt(ObjGame, daLocation.TreeObjects[i].Tile); if not Reflect.Smart.IsNull(tempO.Reference) then objectID := tempO.getId else objectID := -1; end; end; end; break; end; end; end; end; end; end; end; function R_GetClosestPlaceForFire: TPoint; var tempObj : TReflectObject; Tile : TPOINt; begin tile := Reflect.Tiles.GetGlobalTile; tempObj.GetAt(ObjGame, point(tile.x-1, tile.y)); if Reflect.Smart.IsNull(tempObj.Reference) or tempObj.getID < deadObjID then exit(tempObj.getTile); tempObj.GetAt(ObjGame, point(tile.x+1, tile.y)); if Reflect.Smart.IsNull(tempObj.Reference) or tempObj.getID < deadObjID then exit(tempObj.getTile); tempObj.GetAt(ObjGame, point(tile.x, tile.y-1)); if Reflect.Smart.IsNull(tempObj.Reference) or tempObj.getID < deadObjID then exit(tempObj.getTile); tempObj.GetAt(ObjGame, point(tile.x, tile.y+1)); if Reflect.Smart.IsNull(tempObj.Reference) or tempObj.getID < deadObjID then exit(tempObj.getTile); exit(Point(-1, -1)); end; procedure createFire; var rsTile : TPoint; fireID : integer; tinderFirst : boolean; tempO : TReflectObject; _item : TReflectInvItem; timer : TReflectTimer; label normal; begin if not daLocation.canCook or (length(daLocation.FireLocations) <> 0) or not Reflect.Inv.Contains(TinderIDs) or not Reflect.Inv.Contains(LogIDs) then exit; case daLocation.ID of 24:begin //otto end; 29:begin //zul end; else begin normal: RSTile := Reflect.Tiles.GetGlobalTile; tempO.GetAt(ObjGame, RSTile); if not Reflect.Smart.IsNull(tempO.Reference) then fireID := tempO.getId else fireID := -1; if fireID < deadObjID then begin updateScreen('Going to make fire...'); if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); if(random(2) = 1) then tinderFirst := true else tinderFirst := false; if not anySlotActivated then begin if tinderFirst then begin if _item.Find(TinderIDs) then begin _item.Interact; sleepScript(250+random(500)); end; end else begin if _item.Find(LogIDs) then begin _item.Interact; sleepScript(250+random(500)); end; end; end; if anySlotActivated(true) then begin if not tinderFirst then begin if _item.Find(TinderIDs) then begin _item.Interact; sleepScript(250+random(500)); end; end else begin if _item.Find(LogIDs) then begin _item.Interact; sleepScript(250+random(500)); end; end; end; sleepScript(1000+random(1000)); if(random(round(AntiAmount/1000)) = 1)then Reflect.Antiban.MMouseOffClient('rand'); while ReflectPlayer.isLoggedIn and Reflect.Tiles.NearTile(rsTile, 1) and ReflectPlayer.IsDoingAnim(FiremakingAnimationIDs, 1000) and not ReflectPlayer.IsUnderAttack do begin randomHandler; updateScreen('Making fire...'); end; timer.restart; tempO.GetAt(ObjGame, RSTile); if not Reflect.Smart.IsNull(tempO.Reference) then fireID := tempO.getId else fireID := -1; while timer.ElapsedTime < 2500 and not inIntArray(FireIDs, fireID) do begin sleepScript(50); tempO.GetAt(ObjGame, RSTile); end; end else begin updateScreen('Looking for place for fire...'+inttostr(fireID)); RSTile := R_GetClosestPlaceForFire; R_InteractTile(RSTile, ['Walk']); ReflectPlayer.FFlag(0, 5000+random(500)); sleepScript(1000+random(500)); end; end; end; end; procedure goToFire; var FireObject : TReflectObject; i : integer; rsTile, objTile : TPoint; closestFireTile : FireLocation; label normal; begin if not daLocation.canCook then exit; case daLocation.ID of 24:begin //otto end; 29:begin //zul end; else begin normal: if (length(daLocation.FireLocations) = 0) then begin if FireObject.Find(ObjGame, FireIDs, ItemCheckDistance) then begin objTile := FireObject.GetTile; if not R_TileOnMS(objTile, RSTile) then begin updateScreen('Going to fire.'); ReflectPlayer.BlindWalkMM(objTile, 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1000)); end; end; end else begin closestFireTile.Tile.x := -1; for i:=0 to high(daLocation.FireLocations) do if (Reflect.Tiles.DistanceFromTile(daLocation.FireLocations[i].Tile) < Reflect.Tiles.DistanceFromTile(closestFireTile.Tile)) or (closestFireTile.Tile.x = -1) then closestFireTile := daLocation.FireLocations[i]; if not R_TileOnMS(closestFireTile.Tile, RSTile, closestFireTile.Offset[0], closestFireTile.Offset[1], closestFireTile.Offset[2]) then begin updateScreen('Going to fire location.'); ReflectPlayer.BlindWalkMM(Point(closestFireTile.Tile.x+closestFireTile.TileOffset[0], closestFireTile.Tile.y+closestFireTile.TileOffset[1]), 5); ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1000)); end; end; end; end; end; procedure OpenFire; var FireObject : TReflectObject; i : integer; rsTile, objTile : TPoint; _item : TReflectInvItem; RawFishIDs : TIntegerArray; closestFireTile : FireLocation; timer : TReflectTimer; W : TReflectWidget; tb : TBox; label normal; begin RawFishIDs := daLocation.getRawFishIDs; if not daLocation.canCook or not Reflect.Inv.Contains(RawFishIDs) then exit; case daLocation.ID of 24:begin //otto end; 29:begin //zul end; else begin normal: if (length(daLocation.FireLocations) = 0) then begin if FireObject.Find(ObjGame, FireIDs, ItemCheckDistance) then begin objTile := FireObject.GetTile; if R_TileOnMS(objTile, RSTile) then begin updateScreen('Going to cook food.'); if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); if not anySlotActivated then begin if _item.Find(rawFishIds) then begin _item.Interact; sleepScript(250+random(500)); end; end; if anySlotActivated(true) then begin if R_InteractTile(objTile, FireOptions) then begin ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); timer.restart; W.GetWidget(Widget_Cook_Container, Cook_Options); while (timer.elapsedTime < 2500) do begin if W.NotNull then begin tb := w.GetBounds; if tb.X1 > 0 then break; end; W.Free; sleepScript(50); W.GetWidget(Widget_Cook_Container, Cook_Options); end; W.Free; end; end; end; end; end else begin closestFireTile.Tile.x := -1; for i:=0 to high(daLocation.FireLocations) do if (Reflect.Tiles.DistanceFromTile(daLocation.FireLocations[i].Tile) < Reflect.Tiles.DistanceFromTile(closestFireTile.Tile)) or (closestFireTile.Tile.x = -1) then closestFireTile := daLocation.FireLocations[i]; if R_TileOnMS(closestFireTile.Tile, RSTile, closestFireTile.Offset[0], closestFireTile.Offset[1], closestFireTile.Offset[2]) and (Reflect.Tiles.GetPlane = closestFireTile.Plane) then begin updateScreen('Going to cook food.'); if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); if not anySlotActivated then begin if _item.Find(rawFishIds) then begin _item.Interact; sleepScript(250+random(500)); end; end; if anySlotActivated(true) then begin if R_InteractTile(closestFireTile.Tile, closestFireTile.Options, closestFireTile.Offset[0], closestFireTile.Offset[1], closestFireTile.Offset[2]) then begin ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); timer.restart; W.GetWidget(Widget_Cook_Container, Cook_Options); while (timer.elapsedTime < 2500) do begin if not W.NotNull then begin tb := w.GetBounds; if tb.X1 > 0 then break; end; W.Free; sleepScript(50); W.GetWidget(Widget_Cook_Container, Cook_Options); end; W.Free; end; end; end; end; end; end; end; procedure doFire; var x, y, i, lastFishSlot, knifeSlot : integer; _item : TReflectInvItem; RawFishIDs, cookedFishIDs : TIntegerArray; _items : TReflectInvItemArray; W : TReflectWidget; found : boolean; tb : TBox; label normal; begin RawFishIDs := daLocation.getRawFishIDs; if not daLocation.canCook or not Reflect.Inv.Contains(RawFishIDs) then exit; cookedFishIDs := daLocation.getCookedFishIDs; case daLocation.ID of 24:begin //otto if daLocation.canCook then begin while ReflectPlayer.isLoggedIn and Reflect.Inv.Contains(RawFishIDs) and not ReflectPlayer.IsUnderAttack and Reflect.Inv.Contains(KnifeIDs) do begin if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); updateScreen('Knifing fish...'); if Reflect.Inv.IsFull and not Reflect.Inv.Contains(cookedFishIDs) then dropARawFish; if not anySlotActivated then begin for i:=0 to high(KnifeIDs) do begin if(_item.Find(KnifeIDs[i]))then begin Reflect.Mouse.Move(_item.getbox, mouse_left); sleepScript(250+random(500)); break; end; end; end; if anySlotActivated(true) then begin for i:=0 to high(rawFishIds) do begin if(_item.Find(rawFishIds[i]))then begin Reflect.Mouse.Move(_item.getbox, mouse_left); sleepScript(500+random(500)); break; end; end; end; randomHandler; end; end; end; 29:begin //zul if daLocation.canCook then begin while ReflectPlayer.isLoggedIn and Reflect.Inv.Contains(RawFishIDs) and not ReflectPlayer.IsUnderAttack and Reflect.Inv.Contains(KnifeIDs) do begin if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); updateScreen('Knifing fish...'); randomHandler; if Reflect.Inv.IsFull and not Reflect.Inv.Contains(cookedFishIDs) then dropARawFish; while ReflectPlayer.isLoggedIn and Reflect.Inv.Contains(RawFishIDs) and not ReflectPlayer.IsUnderAttack and Reflect.Inv.Contains(KnifeIDs) do begin lastFishSlot := -1; _items.GetAll; for i:= high(_items) downto 0 do begin if inIntArray(rawFishIDs, _items[i].GetID) then begin lastFishSlot := _items[i].getInvSlot; break; end; end; knifeSlot := -1; for i:=0 to high(_items) do if inIntArray(knifeIds, _items[i].GetID) then begin knifeSlot := _items[i].getInvSlot; break; end; if not anySlotActivated then begin tb := Reflect.Inv.InvBox(knifeSlot); Reflect.Mouse.Move(tb, mouse_left); sleepScript(100+random(150)); end; if anySlotActivated(true) then begin tb := Reflect.Inv.InvBox(lastFishSlot); Reflect.Mouse.Move(tb, mouse_left); sleepScript(100+random(150)); end; end; end; end; end; else begin normal: W.GetWidget(Widget_Cook_Container, Cook_Options); if W.NotNull then begin tb := w.GetBounds; if tb.X1 <= 0 then begin w.Free; exit; end; if W.Interact('Cook All') then begin sleepScript(1000+random(2500)); if(random(round(AntiAmount/350)) <> 1)then Reflect.Antiban.MMouseOffClient('rand'); while ReflectPlayer.isLoggedIn and ReflectPlayer.IsDoingAnim(CookingAnimationIDs, 1000) and Reflect.Inv.Contains(rawFishIDs) and not ReflectPlayer.IsUnderAttack do begin randomHandler; updateScreen('Cooking food...'); FixActive; end; end; W.Free; end; end; end; end; procedure doCooking; var FireObject : TReflectObject; RawFishIDs : TIntegerArray; begin RawFishIDs := daLocation.getRawFishIDs; if Reflect.Inv.Contains(rawFishIDs) then begin if not FireObject.Find(ObjGame, FireIDs, ItemCheckDistance) then begin if not Reflect.Inv.Contains(LogIDs) then begin goToTree; if Reflect.Inv.IsFull then dropARawFish; chopTree; end; CreateFire; end; GoToFire; OpenFire; DoFire; end; end; procedure runAway; var RSTile : TPoint; label _random; begin RsTIle := Reflect.Tiles.GetGlobalTile; updateScreen('Running away.'); if length(daLocation.RunDirections) = 0 then begin goto _random; end else begin case daLocation.RunDirections[random(length(daLocation.RunDirections))] of 'n':begin ReflectPlayer.BlindWalkMM(point(RsTIle.x, RsTIle.y+15), 5); end; 's':begin ReflectPlayer.BlindWalkMM(point(RsTIle.x, RsTIle.y-15), 5); end; 'w':begin ReflectPlayer.BlindWalkMM(point(RsTIle.x-15, RsTIle.y), 5); end; 'e':begin ReflectPlayer.BlindWalkMM(point(RsTIle.x+15, RsTIle.y), 5); end; else begin _random: case random(8) of 0:ReflectPlayer.BlindWalkMM(point(RsTIle.x, RsTIle.y-15), 5); 1:ReflectPlayer.BlindWalkMM(point(RsTIle.x, RsTIle.y+15), 5); 2:ReflectPlayer.BlindWalkMM(point(RsTIle.x+15, RsTIle.y), 5); 3:ReflectPlayer.BlindWalkMM(point(RsTIle.x-15, RsTIle.y), 5); 4:ReflectPlayer.BlindWalkMM(point(RsTIle.x+15, RsTIle.y-15), 5); 5:ReflectPlayer.BlindWalkMM(point(RsTIle.x-15, RsTIle.y+15), 5); 6:ReflectPlayer.BlindWalkMM(point(RsTIle.x-15, RsTIle.y-15), 5); 7:ReflectPlayer.BlindWalkMM(point(RsTIle.x+15, RsTIle.y+15), 5); end; end; end; end; ReflectPlayer.FFlag(2+randomRange(-2, 2), 5000+random(500)); sleepScript(random(1500)); end; procedure doChecks; var i, h, tInt : integer; coins : TReflectInvItem; BaitIDs : TIntegerArray; begin updateScreen(''); randomHandler; fixActive; if(ReflectPlayer.GetRunEnergy >= RunAmount) and not ReflectPlayer.IsRunOn then ReflectPlayer.SetRun(true); BaitIDs := daLocation.getBaitIDs; if(high(BaitIDs) > -1) and not Reflect.Inv.Contains(BaitIDs) then begin UpdateScreen('No bait left.'); daLogger.Status('No bait left.', []); ReflectPlayer.Active := false; ReflectPlayer.Logout; sleepScript(2500); exit; end; if ((daLocation.ID = 14) or (daLocation.ID = 15)) and daLocation.canBank then begin if not coins.Find(CoinsIDs) or (Coins.getQuantity < 30) then begin daLogger.Status('Not enough coins left.', []); UpdateScreen('Not enough coins.'); ReflectPlayer.Active := false; ReflectPlayer.Logout; sleepScript(2500); exit; end; end; if ReflectPlayer.IsUnderAttack then begin UpdateScreen('Under attack! Running away.'); daLogger.Status('Under attack!', []); runAway; sleepScript(5000+random(2500)); exit; end; if(LastXPCheck.Elapsedtime > 600000) then begin if Reflect.Gametab.CurrentColor <> Gametab_Inventory then Reflect.Gametab.Open(Gametab_Inventory); setupPlayer; if(ReflectPlayer.GetSkillExp(SKILL_FISHING) <= LastXPXP)then begin UpdateScreen('No fishing XP gained in 10 minutes.'); daLogger.Error('No fishing XP gained in 10 minutes.', []); LastXPXP := ReflectPlayer.GetSkillExp(SKILL_FISHING); ReflectPlayer.Active := false; ReflectPlayer.Logout; sleepScript(2500); exit; end; LastXPXP := ReflectPlayer.GetSkillExp(SKILL_FISHING); end; if (StatsTimer.Elapsedtime > StatsTime)then begin StatsTimer.restart; StatsTime := 50000 + random(400000); for i:=0 to high(daLocation.FishNPCs) do begin for h:=0 to high(daLocation.FishNPCs[i].RawFishes) do tInt := tInt + (daLocation.FishNPCs[i].RawFishes[h].price*daLocation.FishNPCs[i].RawFishes[h].caught); for h:=0 to high(daLocation.FishNPCs[i].CookedFishes) do tInt := tInt + (daLocation.FishNPCs[i].CookedFishes[h].price*daLocation.FishNPCs[i].CookedFishes[h].caught); for h:=0 to high(daLocation.FishNPCs[i].BurntFishes) do tInt := tInt + (daLocation.FishNPCs[i].BurntFishes[h].price*daLocation.FishNPCs[i].BurntFishes[h].caught); end; statsServer.IncreaseVariable('67', (ReflectPlayer.GetSkillExp(SKILL_FISHING)-statsFishXP)); statsServer.IncreaseVariable('78', (ReflectPlayer.GetSkillExp(SKILL_COOKING)-statsCookXP)); statsServer.IncreaseVariable('80', (ReflectPlayer.GetSkillExp(SKILL_WOODCUTTING)-statsWoodXP)); statsServer.IncreaseVariable('79', (ReflectPlayer.GetSkillExp(SKILL_FIREMAKING)-statsFireXP)); statsServer.IncreaseVariable('81', (ReflectPlayer.GetSkillExp(SKILL_AGILITY)-statsAgilXP)); statsServer.IncreaseVariable('71', (ReflectPlayer.GetSkillExp(SKILL_STRENGTH)-statsStrXP)); if daLocation.canBank and not inIntArray([16,17,18,19,20,21], daLocation.ID) then statsServer.IncreaseVariable('44', (tInt - statsProfit)); statsFishXP := ReflectPlayer.GetSkillExp(SKILL_FISHING); statsCookXP := ReflectPlayer.GetSkillExp(SKILL_COOKING); statsWoodXP := ReflectPlayer.GetSkillExp(SKILL_WOODCUTTING); statsFireXP := ReflectPlayer.GetSkillExp(SKILL_FIREMAKING); statsAgilXP := ReflectPlayer.GetSkillExp(SKILL_AGILITY); statsStrXP := ReflectPlayer.GetSkillExp(SKILL_STRENGTH); statsProfit := tInt; if useStats then if statsServer.Commit then daLogger.Status('Successfully sent heartbeat to ''stats.grats.pw''.', []); end; tInt := 0; for i:=0 to high(daLocation.FishNPCs) do begin for h:=0 to high(daLocation.FishNPCs[i].RawFishes) do tInt := tInt + daLocation.FishNPCs[i].RawFishes[h].caught; for h:=0 to high(daLocation.FishNPCs[i].CookedFishes) do tInt := tInt + daLocation.FishNPCs[i].CookedFishes[h].caught; for h:=0 to high(daLocation.FishNPCs[i].BurntFishes) do tInt := tInt + daLocation.FishNPCs[i].BurntFishes[h].caught; end; if(tInt >= AmountAmount) and (AmountAmount > -1) then begin UpdateScreen('Caught more or equal to given amount to catch.'); daLogger.Status('Caught more or equal to given amount to catch.', []); ReflectPlayer.Active := false; ReflectPlayer.Logout; sleepScript(2500); exit; end; if useBreaks then doBreakCheck; end begin ShowForm; if started then begin ClearDebug; Reflect.Setup; Reflect.Smart.Graphics.Clear; if not(SmartEnabled(Reflect.Smart.Target)) then SmartSetEnabled(Reflect.Smart.Target, false); setupINeedFuncs; doUpdate; if (high(WorldList) > -1) and not ReflectPlayer.isLoggedIn then ReflectPlayer.ChangeWorld(WorldList[random(length(WorldList))]); nullInt := -1337;//so it runs .create at least once and makes sure script is played logged in while not(ReflectPlayer.isLoggedIn) or (nullInt = -1337) do begin if ReflectPlayer.Active then begin ReflectPlayer.Login; if ReflectPlayer.Active then setupPlayer; end else begin sleepScript(1000); end; nullInt := 0; end; setupScript; repeat if ReflectPlayer.IsLoggedIn then begin if daLocation.isDynamic then dynFishing; if isInvFullScript then begin if useFakeWaitTime and wasWorking then begin updateScreen('Doing fake ''antiban'' wait.'); sleepScript(1000+random(7500)); end; wasWorking := false; if daLocation.canCook and Reflect.Inv.Contains(daLocation.getRawFishIDs) then begin doCooking; end else begin if daLocation.canBank then begin goToBank; openBank; doBank; end else begin doDropping(false); end; end; end else begin if not((FishspotIndice = ReflectPlayer.GetInteractingIndex) and (FishspotIndice > -1)) or not inIntArray(daLocation.getAnimationIDs, ReflectPlayer.GetAnimation) then begin doFishing; end else begin wasWorking := true; updateScreen('Fishing...'); end; end; doChecks; end else begin if ReflectPlayer.Active then begin if (high(WorldList) > -1) then ReflectPlayer.ChangeWorld(WorldList[random(length(WorldList))]); ReflectPlayer.Login; if ReflectPlayer.Active then setupPlayer; end else begin sleepScript(1000); end; end; until(false); end; end.