-
Notifications
You must be signed in to change notification settings - Fork 2
/
BigLeathering.py
76 lines (61 loc) · 1.86 KB
/
BigLeathering.py
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
waitAfterCut = 1000
waitAfterMove = 1500
waitForContents = 5000
waitForTarget = 1500
#0x2D23 cleaver
#0x0EC5 coltellino
leatherID = 0x1079
leatherID2 = 0x1081
def KillaMob():
mob = Mobiles.Filter()
mob.Enabled = True
mob.RangeMax = 10
mob.IsHuman = 0
mobFound = Mobiles.ApplyFilter(mob)
listMob = list()
for c in mobFound: #itera la lista dei mob trovati
if c.Notoriety == 3:
listMob.append(c)
return listMob
def AllKill(listMob):
for mob in listMob:
Player.ChatSay(33,"All Kill")
Target.WaitForTarget(10000, False)
Target.TargetExecute(mob)
AspettaMorto(mob)
Misc.Pause(1000)
def CercaMorti():
ignoreCorpo = list()
# Filtro corpi
corpse = Items.Filter()
corpse.Enabled = True
corpse.OnGround = True
corpse.Movable = False
corpse.RangeMax = 12
corpse.IsCorpse = True
corpseFound = Items.ApplyFilter(corpse)
for c in corpseFound: #itera la lista dei corpi trovati
#if c.Serial not in ignoreCorpo:
#ignore.append(c.Serial)
Player.PathFindTo(c.Position.X,c.Position.Y,c.Position.Z)
Misc.Pause(2000)
loot(c)
def AspettaMorto(mobAttaccato):
while True:
if Mobiles.FindBySerial(mobAttaccato.Serial) is None:
return
def loot(corpo):
Items.UseItemByID(0x2D23,-1)
Target.WaitForTarget(waitForTarget, False)
Target.TargetExecute(corpo)
Misc.Pause(1000)
if Target.HasTarget(): Target.Cancel()
Items.WaitForContents(corpo, waitForContents)
for item in corpo.Contains : #itera la lista degli oggetti nel corpo
if item.ItemID == leatherID2: #se l'oggetto è di tipo pelle lo sposta nel backpack
Items.Move(item,Player.Backpack, 0)
Misc.Pause(1000)
def main():
AllKill(KillaMob())
CercaMorti()
main()