As promised here is my current G13 config. I also put my script config cause it should work with a G15.

G4, G10, G11, G12 = ZQSD
G1 = loot
G2 = food
G3 = heal pot
G5 = sheath / unsheath
G6 = use
G7 = alternate use
G8 = spawn mount
G9 = stam pot
G13 = small AoE cycle (virtuous wrath, fireball, corrosive blast)
G14 = ray AoE cycle (holy flame, wall of fire, I must add acid rain)
G15 = shift
G16 = cycle situationnal debuff (exhaust, stam leech, burden)
G17 = cycle heal other (heal other, sacrifice)
G18 = cycle self heal (stam2health, witches brew, heal)
G19 = cycle utility spells (Wall of force, confusion, launch)
G20 = gank
G21 = mana2stam
G22 = cycle self buff (a shit-ton to list)
G23 = jump
G24 = crouch
Joystick :
Up = equip 2h weapon + ready whirlwind
Left = equip 1h weapon then shield
Down = equip staff + ready attack spell
Right = equip bow

Here is the script for cycling and looting. The problem with DFO is if you bind something to a key + modifier (ctrl or alt) they won't work if you are using the shift. That's why I have to detect it for some keys.

Code:
keyArray = {{}, -- 1
            {},
            {},
            {},
            {},
            {},
            {},
            {},
            {},
            {},
            {},
            {},
            {"F1", "F2", "F3"}, -- 13
            {"F11", "F12"}, -- 14
            {},
            {"lbracket", "rbracket", "backslash"},
            {"U", "V"},
            {"F5", "F6", "F7"}, -- 18
            {"F8", "F9", "F10"}, -- 19
            {},
            {},
            {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}
            };
ctrlModifier = {{}, -- 1
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {},
                {}, -- 13
                {}, -- 14
                {},
                {},
                {},
                {}, -- 18
                {}, -- 19
                {},
                {},
                {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
                };
indexes = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
lastGkey = 0;
function OnEvent(event, arg)
    if (event=="G_PRESSED" and arg ~=1) then
        if(lastGkey > 0 and lastGkey == arg) then
            indexes[arg] = indexes[arg] + 1;
            if(indexes[arg] > table.getn(keyArray[arg])) then
                indexes[arg] = 1;
            end
        end
        isSprint = IsModifierPressed("shift");
        if(ctrlModifier[arg][indexes[arg]]) then
            if(isSprint) then
                ReleaseKey("lshift");             
            end
            PressKey("lctrl");
        end
        PressAndReleaseKey(keyArray[arg][indexes[arg]]);
        if(ctrlModifier[arg][indexes[arg]]) then
            if(isSprint) then
                PressKey("lshift");
            end
            ReleaseKey("lctrl");
        end
        lastGkey = arg;
    end


    if(event=="G_PRESSED" and arg==1) then
        x, y = GetMousePosition();
        PressMouseButton(1);
        Sleep(10);
        MoveMouseTo(26532, 48321);
        Sleep(10);
        ReleaseMouseButton(1);
        Sleep(10);
        MoveMouseTo(x, y);
    end
end

Last edited by Arkh; 10/23/09 09:40 AM.

[Linked Image from w3.the-kgb.com][Linked Image from w3.the-kgb.com]