Skocz do zawartości

Skrypty TibiaBot NG

Od ostatniej odpowiedzi w tym temacie minęło 204 dni. Pamiętaj, że odkopywanie takich tematów jest niewskazane, chyba że chcesz wnieść coś nowego do dyskusji.

Polecane posty

Witam. jest sprawa. potrzebuje skrypt na trainy.

Sprawa wyglada tak, że server pisze ze masz napisac '/train 1214' bo dostaniesz bana na 3h ;P

kod za każdym razem jest inny..

na ngbot.pl znalazłem skrypt, który kopiuje i wkleja, gdy zapyta. ale tylko ten kod co dostal od servera za pierwszym razem..

oto i on

Var 
Code : String; 

procedure Event_Notice(Text: String); 
begin 
if Pos('/train', Text) = 0 then Exit; 
Delete(Text, 1, Pos('/train',text)-1); 
Code:= Text; 
end; 

While not terminated do 
begin 
code:= ''; 
updateworld; 
ProcessEvents; 
if code <> '' then begin 
Self.say(code); 
code:= ''; 
Sleep(5*60*1000); 
end; 
Sleep(1000); 
end

 

można go jakoś przerobić, żeby wklejał za każdym razem ten kod co server poda?

proszę o pomoc : )

 

Udostępnij ten post


Link to postu
Pani Kasia

Hymm gram na otsie gdzie jest taki potwor jak King << jak zaznacze Target All to on go nie atakuje ... wie ktoś czemu ??

 

+ potrzebuje scrypt zeby zaatakował z czaru ............ gdy monster bedzie invisible


userbar1aa8vybw7.png

18413ih7.png

Need

Udostępnij ten post


Link to postu
Pani Kasia

Pani Kasia

Szukam skryptu do NG na OTS, ktory przepisuje czerwony tekst pojawiajacy sie na ekranie co 5 min.

Please type '/train xxxx' to prove that you are actually playing the game.
Not doing so will get you banned for 3 hours.

Przepisac ma to (bez " Please type ' "):

/train xxxx' to prove that you are actually playing the game.

Not doing so will get you banned for 3 hours.

 

Tam gdzie - xxxx - to losowy kod.

 

Wiem, ze istnieje taki skrypt.

Mialem go nawet, ale przez przypadek usunalem...

Udostępnij ten post


Link to postu

Witam, mam pytanie jest moze taki skrypt ,ze jak boce to bot mi wyzuca itemy na ziemie na 1 sqm i niechce mi sie tego tyle zbierac zeby bot to jakos sam wsadzal do pustych bp ??

Udostępnij ten post


Link to postu
Witam, mam pytanie jest moze taki skrypt ,ze jak boce to bot mi wyzuca itemy na ziemie na 1 sqm i niechce mi sie tego tyle zbierac zeby bot to jakos sam wsadzal do pustych bp ??

 

jest możliwość taka w elfbot ;]

Udostępnij ten post


Link to postu
Pani Kasia

Daloby rade zrobic skrypta zeby ignorowal niektore dedy monsterow? Bo jak expie na otsie to mi czesto otwiera zamiast deda moba to jego summona i po loocie. Albo zeby char sprawdzal wszystkie dedy naokolo siebie? A i czy mozna prosic o skrypta zaznaczajacego moby odrazu jak zobaczy je na ekranie? Tylko zeby zaznaczal tylko potwory, bez ludzi. Z gory dzieki

Udostępnij ten post


Link to postu
Szukam skrypta który będzie zakładał kamienie lub speary z bp do ręki.

Z góry thx

 

Const

SmallID = 1781

SmallAmount = 5

 

Function GetItemFromOpenBackpack(ID, Index: 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;

if x = Index then Continue;

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 CountItemAmountFromOpenBackpack(ID: integer): integer;

var

x: integer;

y: integer;

begin

Result := 0;

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 := Result + Self.Containers.Container[x].Item[y].Amount;

end;

end;

end;

end;

 

while not terminated do

begin

UpdateWorld;

 

SmallStone := GetItemFromOpenBackpack(SmallID, Self.Containers.Count);

if SmallStone <> nil then SmallStone.MoveToContainer(Self.Containers.Container[0], 0, 0);

if (Self.LeftHand.ID = SmallID) then

begin

if (Self.LeftHand.Amount < 90) then

begin

SmallStone := GetItemFromOpenBackpack(SmallID, Self.Containers.Count);

if SmallStone <> nil then SmallStone.MoveToBody(Self.LeftHand, 0);

end;

end else begin

SmallCount := CountItemAmountFromOpenBackpack(SmallID);

if SmallCount >= SmallAmount then

begin

Self.LeftHand.MoveToBody(Self.Arrow, 0);

Sleep(500);

SmallStone := GetItemFromOpenBackpack(SmallID, Self.Containers.Count);

if SmallStone <> nil then SmallStone.MoveToBody(Self.LeftHand, 0);

end else if Self.LeftHand.ID = 0 then Self.Arrow.MoveToBody(Self.LeftHand, 0);

end;

 

Sleep(500);

end;

 

^ kamyki z bp do reki

Udostępnij ten post


Link to postu

@ Damii

Już 5 dostałeś THX!!!!

 

 

Ps: Ma ktoś waipointy na gobliny koło ab?

 

I PROSZĘ O JESZCZE JEDNEGO SKRYPTA!

Skrypcik dzięki któremu mój pall będzie walić potworki ale uciekać od nich na 2, 3 kratki.

 

Za pomoc dam 5

Udostępnij ten post


Link to postu

Nie ma za co :P. Na 1szej stronie tematu gdzies bylo. A do prosby o skrypt na walenie i uciekanie sie przylaczam : P. Byl tu jakis ale nie dziala. Error wyskakuje ;c

 

@edit

 

Stawiam sobie bota na zbieranie bear pawow i mi dedow bearow nie otwiera. Jakies porady? : c

Udostępnij ten post


Link to postu
Stawiam sobie bota na zbieranie bear pawow i mi dedow bearow nie otwiera. Jakies porady? : c

 

W cave hunting masz ustawione looting? xD

Udostępnij ten post


Link to postu
Taa. Zauwazylem ze nie otwiera rowniez wolfow i zwyklych dwarfow. Jakies porady? ;c

 

 

Może reinstala zrób? Nie wiem ja na szczęście nie mam takich problemów.... Może znajdź skrypta który dobija potwory i wali kurczaki i sheepy, może pomoże : )

Udostępnij ten post


Link to postu
Ps: Ma ktoś waipointy na gobliny koło ab?

 

hxxp://forums.tibiabot.com/showthread.php?p=929456&highlight=Goblin+Femor+Hills+depositer#post929456

 

W miejsce x wpisz t (tam gdzie hxxp ma byc http)

Udostępnij ten post


Link to postu

Ma ktoś działajacego skrypta dla palka ? Chodzi o to,że ma odchodzić od mobów ... Bo ten co jest na 1 czy tam 2 stronie nie działa ;/ za pomoc daje 5 ! :)

Udostępnij ten post


Link to postu

const

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

Wanted='Bonebeast';// which monster to keep diagonal, see lines 113 and 485 for more options

Wanted2='Dragon';// which monster to keep diagonal, see lines 113 and 485 for more options

AttackAt = 16;//will chase out of fire range when creatures health is at or below this amount

//set to 100 to always keep distance

 

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;

 

Skrypt na uciekanie od moba. W wanted i wanted2 nalezy wpisac od jakich mobow ma uciekac nasza postac.

Udostępnij ten post


Link to postu

liczy m-walle

 

Const
iOption = 1; //0 - Magic Wall; 1 - Wild Growth

Var
iItem, iOld, tTime : integer;
tShotTime, tLastsTime : date;
tItem: String;

procedure Event_Notice(Text: String);
begin
if Pos(tItem, Text) = 0 then Exit;
Delete(Text, 1, 13);
tShotTime:= Now;
iOld:= 1;
end;

var
TimeLeft,TimeEnd: string;
hh,mm,ss: integer;
hA,mA,sA: integer;

begin
if iOption = 0 then begin
tItem:= 'magic wall';
tTime:= 20;
end else begin
tItem:= 'wild growth';
tTime:= 45;
end;
//
iItem := 0;
iOld:= 0;
While not terminated do begin
UpdateWorld;
ProcessEvents;
//
if iItem <> iOld then begin
//
hh:= StrToInt(FormatDateTime('hh',tShotTime));
mm:= StrToInt(FormatDateTime('nn',tShotTime));
ss:= StrToInt(FormatDateTime('ss',tShotTime));
//
ss:= ss + tTime;
If ss >= 60 then begin
ss:= ss - 60;
mm:= mm + 1;
end;
if mm>= 60 then begin
mm:= mm - 60;
hh:= hh + 1;
end;
//
if hh < 10 then
TimeEnd:= '0' + IntToStr(hh)
else
TimeEnd:= IntToStr(hh);
TimeEnd:= TimeEnd + ':';
if mm < 10 then
TimeEnd:= TimeEnd + '0' + IntToStr(mm)
else
TimeEnd:= TimeEnd + IntToStr(mm);
TimeEnd:= TimeEnd + ':';
if ss < 10 then
TimeEnd:= TimeEnd + '0' + IntToStr(ss)
else
TimeEnd:= TimeEnd + IntToStr(ss);
//
hA:= StrToInt(FormatDateTime('hh',Now));
mA:= StrToInt(FormatDateTime('nn',Now));
sA:= StrToInt(FormatDateTime('ss',Now));
//
if hA = hh then begin
if mA = mm then begin
TimeLeft:= ss - sA;
end else begin
TimeLeft:= (60 - sA) + ss;
end;
end;
//
if TimeLeft > 0 then Self.DisplayText(IntToStr(TimeLeft) + ' seconds remaining - ' + TimeEnd);
if TimeLeft <= 0 then iOld:=0;
//
Sleep(1000);
end;
end;
end;

 

Udostępnij ten post


Link to postu
Od ostatniej odpowiedzi w tym temacie minęło 204 dni. Pamiętaj, że odkopywanie takich tematów jest niewskazane, chyba że chcesz wnieść coś nowego do dyskusji.

Bądź aktywny! Zaloguj się lub utwórz konto

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto

Zarejestruj nowe konto, to proste!

Zarejestruj nowe konto

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się
  • Kto przegląda   0 użytkowników

    Brak zalogowanych użytkowników przeglądających tę stronę.

×
Okienko zamknie się za 5 sekund...