steath 8.9.4
AbyssAntiMacro.pas
Compiler: [Error] (E:\UO\Stealth_v8.9.2\Scripts\Uses\AbyssAntiMacro.pas at 5:1): 'BEGIN' expected
Code: Select all
// v 1.0
// First maker is Grin (inject)
// adaptation AdmiR
unit AbyssAntiMacro; 
interface 
function return_value(gi :TGumpInfo) : integer;
procedure AntimacroAbyss(Serial,GumpID,X,Y : Cardinal);
implementation
const
  AntiMacroGumpSerial = $1832044;   
function return_value(gi :TGumpInfo) : integer;
var 
  a : array of array of integer;
  i ,j , k , VariantReply , F: integer;  
  dx,dy : array [0..1] of integer; 
  cos : longint;
begin
  SetLength(a, 10); 
  a[2]:=[8,9,10,8,5,6,8,1,2];
  a[3]:=[4,7,6,6,7,8,5,7,11];
  a[5]:=[4,5,6,6,7,8,5,7,11];
  a[6]:=[7,9,10,5,6,8,8,11,10];
  a[8]:=[3,5,6,6,7,9,4,9,8];
  a[9]:=[4,6,7,5,8,7,2,1,4];    
  F := 10000;
                            
  for i := 0 to 2 do
  begin  
    VariantReply := StrToInt(gi.Text[i+1]);  
    cos := 0; 
    for k := 0 to 2 do
    begin
      for j := 0 to 1 do 
      begin 
        dx[j] := gi.GumpPics[a[VariantReply][j+k*3]].x-gi.GumpPics[a[VariantReply][j+1+k*3]].x; 
        dy[j] := gi.GumpPics[a[VariantReply][j+k*3]].y-gi.GumpPics[a[VariantReply][j+1+k*3]].y;
      end; 
      cos := cos + Abs(round(1000*(dx[0]*dx[1]+dy[0]*dy[1])/sqrt((dx[0]*dx[0]+dy[0]*dy[0])*(dx[1]*dx[1]+dy[1]*dy[1]))));    
    end;  
    if cos < F then 
    begin
      F := cos;
      result := i+1;
    end;
  end;
end;    
procedure AntimacroAbyss(Serial,GumpID,X,Y : Cardinal);
  var
    gi :TGumpInfo;
  begin 
    if Serial = AntiMacroGumpSerial then
      begin
        GetGumpInfo(GetGumpsCount-1,gi);    
        NumGumpButton(GetGumpsCount-1,return_value(gi));        
      end;  
  end;     
Begin
  SetEventProc(evIncomingGump,'AntimacroAbyss');  
end.21:17:00:980 [fxuo5232]: Compiler: [Error] (AbyssAntiMacro at 45:120): Type mismatch
21:17:00:980 [fxuo5232]: Compiler: [Error] (E:\UO\Stealth_v8.9.2\Scripts\Uses\ABYSSANTIMACRO.pas at 2:12): Unit 'AbyssAntiMacro' not found or contains errors
21:17:00:980 [fxuo5232]: Compiling failed
Code: Select all
Program Miner;
uses AbyssAntiMacro.pas;
type
 TMinTile = record
  Tile, X, Y : Integer; 
 end;
var
 MinTiles : Array of TMinTile;
 k : Integer;
 Healers  : Array of TPoint;
 
 {Config vards}
 UnloadPoint : TPoint;
 ZhongZ : TPoint;
 Yuemen : TPoint;
 OreMine1 : TPoint;
 OreMine2 : TPoint;
 UnloadChest : Cardinal;
 WhereUnload : String;Compiler: [Error] (E:\UO\Stealth_v8.9.11\Scripts\Uses\AbyssAntiMacro.pas at 5:1): 'BEGIN' expected
21:21:11:064 [fxuoboylord01]: Compiling failed
Code: Select all
// v 1.0
// First maker is Grin (inject)
// adaptation AdmiR
unit AbyssAntiMacro; 
interface 
function return_value(gi :TGumpInfo) : integer;
procedure AntimacroAbyss(Serial,GumpID,X,Y : Cardinal);
implementation
const
  AntiMacroGumpSerial = $1832044;   
function return_value(gi :TGumpInfo) : integer;
var 
  a : array of array of integer;
  i ,j , k , VariantReply , F: integer;  
  dx,dy : array [0..1] of integer; 
  cos : longint;
begin
  SetLength(a, 10); 
  a[2]:=[8,9,10,8,5,6,8,1,2];
  a[3]:=[4,7,6,6,7,8,5,7,11];
  a[5]:=[4,5,6,6,7,8,5,7,11];
  a[6]:=[7,9,10,5,6,8,8,11,10];
  a[8]:=[3,5,6,6,7,9,4,9,8];
  a[9]:=[4,6,7,5,8,7,2,1,4];    
  F := 10000;
                            
  for i := 0 to 2 do
  begin  
    VariantReply := StrToInt(gi.Text[i+1]);  
    cos := 0; 
    for k := 0 to 2 do
    begin
      for j := 0 to 1 do 
      begin 
        dx[j] := gi.GumpPics[a[VariantReply][j+k*3]].x-gi.GumpPics[a[VariantReply][j+1+k*3]].x; 
        dy[j] := gi.GumpPics[a[VariantReply][j+k*3]].y-gi.GumpPics[a[VariantReply][j+1+k*3]].y;
      end; 
      cos := cos + Abs(round(1000*(dx[0]*dx[1]+dy[0]*dy[1])/sqrt((dx[0]*dx[0]+dy[0]*dy[0])*(dx[1]*dx[1]+dy[1]*dy[1]))));    
    end;  
    if cos < F then 
    begin
      F := cos;
      result := i+1;
    end;
  end;
end;    
procedure AntimacroAbyss(Serial,GumpID,X,Y : Cardinal);
  var
    gi :TGumpInfo;
  begin 
    if Serial = AntiMacroGumpSerial then
      begin
        GetGumpInfo(GetGumpsCount-1,gi);    
        NumGumpButton(GetGumpsCount-1,return_value(gi));        
      end;  
  end;     
Begin
  SetEventProc(evIncomingGump,'AntimacroAbyss');  
end.21:23:15:382 [fxuoboylord01]: Compiling failed
Code: Select all
rogram Miner;
uses AbyssAntiMacro.pas;
type
 TMinTile = record
  Tile, X, Y : Integer; 
 end;
var
 MinTiles : Array of TMinTile;
 k : Integer;
 Healers  : Array of TPoint;
 
 {Config vards}
 UnloadPoint : TPoint;
 ZhongZ : TPoint;
 Yuemen : TPoint;
 OreMine1 : TPoint;
 OreMine2 : TPoint;
 UnloadChest : Cardinal;
 WhereUnload : String;
 SmeltPoint  : TPoint; 
 ForgeId     : Cardinal;
 OreMine     : TPoint;Code: Select all
Serial: 1E1A3
GumpID: 119FB593
X: 001E
Y: 001E
Pages: 0
Gump Options:
GumpPics: X  Y  ID  Hue  Page  ElemNum
0:        120  120  5021  0  0  2
1:        374  126  2362  0  0  3
2:        387  124  2362  0  0  4
3:        363  128  2362  0  0  5
4:        362  139  2362  0  0  6
5:        370  142  2362  0  0  7
6:        380  145  2362  0  0  8
7:        357  147  2362  0  0  9
8:        376  155  2362  0  0  10
9:        354  159  2362  0  0  11
10:        364  163  2362  0  0  12
11:        374  166  2362  0  0  13
ResizePics: X   Y   ID   Width   Height   Page   ElemNum
0:        100  100  83  320  205  0  0
1:        108  110  3000  306  185  0  1
GumpTexts: X   Y   Color   Text_ID   Page   ElemNum
0:        170  135  0  0  0  14
1:        160  190  65  1  0  16
2:        160  225  56  2  0  18
3:        160  260  69  3  0  20
Text Lines:
Please choose this number:
6
5
9
GumpButtons: X   Y   Released_ID  Pressed_ID   Quit   Page_ID   Return_value   Page   ElemNum
0:        120  185  2152  2153  1  0  1  0  15
1:        120  220  2152  2153  1  0  2  0  17
2:        120  255  2152  2153  1  0  3  0  19


