Ir para conteúdo
Faça parte da equipe! (2024) ×
Conheça nossa Beta Zone! Novas áreas a caminho! ×
  • Quem está por aqui   0 membros estão online

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

Script para paladins atacarem de longe


eduardodh
 Compartilhar

Posts Recomendados

:d pessoal, preciso de um script para que os paladins possam atacar de longe com crossbow (3sqm de distancia) e preciso tambem de um script para que o bot recoloque as bolts da backpack para o lugar em que se colocam elas ( do lado do lugar onde tem a legs). Se alguem puder me ajudar me fornecendo estes 2 scripts eu agradeceria. Obrigado;)

Link para o comentário
Compartilhar em outros sites

bom cara, eu acho q pro char pegas os bolts e etc. e colocar no lugar , é so marcar aquela opçao no tibiabot ng mesmo

'refill ammo'

mais nao sei se é isso, vou procura e providenciar pra vcs.

Link para o comentário
Compartilhar em outros sites

Script de Pally, pra atacar a 3 sqm's

 

 

const

RampsID = [1950, 1952, 1954, 1956, 385, 1947, 434, 414, 604, 7020]

Wanted='Troll';// Escolha o nome do Monstro aqui para vc correr á 3 SQM dele

Wanted2='Troll Champions';// Escolha outro Monstro aqui para vc correr á 3 SQM

AttackAt = 16;// recomendavel deixar assim

//fixado em 100 nao toma a distância

 

function GetCreatureByID(ID: integer): TCreature;

var

x: integer;

Finished: boolean;

begin

Result := nil;

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

begin

if x >= Creatures.Count then Break;

if Creatures.Creature[x].ID = ID then

begin

Result := Creatures.Creature[x];

Exit;

end;

end;

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 TileIsWalkable(X, Y, Z: integer): boolean;

var Tile: TTile;

begin

Result := True;

Tile := GetTileFromXYZ(X, Y, Z);

If (Tile <> nil) and (Tile.Count <> 0) then

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

begin

if Tile.Item[Z].Properties.Hole then Result := False;

else if Tile.Item[Z].Properties.Stairs then Result := False;

else if not Tile.Item[Z].Properties.Walkable then Result := False;

else

begin

for x := low(RampsID) to high(RampsID) do

begin

if Tile.Item[Z].ID = RampsID[x] then Result := False;

end;

end;

end;

end;

 

Function MoveFromRange: boolean;

begin

Result := True;

Creature := GetCreatureByID(Self.Attacking);

if Creature <> nil then

//northwest

if ((Creature.X-self.X = 2) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = 2) and (Creature.Y-self.Y = 3)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = 3)) or

//southwest

((Creature.X-self.X = 2) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = 2) and (Creature.Y-self.Y = -3)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = -3)) or

//northeast

((Creature.X-self.X = -2) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = -2) and (Creature.Y-self.Y = 3)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = 3)) or

//southeast

((Creature.X-self.X = -2) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = -2) and (Creature.Y-self.Y = -3)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = -3)) then

Result := False;

end;

 

begin

while not Terminated do

begin

UpdateWorld;

if Self.Attacking <> 0 then

begin

Creature := GetCreatureByID(Self.Attacking);

if Terminated=True then exit;

if (Creature <> nil) and (MoveFromRange) then

if (Creature.Health<=AttackAt) then

if (Creature.Name=Wanted) or (Creature.Name=Wanted2) then

//// Add more monsters here in the same format if you want to run from them

//// make sure to add them also to the constant list at the top

begin

//Northwest of Creature

if (Creature.X > Self.X) and (Creature.Y > Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 2, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 3, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 2, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 3, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 3, Creature.Z);

end;

end;

//Southwest of Creature

if (Creature.X > Self.X) and (Creature.Y < Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y - 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y - 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y - 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 3, Creature.Z);

end;

end;

//Northeast of Creature

if (Creature.X < Self.X) and (Creature.Y > Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 3, Creature.Z);

end;

end;

//Southeast of Creature

if (Creature.X < Self.X) and (Creature.Y < Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y - 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y - 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y - 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 3, Creature.Z);

end;

end;

//North of Creature

if (Creature.X = Self.X) and (Creature.Y > Self.Y) then

begin

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 3, Creature.Z);

end;

end;

//East of Creature

if (Creature.X < Self.X) and (Creature.Y = Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y -1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y -1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y -1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 3, Creature.Z);

end;

end;

//South of Creature

if (Creature.X = Self.X) and (Creature.Y < Self.Y) then

begin

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 3, Creature.Z);

end;

end;

//West of Creature

if (Creature.X > Self.X) and (Creature.Y = Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y - 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y - 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y - 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 3, Creature.Z);

end;

end;

end;

//Diagonal if higher than Attackat health and 1sqm away

Creature := GetCreatureByID(Self.Attacking);

if Terminated=True then exit;

if (Creature <> nil) and (MoveFromRange) then

if (Creature.Health>AttackAt) then

if (Creature.Name=Wanted) or (Creature.Name=Wanted2) then

//// Add more monsters here in the same format if you want to be diagonal from them

//// make sure to add them also to the constant list at the top.

if (abs(Creature.X-self.X) <= 1) and (abs(Creature.Y-self.Y) <= 1) then

begin

if (Self.X<>Creature.X) and (Self.Y=Creature.Y) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x,Self.y-1,self.z) then

begin

Self.MoveUp;

Moved:=true;

end;

If (Moved=False) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x,Self.y+1,self.z) then

Self.MoveDown;

end;

end;

Moved:=false;

if (Self.X=Creature.X) and (Self.Y<>Creature.Y) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x-1,Self.y,self.z) then

begin

Self.MoveLeft;

Moved:=true;

end;

If (Moved=False) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x+1,Self.y,self.z) then

Self.MoveRight;

end;

end;

end;

end;

sleep(500);

end;

end;

 

 

 

 

acho que achei o tal script ;p

lembrando que ali no lugar de troll e troll champion, vc escolhe o nome dos bichos, se quiserem escolher mais de 2 bichos,

basta separar com virgula e tudo junto. exemplo: (skeleton,ghoul)

 

:*

 

testem ;

Link para o comentário
Compartilhar em outros sites

Opa eae velho,

eu não ja vi o script, porem nunca usei, eh complicado, voce tem que mexer no arquivo do tibia.dat e talz e executar o scipt que o parceiro ali em cima deu. O mais facil é caçar na mao mesmo, outra coisa que eu ouvi falar, pode ser mentira é que o Elfbot ja da distancia dos bixos, mas vai saber né... Boa sorte

Link para o comentário
Compartilhar em outros sites

  • 3 semanas atrás...
  • 2 meses depois...
Script de Pally, pra atacar a 3 sqm's

 

 

const

RampsID = [1950, 1952, 1954, 1956, 385, 1947, 434, 414, 604, 7020]

Wanted='Troll';// Escolha o nome do Monstro aqui para vc correr á 3 SQM dele

Wanted2='Troll Champions';// Escolha outro Monstro aqui para vc correr á 3 SQM

AttackAt = 16;// recomendavel deixar assim

//fixado em 100 nao toma a distância

 

function GetCreatureByID(ID: integer): TCreature;

var

x: integer;

Finished: boolean;

begin

Result := nil;

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

begin

if x >= Creatures.Count then Break;

if Creatures.Creature[x].ID = ID then

begin

Result := Creatures.Creature[x];

Exit;

end;

end;

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 TileIsWalkable(X, Y, Z: integer): boolean;

var Tile: TTile;

begin

Result := True;

Tile := GetTileFromXYZ(X, Y, Z);

If (Tile <> nil) and (Tile.Count <> 0) then

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

begin

if Tile.Item[Z].Properties.Hole then Result := False;

else if Tile.Item[Z].Properties.Stairs then Result := False;

else if not Tile.Item[Z].Properties.Walkable then Result := False;

else

begin

for x := low(RampsID) to high(RampsID) do

begin

if Tile.Item[Z].ID = RampsID[x] then Result := False;

end;

end;

end;

end;

 

Function MoveFromRange: boolean;

begin

Result := True;

Creature := GetCreatureByID(Self.Attacking);

if Creature <> nil then

//northwest

if ((Creature.X-self.X = 2) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = 2) and (Creature.Y-self.Y = 3)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = 3)) or

//southwest

((Creature.X-self.X = 2) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = 2) and (Creature.Y-self.Y = -3)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = 3) and (Creature.Y-self.Y = -3)) or

//northeast

((Creature.X-self.X = -2) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = -2) and (Creature.Y-self.Y = 3)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = 2)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = 3)) or

//southeast

((Creature.X-self.X = -2) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = -2) and (Creature.Y-self.Y = -3)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = -2)) or

((Creature.X-self.X = -3) and (Creature.Y-self.Y = -3)) then

Result := False;

end;

 

begin

while not Terminated do

begin

UpdateWorld;

if Self.Attacking <> 0 then

begin

Creature := GetCreatureByID(Self.Attacking);

if Terminated=True then exit;

if (Creature <> nil) and (MoveFromRange) then

if (Creature.Health<=AttackAt) then

if (Creature.Name=Wanted) or (Creature.Name=Wanted2) then

//// Add more monsters here in the same format if you want to run from them

//// make sure to add them also to the constant list at the top

begin

//Northwest of Creature

if (Creature.X > Self.X) and (Creature.Y > Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 2, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 3, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 2, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 3, Creature.Z)=true) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 3, Creature.Z);

end;

end;

//Southwest of Creature

if (Creature.X > Self.X) and (Creature.Y < Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y - 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y - 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y - 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 3, Creature.Z);

end;

end;

//Northeast of Creature

if (Creature.X < Self.X) and (Creature.Y > Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 3, Creature.Z);

end;

end;

//Southeast of Creature

if (Creature.X < Self.X) and (Creature.Y < Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y - 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y - 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y - 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 3, Creature.Z);

end;

end;

//North of Creature

if (Creature.X = Self.X) and (Creature.Y > Self.Y) then

begin

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 3, Creature.Z);

end;

end;

//East of Creature

if (Creature.X < Self.X) and (Creature.Y = Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y -1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y -1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y -1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 3, Creature.Z);

end;

end;

//South of Creature

if (Creature.X = Self.X) and (Creature.Y < Self.Y) then

begin

Tile:=GetTileFromXYZ(Creature.X - 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 1, Self.Y, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 1, Self.Y, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 1, Self.Y, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X + 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X + 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X + 3, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 3, Creature.Z);

end;

end;

//West of Creature

if (Creature.X > Self.X) and (Creature.Y = Self.Y) then

begin

Tile:=GetTileFromXYZ(Self.X, Creature.Y - 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y - 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y - 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Self.X, Creature.Y + 1, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Self.X, Creature.Y + 1, Creature.Z)) then

begin

Self.MoveTo(Self.X, Creature.Y + 1, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y + 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y + 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y + 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 2, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 2, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 2, Creature.Y - 3, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 2, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 2, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 2, Creature.Z);

end;

Tile:=GetTileFromXYZ(Creature.X - 3, Creature.Y - 3, Creature.Z);

if (Tile<>nil) and (TileIsWalkable(Creature.X - 3, Creature.Y - 3, Creature.Z)) then

begin

Self.MoveTo(Creature.X - 3, Creature.Y - 3, Creature.Z);

end;

end;

end;

//Diagonal if higher than Attackat health and 1sqm away

Creature := GetCreatureByID(Self.Attacking);

if Terminated=True then exit;

if (Creature <> nil) and (MoveFromRange) then

if (Creature.Health>AttackAt) then

if (Creature.Name=Wanted) or (Creature.Name=Wanted2) then

//// Add more monsters here in the same format if you want to be diagonal from them

//// make sure to add them also to the constant list at the top.

if (abs(Creature.X-self.X) <= 1) and (abs(Creature.Y-self.Y) <= 1) then

begin

if (Self.X<>Creature.X) and (Self.Y=Creature.Y) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x,Self.y-1,self.z) then

begin

Self.MoveUp;

Moved:=true;

end;

If (Moved=False) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x,Self.y+1,self.z) then

Self.MoveDown;

end;

end;

Moved:=false;

if (Self.X=Creature.X) and (Self.Y<>Creature.Y) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x-1,Self.y,self.z) then

begin

Self.MoveLeft;

Moved:=true;

end;

If (Moved=False) then

begin

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

if Tile<>nil then

if TileIsWalkable(Self.x+1,Self.y,self.z) then

Self.MoveRight;

end;

end;

end;

end;

sleep(500);

end;

end;

 

 

 

 

acho que achei o tal script ;p

lembrando que ali no lugar de troll e troll champion, vc escolhe o nome dos bichos, se quiserem escolher mais de 2 bichos,

basta separar com virgula e tudo junto. exemplo: (skeleton,ghoul)

 

:*

 

testem ;

 

 

o script funfo aqui,so que so funciona se eu ataca o bixo com a mão ai ele corre,se eu coloca attack monster do bot ng n funfa,podem me ajuda?

Link para o comentário
Compartilhar em outros sites

o script funfo aqui,so que so funciona se eu ataca o bixo com a mão ai ele corre,se eu coloca attack monster do bot ng n funfa,podem me ajuda?

 

Tente marcar a opção "attack monsters" e depois a opção "target all", pois qndo vc só maraca a "attack monsters", o bot só ataca se o monstro te der um hit primeiro. Mas qndo vc marca a opção "target all" o bot ataca todos os bichos, mesmo se eles estiverem atacando outro player.

Se não der certo, só mexendo no arquivo .dat mesmo.

Link para o comentário
Compartilhar em outros sites

Opa eae velho,

eu não ja vi o script, porem nunca usei, eh complicado, voce tem que mexer no arquivo do tibia.dat e talz e executar o scipt que o parceiro ali em cima deu. O mais facil é caçar na mao mesmo, outra coisa que eu ouvi falar, pode ser mentira é que o Elfbot ja da distancia dos bixos, mas vai saber né... Boa sorte

 

 

 

Não , isso eh mentira o elfbot nao da distancia sozinho.

Link para o comentário
Compartilhar em outros sites

Tente marcar a opção "attack monsters" e depois a opção "target all", pois qndo vc só maraca a "attack monsters", o bot só ataca se o monstro te der um hit primeiro. Mas qndo vc marca a opção "target all" o bot ataca todos os bichos, mesmo se eles estiverem atacando outro player.

Se não der certo, só mexendo no arquivo .dat mesmo.

 

n deu nem cm target all :S

 

cmo é que muda no dat?

Link para o comentário
Compartilhar em outros sites

Este tópico está impedido de receber novos posts.
 Compartilhar

×
×
  • Criar Novo...

Informação Importante

Nós fazemos uso de cookies no seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies , caso contrário, vamos supor que você está bem para continuar.