Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Z: [TibiaBot NG] Skrypty


SensiiTychy

Rekomendowane odpowiedzi

Opublikowano

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;

×
×
  • Dodaj nową pozycję...