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.
  • 0

[ Pedido ] Script!


NeTToW
 Compartilhar

Pergunta

9 respostass a esta questão

Posts Recomendados

  • 0
Cara, é difícil, também estou querendo achar. Mas mesmo no site do tibiabot.com está difícil...

Se alguém usa ou sabe onde encontrá-lo é só postar aqui. Vlw

 

To ligado brother...

 

Mais nao custa nada tentar né ;D

 

Abraços~

Link para o comentário
Compartilhar em outros sites

  • 0

Eu tenho um aki !!

 

Pally ataca de longe !

 

 

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 Champion';// Escolha outro Monstro aqui para vc correr á 3 SQM

AttackAt = 99;//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;

 

 

 

:confused: Fikar dançando !!

 

B := 0;

while not terminated do

begin

A := Random(1,5);

if B <> A then

case A of

1:

begin

Self.FaceUp;

Sleep(400);

end;

2:

begin

Self.FaceRight;

Sleep(400);

end;

3:

begin

Self.FaceDown;

Sleep(400);

end;

4:

begin

Self.FaceLeft;

Sleep(400);

end;

end;

B := A;

sleep(10);

end;

 

 

 

:eek:Muda de arma pra tal monstro !

 

 

Const

//Coloque as configuração para mudar para o modo defensivo//

MonsterName = 'Dwarf Guard'

weapon1_ID = 3295

//Coloque as configuração para voltar para o modo ofensivo//

Weapon2_ID = 3291

 

function GetItemFromOpenBackpack(ID: integer): TItem;

var

y: integer;

begin

Result := nil;

for x := 0 to Self.Containers.Count - 1 do

begin

if x >= Self.Containers.Count then Break;

for y := 0 to Self.Containers.Container[x].Count - 1 do

begin

if y >= Self.Containers.Container[x].Count then Break;

if Self.Containers.Container[x].Item[y].ID = ID then

begin

Result := Self.Containers.Container[x].Item[y];

Exit;

end;

end;

end;

end;

 

function GetCreatureByID(ID: integer): TCreature;

var

x: integer;

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;

 

procedure Event_Attacked(ID:integer);

begin

Creature := GetCreatureByID(ID);

if Creature <> nil then

begin

A := 0;

if Creature.Name = MonsterName then

begin

Self.Defensive;

Weapon := GetItemFromOpenBackpack(Weapon1_ID);

if Self.RightHand.ID <> Weapon1_ID then

if Weapon = nil then

self.DisplayText('Weapon1 wasnt found in open backpack!');

else Weapon.MoveToBody(Self.RightHand,0);

A := 1;

end;

if not self.attacking then

if A = 0 then

begin

Self.Offensive;

if Self.RightHand.ID <> Weapon2_ID then

begin

Weapon := GetItemFromOpenBackpack(Weapon2_ID);

if Weapon <> nil then

Weapon.MoveToBody(Self.RightHand,0);

else Self.DisplayText('Weapon2 wasnt found in opened backpack!');

end;

end;

end;

end;

 

while not terminated do

begin

UpdateWorld;

ProcessEvents;

sleep(100);

end;

 

 

Perfect slime trainig :

 

const

Spell = 'exura'

Food_Id = 3578; // ID da comida que você tem.

MinMana = 150; // Coloque aqui a mana para começar a comer.

StrongWeaponID = 3295 // A arma para matar o Slime Original.

HealAtHp = 500 // Vida para usar Exura.

PotionAtHp = 100 // Vida para usar Poção.

Potion = 266 // O ID da Poção de Vida que você irá usar.

KillAtHp=200 // Quando estiver com essa vida, você irá matar a Slime Original.

var

StrongWeapon:TItem;

 

function GetItemFromOpenBackpack(ID: integer): TItem;

var

x: integer;

y: integer;

begin

Result := nil;

for x := 0 to Self.Containers.Count - 1 do

begin

if x >= Self.Containers.Count then Break;

for y := 0 to Self.Containers.Container[x].Count - 1 do

begin

if y >= Self.Containers.Container[x].Count then Break;

if Self.Containers.Container[x].Item[y].ID = ID then

begin

Result := Self.Containers.Container[x].Item[y];

Exit;

end;

end;

end;

end;

 

function Attacking: boolean;

begin

UpdateWorld;

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

begin

UpdateWorld;

if Creatures.Creature[x].Attacking then

begin

Result := True;

Exit;

end;

end;

Result := False;

Exit;

end;

 

function GetFollowedCreatureID: integer;

begin

UpdateWorld;

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

begin

UpdateWorld;

if Creatures.Creature[x].Following then

begin

Result := Creatures.Creature[x].ID;

Exit;

end;

end;

end;

 

begin

updateworld;

MotherSlime := GetFollowedCreatureID;

while not Terminated do

begin

UpdateWorld;

if self.LogoutBlock=false then self.Logout(false);

if ((Self.Health) <(HealAtHp)) and ((Self.Mana)>(25)) then

Self.Say(Spell)

UpdateWorld;

if ((Self.Health) <(PotionAtHp)) then Self.Containers.UseItemWithSelf(GetItemFromOpenBackpack(Potion));

Sleep(1000);

if not Attacking then

begin

UpdateWorld;

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

begin

UpdateWorld;

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

begin

if (Creatures.Creature[x].Name <> Self.Name) and (Creatures.Creature[x].NPC) and (Creatures.Creature[x].Z = Self.Z) then

begin

UpdateWorld;

X1 := Creatures.Creature[x].X;

Y1 := Creatures.Creature[x].Y;

if (X1 - Self.X = 1) or (X1 - Self.X = 0) or (X1 - Self.X = -1) then

begin

UpdateWorld;

if (Y1 - Self.Y = 1) or (Y1 - Self.Y = 0) or (Y1 - Self.Y = -1) then

begin

Creatures.Creature[x].Attacking := true;

Break;

end;

end;

end;

end;

end;

end;

else

begin

if self.Health < KillAtHp then

Begin

UpdateWorld;

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

begin

UpdateWorld;

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

begin

if (Creatures.Creature[x].Name <> Self.Name) and (Creatures.Creature[x].NPC) and (creatures.creature[x].Z = self.Z) then

Creatures.Creature[x].Attacking := true;

StrongWeapon:= GetItemFromOpenBackpack(StrongWeaponID);

if StrongWeapon <> nil then

StrongWeapon.MoveToBody(Self.RightHand, 0);

Break;

end;

end;

end;

if Self.Mana < MinMana then

begin

UpdateWorld;

for container := 0 to Self.Containers.Count - 1 do

begin

UpdateWorld;

for item := 0 to Self.Containers.Container[container].Count - 1 do

begin

UpdateWorld;

if Self.Containers.Container[container].Item[item].ID = Food_Id then

Self.Containers.Container[container].Item[item].Use;

end;

end;

end;

end;

Sleep(1000);

end;

end;

 

 

Druid_sio !

 

Const MiniCreatureHP =80; // if your firned has 80% of his hp it will heal..change it as you like it.

const ITEM_RUNE_UH = 3160;

const Name='Uncle Olaf'; //enter here the name of your friend.

var

Creature: TCreature;

CreatureName: string;

 

function IsCreatureVisible(Name: string): boolean;

var

x: integer;

begin

Result := False;

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

begin

if x >= Creatures.Count then Break;

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

begin

if Creatures.Creature[x].Visible then

begin

Result := True;

Exit;

end;

end;

end;

end;

 

function GetCreatureByName(Name: string): TCreature;

var

x: integer;

begin

Result := nil;

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

begin

if x >= Creatures.Count then Break;

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

begin

Result := Creatures.Creature[x];

Exit;

end;

end;

end;

 

begin

while not Terminated do

begin

UpdateWorld;

Creature := GetCreatureByName(Name);

If Creature<> nil then

If IsCreatureVisible(Name) then

begin

if ((Creature.Health) <(MiniCreatureHP)) and ((Self.Mana)>(70)) then

Self.Say('exura sio "'+Name)

else

if ((Creature.Health) <(MiniCreatureHP)) then Self.Containers.UseItemWithCreature(ITEM_RUNE_UH, Creature);

end;

Sleep(1000);

end;

 

end;

 

 

Usa mana potion ! (bom pra kem crackeou com power hex !)

 

 

const

minMana = 200; //Mana pra usar Mf pequena

 

 

while not Terminated do

begin

UpdateWorld;

if (Self.Mana < minMana) then

begin

Self.Containers.UseItemWithSelf(268) // Ese aki é o ID da mana pot pekena

Sleep(1000);

end;

Sleep(100);

end;

 

 

Alerta acaba o cap ::

 

Const

cap = 5

 

while not terminated do

begin

UpdateWorld;

if self.capacity < cap then

PlaySound('C:\Documents and Settings\Administrador\Desktop\Todas As Pastas\cap.wav'); // Tem q ser wav

Sleep(100);

end

 

 

Usa ob knigfe !!

 

 

 

 

const

obsidian_knife = 5908; //id da obsidian ou woden stak

skin_body = [4011, 4047, 4052, 4057]; //id dor corpos

 

function searchIntArray(id:integer): boolean;

var

i: integer;

begin

result := false;

for i := low(skin_body) to high(skin_body) do begin

if skin_body = id then result := true;

end;

end;

 

function GetItemFromOpenBackpack(ID: integer): TItem;

var

y: integer;

begin

Result := nil;

for x := 0 to Self.Containers.Count - 1 do

begin

if x >= Self.Containers.Count then Break;

for y := 0 to Self.Containers.Container[x].Count - 1 do

begin

if y >= Self.Containers.Container[x].Count then Break;

if Self.Containers.Container[x].Item[y].ID = ID then

begin

Result := Self.Containers.Container[x].Item[y];

Exit;

end;

end;

end;

end;

 

function SkinBodies(id:integer): Boolean;

var

x, y: integer;

knife: TItem;

t: integer;

begin

UpdateWorld;

knife := GetItemFromOpenBackpack(obsidian_knife);

if knife = nil then

begin

Self.DisplayText('An Obsidian Knife could not be found, please open a container with it.');

exit;

end;

t := -1;

for x := -1 to 1 do begin

for y := -1 to 1 do begin

// if Screen.Tile[7+x, 5+y].Count >= 3 then begin

// t := -2

// end else t := -1;

if searchIntArray(Screen.Tile[7+x, 5+y].Item[screen.Tile[7+x, 5+y].Count+t].ID) = true then begin

UpdateWorld;

knife := GetItemFromOpenBackpack(obsidian_knife);

if knife <> nil then begin

knife.UseWithGround(Self.X+X, Self.Y+Y, Self.Z);

Self.DisplayText('Attempted to skin a creature with the ID ' + IntToStr(Screen.Tile[7+x, 5+y].Item[screen.Tile[7+x, 5+y].Count-1].ID) + '.');

Sleep(100);

UpdateWorld;

end;

end;

end;

end;

end;

 

begin

while not terminated do begin

UpdateWorld;

SkinBodies(skin_body);

Sleep(100);

end;

end;

 

//id de corpos mortos

//4011 Minotaur

//4025 Dragons

//4047 Minotaur mage

//4052 Minotaur archer

//4057 Minotaur guard

//4062 Dragon lord

//4112 Behemoth

//4212 Bonebeast

//4321 Lizard Templar

//4324 Lizard Sentinel

//4327 Lizard Snakecharmer

//4097 Demon

//4137 Vampire

 

 

 

Calculadora de skills

 

var

Shielding,ShieldTime,MinutesS,HoursS,HS,MS: Integer;

Magic,MagicTime,MinutesM,HoursM,HM,MM: Integer;

Weapon,WeaponTime,MinutesW,HoursW,HW,MW: Integer;

begin

UpdateWorld;

Shielding := Self.Skills.Shielding.Percentage;

Magic := Self.Skills.Magic.Percentage;

Weapon := Self.Skills.Sword.Percentage;

ShieldTime:=0; MinutesS:=0; HoursS:=0; HS:=0; MS:=0;

MagicTime:=0; MinutesM:=0; HoursM:=0; HM:=0; MM:=0;

WeaponTime:=0; MinutesW:=0; HoursW:=0; HW:=0; MW:=0;

while not Terminated do

begin

UpdateWorld;

if Shielding = Self.Skills.Shielding.Percentage then ShieldTime:=ShieldTime+1;

else begin

MinutesS:=Int(((ShieldTime*(100-Self.Skills.Shielding.Percentage))));

Shielding := Self.Skills.Shielding.Percentage;

HS:=Int(MinutesS/60);

MS:=MinutesS-HS*60

ShieldTime:=0;

end;

If (HS>0) and (MS>=0) then MS:=MS-1

else if (HS=0) and (MS>0) then MS:=MS-1

If MS<0 then begin

HS:=HS-1

MS:=59

end;

If HS+MS>0 then Self.DisplayText('Time to shielding advance: '+IntToStr(HS)+' hours : ' +IntToStr(MS)+' minutes');

 

Sleep(20000)

begin

UpdateWorld;

if Magic = Self.Skills.Magic.Percentage then MagicTime:=MagicTime+1;

else begin

MinutesM:=Int(((MagicTime*(100-Self.Skills.Magic.Percentage))));

Magic := Self.Skills.Magic.Percentage;

HM:=Int(MinutesM/60);

MM:=MinutesM-HM*60

MagicTime:=0;

end;

If (HM>0) and (MM>=0) then MM:=MM-1

else if (HM=0) and (MM>0) then MM:=MM-1

If MM<0 then begin

HM:=HM-1

MM:=59

end;

If HM+MM>0 then Self.DisplayText('Time to magic advance: '+IntToStr(HM)+' hours : ' +IntToStr(MM)+' minutes');

end;

Sleep(20000)

begin

UpdateWorld;

if Weapon = Self.Skills.Sword.Percentage then WeaponTime:=WeaponTime+1;

else begin

MinutesW:=Int(((WeaponTime*(100-Self.Skills.Sword.Percentage))));

Weapon := Self.Skills.Sword.Percentage;

HW:=Int(MinutesW/60);

MW:=MinutesW-HW*60

WeaponTime:=0;

end;

If (HW>0) and (MW>=0) then MW:=MW-1

else if (HW=0) and (MW>0) then MW:=MW-1

If MW<0 then begin

HW:=HW-1

MW:=59

end;

If HW+MW>0 then Self.DisplayText('Time to weapon advance: '+IntToStr(HW)+' hours : ' +IntToStr(MW)+' minutes');

end;

Sleep(20000)

end;

end;

 

Uma spell pra cada bixo a ser atacado !!

 

 

const

frigo = ['banshee'];

flam = ['ancient scarab'];

tera = ['cyclops'];

vis = ['acolyte of the cult'];

mort = ['black knight'];

useWand = 1 // 1 se estiver usando Wand/rod 0 se nao estiver usando

 

function GetExoriType(Crea: TCreature): String;

begin

Result := '';

 

for z := Low(frigo) to High(frigo) do

begin

if AnsiLowerCase(Crea.Name) = AnsiLowerCase(frigo[z]) then

Result := 'exori frigo';

end;

 

for z := Low(flam) to High(flam) do

begin

if AnsiLowerCase(Crea.Name) = AnsiLowerCase(flam[z]) then

Result := 'exori flam';

end;

 

for z := Low(tera) to High(tera) do

begin

if AnsiLowerCase(Crea.Name) = AnsiLowerCase(tera[z]) then

Result := 'exori tera';

end;

 

for z := Low(vis) to High(vis) do

begin

if AnsiLowerCase(Crea.Name) = AnsiLowerCase(vis[z]) then

Result := 'exori vis';

end;

 

for z := Low(mort) to High(mort) do

begin

if AnsiLowerCase(Crea.Name) = AnsiLowerCase(mort[z]) then

Result := 'exori mort';

end;

 

end;

 

function GetCreatureByID(ID: integer): TCreature;

var

x: integer;

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;

 

 

Galera Espero Ter ajudado :)

Link para o comentário
Compartilhar em outros sites

  • 0

Então me diga, para que existem regras se elas não são seguidas?

Todos os tópicos ressucitado eu reporto, ou seja, se ele resolveu a dúvida ou não eu reporto.

Eu acho que deveriam ser seguidas as regras.

 

Deixo minhas palavras.

Sem mais...

 

____

Obs: Repare se os usuários que "estão" com a dúvida, veja se eles são ativos no fórum, ou frequentam pelo menos 1 vez por semana.

Obrigado.

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.