SetActiveWindow Asheron's Call
Constants
//Tools
ICT = Intricate Carving Tool
//Chest Pull Settings
KeyPullOn = True
Chest = 0 //Select chest before starting macro
Key = * Forge Key //Change to Mana Forge Key to only use single keys, or any other key you want to use
Ring = Black Coral Keyring
TBC = 7 //Time before chest closes in seconds
//Don't touch below this
CURRENTRINGGUID = 0
FOUNDONE = 0
temp = 0
End
Dataset UsedKeyrings
KeyringGUID = Integer
End
While $KeyPullOn = True
SetConst $Chest = _selectedguid
If $KeyPullOn = True
End
Call FindKey
End
Procedure FindKey //Locates a key in inventory for use
HaveItem $Key
If {PluginResult} = OK
Call Unlock
Else
Call Unring
End
End
Procedure Unlock //Unlock Chest
UseItem $Key, $Chest
Delay 2 Sec
Call Loot
End
Procedure Loot //Select Chest, Open Chest, Delay for looting, Select Chest, Close Chest
SelectGUID $Chest
Keydown R 1 Sec
Delay 7 Sec
SelectGUID $Chest
Keydown R .25 Sec
Keydown R .5 Sec
Keydown R .75 Sec
Call Findkey
End
Procedure Unring //Check for key, if none, Unring Key, if no key switches to new keyring
UseItem $ICT, $CURRENTRINGGUID
Delay 2 Sec
HaveItem $Key
If {PluginResult} <> OK
Call NextKeyring
DSIndexDelete DSInventory, IdSort1
If $FOUNDONE = 0
Sendtext 13, No more mfks or rings, stopping.
SetConst $KeyPullOn = False
End
End
Sendtext 13, $CURRENTRINGGUID - $FOUNDONE
Call Findkey
End
Procedure NextKeyring //This Should switch keyrings upon being out of keys.
SetConst FOUNDONE = 0
LoadDecalInventory
DSIndexAdd DSInventory, IdSort1, GUID
DSIndex DSInventory, IdSort1
DSFilter DSInventory, NAME = '$Ring'
DSCount DSInventory, temp
IF $temp = 0
Exit
End
DSEdit UsedKeyrings
DSAppend UsedKeyrings
SetConst UsedKeyrings[KeyringGUID] = $CURRENTRINGGUID
DSPost UsedKeyRings
DSIndexAdd UsedKeyrings, IdSort, KeyringGUID
DSIndex UsedKeyrings, IdSort
DSFirst UsedKeyRings
While 1 = 1
If DSInventory[GUID] <> UsedKeyRings[KeyringGUID]
SetConst CURRENTRINGGUID = DSInventory[GUID]
SetConst FOUNDONE = 1
DSIndexDelete UsedKeyrings, IdSort
Exit
End
If EOF UsedKeyRings
If EOF DSInventory
DSIndexDelete UsedKeyrings, IdSort
Exit
End
SetConst CURRENTRINGGUID = DSInventory[GUID]
SetConst FOUNDONE = 1
DSIndexDelete UsedKeyrings, IdSort
Exit
End
If EOF DSInventory
DSIndexDelete UsedKeyrings, IdSort
Exit
End
DSNext UsedKeyRings
DSNext DSInventory
End
End
-----signature-----
ImmortalBob, Axer Extraordinaire
+Turbine Sappho tells you, "I am starting to think you are immortal"