in your browser.
Help with two Warlock Macro's
Return to board index
This post was from a user who has deleted their account.
Second can be tricky. It can't auto-delete. Best you can do is attach it to another macro ability. I'll assume Drain Soul.
/cast Drain Soul
/run for b=0,3 do for s=1,GetContainerNumSlots(b)do local i=GetContainerItemLink(b,s)if i and GetItemInfo(i)=='Soul Shard'then PickupContainerItem(b,s)DeleteCursorItem()end;end;end
: I can't test this script at the moment, so don't run it without a proper test, or it might just delete other items. To test it, place a shard in every bag and run this script:
/run local I=0;for b=0,3 do for s=1,GetContainerNumSlots(b)do local i=GetContainerItemLink(b,s)if i and GetItemInfo(i)=='Soul Shard'then I=I+1;print('Found '..GetItemInfo(i) or 'nil')end;end;end print("Total of "..I.." shards found")
And make sure: (a) "Found Soul Shard" gets printed (potentially a lot), and (b) nothing else get printed. Also, verify that it doesn't print more than the amount of shards NOT in your shard bag.
Yes, they can be deleted.
/run i="Soul Shard"d=GetItemCount(i)-20 for x=0,4 do for y=1,GetContainerNumSlots(x) do if (d>0) then l=GetContainerItemLink(x,y) if l and GetItemInfo(l)==i then PickupContainerItem(x,y) DeleteCursorItem() d=d-1 end end end end
´to number you want
Thanks for successfully posting a script 47 character longer than mine which: introduces global variables to the namespace, potentially breaking thing; and doesn't mind the existence of a Soul Bag, simply destroying
soul shards. You were clearly a wonderful help.
You are not logged in. Please
to post a reply or
if you don't already have an account.