Is there an OpenGrandExchange; procedure/function in the SRL base? I've been searching in the SRL/grandexchange.scar, and can't find any thing doing so.
-Thanks
Is there an OpenGrandExchange; procedure/function in the SRL base? I've been searching in the SRL/grandexchange.scar, and can't find any thing doing so.
-Thanks
I ... Am ... CARTMANN!
I do not think there is, but making one isn't that hard, play around with TPA's and that kind of stuff
EDIT: Or use ChArMz' code
Last edited by Zyt3x; 01-12-2010 at 06:12 PM.

Code:function GEScreen: Boolean; var TPA: TPointArray; B: TBox; begin Result := False; FindColors(TPA, 39116, 205, 31, 315, 52); if Length(TPA) < 5 then Exit; B := GetTPABounds(TPA); with B do Result := Pos('Grand', GetTextAtEx(x1 - 1, y1 - 2, 0, UpChars, False, False, 0, 1, 39116, 20, False, tr_AllChars)) > 0; end; function OpenGE: Boolean; var C: TPointArray; B: TBox; C2D: T2DPointArray; I, T: Integer; begin if ( not LoggedIn ) then Exit; Result := False; ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.10, 0.19); FindColorsTolerance(C, 3219751, MSX1, MSY1, MSX2, MSY2, 7); if Length(C) > 0 then C2D := SplitTPA(C, 5) else Exit; SortATPAFromFirstPoint(C2D, Point(MSCX, MSCY)); for I := 0 to High(C2D) do begin if Length(C2D[I]) < 50 then Continue; B := GetTPABounds(C2D[I]); with B do MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 2, 2); //if ( not Pos('clerk', rs_GetUpText) > 0 ) then //Continue; GetMousePos(x, y); Mouse(x, y, 0, 0, False); Result := FastChooseOption('ange Gra'); if Result then Break; end; if Result then begin T := GetSystemTime; while ( GetSystemTime - T < 10000 ) and ( not GEScreen ) do Wait(50 + Random(100)); end; Result := GEScreen; end;
Charmz, i can't compile your functions, it says it doesnt exits?:
Line 90: [Error] (21512:11): Unknown identifier 'FastChooseOption' in script C:\Documents and Settings\.......\WalkLUMBandGE.scar
I ... Am ... CARTMANN!
Thank you IceFire, i have another problem too, but that isn't topic related thouge, hope you can help me anyway :P
I've used a "symbol" from the SRL database in this line:
then my script says this when i compile:Code:If not FindSymbolIn(x, y, water, MMX1, MMY1, MMX2, MMY2) then
Line 145: [Error] (21567:27): Unknown identifier 'water' in script C:\Documents and Settings\Alexander\Skrivebord\Scar\scarprerelease\ Scripts\WalkLUMBandGE.scar
I ... Am ... CARTMANN!
Yes "water", it's fromwhich i've tried to add into my script, but then i got this result:Code:{.include SRL/SRL/core/symbol.scar}
It opened another tab, with "symbols" saying:
Line 17: [Error] (21446:1): Duplicate identifier 'SymbolAccuracy' in script C:\Documents and Settings\Alexander\Skrivebord\Scar\scarprerelease\ includes\SRL\SRL\core\symbol.scar
I ... Am ... CARTMANN!
yeah lol, that seemed to solve my problem.
I think my last bug would be this:
I'm doing an SRL function GESell, which returns a boolean (i presume it's about the succes of the attempted sell)Code:procedure UseGE; begin If not GEScreen=true then begin writeln('Couldnt open GE') exit; end else if Players[CurrentPlayer].Booleans[0]=true then GESell(Players[CurrentPlayer].Strings[0], Players[CurrentPlayer].Strings[1], Players[CurrentPlayer].Integers[0]); if GESell=true then writenl('Succesfully trying to sell items');
So i ask if the trade went smooth "GESell=true" but i get a compile error in that line of code:
Line 207: [Error] (21629:10): Invalid number of parameters in script C:\Documents and Settings\Alexander\Skrivebord\Scar\scarprerelease\ Scripts\WalkLUMBandGE.scar
I ... Am ... CARTMANN!
Function GESell(Price, Quantity: string; InvSpot: integer): boolean;
It would help if you looked at the function parameters, you can see there are two strings and 1 integer.
GESell(Players[CurrentPlayer].Strings[0], Players[CurrentPlayer].Strings[1], Players[CurrentPlayer].Integers[0])
yes?
I ... Am ... CARTMANN!
Dunno, paste a sufficient piece of the surrounding code or we don't have anything to go on.
SCAR Code:GESell(Players[CurrentPlayer].Strings[0], Players[CurrentPlayer].Strings[1], Players[CurrentPlayer].Integers[0]);
if GESell=true then
->
SCAR Code:if (GESell(Players[CurrentPlayer].Strings[0], Players[CurrentPlayer].Strings[1], Players[CurrentPlayer].Integers[0])) then
writeln('Succesfully trying to sell items') //no ; here because of else either
You don't need =true either... and it's WriteLn![]()
YES! it succesfully compiledjust need to add some colors to the TPA's and this is of for testing
Btw, some +rep comeing your way IceFire908
I ... Am ... CARTMANN!
There are currently 1 users browsing this thread. (0 members and 1 guests)