-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcraft_Inscription.py
64 lines (42 loc) · 1.32 KB
/
craft_Inscription.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
from AutoComplete import *
from AutoComplete import *
InscriptionGump = 2066278152
ReCreate = 21
ScribesPen = 0x0FBF
def checkNotHaveEnough():
if Gumps.LastGumpTextExist("You do not have enough"):
Misc.SendMessage("Item not enough!")
end()
def getPenCharges(pen):
return int(str(pen.Properties[1]).split(": ")[1])
def meditation():
if Player.Mana < Player.ManaMax * 0.5:
while True:
if not Player.BuffsExist("Meditation"):
Player.UseSkill("Meditation")
Player.HeadMessage(111, "*Meditation*")
Misc.Pause(1000)
if Player.ManaMax * 0.9 < Player.Mana:
break
Misc.Pause(1000)
def main():
while True:
pen = Items.FindByID(ScribesPen, 0, Player.Backpack.Serial)
if not pen:
break
Items.UseItem(pen)
while True:
pen = Items.FindBySerial(pen.Serial)
if not pen:
break
charges = getPenCharges(pen)
if not charges:
break
Gumps.WaitForGump(InscriptionGump, 3000)
checkNotHaveEnough()
meditation()
Gumps.SendAction(InscriptionGump, ReCreate)
Misc.Pause(100)
Misc.Pause(100)
Misc.SendMessage("Done!")
main()