joeblow8579 posted:
Very funny.
hehehehehe
I think i got datasets working, it should just go through all your keys/rings now without worrying about handing off to another player.
SetActiveWindow Asheron's Call
Constants
Go = True
Chest = 2075783201 //GUID of chest you want to loot, select ingame and type /actguid for this
Key = * Forge Key
Ring = Black Coral Keyring
ICT = Intricate Carving Tool
CURRENTRINGGUID = 0
FOUNDONE = 0
temp = 0
End
While $Go = True
Call FindKey
End
Dataset UsedKeyrings
KeyringGUID = Integer
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.
Stop
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 = 'Black Coral Keyring'
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"