Forum TibiaBot NG Strona Główna

TibiaBot NG
Forum Poświęcone Najpopularniejszemu Botowi do Tibii
 

Przydatne skrypty

 
Napisz nowy temat   Odpowiedz do tematu    Forum TibiaBot NG Strona Główna -> Skrypty
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Nexuz
Administrator



Dołączył: 29 Gru 2007
Posty: 10
Przeczytał: 0 tematów

Pomógł: 5 razy
Ostrzeżeń: 0/5

PostWysłany: Nie 18:37, 30 Gru 2007    Temat postu: Przydatne skrypty

Umieszczam tutaj podstawowe skrypty, które napewno się przydadzą


1. Skrypt polega na automatycznym wystrzeleniu Mwalla kiedy kliknie się przycisk.

Kod:
Var
Creature:TCreature;
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_KeyDown(Key: integer);
Begin
If key=$11 then //tutaj zmień przycisk na jaki chcesz
   begin
   updateworld;
   Creature := GetCreatureByID(Self.Attacking);
      if Creature <> nil then
      begin
        case Creature.Direction of
          0:  Self.Containers.UseItemWithGround(3180, Creature.X, Creature.Y - 2, Creature.Z);
          1:  Self.Containers.UseItemWithGround(3180, Creature.X + 2, Creature.Y, Creature.Z);
          2:  Self.Containers.UseItemWithGround(3180, Creature.X, Creature.Y + 2, Creature.Z);
          3:  Self.Containers.UseItemWithGround(3180, Creature.X - 2, Creature.Y, Creature.Z);
        end;
      end;
    end;
end;
Begin
while not terminated do
begin
ProcessEvents;
Sleep(100);
end;
end;


2. Trenowanie na obu monkach .. bardzo przydatne dla palladinów
Skrypt ten polega na tym że jak (skujemy) monka do xx hp to automatycznie nasza postac zaznaczy atak na drugiego monka i tak w kółko Wesoly


Kod:
Const     
StopAt=50;//Przestań atakować monka jęzeli ma %hp .
AttackAt=80;// zacznij atakować monka kiedy ma powyżej % hp.   
TrainName=['Monk','FrinedName1','FriendName2']/you can change it to a player name.
var     
creature:tcreature;     

function GetCreatureByNameHPHIGH(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   
    if Creatures.Creature[x].z=Self.Z then   
    if Creatures.Creature[x].Health>AttackAt then     
    begin     
      Result := Creatures.Creature[x];     
      Exit;     
    end;     
  end;     
end;     
function Attacking: 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].Attacking then     
    begin     
      Result := True;     
      Exit;     
    end;     
  end;     
end;     
function GetAttackedCreature: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].Attacking=true then     
    begin     
      Result := Creatures.Creature[x];     
      Exit;     
    end;     
  end;     
end;     


begin     

while not Terminated do     
  begin     
  UpdateWorld;     
  if not attacking then     
  begin
  For x:=low(TrainName) to high(trainName) do
   begin 
   If self.attacking<>0 then break;   
    Creature:=GetCreatureByNameHPHIGH(TrainName[x]);     
    if  Creature <> nil then     
    creature.attacking:=true;
    sleep(100); updateworld;     
  end;
  end;     
  if attacking then     
  begin     
  Creature:=GetAttackedCreature;     
  if  Creature <> nil then     
  if creature.Health < StopAt then creature.attacking:=false;     
  end;     
  sleep(1000);     
  end;     
end;


3.Gdy nie mam jedzenia w bp usłyszymy alert


Kod:
Const
  FoodID = 1111 //tutaj wpisujemy ID foodu jaki mamy w bp
  MusicPath = 'C:\Windows\Media\Notify.wav' // This is the main alert of windows.
                                           // You can try to change it to music or another alert
                                         //  or whatever you want, just change the path correctly.

while not terminated do
begin
  UpdateWorld;
  a:=0;
  For x:= 0 to Self.Containers.Count - 1 do
  begin
    for y := 0 to Self.Containers.Container[x].Count - 1 do
    begin
      if Self.Containers.Container[x].Item[y].ID = FoodID
      then a := 1;
      Sleep(100);
    end;
    sleep(100);
  end;
  sleep(100);
  if a = 0 then PlaySound(MusicPath);
end; 


Mam nadzieje że skrypty się przydały Jezyk


Post został pochwalony 0 razy

Ostatnio zmieniony przez Nexuz dnia Nie 18:40, 30 Gru 2007, w całości zmieniany 1 raz
Powrót do góry
Zobacz profil autora
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum TibiaBot NG Strona Główna -> Skrypty Wszystkie czasy w strefie EET (Europa)
Strona 1 z 1

 
Skocz do:  
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group
deox v1.2 // Theme created by Sopel & Download

Regulamin