-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathauto_Kill_Clumble.py
94 lines (80 loc) · 2.77 KB
/
auto_Kill_Clumble.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
from System.Collections.Generic import List
from System import Byte
pet_serial = 0x0000E7C7
trush_poach_serial = 0x4008CB18
def Invisibility():
if not Player.BuffsExist("Invisibility"):
Target.Cancel()
Spells.CastMagery("Invisibility")
Target.WaitForTarget(3000, False)
Target.Self()
if Player.WarMode:
Player.SetWarMode(False)
Misc.Pause(100)
def PetFood(pet_serial, trush_poach_serial):
foods = {
0x097B: {"name": "fish", "type": "etc"},
0x097D: {"name": "cheese", "type": "etc"},
0x09B7: {"name": "chicken", "type": "meat"},
0x09C0: {"name": "sausage", "type": "meat"},
0x09C9: {"name": "ham", "type": "meat"},
0x09D1: {"name": "grape", "type": "fruit"},
0x09D2: {"name": "peach", "type": "fruit"},
0x09D0: {"name": "apple", "type": "fruit"},
0x09EB: {"name": "muffins", "type": "etc"},
0x09F2: {"name": "ribs", "type": "meat"}
}
if Timer.Check("PetFoodClock"):
return
else:
Timer.Create("PetFoodClock", 60000)
global ate_meat
global ate_fruit
ate_meat = False
ate_fruit = False
Misc.SendMessage("PETFOOD", 1150)
Misc.SendMessage("==============", 1150)
while ate_fruit == False:
Spells.CastMagery("Create Food")
Misc.Pause(1000)
for food_k, food_v in foods.items():
item = Items.FindByID(food_k, -1, Player.Backpack.Serial)
if item is not None:
if food_v["type"] == "fruit":
Target.Cancel()
Misc.Pause(50)
Items.Move(item, pet_serial, 0)
ate_fruit = True
Misc.Pause(500)
for food in foods.keys():
item = Items.FindByID(food, -1, Player.Backpack.Serial)
if item is not None:
Target.Cancel()
Misc.Pause(50)
Items.Move(item, trush_poach_serial, 0)
Misc.Pause(500)
Misc.Pause(1000)
def Exec():
filter = Mobiles.Filter()
filter.Enabled = True
filter.RangeMax = 30
filter.Notorieties = List[Byte](bytes([3,4]))
enemies = Mobiles.ApplyFilter(filter)
Mobiles.Select(enemies,'Nearest')
for enemy in enemies:
Misc.SendMessage("Hue: " + str(enemy.Hue), enemy.Hue)
#2305 is black
for string in enemy.Properties:
Misc.SendMessage(string, enemy.Hue)
if enemy.Hue == 0:
Invisibility()
Player.Attack(enemy)
Target.ClearLast()
Misc.Pause(2000)
Player.SetWarMode(False)
else:
Misc.Beep()
while True:
PetFood(pet_serial, trush_poach_serial)
Exec()
Misc.Pause(1000)