SRL Archive - SRL Archives

Grandexcahnge.scar


JPHamlett

2009-07-26 02:51:15

i was getting errors using it so i jsut fixed it u dont have to use them but it does work



{*******************************************************************************
Function GESetPrice(value: string): boolean;
By: Rasta Magician
Description: Sets the price of an item.
'0', 'min' - Minimum Value
'1', 'med' - Market Value
'2', 'max' - Max value
Other - Exact value
*******************************************************************************}
Function GESetPrice(Value: Variant): boolean;
var
price : integer;
begin

if not InGE then exit;
if not GESellMenu then
if not GEBuyMenu then
exit;

if value = 'min' then price := 0;
if value = 'med' then price := 1;
if value = 'max' then price := 2;

wait(100+Random(50));

case price of
0: MouseBox(269, 208, 304, 232, 1); // min price
1: exit; // market price
2: MouseBox(376, 210, 408, 233, 1); // max price
else begin
MouseBox(429, 209, 462, 234, 1);
wait(100+Random(100));
TypeSend(IntToStr(value));
wait(200+Random(100));
if IsChatBoxTextAnyLine('price range', clblack) then
begin
writeln('wrong price! Out of Price Range!');
GEMenuExit;
end;
end;
end;

Result := true;
end;


{*******************************************************************************
Function InGE: boolean;
By: Rasta Magician
Description: Checks if we are in GE
*******************************************************************************}
function Inge: Boolean;
var
gebmp, x, y : Integer;
begin
gebmp := BitmapFromString(107, 15, 'beNrNmFFOAzEMRDlT4beILwQ35' +
'FAcipUsjUYztuss224jq8qmTmy/OG6218v3x9vX++v2uSTbFMjn9R' +
'LCg3PZZ/QokfV3cED/9+cFMgwE6IYAY3H3n00vOdCsfODG9W5wCNG' +
'aENLEm6cfrIj/bB1tiSGv/ACAsg77HwpVCBW9VYCybDU+j+IsgFvg' +
'c/+b9DsFILtUAWycPCT9BKCXIK5L4m0IfJMilqLrAaamve/6sj5bF' +
'8dSf6ReTcZ5dyQBgFEMReO9hqYAlBV4ys0MlNIh2OMrL5ismfrP3n' +
'pcvlOVvoynAPlRJmKKbN/WMMgmKuBLR9jrc6pcWfdk671K+1IiOOo' +
'5QKHXgJr0hwCbo10BrCxOQN0EKMcBANOCk9JmgNx/AMBhBk5g7gbI' +
'DUCagpMCTI9wA606RBUobGVzNfXMrCCk1ht9d6aKwgHi+gd6IQI8R' +
'C69rOl9PIp+ZRoVr7ma+pV7qDzXF4AetQOcXJhX7373fp+6n3j9T6' +
'UB2NNzgPve958QmgDsIRxC75//nJzCqjJd/drm8gcF+e3g');
Result := Findbitmap(gebmp, x, y);
freebitmap(gebmp);
end;

Sir R. M8gic1an

2009-07-26 19:26:03

what errors?

~RM

JPHamlett

2009-07-26 20:05:06

i got couldn't convert the string double or somthing along those lines in the first one


and the socond one i got a run time error

Eduard

2009-08-16 11:34:25

same problem, InGE is broken.

NCDS

2009-08-16 12:09:08

Thats a pretty big .bmp for InGE. Also, .bmp's tend to become outdated quickly as colors change and what not. Why not count a color? or check for a color at a specific x, y?

Naum

2009-08-16 12:46:10

InGE could be done with TPA's as well:

Function InGE : Boolean;
Var TPA : TPointArray;
Begin
FindColorsTolerance(TPA, 7581167, MSX1, MSY1, MSX2, MSY2, 2);
Result := (Length(TPA) > 2);
End;

comando346

2009-08-16 12:53:10

so i take it that this is a basic trade script? simple but effective?
so which one would you recommend?

Boreas

2009-08-17 01:44:25

This is not a script. This is a thread about a function that is in an include that is used by scripts that trade at the GE. Scripts are here http://www.villavu.com/forum/forumdisplay.php?f=164

JPHamlett

2009-08-17 02:05:00

didnt work