Klavius

Forum o botach do gry "Tibia"


#1 2008-11-21 18:07:41

rafek1241

Administrator

Zarejestrowany: 2008-11-17
Posty: 8
Punktów :   

Item na godzinę

Przydatny skrypt:

Kod:

const
  ItemName = 'Small Stones'; //The name of the item you want to count; can be anything but best put the actual item name in plural form
  ItemNumber = 1781; //ItemID of the item to count

var  
  seconds, min, mini, hours, count, item, AverageItem, total: integer;  
  hourText,minText,secText: string;

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;    

begin  
  UpdateWorld;  
  AverageItem := 0;
  item := CountItemAmountFromOpenBackpack(ItemNumber);  
  count := 0;  
  seconds := 0;  
  min := 0;  
  hours := 0;  
  while not terminated do  
  begin  
    sleep(1000);  
    UpdateWorld;  
    count := count+1;  
    Seconds := count mod 60;  
    if count>=60 then min := count div 60;  
    mini := min mod 60;  
    if min>=60 then Hours := min div 60;
    total := (CountItemAmountFromOpenBackpack(ItemNumber)-Item);  
    AverageItem := total/count*60*60;
    HourText := IntToStr(Hours);  
    MinsText := IntToStr(mini);  
    SecText := IntToStr(seconds);  
    if Length(HourText) = 1 then HourText := '0' + HourText;  
    if Length(MinsText) = 1 then MinsText := '0' + MinsText;  
    if Length(SecText) = 1 then SecText := '0' + SecText;          
    self.displayText('Running for '+HourText+':'+MinsText+':'+SecText+' | '+ItemName+' collected: '+inttostr(total)+' | '+ItemName+' average/h: '+inttostr(AverageItem)+'.');
    ProcessEvents;  
  end;  
end;

Musicie tylko ustawić jakie itemki i macie taki wynik:
http://img120.imageshack.us/img120/8123/exampleku2.png

Przykład:
za id dajecie 3031 i pisze ile golda na godzinkę

Ustawiamy TYLKO:

Kod:

ItemName = 'Small Stones'; //The name of the item you want to count; can be anything but best put the actual item name in plural form
  ItemNumber = 1781; //ItemID of the item to count

Ustawiamy NAZWA i ID itemka ;D

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.centrum-se.pun.pl www.klasati.pun.pl www.aranze.pun.pl www.muzykologia.pun.pl www.polskasiatkowka.pun.pl