Results 1 to 14 of 14

Thread: QuickTeleGrab

  1. #1
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default QuickTeleGrab

    QuickTeleGrab (FIXED)
    This is a script that is used to obtain items by telekinetic grab, then drops it.

    Features
    - AntiBan
    - Quick Customizable macro settings

    HOW TO START?


    1. Place all characters in the same spot as above picture for script to work properly. (Varrok east bank [underground])
    2. Items within the red box will be kept. Items in the blue box will be dropped.
    3. Script will stop if you have used up all your runes, or have grabbed enough times.
    4. Player will wait for objects to spawn
    5. Post any problems with script here.

    I've tested and working =)
    Last edited by mrpickle; 06-04-2009 at 09:04 AM.

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Semi colon needs to go after the Compass const for it to compile.

    On line 133, there should not be a semicolon ";" after else for it to compile.

    I'm gonna look it over more and will edit this post if I find anything. Looks good though. Good job

    Edit:

    OK, a few things:

    Try to use the least amount of global variables possible. Variables like x and y can easily be used locally within the function.

    Things like:
    SCAR Code:
    if(FindNormalRandoms)then
      begin
        Result := true;
      end;
    Do not need a begin end. Any time you only have one statement after an if then, just leave out the begin end and it will only do that statement if the condition is true:
    SCAR Code:
    if(FindNormalRandoms)then
      Result := true;

    I would check for normal randoms before checking for the fight, but that's just me.

    In wait for color, you do not use the begin end like you should. This will make it not work correctly. You have:
    SCAR Code:
    repeat
          wait(DelayCounting);
          Timer := Timer + 1
          If Timer > MaxDelayCounting then
            Writeln ('Timed Out');
            Break;
      until (FindColor(x,y,Color,0,0,800,600))
    if the timer is > maxdelaycounting, then it will just writeln timed out. It will always break right after though, disallowing the loop to reiterate.

    You should really put semi colons after assignments and until(condition);'s. Like
    SCAR Code:
    Time := 0
    Really should be
    SCAR Code:
    Time := 0;
    Better not to create bad habits

    On line 127, you call InvCount to return the Inventory Count but do nothing with it. Then, you do if(InvCount = 28)then. Line 127 really isn't necessary.

    Near line 151, we have a lack of begin ends:
    SCAR Code:
    end else
          writeln('Out of runes!');
          NextPlayer(False);

    It will writeln Out of runes! if the condition is not met, but it will always NextPlayer(False), making the script always switch players here. Same on line 159.

    In the main loop, you have:
    SCAR Code:
    begin
        for a:= 1 to 8 do
          counter[a] := 0;
      end;
    Why have the begin end at all? They are completely unnecessary because there is no condition or anything above it.





    Hope I helped some. I know I may have pointed out a lot of things, but you really did do a good job. Just fix up a few things and the script should work great. Keep up the good work!


    Edit2:

    You should probably use the Integer member array of the Players structure. Each player may have different colored items.
    Last edited by JAD; 06-03-2009 at 11:21 AM.

  3. #3
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Item1color = 1746121;// color of item to pickup
    Item1name = 'gold ore';   // name of first item?
    Item2color = 941941;// 2nd color of item to pickup
    Item2name = 'gold bar';   // name of 2nd item?
    1. You can just use arrays.
    or 2. You can use a record.
    SCAR Code:
    type
        TItem = record
          Name : string;
          Color : integer;
        end;

  4. #4
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Ok. I'll fix and upload new one after I come back =).

  5. #5
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    yeah Compass = 'S' needs a semicolon. and keep going from there.
    I would advise you to do it ASAP if you want this script used.
    Because alot of people will be like your script isn't working and than move on.

    Lol GL

  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    And for things like
    SCAR Code:
    if BlaBlaBla then
      Result := True;
    This could be replaced with
    SCAR Code:
    Result := BlaBlaBla;

  7. #7
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    And for things like
    SCAR Code:
    if BlaBlaBla then
      Result := True;
    This could be replaced with
    SCAR Code:
    Result := BlaBlaBla;
    Not in all cases though. Like in his find randoms. if he does

    Result := FindFight;
    Result := FindNormalRandoms;

    then this would be bad, because if it found a fight, it would result true. Then it would look for normal randoms, and if there were none there, would result false even though it should have been true because of the fight.

  8. #8
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    @ Jad he could make good use of X0r there?

    SCAR Code:
    Result := FindFight xor FindNormalRandoms

  9. #9
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    @ Jad he could make good use of X0r there?

    SCAR Code:
    Result := FindFight xor FindNormalRandoms
    But it's not actually just Find fight. It's like
    SCAR Code:
    if(FindFight)then
    begin
      result := true;
      wioghwge;
      wgeioweghoew;
    end;
    if(FindNormalRandoms)then
      Result := true;

    If you can make that shorter then you would have to overload some operators, even though I don't think that you can do that in SCAR

  10. #10
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    You don't get fighting randoms in RS anymore

  11. #11
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Your avoid ban procedure wont work at all, Instead of a '-' you need a '..' between the numbers.

    What the '-' is telling SCAR to do is subtract it and make it minus, which is something you don't want .

    @JAD didn't read the script ,soz

    @Richard - lol then its easy, your whole antirandoms procedure is

    Result := FindNormalRandoms;

    or don't even have a procedure at all!

  12. #12
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    I just found out.
    This doesn't work when I try it out in game=\. I am not sure why, but seems logical to me.

    SCAR Code:
    procedure Grabbing;

    begin
      If Not LoggedIn Then exit;
      WaitForColor(1000,70 + random(10),Item1color xor Item2color)
       If (CastSpell(20))then// Casts on the item you are looking for.
        begin
          If (findcolor(x,y,Item1color or Item2color,0,0,800,600)) then
            Mouse(x,y,1+random(4),1+random(4),true);
            writeln('Casted spell '+ inttostr(counter[1])+' times in total of all characters.');
            counter[1] := counter [1] + 1;
            counter[8] := counter [8] + 1;
        end else
        begin
          writeln('Out of runes!');
          NextPlayer(False);
        end;
    end;
    Last edited by mrpickle; 06-04-2009 at 04:38 AM.

  13. #13
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I got a way better idea:
    You perform a for to do loop, For I:= 0 to ItemsToBeDroppedCount
    You add the info to an array.
    Uptextarray[I] := isuptext;
    then go to next item
    simple but yet effective.

    I wrote this fast btw, gtg bed.
    ~Hermen

  14. #14
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Ok, overcame some problems with script. It now should run properly, but it's specific in its function now. Still, try it out =D.

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
  •