-
Notifications
You must be signed in to change notification settings - Fork 0
/
Alchemy [EasyUO + Injection].euo
131 lines (121 loc) · 2.73 KB
/
Alchemy [EasyUO + Injection].euo
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
121
122
123
124
125
126
127
128
129
130
131
set %containerId HGQDKMD
set %craftPotion Agility ; Agility | GreaterHeal
set %potion WUF
set %bloodmoss JUF
set %ginseng JZF
msg $,waitmenu 'What sort of potion do you want' 'Agility'$
msg $,cancelmenu$
if ( %craftPotion = Agility )
{
set %potionKegId KKHYJMD
set %potionColor 24
set %reagents 1
set %reagentType1 %bloodmoss
set %reagentAmount1 1
msg $,automenu 'What sort of potion do you want' 'Agility'$
}
if ( %craftPotion = GreaterHeal )
{
set %potionKegId MNMYJMD
set %potionColor 52
set %reagents 1
set %reagentType1 %ginseng
set %reagentAmount1 7
msg $,automenu 'What sort of potion do you want' 'Greater Heal'$
}
wait 100
loop:
gosub addPotionToKeg
gosub openContainer %containerId
findItem %potion C_ , #backPackID
if ( #findKind = -1 || #findCol <> 0 )
gosub grabEmptyBottle
for %_reagent 1 %reagents
{
set %_reagentType %reagentType . %_reagent
set %_reagentAmount %reagentAmount . %_reagent
set %_reagentToGrab %_reagentAmount * 100
findItem %_reagentType C_ , #backPackId
if ( #findKind = -1 || #findStack < %_reagentAmount )
gosub grabReagent %_reagentType %_reagentToGrab
}
gosub craft
goto loop
sub addPotionToKeg
ignoreItem reset
_addPotionToKeg:
findItem %potion C_ , #backPackId
if ( #findKind = -1 )
return
if ( #findCol <> %potionColor )
{
ignoreItem #findId
goto _addPotionToKeg
}
set #lObjectId %potionKegId
set #lTargetId #findId
set #ltargetKind 1
event macro 17
target 10s
event macro 22
wait 5
return
sub craft
ignoreItem reset
findItem %reagentType1 C_ , #backPackId
if ( #findKind = -1 )
return
set #lObjectId #findId
event macro 17
set %_journal #jIndex
set %timeout #scnt + 10
_journal:
if ( %timeout < #scnt )
return
if ( %_journal >= #jIndex )
goto _journal
set %_journal %_journal + 1
scanJournal %_journal
if ( you_pour_the_completed_potion in #journal )
return
if ( you_toss_the_failed_mixture in #journal )
return
goto _journal
sub grabEmptyBottle
ignoreItem reset
_grabEmptyBottle:
findItem %potion C_ , %containerId
if ( #findKind = -1 )
return
if ( #findCol <> 0 )
{
ignoreItem #findId
goto _grabEmptyBottle
}
exevent drag #findId 1
exevent dropC #backPackId
wait 10
return
sub grabReagent
set %_grabReagentId %1
set %_grabReagentAmount %2
findItem %_grabReagentId C_ , %containerId
if ( #findKind = -1 || #findStack < %_grabReagentAmount )
pause
exevent drag #findId %_grabReagentAmount
exevent dropC #backPackId
wait 10
return
; gosub openContainer [containerId]
sub openContainer
set %_containerId %1
_openContainer:
set #lObjectId %_containerId
event macro 17
set %_timeout #scnt + 10
_waitOpenContainer:
if ( %_timeout < #scnt )
goto _openContainer
if ( #contId = %_containerId )
return
goto _openContainer