Ir para conteúdo
Banner com Efeitos

Featured Replies

  • Respostas 7
  • Visualizações 11.9k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

PRESCISO DE UM SCRIPT Q DE PRA PASSAR EMCIMA DO FOGO DOS DL PQ O BOT FICA PARADO NOS FF, VLW

eu tenho esse vê se serve ae :D

Const

Wanted='Dragon Lord';// Monster to Follow

AttackAt=30; // Start follow if % life of monster < 30

var

x: Integer;

function IsCreatureBesideYou(c: TCreature): boolean;

begin

UpdateWorld;

if (abs(c.X-self.X) <= 5) and (abs(c.Y-self.Y) <= 5) then begin

if c.Z = self.Z then

begin

Result := True;

Exit;

end;

end;

Result := False;

end;

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;

function IsTileWalkable(Tile: TTile): boolean;

begin

Result := True;

for Z := 0 to Tile.Count - 1 do

begin

if Tile.Item[Z].Properties.Hole then

begin

Result := False;

end

else if Tile.Item[Z].Properties.Stairs then

begin

Result := False;

end

else if not Tile.Item[Z].Properties.Walkable then

begin

OutputDebugString('Not Walk: ' + IntToStr(Tile.Item[Z].ID));

Result := False;

end;

end;

end;

function GetCreatureBesideYou: TCreature;

begin

UpdateWorld;

Result := Nil;

for x := 0 to Creatures.Count - 1 do

begin

UpdateWorld;

if (Creatures.Creature[x].Name=Wanted) then

if IsCreatureBesideYou(Creatures.Creature[x]) then

begin

if Creatures.Creature[x].ID <> Self.ID then

begin

UpdateWorld;

Result := Creatures.Creature[x];

Exit;

end;

end;

end;

end;

var

Moved:boolean;

begin

G:=false;

T:=false;

while not terminated do

begin

updateworld;

Creature:=GetCreatureBesideYou;

if Creature<>nil then

if Creatures.Creature[x].Health<=AttackAt then

begin

if (Self.Y>Creature.Y) then

begin

Tile:=GetTileFromXYZ(Self.x,Self.y-1,self.z);

if Tile<>nil then

if IsTileWalkable(Tile) then

begin

Self.MoveUp;

Moved:=true;

end;

end;

Moved:=false;

if (Self.Y<Creature.Y) then

begin

Tile:=GetTileFromXYZ(Self.x,Self.y+1,self.z);

if Tile<>nil then

if IsTileWalkable(Tile) then

begin

Self.MoveDown;

Moved:=true;

end;

end;

Moved:=false;

if (Self.X>Creature.X) then

begin

Tile:=GetTileFromXYZ(Self.x-1,Self.y,self.z);

if Tile<>nil then

if IsTileWalkable(Tile) then

begin

Self.MoveLeft;

Moved:=true;

end;

end;

Moved:=false;

if (Self.X<Creature.X) then

begin

Tile:=GetTileFromXYZ(Self.x+1,Self.y,self.z);

if Tile<>nil then

if IsTileWalkable(Tile) then

begin

Self.MoveRight;

Moved:=true;

end;

end;

end;

sleep(400);

end;

end;

Postado

Fala sua versão do tibia que posto um Tibia.dat editado .

"A esperança é o sonho do homem acordado."

Aristóteles

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo