Results 1 to 11 of 11

Thread: Help!!!please!!!

  1. #1
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help!!!please!!!

    Hey thanks for coming to this thread, i need some help with my script.

    Whenever i try to run it it sais this.
    SCAR Code:
    Successfully compiled
    Line 392: [Hint] (15274:10): Variable 'Result' never used in script C:\Program Files\SCAR 3.12\Scripts\WOODCUTTING SCRIPTS\U L T R A Willows Cutter Version 4.Scar
    SRL Compiled in 0 msec
    Successfully executed

    I dont know why it doesnt do anything after it sais that. But it should click a color on the mini map tho...

    Here is my script its a willow chopper/banker.
    SCAR Code:
    Program ULTRAWillowCutter;
    {.Include SRL/SRL.Scar}
    {.Include SRL/SRL/Skill/Woodcutting.Scar}
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    { C  R  E  D  I  T  S.
    YOHOJO AND BOBBOHOBBO FOR THEIR ENT FINDER.
    FREDDY1990 FOR SCAR :).
    WT-FAKAWI FOR HIS FINDING RANDOMS PROCEDURES/FUNCTIONS.
    U L T R A FOR HIS NICE SCRIPT :D.
      C  R  E  D  I  T  S.}

    //////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    // I M P O R T A N T.
    // DO NOT I REPEAT, DO NOT TAKE ANYTHING FROM THIS SCRIPT WITHOUT MY PERMISSION
    // IF YOU PEOPLE SEE SOMONE COPY ANYTHING FROM MY SCRIPT WITHOUT MY PERMISSION
    // PLEASE DO REPORT TO ME THIS INSTANT, SO I COULD TELL SOMONE LIKE A SRL MOD
    // ABOUT WHAT AND HOW HAPPEND, AND THE PERSON WHO COPIED ME, WILL BE BANNED.
    // I M P O R T A N T.
    ////////////////////////////////////////////////////////////////////////////////
    {///////////////////////////////////////////////////////////////////////////////
    { CATEGORY: WOODCUTTING.
    { AUTHOR: U L T R A.
    { PURPOSE: LEVELS UP WOODCUTTING.
    { DESCRIPTION: CUTS WILLOWS THEN BANKS THEM.
    { PLACE: DRAYNOR VILLAGE.
    { ANTIBAN: TRUE.
    { ANTIRANDOMS: TRUE.
    { SPECIAL FEATURES: ONLY USES ONE PLAYER FOR NOW.
    ///////////////////////////////////////////////////////////////////////////////}

    ////////////////////////////////////////////////////////////////////////////////
    //FeAtUrEs
    //1.Anti - Randoms.
    //2.Awsome Anti - Ban.
    //3.Loop.
    //4.Map Walking.
    //5.Willow Finding And Cutting.
    //6.Item Banking.
    //7.Ent Finder - BY YOHOJO MODDED BY BOBBOHOBBO.
    //8.My First Script.
    //fEaTuReS.
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    //AdDeD.
    //1.Now You Choose How Many Times To Look For The Bank, If Didn't Find At All It
    //Logs Out!
    //2.It Will Tell You The Exact Amount Of Exp. That You Had Earned.
    //3.More Fail - Safes, Now If It Didnt Find Rock Color, Didnt Find Willow Color,
    //And Didnt Find Fishing Symbol, It Logs Out!!!
    //aDdEd.
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    {
    { I N S T R U C T I O N S. USE SCAR 3.12C AND THE LATEST SRL.
    1. Low detail, not laggy computer, highest brightness in runescape.
    2. Start in draynor bank with your player.
    3. Set up const and the declare players.
    4. Drag the crosshair into the runescape window.
    5. Hit run and of course enjoy my script.
    { I N S T R U C T I O N S. USE SCAR 3.12C AND THE LATEST SRL.
    }

    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    Const
    ToDo = 50;//Loads To Do Before Logging Out.
    TheWaitForCut = 3000;//Mili - Seconds To Wait Before Clicking Another Willow.
    BankingTry = 15;//How Many Times To Try And Find The Bank Booth, If Not Found Then Log Out.
    Speed = 15;//The Speed Of The Cursor(Pointer), Lower=Slower, Higher=Faster.
    //Note That Speed = 50; Is Like Already Insane, Do Only 10-20, Thats The Best.

    RockColor = 3750717;//Pick The Lightest Color Of The Rock South From Bank.
    TreeColor = 1786422;//Pick The Color Of The Tree ONLY If Doesn't Find Willows.

    Var
    x, y: Integer;
    TotalWillows: Integer;
    ExpGained: Integer;
    BankTrips: Integer;
    TToBank: Integer;
    EndXP: Integer;
    StartXP: Integer;

    Procedure DeclarePlayers;
    Begin
    HowManyPlayers:= 1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer:= 0;

    Players[0].Name := ''; //UserName.
    Players[0].Pass := ''; //Password.
    Players[0].Nick := ''; //3-4 Letters Of UserName.
    Players[0].Active := True; //True If You Are Using This Player, False If Not.

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

    Procedure WasWcExp;
    Begin
    StartXP:=GetXP('woodcutting');
    Wait(1000+random(1000));
    End;

    Procedure RightNowWcExp;
    Begin
    EndXP:=GetXP('woodcutting');
    Wait(1000+random(500));
    End;

    Procedure HowMuchExp;
    Begin
    ExpGained:=EndXP-StartXP;
    Wait(1000+random(700));
    End;

    Procedure Report;
    Begin
    ClearDebug;
    WriteLn('U L T R A Willow Chopper Version 5');
    WriteLn('Ran For: ' + TimeRunning + '.');
    WriteLn('Cut Approx: ' + IntToStr(TotalWillows) + ' Willows.');
    WriteLn('Earned Approx: ' + IntToStr(ExpGained) + ' Expirience.');
    WriteLn('Banked: ' + IntToStr(BankTrips) + ' Loads.');
    WriteLn('Thanks For Using U L T R A Willow Chopper Version 5');
    End;

    Procedure EntFinder; //Made By YoHoJo. Modded by Bobbohobbo
    Var
      EX, EY: integer;
      FX, FY: integer;
      SafeEntWait: LongInt;
    begin
      If (Not (LoggedIn)) Then
      Exit;
      Begin
        Status('Checking For Ent')
          If
          (FindObjCustom(EX, EY, ['Willow'], [4690821], 5)) Then
        Begin
          MMouse(EX, EY, 0, 0)
            If FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) Then
          Begin
            Status('Ent Found');
            MouseFindFlag(645, 83, 2, 2);
            MarkTime(SafeEntWait)
              Repeat
              FTWait(5)
                FindNormalRandoms;
              If Not (LoggedIn) Then
                NextPlayer(False);
            Until TimeFromMark(SafeEntWait) > 29000 + Random(10000)
          End;
        End;
      End;
    End;

    Procedure WaitWhileChopping;
    Begin
    EntFinder;
    Wait(TheWaitForCut+random(1000));
    EntFinder;
    End;

    Function FindFastRandoms: Boolean;//Credits To WT-Fakawi.
    Var
    I: Integer;
    Begin
    For I:=1 To 11 Do
    Begin
    Case I Of
    1: If FindDead Then
    Result := True;
    2: If FindMod Then
    Result := True;
    3: If FindMime Then
    Result := True;
    4: If FindMaze Then
    Result := True;
    5: If FindQuiz Then
    Result := True;
    6: If FindDemon Then
    Result := True;
    7: Begin
    If NoGameTab Then
    Begin
    Result := True;
    Players[CurrentPlayer].loc := 'No GameTab';
    Logout;
    Exit;
    End;
    End;
    8: Begin
    If InBlack Then
    Begin
    Result := True;
    Players[CurrentPlayer].loc := 'InBlack';
    Logout;
    Exit;
    End;
    End;
    9: RC;
    10: Respond;
    11: ClickToContinue;
    End;
    Wait(1);
    End;
    End;

    Procedure FindRandoms;
    Begin
    EntFinder;
    FindTalk;
    FindFastRandoms;
    FindNormalRandoms;
    FindLamp('Woodcutting');
    SolvePinball;
    FindEnt(x, y, true);
    If(FindFight)Then
    Begin
    MakeCompass('N');
    RunTo('E', True);
    Wait(7000 +Random(3000));
    RunBack;
    End;
    End;

    Procedure RandomlyChosenSkill;
    Begin
      Case Random(11) Of

    0: HoverSkill('Attack', False);
    1: HoverSkill('Strength', False);
    2: HoverSkill('Defence', False);
    3: HoverSkill('Range', False);
    4: HoverSkill('Prayer', False);
    5: HoverSkill('Magic', False);
    6: HoverSkill('Runecraft', False);
    7: HoverSkill('Hitpoints', False);
    8: HoverSkill('Agility', False);
    9: HoverSkill('Herblore',  False);
    10: HoverSkill('Fishing', False);

      End;
    End;

    Procedure ReadQuestRandom;
    Begin
      Case Random(4) Of
     
    0: Begin
       GameTab(3);
       Wait(1000+random(5000));
       Mouse(582, 265, 2, 2, True);
       Wait(2000+random(6000));
       Mouse(458, 70, 4, 4, True);
       Wait(1000+random(1000));
       GameTab(4);
       End;
       
    1: Begin
       GameTab(3);
       Wait(1000+random(5000));
       Mouse(590, 279, 2, 2, True);
       Wait(2000+random(6000));
       Mouse(458, 70, 4, 4, True);
       Wait(1000+random(1000));
       GameTab(4);
       End;
       
    2: Begin
       GameTab(3);
       Wait(1000+random(5000));
       Mouse(588, 295, 2, 2, True);
       Wait(2000+random(6000));
       Mouse(458, 70, 4, 4, True);
       Wait(1000+random(1000));
       GameTab(4);
       End;
       
    3: Begin
       GameTab(3);
       Wait(1000+random(5000));
       Mouse(614, 310, 2, 2, True);
       Wait(2000+random(6000));
       Mouse(458, 71, 4, 4, True);
       Wait(1000+random(1000));
       GameTab(4);
       End;
      End;
    End;
       

    Procedure AntiBan;
    Begin
    If(Not(LoggedIn))Then
    Exit;
    Case Random(8) Of

    0: RandomMovement;
    1: HoverSkill('Woodcutting', False);
    1: RandomRClick;
    2: BoredHuman;
    3: PickUpMouse;
    4: AlmostLogout;
    5: Begin
    GameTab(2 +Random(12));
    Wait(2000 +Random(1000));
    GameTab(4);
       End;
    6: RandomlyChosenSkill;
    7: ReadQuestRandom;
     End;
    End;

    Procedure Walk2Willows;
    Begin
    If(Not(LoggedIn))Then
    Exit;
    PerfectNorth;
    HighestAngle;
    ClickExactMMColorTol(RockColor, 5);
    FFlag(0);
    If(FindObj(x, y,'illo', TreeColor, 10))Then
    WriteLn('Found Willows, Begging To Cut Them.');
    End;

    Procedure WhereAreWillows;
    Begin
    If(Not(FindObj(x, y, 'illo', TreeColor, 10)))Then
    Begin
    Repeat
    SymbolAccuracy := 0.6;
    If(FindSymbol(x, y, 'Fish'))Then
    Mouse(x, y, 3, 3, True);
    FFlag(0);
    FindRandoms;
    FindFastRandoms;
    Until(Not(FindSymbol(x, y, 'Fish')));
    If(Not(FindSymbol(x, y, 'Fish')))Then
    Begin
    WriteLn('Didnt Find Color Of The Rock.');
    Wait(100+random(100));
    WriteLn('Didnt Find Willows.');
    Wait(100+random(120));
    WriteLn('Didnt Find Fishing Symbol.');
    Wait(100+random(50));
    WriteLn('We Are Lost, Or Map Walking Didnt Work, Terminating Script.');
    Exit;
    TerminateScript;
    End;
    End;
    End;

    Procedure FindAndChop;
    Var CuttingTime : integer;
    Begin
    MarkTime(CuttingTime);
    Repeat
    If(Not(LoggedIn))Then
    Exit;
    MakeCompass('N');
    HighestAngle;
    If(FindObj(x, y, 'illo', TreeColor, 10))then
    Begin
    MMouse(x, y, 4, 4);
    If(IsUpText('illo'))Then
    Begin
    GetMousePos(x, y);
    Mouse(x, y, 2, 2, True);
    EntFinder;
    FindRandoms;
    WaitWhileChopping;
    AntiBan;
    End;
    End;
    Until (InvFull)Or(TimeFromMark(CuttingTime) > 600000+random(60000));
    If(InvFull)Then
    Begin
    TotalWillows := TotalWillows+27;
    ExpGained:=ExpGained+1822;
    WriteLn('Chopped A Full Load Of Willow Logs, Heading For The Bank');
    Begin
    If(TimeFromMark(CuttingTime) > 600000+random(60000))Then
    Begin
    Report;
    Exit;
    TerminateScript;
    End;
    End;
    End;
    End;

    Procedure BankIt;
    Begin
    If(InvFull)Then
    Begin
    Repeat
    SymbolAccuracy := 0.6;
    If(FindSymbol(x, y,'Bank'))Then
    Begin
    Mouse(x, y, 3, 3, True);
    FFlag(0);
    MakeCompass('E');
    FindRandoms;
    FindFastRandoms;
    OpenBankQuiet('feb');
    Flag;
    Wait(500 + random(500));
    FixBank;
    Deposit(2,28,2);
    CloseBank;
    MakeCompass('N');
    TToBank:=TToBank+1;
    End;
    Until(FindSymbol(x, y,'Bank'))Or(TToBank = BankingTry);
    If(FindSymbol(x, y,'Bank'))Then
    Begin
    ClearDebug;
    BankTrips:=BankTrips+1;
    TToBank:=0;
    If(TToBank = BankingTry)Then
    Begin
    Exit;
    Report;
    TerminateScript;
    End;
    End;
    End;
    End;


    Procedure TheLoop;
    Begin
    MouseSpeed:=Speed;
    Begin
    Repeat
    EntFinder;
    FindAndChop;
    EntFinder;
    FindFastRandoms;
    FindRandoms;
    Until(InvFull);
    If(InvFull)Then
    Begin
    AntiBan;
    FindRandoms;
    FindFastRandoms;
    BankIt;
    Report;
    RightNowWcExp;
    End;
    End;
    End;

    Begin
    SetUpSRL;
    Wait(50+random(100));
    DeclarePlayers;
    If(Not(LoggedIn))Then
    Begin
    LoginPlayer;
    ActivateClient;
    WasWcExp;
    Begin
    Repeat
    MouseSpeed:=Speed;
    Walk2Willows;
    WhereAreWillows;
    TheLoop;
    HowMuchExp;
    Until(BankTrips = ToDo)Or(Not(LoggedIn));
    If(BankTrips = ToDo)Or(Not(LoggedIn))Then
    Exit;
    Report;
    TerminateScript;
    End;
    End;
    End.
    Woot woot.

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Functions need to have a result.

    SCAR Code:
    Function BankIt: Boolean;
    Begin
    If(InvFull)Then
    Begin
    Repeat
    SymbolAccuracy := 0.6;
    If(FindSymbol(x, y,'Bank'))Then
    Mouse(x, y, 3, 3, True);
    FFlag(0);
    MakeCompass('E');
    FindRandoms;
    FindFastRandoms;
    OpenBankQuiet('feb');
    Flag;
    Wait(500 + random(500));
    FixBank;
    Deposit(2,28,2);
    CloseBank;
    MakeCompass('N');
    TToBank:=TToBank+1;
    Until(FindSymbol(x, y,'Bank'))Or(TToBank = BankingTry);
    If(FindSymbol(x, y,'Bank'))Then
    Begin
    ClearDebug;
    BankTrips:=BankTrips+1;
    TToBank:=0;
    Begin
    If(TToBank = BankingTry)Then
    Exit;
    Report;
    TerminateScript;
    End;
    End;
    End;
    End

    You need to add result:=true in there.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Where do i add it, iam not sure.
    Woot woot.

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Function BankIt: Boolean;
    Begin
      If(InvFull)Then
      Begin
        Repeat
          SymbolAccuracy := 0.6;
          If(FindSymbol(x, y,'Bank'))Then
          begin
            Mouse(x, y, 3, 3, True);
            FFlag(0);
            MakeCompass('E');
            FindRandoms;
            FindFastRandoms;
            OpenBankQuiet('feb');
            Flag;
            Wait(500 + random(500));
            FixBank;
            Deposit(2,28,2);
            CloseBank;
            MakeCompass('N');
            TToBank:=TToBank+1;
            result:=true // Here?
          end;
        Until(FindSymbol(x, y,'Bank'))Or(TToBank = BankingTry);
        If(FindSymbol(x, y,'Bank'))Then
        Begin
          ClearDebug;
          BankTrips:=BankTrips+1;
          TToBank:=0;
          If(TToBank = BankingTry)Then
          begin
            Exit;
            Report;
            TerminateScript;
          end;
        End;
      End;
    End;

    Try that?.

    Please learn standards. alot easier to debug

    //Edit, since you are only using BankIt, change it to a procedure..

    SCAR Code:
    Procedure BankIt;
    Begin
      If(InvFull)Then
      Begin
        Repeat
          SymbolAccuracy := 0.6;
          If(FindSymbol(x, y,'Bank'))Then
          begin
            Mouse(x, y, 3, 3, True);
            FFlag(0);
            MakeCompass('E');
            FindRandoms;
            FindFastRandoms;
            OpenBankQuiet('feb');
            Flag;
            Wait(500 + random(500));
            FixBank;
            Deposit(2,28,2);
            CloseBank;
            MakeCompass('N');
            TToBank:=TToBank+1;
          end;
        Until(FindSymbol(x, y,'Bank'))Or(TToBank = BankingTry);
        If(FindSymbol(x, y,'Bank'))Then
        Begin
          ClearDebug;
          BankTrips:=BankTrips+1;
          TToBank:=0;
          If(TToBank = BankingTry)Then
          begin
            Exit;
            Report;
            TerminateScript;
          end;
        End;
      End;
    End;

    You only need a function if you are going to do.. if(BankIt)then etc

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  5. #5
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kk thanks

    EDIT:
    Now it sais this =(
    SCAR Code:
    Successfully compiled
    SRL Compiled in 16 msec
    Successfully executed

    Why does it execute!!!
    Woot woot.

  6. #6
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    W H Y does it exit!
    Woot woot.

  7. #7
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Dragg the cross hair on runescape before pressing play.

  8. #8
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I drag it, i drag it!
    Woot woot.

  9. #9
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    SRL Compiled in 0 msec
    0_n03s
    woodcutting = 25
    Successfully executed

    it works for me. (the one you posted in you're first post).

    edit:
    i think i got him:
    SCAR Code:
    Begin
    SetUpSRL;
    Wait(50+random(100));
    DeclarePlayers;
    Begin
    ActivateClient;
    LoginPlayer;
    WasWcExp;
    Begin
    Repeat
    MouseSpeed:=Speed;
    Walk2Willows;
    WhereAreWillows;
    TheLoop;
    HowMuchExp;
    Until(BankTrips = ToDo)Or(Not(LoggedIn));
    If(BankTrips = ToDo)Or(Not(LoggedIn))Then
    Exit;
    Report;
    TerminateScript;
    End;
    End;
    End.

    you're main loop shout be that. you didn't activate the client. (and it was after login player). also a tip. LogInplayer, does allready check if the player is logged in

  10. #10
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Woot it works thatnks alot!!!
    Woot woot.

  11. #11
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sort your standards out :P

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •