-
Posted by graz on Sat, 03 Dec 2011 19:47:07
Hi, I've been trying to develop a better Pick Pocket as Auto Loot is not fast enough to fully pick pocket when you immedietly Ambush after.
By what i can assume, if fRPickPocket()==1 then i should be able to do Ambush straight after, however it still fails to correctly loot all slots. I'm still learning Lua and help help is greatly appreciated. ``
function fRPickPocket() CastSpellByName("Pick Pocket") local LootCount=GetNumLootItems() if LootCount > 0 then for x=1, LootCount do LootSlot(x) ConfirmLootSlot(x) x=x+1 end if x==LootCount then return 1 end else return 1 end return 0 end
``
-
Posted by jnwhiteh on Sun, 04 Dec 2011 23:28:47
Hi, I've been trying to develop a better Pick Pocket as Auto Loot is not fast enough to fully pick pocket when you immedietly Ambush after.
By what i can assume, if fRPickPocket()==1 then i should be able to do Ambush straight after, however it still fails to correctly loot all slots. I'm still learning Lua and help help is greatly appreciated. `` function fRPickPocket()
CastSpellByName("Pick Pocket") local LootCount=GetNumLootItems() if LootCount > 0 then for x=1, LootCount do LootSlot(x) ConfirmLootSlot(x) x=x+1 end if x==LootCount then return 1 end else return 1 end return 0
end ``
You cannot cast a spell using CastSpellByName(). So you cannot do it like this. You might be able to get away with doing it in a macro, but you'd need to seriously compress the Lua code. I suggest looking for macros that do this, there should be plenty already.