-
Notifications
You must be signed in to change notification settings - Fork 2
/
copiaRuneBook.py
120 lines (113 loc) · 4.33 KB
/
copiaRuneBook.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
##====== RuneBook cloner ======##======================================
## Piattaforma: Razor Enhanced
## Autore: Giocos
## Versione: 0.1
## Shard: UODreams
##=============================##======================================
## I nomi degli spot delle rune NON devono inziare per un numero
## All'avvio tutte le rune, se presenti, nella root del backpack
## verranno trasferite all'interno della bag e sovrascritte.
##=============================##======================================
## roadmap
## --- copia di runebook delle biblioteche
## --- Se non hai rune andare dal vendor e comprarne una 20ina
## --- Undress del pg e attivazione meditation al recupero mana
## --- Attivazione lichform se si ha necro
## --- Drop di tutte le rune presenti nel runebook che dovrebbe essere vergine
## --- Grafica
##=============================##======================================
## Serve:
## -runebook da copiare
## -runebook vergine
## -bag vuota dove andremo a inserire le rune vuote
## ---rune vuote nel backpack o dentro la bag
##=============================##======================================
def checkMana():
minmana = 30
manaPause = 10000
while (Player.Mana < minmana):
Misc.SendMessage("Mana sotto la soglia. Wait...", 80)
Misc.Pause(manaPause)
return ;
#######################################
#######################################
def getNumRuneRunebook(runeBookSerial):
return len(pulizia(runeBookSerial))
#######################################
def pulizia(runeBookSerial):
Items.UseItem(runeBookSerial)
Gumps.WaitForGump(1431013363, 3000)
Misc.Pause(100)
listaBook = Gumps.LastGumpGetLineList( )
newListaBook = []
for x in listaBook:
if not (x[0].isnumeric()) and not (x.isnumeric()) and (x != "Empty") and (x != "Gate Travel") and (x != "Charges: ") and (x != "Max Charges: ") and (x != "Rename book") and (x != "Sacred Journey") and (x != "Set default") and (x != "Recall") and (x != "Drop rune") :
newListaBook.append(x)
if Target.HasTarget(): Target.Cancel()
return newListaBook
#######################################
def recalla(runeBookDaCopiare,num):
wait = 1000
recallPause=2000
checkMana()
Items.UseItem(runeBookDaCopiare)
Gumps.WaitForGump(1431013363, wait)
listGump = Gumps.LastGumpGetLineList( )
Misc.Pause(2000)
Gumps.SendAction(1431013363, num * 6 -1)
Misc.Pause(recallPause)
Gumps.ResetGump()
return listGump
#######################################
def marka(runa):
wait = 3000
markPause=1000
checkMana()
Misc.Pause(wait)
Spells.CastMagery("Mark")
Target.WaitForTarget(wait)
Target.TargetExecute(runa)
Misc.Pause(markPause)
#######################################
def getGump(runeBookDaCopiare):
Items.UseItem(runeBookDaCopiare)
Misc.Pause(2000)
return Gumps.LastGumpGetLineList( )
#######################################
def muoviRune(bagRune):
Misc.SendMessage("Sposto le rune nella bag", 82)
runaID = 0x1F14
dragDelay = 500
for item in Player.Backpack.Contains:
if item.ItemID == runaID:
Items.Move(item,bagRune,0)
Misc.Pause(dragDelay)
Misc.SendMessage("Spostamento rune completato", 82)
#######################################
############MAIN######################
#######################################
runaID = 0x1F14
Misc.SendMessage('Targetta il runebook da copiare', 50)
runeBookDaCopiare = Target.PromptTarget()
Misc.SendMessage('Targetta la bag con le rune', 50)
bagRune = Target.PromptTarget()
bagRune = Items.FindBySerial(bagRune)
Misc.SendMessage('Targetta il runebook VERGINE', 50)
runeBookVergine = Target.PromptTarget()
muoviRune(bagRune)
listaSpot = pulizia(runeBookDaCopiare)
Misc.SendMessage("DEBUG:" +str(len(listaSpot)),33)
for x in range(len(listaSpot)/2):
Misc.SendMessage("--> Racall to -> " +listaSpot[x], 80)
recalla(runeBookDaCopiare,x+1)
for item in bagRune.Contains:
if item.ItemID == runaID:
Misc.SendMessage("--> Marko -> " +listaSpot[x], 80)
marka(item)
Items.UseItem(item)
Misc.Pause(100)
Misc.ResponsePrompt(listaSpot[x])
Items.Move(item,runeBookVergine,0)
Misc.Pause(1000)
Misc.SendMessage("--> Runa inserita nel nuovo Runebook -> " +listaSpot[x], 80)
break