Code: Select all
Sub Main
/declare Clickie local
/declare Pack local
/declare PackSlot local
/declare ClickSlot local
/declare CastTime local
/declare Switch array
/declare InputParam local
/declare ArrayCount local
/declare IniInput local
/varset InputParam @Param0
/varset ArrayCount 1
:MakeArray
/varset Switch(@ArrayCount) ${String["@InputParam"].Arg[@ArrayCount,;]}
/if (!${Ini[clickies.ini,Items,${String["@Switch(@ArrayCount)"]}].Length}) {
/echo ERROR: @Switch(@ArrayCount) is invalid.
/goto :SwitchDone
}
/varadd ArrayCount 1
/if (!${String["@InputParam"].Arg[@ArrayCount,;].Length}) {
/varset ArrayCount 1
/goto :SwitchOut
}
/goto :MakeArray
:SwitchOut
/if (${String[@Switch(@ArrayCount)].Equal["UNDEFINED-ARRAY-ELEMENT"]}) /goto :SwitchDone
/varset IniInput "${Ini[clickies.ini,Items,${String["@Switch(@ArrayCount)"]}]}"
/varset Clickie "${String["@IniInput"].Arg[1,;]}"
/varset Pack "${String["@IniInput"].Arg[2,;]}"
/varset PackSlot "${String["@IniInput"].Arg[3,;]}"
/varset ClickSlot "${String["@IniInput"].Arg[4,;]}"
/varset CastTime "${String["@IniInput"].Arg[5,;]}"
:SwitchNClick
/echo Now switching ${Me.Inventory["@ClickSlot"].Name} with @Clickie
/if (!${Window[InventoryWindow].Open}) {
/keypress inventory
}
/if (!${Window[${InvSlot[@Pack].Name}].Open}) {
/itemnotify pack2 rightmouseup
}
/itemnotify in ${String[@Pack]} ${String[@PackSlot]} leftmouseup
/delay 1
/itemnotify ${String[@ClickSlot]} leftmouseup
/delay 1
/itemnotify ${String[@ClickSlot]} rightmouseup
/delay ${Math.Calc[${Float["@CastTime"]}+1]}s
/itemnotify ${String[@ClickSlot]} leftmouseup
/delay 1
/itemnotify in ${String[@Pack]} ${String[@PackSlot]} leftmouseup
/delay 1
:SwitchDone
/zapvars
/cleanup
/returnCode: Select all
[Items]
Robe=Koadic's Robe of Heightened Focus;pack2;1;chest;6.5
Shield=Shield of Auras;pack2;2;offhand;7
Resist=String of Beaded Slime;pack2;6;leftwrist;1
Sow=Yttrium Studded Leather Boots;pack2;3;feet;12
Xuzl=Amulet of Xuzl;pack2;4;neck;10
