NG Phorum

Forum o bocie TibiaNG oraz ElfBotNG


#1 2009-05-02 11:53:31

Admin

Administrator

Zarejestrowany: 2009-04-02
Posty: 24
Punktów :   

Wyrzuć loot gdy mało cap

Skrypt wyrzuca itemki od podanym ID gdy mamy mało Capa.

[Musisz być zalogowany, aby przeczytać ukrytą wiadomość]

Kod:

Const
  ItemIDs = [3285,3447,3448,3350] // it will try to throw items until you have enuogh cap again in the order from the right to left.
  MinCap = 50
  AlertWhenDrop = 1 // 0 - to disable. 1 - to enable.
 
function GetItemFromOpenBackpack(ID: integer): TItem;
var
  y: integer;
begin
  Result := nil;
  for x := Self.Containers.Count - 1 downto 0 do
  begin
    if x >= Self.Containers.Count then Break;
    for y := Self.Containers.Container[x].Count - 1 downto 0 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;

while not terminated do
begin
  UpdateWorld;
  if Self.Capacity <= MinCap then
  begin
    for i := Low(ItemIDs) to High(ItemIDs) do
    begin
      Item := GetItemFromOpenBackpack(ItemIDs[i]);
      if Item <> nil then
      begin
        Item.MoveToGround(Self.X,Self.Y,Self.Z,0);
        if AlertWhenDrop then
        PlaySound('C:/Windows/Media/Notify.wav');
        break;
      end;
    end;
  end; 
  Sleep(1500);
 end;

Offline

 

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.microrc.pun.pl www.bulletsofpain.pun.pl www.nutriolandia.pun.pl www.gossip-girl.pun.pl www.cll.pun.pl