-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFindClicky.mac
More file actions
119 lines (114 loc) · 5.12 KB
/
FindClicky.mac
File metadata and controls
119 lines (114 loc) · 5.12 KB
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
|||||||||||||||||||||||||||||||||||||||||||||||||||
|FindClicky.mac by Chatwiththisname
|v1.0 ~ Initial release 1/2/2018
|Usage: /mac FindClicky
| /mac FindClicky All
| Above is same as /mac FindClicky
| /mac FindClicky Worn
| Above will only check for clickies in worn slots
| /mac FindClicky Inventory
| Above will only check inventory/container slots
|
|Purpose: Will search your worn slots and inventory
| for clickable items and output found items to
| the MQ2 Window
|||||||||||||||||||||||||||||||||||||||||||||||||||
| --------------------------------------------------------------------------------------------
| SUB: Main
| --------------------------------------------------------------------------------------------
Sub Main(string whereToLook)
/declare clickyCount int outer 0
|decide what optionCheck should be
/if (${whereToLook.Length}) {
/if (${whereToLook.Left[3].Equal[wor]}) {
|/echo setting optionCheck to Worn
/declare optionCheck string local Worn
} else /if (${whereToLook.Left[3].Equal[inv]}) {
/declare optionCheck string local Inventory
} else /if (${WhereToLook.Left[3].Equal[all]}) {
/declare optionCheck string local All
}
} else {
/declare optionCheck string local All
}
/echo \ar[\agFindClicky\ar]\aw >>> \atWhere to look: \ao${optionCheck}
/call OpenAllContainers
|if optionCheck is all or worn check the worn slots
/if (${Select[${optionCheck},All,Worn]}) {
/call SearchWorn
}
|if optionCheck is all or inventory check the inventory slots/containers
/if (${Select[${optionCheck},All,Inventory]}) {
/call SearchInventory
}
/squelch /cleanup
/echo \ar[\agFindClicky\ar]\aw >>> \atFound \ao${clickyCount} clickies.
/echo \ar[\agFindClicky\ar]\aw >>> \atMacro Runtime: \ao${Macro.RunTime} seconds.
/return
| --------------------------------------------------------------------------------------------
| SUB: OpenAllContainers
| --------------------------------------------------------------------------------------------
Sub OpenAllContainers
|** Opening your inventory **|
/if (!${Window[InventoryWindow].Open}) {
/squelch /windowstate InventoryWindow open
}
|** Opening all your bags **|
/declare i int inner
/for i 23 to 32
/if (${Me.Inventory[${i}].Container} && !${Me.Inventory[${i}].Open}) {
/nomodkey /itemnotify pack${Int[${Math.Calc[${i}-22]}]} rightmouseup
}
/next i
/return
| --------------------------------------------------------------------------------------------
| SUB: SearchInventory
| --------------------------------------------------------------------------------------------
Sub SearchInventory
/declare i int local 0
/declare j int local 0
/for i 23 to 32
|If the Top level inventory slot isn't a container, see if it's a clicky
/if (!${Me.Inventory[${i}].Container}) {
/if (${Me.Inventory[${i}].Spell.ID}) {
/if (${Me.Inventory[${i}].EffectType.NotEqual[Worn]} && ${Me.Inventory[${i}].EffectType.NotEqual[Combat]}) {
/if (${Me.Inventory[${i}].Name.Left[6].NotEqual[Spell:]} && ${Me.Inventory[${i}].Item[${j}].Name.Left[5].NotEqual[Song:]} && ${Me.Inventory[${i}].Name.Left[6].NotEqual[Combat]}) {
/echo \ar[\agFindClicky\ar]\aw >>> \atClickable Item Found: \ao${Me.Inventory[${i}].Name}\at casts \ao${Me.Inventory[${i}].Spell}
/ini FindClicky_${Me.Name}_${EverQuest.Server} "${Me.Inventory[${i}].Name}" Spell "${Me.Inventory[${i}].Spell}"
/varcalc clickyCount ${clickyCount} + 1
}
}
}
|If it wasn't a container goto next i
/continue
}
|If it is a container, look inside to see if it has clickies
/for j 1 to ${Me.Inventory[${i}].Container}
/if (${Me.Inventory[${i}].Item[${j}].Spell.ID}) {
/if (${Me.Inventory[${i}].Item[${j}].EffectType.NotEqual[Worn]} && ${Me.Inventory[${i}].Item[${j}].EffectType.NotEqual[Combat]}) {
/if (${Me.Inventory[${i}].Item[${j}].Name.Left[6].NotEqual[Spell:]} && ${Me.Inventory[${i}].Item[${j}].Name.Left[5].NotEqual[Song:]}) {
/echo \ar[\agFindClicky\ar]\aw >>> \atClickable Item Found: \ao${Me.Inventory[${i}].Item[${j}].Name}\at casts \ao${Me.Inventory[${i}].Item[${j}].Spell}
/ini FindClicky_${Me.Name}_${EverQuest.Server} "${Me.Inventory[${i}].Item[${j}].Name}" Spell "${Me.Inventory[${i}].Item[${j}].Spell}"
/varcalc clickyCount ${clickyCount} + 1
}
}
}
/next j
/next i
/return
| --------------------------------------------------------------------------------------------
| SUB: SearchWorn
| --------------------------------------------------------------------------------------------
Sub SearchWorn
/declare i int local 0
/for i 0 to 22
/if (${Me.Inventory[${i}].Spell.ID}) {
/if (!${Me.Inventory[${i}].EffectType.Equal[Worn]}) {
/echo \ar[\agFindClicky\ar]\aw >>> \atClickable Item Found: \ao${Me.Inventory[${i}].Name}\at casts \ao${Me.Inventory[${i}].Spell}
/ini FindClicky_${Me.Name}_${EverQuest.Server} "${Me.Inventory[${i}].Name}" Spell "${Me.Inventory[${i}].Spell}"
/varcalc clickyCount ${clickyCount} + 1
}
}
/next i
/return
| [+++ Formatted by MQ2f using tabs for indents +++]