Помогите....
Posted: 14.08.2009 20:58
написать процедуру на збрасывание вещей с пака (мне нада чтобы некторые итемы с пака чар выбрасывал наземлю на одну, 2-е клетки от чара) если можна то по определеной кординате збрасывал.
Code: Select all
function Drop(ItemID: Cardinal; Count: Integer; X,Y,Z: Integer): Boolean;
procedure FlashItem(Item: Cardinal;Count: Integer);
begin
Drop(Item,Count,GetX(self)+1,GetY(self),GetZ(self));
end;
пример использования:
My_Item=$0F51
FindType(My_Item,backpack);
if FindCount>0 then begin
repeat
FlashItem(FindItem,1); //<- Будет сбрасывать на землю по 1 итему пока все не выбросит
FindType(My_Item,backpack);
until FindCount=0;
end;
Code: Select all
Procedure StoreOre
j, a: integer;
begin
j := 1;
UseObject(OreBox);
Wait(3200);
UOSay(Chr(39)+'resend');
Wait(1000);
while j < 5 do
begin
If FindType(Item[j], backpack) > 0 then
begin
ItemID := finditem;
If not(isDead(self)) then MoveItem(ItemID, 0, OreBox, 0, 0, 0);
Wait(1000);
end
else
begin
j := j + 1;
end;
end;
begin
a := 1;
while a < 5 do
begin
If FindType(Musor[a], backpack) > 0 then
begin
ItemID := finditem;
If not(isDead(self)) then Drop(ItemID,Count,GetX(self)+1,GetY(self),GetZ(self));
Wait(1000);
end
else
begin
a := a + 1;
end;
end;
addtosystemjournal('Идем ловить дальше');
Dig;
end;
end;
proZak wrote:А так работать будет?)))
Code: Select all
for a := 1 to High(Musor) do If FindType(Musor[a], backpack) > 0 then begin If not Dead then Drop(FindItem,FindCount или FindQuantity,GetX(self)+1,GetY(self),GetZ(self)); Wait(1000); и еще сюда бы неплохо проверку на ворлдсейв воткнуть end;
proZak wrote:Code: Select all
Procedure StoreOre; var g, a, k: integer; begin CheckSave; WaitConnection(3000); Disarm; wait(1000); for k := 4 to 5 do FindType(Tools[k], backpack); If k = 4 then Equip (RhandLayer, finditem); If k = 5 then Equip (LhandLayer, finditem); Begin g := 1; UseObject(OreBox); Wait(3200); UOSay(Chr(39)+'resend'); Wait(1000); while g < 14 do begin If FindType(Item[g], backpack) > 0 then begin ItemID := finditem; If not(isDead(self)) then MoveItem(ItemID, 0, OreBox, 0, 0, 0); Wait(1000); end else begin g := g + 1; end; end; begin a := 1; while a < 67 do begin If FindType(Musor[a], backpack) > 0 then begin //If not Dead then < врядли FindType найдет мусор в паке если чар сдох :) //FindCount - Это кол-во стопок, а тебе нужно указать сколько из стопки поэтому FindQuantity Drop(FindItem,FindQuantity,GetX(self)+1,GetY(self),GetZ(self)); Wait(1000); CheckSave;<ибо действо на сервере делаешь end else begin a := a + 1; end; end; end; Dig; end; end;
Это ты о чем?Banzayka wrote:текстовик рекорд