Results 1 to 2 of 2

Thread: Script fault cant figgure

  1. #1
    Join Date
    Sep 2008
    Location
    Holland
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Script fault cant figgure

    It was working for like 3-4 baggs then i had to go i came back i start and it doest start it only clicks on alter if i put mouse on the bone



    program New;
    {.include SRL/SRL.scar}


    Const
    Altar = 7831681;//the color of the altar

    var
    x, y, i, DragonBone: Integer;

    Procedure LoadDTM;
    begin
    DragonBone := DTMFromString('78DA630C656460E8026224509891C1C005A 44' +
    '1A2FF81803109C89A8CAA06220B23817400905547408D0790 D54D' +
    '400DC8AE56FC6A00E94209BC');
    end;

    function TPAFind(Var X, y :integer; colors :TIntegerArray; TheUpText :String):boolean;
    //By Bazzbarrett and ProphesyOfWolf!
    var
    CTS, Ic : Integer;
    TPA: TPointArray;
    ATPA: Array of TPointArray;
    H, S, L, HueMod, SatMod, tolerance :extended;
    midcolor: integer;
    // HueString, SatString:string;
    I,II : integer;
    HSLColor : Array[1..3] of Extended;
    HSL: Array[0..1] of Array[1..3] of Extended;
    begin
    //Work Out some values
    For Ic:= 1 to 3 do
    begin;
    HSL[0][ic] := 255; //Max is 240?
    end;
    For Ic:= 0 to High(Colors) do
    begin;
    ColortoHSL(Colors[ic],HSLColor[1],HSLColor[2],HSLColor[3]);
    For II:= 1 to 3 do
    begin;
    HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
    HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
    end;
    end;
    For Ic:= 0 to 9 do
    begin;
    end;
    H := HSL[1][1] - HSL[0][1];
    S := HSL[1][2] - HSL[0][2];
    L := HSL[1][3] - HSL[0][3];
    midcolor := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
    HueMod := (H/L);
    SatMod := (S/L);
    tolerance := L;

    //FIND the TPA!
    CTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(Huemod, satmod );
    FindColorsSpiralTolerance(MSCX, MSCY, TPA, MidColor, MSX1, MSY1, MSX2, MSY2, round(tolerance+0.5));
    ColorToleranceSpeed(CTS);
    ATPA := TPAToATPAEx(TPA, 15, 15);
    For Ic := 0 to High(ATPA) do
    begin
    MiddleTPAEx(ATPA[i], x, y);
    MMouse(x, y, 2, 2);
    Wait(50);
    If(IsUpTextMultiCustom([TheUpText])) then
    begin
    Result := True;
    GetMousePos(x, y);
    Break;
    end;
    end;
    end;

    Function ClickBone : boolean;
    begin
    LoadDTM;
    if FindDTM(DragonBone,x,y,MIx1,MIy1,MIx2,MIy2) then
    begin
    mouse(x,y,5,5,false);
    Wait(100+random(200));
    if ChooseOption('se') then result:=true;
    FreeDTM(DragonBone);
    end;
    end;

    procedure UseOnAltar;
    begin
    if IsUpText('ragon') then
    begin
    if TPAFind(x, y, [7831425, 8160389, 8028547], 'ltar') then
    begin
    mmouse(x,y,5,5);
    Wait(100+random(200));
    if isuptext('ltar') then mouse(x,y,0,0,true);
    end;
    end else exit;
    end;

    begin
    SetupSRL;
    ActivateClient;
    for i:=0 to 22 do
    begin
    ClickBone;
    UseOnAltar;
    Wait(200+random(1000));
    end;
    end.

  2. #2
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    use scar tags -.-

    SCAR Code:
    procedure UseOnAltar;
    begin
        if TPAFind(x, y, [7831425, 8160389, 8028547], 'ltar') then
        begin
          x := x + randomrange(-5, 5);
          y := y + randomrange(-5, 5);
          mmouse(x,y,0,0);
          Wait(100+random(200));
          if isuptext('ltar') then mouse(x,y,0,0,true);
        end;
    end;

    replace your useonaltar with that one.
    ~ Metagen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Fault in script :o
    By Performa in forum OSR Help
    Replies: 2
    Last Post: 09-25-2008, 10:29 PM

Posting Permissions

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