Program New Region Script Options const CorpseType 8198 var LootBagID

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Program New;
{$Region Script Options}
const CorpseType = 8198;
var LootBagID : Cardinal;
const Range = 1;
{$EndRegion}
{$Region Script Variable Declaration}
var CorpseID : Cardinal;
var LootList : Array of Cardinal;
{$EndRegion}
{$Region Procedures}
Procedure HandleCorpse();
var i : Integer;
begin
{$Region Loot Declaration}
{$EndRegion}
if ( GetDistance(CorpseID) <= Range ) Then
begin
UseObject(CorpseID);
Wait(1000);
for i := 0 to (Length( LootList ) - 1) do
begin
while ( FindTypeEx( LootList[i],$FFFF,CorpseID,True ) > 0 ) do
begin
if ( GetDistance(CorpseID) <= Range ) Then begin
MoveItem( FindItem,9999999,LootBagID,0,0,0);
end else begin
exit;
end;
end;
end;
Ignore(CorpseID);
ClientPrint(' Corpse were Sucessfull Looted ');
end;
end;
{$EndRegion}
{$Region Main Body}
begin
LootList := [$0EED,$0F81,$26B7,$0F0F,$0F10,$0F11,$0F12,$0F13,$0F14,$0F15,$0F16
,$0F17,$0F18,$0F19,$0F1A,$0F1B,$0F1C,$0F1D,$0F1E,$0F1F,$0F20,$0F20,$0F21,$0F22,
$0F23,$0F24,$0F25,$0F26,$0F27,$0F28,$0F29,$0F2A,$0F2B,$0F2C,$0F2D,$0F2E,$0F2F,$0F30];
LootBagID := Backpack();
DropDelay := 1250;
IgnoreReset();
while ( Connected() = true ) do
begin
FindDistance := Range;
If ( FindTypeEx(CorpseType,$FFFF,Ground(),False) > 0 ) then
begin
CorpseID := FindItem;
HandleCorpse();
end;
end;
Wait(250);
end.
{$EndRegion}