it get that error when it does inmenu it opens up the text script btw so i think its in there not sure though could be doing something else worngCode:program tanner; {.include srl/srl/misc/smart.scar} {.include srl/srl.scar} {.include srl/srl/reflection/reflection.scar} var x, y, hidedtm : integer; procedure DeclarePlayers;//add more if needed begin HowManyPlayers := 1; NumberOfPlayers(HowManyPlayers); CurrentPlayer := 0; Players[0].Name := ''; Players[0].Pass := ''; Players[0].Nick := 'ham'; Players[0].Active := True; // Use this account? Players[0].strings[0] := 'soft'; // soft or hard leather Players[0].Pin := ''// bank pin lave if none Players[0].BoxRewards := ['XP', 'ostume', 'mote', 'Gem', 'ithril', 'oal']; end; procedure loaddtm; begin Hidedtm:= DTMFromString('78DA638C60606048624001FBB66E611004D28' + 'C40FC1F08182B808C7854351B972D05D38C503E632E90A84155B3' + '7DCD1A54357E40A21A55CDA9C38750D5B802894854358776EE445' + '5930824BC50D5AC9A3717554D3190084455B361C91214350093D2' + '17FE'); end; procedure findtanner; forward; function InMenu: Boolean; var c: Integer; begin if (CountColor(0, MSX1, MSY1, MSX2, MSY2) > 3292486) then begin MouseBox(26, 138, 489, 157, 1); c := GetTimeRunning + 45000; while (not InMenu) and (GetTimeRunning < c) do Wait(50); Wait(RandomRange(100, 150)); end; Result := FindTextTPAEX(2070783, 20, 177, 46, 138, 32, x, y, 'What', upchars, Nothing); end; procedure InTanMenu; begin repeat wait(1); findnormalrandoms; until(InMenu) mouse(94, 101, 13, 13, false); waitforoption('All', 5000); r_chooseoption('All'); end; procedure FindTanner; var NPCC: TNPC; TanPoint: TPoint; begin If(FindNPC('Ellis',NPCC))then begin writeln('Found the Tanner! Attempting to click'); TanPoint := TileToMS(NPCC.Tile, Random(5)); mouse(TanPoint.x,TanPoint.y,2,2,false); WaitForOption('rade', 5000); wait(10 + random (2)); chooseoption('rade'); end; end; {******************************************************************************* procedure R_Withdraw(Item : Variant; Amount : Integer); By: Infantry001 Description: Withdraw Amount of Item. Item can be either ID or Name. *******************************************************************************} procedure R_Withdraw(Item : Variant; Amount : Integer); var I, BankSlot : Integer; BBox : TBox; Items : TBankSlotArray; begin if not R_BankScreen then exit; Items := GetBankArray; case VarType(Item) of 3: for I := 0 to High(Items) do begin if (Items[i].ID = Integer(Item)) then begin BankSlot := Items[i].Index + 1; break; end; end; 256: for I := 0 to High(Items) do begin if (Items[i].Name = Item) then begin BankSlot := Items[i].Index + 1; break; end; end; end; BBox := BankIndexToMSBox(BankSlot); If Amount = 1 Then Begin MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1); Wait(RandomRange(50, 150)); End Else Begin MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2); if (Amount = 5) or (Amount = 10) then R_ChooseOption('Withdraw-' +IntToStr(Amount)) else if Amount = 0 then R_ChooseOption('Withdraw-All') else if not R_ChooseOption('Withdraw-'+IntToStr(Amount)+' ') then begin MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2); if (R_ChooseOption('Withdraw-X')) then begin Wait(1000 + Random(100)); TypeSend(IntToStr(Amount)); end; end; end; end; procedure banking; begin R_OpenBankBooth('akb'); repeat wait(1) findnormalrandoms; until (R_Bankscreen) or (R_Pinscreen); if R_Pinscreen then Inpin(Players[CurrentPlayer].Pin); R_MouseItemID(1742, 'All'); wait(100 + random (10)); R_Withdraw(1739, 27); end; procedure writepos; var myposition: TPoint; begin MyPosition := GetMyPos; writeln('Our tile is: '+inttostr(MyPosition.x)+','+inttostr(MyPosition.y)); end; function TanneryWalkPath:TPointArray; begin setlength(result,3); result[0] := point(3277,3174); result[1] := point(3282,3184); result[2] := point(3275,3191); end; function InBank: boolean; var PlayerPosition : Tpoint; begin PlayerPosition := GetMyPos; if PointInBox(PlayerPosition , IntToBox(3269,3165, 3271,3170)) then begin result := true; writeln('You are in the bank!'); end else writeln('Not in bank relocating'); end; Procedure TanneryWalk; var i :integer; path : tpointarray; realigntile : Tpoint; begin If(Not(Inbank))then begin realignTile := Point(3270, 3167); WalkToTile(realignTile, 2, 1); end; path := tannerywalkpath; For I := 0 to High(path) do Begin If (WalkToTile(path[i], 2, 1)) Then R_Flag; R_FindRandoms; FindNormalRandoms; Wait(550+Random(300)); end; end; function BankWalkPath:TPointArray; begin setlength(result,3); result[0] := point(3282,3182); result[1] := point(3276,3167); result[2] := point(3269,3167); end; Procedure BankWalk; var i :integer; path : tpointarray; begin path := bankwalkpath; For I := 0 to High(path) do Begin If (WalkToTile(path[i], 2, 1)) Then // error line R_Flag; R_FindRandoms; FindNormalRandoms; Wait(550+Random(300)); end; end; begin Smart_server := 101; Smart_signed := true; Setupsrl; Setupreflection; activateclient; Declareplayers; Loginplayer; //writepos; //Banking; //Tannerywalk; FindTanner; intanmenu; BankWalk; end.




Reply With Quote
















