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

[Pomoc] Wyrzucanie Itemow Na Xyz


Rekomendowane odpowiedzi

Opublikowano

Witam.. posiadam takiego skrypta na wyrzucanie loota na xyz

i jest problem ze on mi nie dziala.. gdy laduje przez waypoint>add>script..

lub czasami dziala ale zatrzymuje sie na tym skrypcie i nie czyta dalej waypointow i stoi.

w czym moze byc problem.. chcialbym aby wyrzucal mi dane itemki na podane wspolrzedne gdy mam wiecej niz iles capa(robil lootbaga)

prosze o pomoc

 

Const

ItemNumber = 3410

Amount = 2

Cap = 300

Sound = 1

var

iten :integer;

 

function GetItemFromOpenBackpack(ID: 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;

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 CountItemFromOpenBackpack(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 + 1;

end;

end;

end;

end;

 

 

begin

iten :=0;

Alarm := False;

while not terminated do

begin

UpdateWorld;

iten := CountItemFromOpenBackpack(Itemnumber);

if ((Cap >= Self.Capacity) and (Iten >= Amount)) then

begin

repeat

updateworld;

GIFOB := GetItemFromOpenBackpack(itemnumber);

GIFOB.movetoground(32422,32155,15,6);

sleep(100);

until ((Cap <= Self.Capacity) or (Iten <= Amount));

Self.PrivateMessage(Self.Name, 'Item dropped');

alarm := True;

end;

if Alarm and Sound then

begin

PlaySound('C:/Windows/Media/Notify.wav');

sleep(1000);

end;

updateworld;

if ((Iten <= Amount) or (Self.Capacity >= Cap)) then

Alarm := False;

sleep(1000);

end;

end;

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
×
×
  • Dodaj nową pozycję...