Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

xwclx

Qual linguagem desse script?

Recommended Posts

queria saber a linguagem desse script

 

é de um jogo ;D , to querendo aprender a fazer o meu

 

////////////////////////////////////////////
const
 CaveToBankWaypoints = 'C:\Arquivos de programas\TibiaBot NG\northdararot-cavetobank.wpt'
 BankToCaveWaypoints = 'C:\Arquivos de programas\TibiaBot NG\northdararot-banktocav.wpt'
 AlertFrom = 'C:\Windows\Media\Notify.wav'
 MinCap = 10;
 WaitTime = 1;
////////////////////////////////////////////

var
NMexeu: boolean;

Function GetTileFromXYZ(X, Y, Z: integer): TTile;
begin
 Result := nil;
 if abs((Self.X - 7) - X) > 14 then Exit;
 if abs((Self.Y - 5) - Y) > 11 then Exit;
 if Self.Z <> Z then Exit;
 Result := Screen.Tile[abs((Self.X - 7) - X), abs((Self.Y - 5) - Y)];
end;


Procedure UseTile(X,Y,Z: Integer);
Var
 Tile: TTile;
begin
 if Z = Self.Z then
 begin
   Tile := GetTileFromXYZ(X, Y, Z);
   Tile.Item[1].Use;
 end;
 else Unreachable := True;
end;

Procedure UseSewer(X,Y,Z: Integer);
Var
 Tile: TTile;
begin
 if Z = Self.Z then
 begin
   Tile := GetTileFromXYZ(X, Y, Z);
   Tile.Item[1].Use;
 end;
 else Unreachable := True;
end;

Procedure UseRope(X,Y,Z: Integer);
begin
 if Z = Self.Z then
 begin
   Self.Containers.UseItemWithGround(3003, X, Y, Z);
 end;
 else Unreachable := True;
end;

Procedure MoveTo(X,Y,Z: Integer);
begin
 if Z = Self.Z then
 begin
   Self.MoveTo(X,Y,Z);
 end;
 else Unreachable := True;
end;

Procedure UseShovel(X,Y,Z: Integer);
begin
 if Z = Self.Z then
 begin
   Self.Containers.UseItemWithGround(3457, X, Y, Z);
   Self.Containers.UseItemWithGround(5710, X, Y, Z);
   Sleep(1000);
   Self.MoveTo(X, Y, Z);
 end;
 else Unreachable := True;
end;


Procedure WaypointToAction(X,Y,Z,Action :Integer);
begin
 UpdateWorld;
 Case Action of
   1: UseRope(X,Y,Z);
   2: UseTile(X,Y,Z);
   3: MoveTo(X, Y+1, Z+1);
   4: MoveTo(X, Y-1, Z-1);
   5: MoveTo(X, Y, Z-1);
   6: MoveTo(X, Y, Z);
   7: UseShovel(X,Y,Z-1);
   8: MoveTo(X, Y, Z);
   9: Sleep(X*1000);
  11: UseSewer(X,Y,Z);
 else
   MoveTo(X,Y,Z);
 end;
end;


Function WaypointReached(X,Y,Z,Action :Integer): Boolean;
begin
 UpdateWorld;
 Result := False;
 Case Action of
   1: if (Z = Self.Z + 1) then Result := True;
   2: if (Z = Self.Z + 1) then Result := True;
   3: if (Z = Self.Z) then Result := True;
   4: if (Z = Self.Z) then Result := True;
   5: if (Z = Self.Z) then Result := True;
   6: if ((X = Self.X) and (Y = Self.Y) and (Z = Self.Z)) then Result := True;
   7: if (Z = Self.Z) then Result := True;
   8: if (abs(Z - Self.Z) = 1) then Result := True;
   9: Result := True;
  11: if (abs(Z - Self.Z) = 1) then Result := True;
 else
   if ((X = Self.X) and (Y = Self.Y) and (Z = Self.Z)) then Result := True;
 end;
end;


Function CountWaypoints(FilePath: String): Integre;
Var
 i: Integer
 WaypointFile: TextFile
begin
 i := 0
 AssignFile(WaypointFile, FilePath);
 ReSet(WaypointFile);
 while not EoF(WaypointFile) do
 begin
   temp:= ReadLn(WaypointFile);
   i := i+1;
 end;
 Result:= (i/4);
end;


Function ExtractWaypointsFromFile(FilePath: String; Count: Integer): Integre;
Var
 i: Integr
 WaypointsArray: Integer
 WaypointFile: TextFile
begin
 WaypointsArray := VarArrayCreate([0, Count - 1, 0, 3], $C);
 AssignFile(WaypointFile, FilePath);
 ReSet(WaypointFile);
 for i:=0 to Count-1 do
 begin
   WaypointsArray[i,0] := StrToInt(ReadLn(WaypointFile));
   WaypointsArray[i,1] := StrToInt(ReadLn(WaypointFile));
   WaypointsArray[i,2] := StrToInt(ReadLn(WaypointFile));
   WaypointsArray[i,3] := StrToInt(ReadLn(WaypointFile));
 end;
 CloseFile(WaypointFile);
 Result := WaypointsArray;
end;


procedure Alerta;
begin
 UpdateWorld;
 if self.connected then
 if Self.Capacity <= MinCap then
 begin
  PlaySound(AlertFrom);
 end;
end;

Procedure FollowWaypoint(FilePath: String)
begin
 Index := 0
 Unreachable := False
 WaypointsCount := CountWaypoints(FilePath);
 WP := ExtractWaypointsFromFile(FilePath, WaypointsCount);

 while (Index <> (WaypointsCount-1)) and (not Terminated) do
 begin
   if Unreachable then
   begin
     Index := Index+1;
     Unreachable := False;
   end;

   if Index = (WaypointsCount-1) then Index := 0;
   if WaypointReached(WP[index,0],WP[index,1],WP[index,2],WP[index,3]) then
     Index := Index +1;

   WaypointToAction(WP[index,0],WP[index,1],WP[index,2],WP[index,3]);

   Sleep(1000);
 end;
end;

begin
 updateworld
 if Self.Capacity > MinCap then exit;
 if Self.Capacity <= MinCap then
   begin
   NMexeu:= True
   FollowWaypoint(CaveToBankWaypoints); 
   end;
 While NMexeu and (not terminated) do
 begin
   Sleep(WaitTime*6000);
   Self.npcsay('Hi')
   sleep(1500)
   Self.npcsay('Deposit All')
   sleep(1500)
   Self.npcsay('Yes')
   sleep(1500)  
   updateworld;
   if Self.Capacity > MinCap then
    begin
    NMexeu:= False;
    end;
 end;
 if Terminated then Exit;


 FollowWaypoint(BankToCaveWaypoints);


 Sleep(1000);
end;  

Compartilhar este post


Link para o post
Compartilhar em outros sites

tibia script.

 

parece ser o "elfbot"

 

procure nos forums tibiabot tibia, etc..

 

 

sim sim , é isso mesmo.

na vdd eh bot ng.

eu perguntei la mas ninguem responde

 

 

 

será que com uanto tempo eu consigo faze rum script desses?

Compartilhar este post


Link para o post
Compartilhar em outros sites
será que com uanto tempo eu consigo faze rum script desses?

 

É essa é uma pergunta que eu jamais vo poder ajudar kkk

 

[]s

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.