PDA

View Full Version : Sell junk, ok but "toss junk?"


JHawx
28-01-2007, 01:04 PM
im using folowing macro to sell all junk items to vendor:

---
/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Selling "..name); UseContainerItem(bag,slot) end; end; end
---

But how do i set it to dismiss junk items from pouches?
I no longer collect junk items. as i benefite from colletng white items or green ones... ???

And yes, this sucker works! I use i every time i go to the vendor... But..
I usually run in instances because theres these low level characters asking me in guild to help em. I really dont need those crappy greyd out items from those, and i usually have to spend some time beetween battles to make some space for the green and blue items. got what i mean?

VincentGdG
28-01-2007, 07:11 PM
You can use Auto-Bag.

With it you can set items on a destroy-on-pickup list.
This comes in very handy. I will upload an updated version here soon.

Regards
Vince

Rowaa
29-01-2007, 10:30 AM
If you use Titan, then Titan Panel - Itemized Deductions (ReBorn) (http://ui.worldofwar.net/ui.php?id=3586) have lots of options for clearing out your bag too.

JHawx
31-01-2007, 12:45 AM
can these be made so it will clear inventory on command like macro does?
Because i dont want to toss stuff all the time, only when i need space. because those rock chips just keeps adding up, like 20 gets like 50s -1g... theyr black but really... adds up... you know what i mean.

if there is a macro solution to this, id rather use it than get a mod, theyr usually dependant on some other mods and addonns, and dont work after some is upgraded or patched...

ill try the mods tho, if i like em, ill start using em, but... well...

Wintrow
31-01-2007, 10:17 AM
This should do it...

It's a change of your script. Instead of "using" the items (which sells them when at a vendor) it picks them up and deletes them.

I suggest testing it with an alt or without anything valuable in your bags :wink:

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Dropping "..name); PickupContainerItem(bag,slot); DeleteCursorItem() end; end; end

JHawx
31-01-2007, 12:34 PM
This should do it...

It's a change of your script. Instead of "using" the items (which sells them when at a vendor) it picks them up and deletes them.

I suggest testing it with an alt or without anything valuable in your bags :wink:

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Dropping "..name); PickupContainerItem(bag,slot); DeleteCursorItem() end; end; end

sadly too log, if there wouldnt be announcing, it would be short enough tho...
so...

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); PickupContainerItem(bag,slot); DeleteCursorItem() end; end[/QUOTE]

would this work?

Wintrow
31-01-2007, 02:49 PM
sadly too log, if there wouldnt be announcing, it would be short enough tho...
so...

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); PickupContainerItem(bag,slot); DeleteCursorItem() end; end

would this work?

no, lol, you'd delete everything in your bags :grin:

try this:

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then PickupContainerItem(bag,slot); DeleteCursorItem() end; end; end

it's the same as my previous but without the announce.

JHawx
31-01-2007, 03:19 PM
no, lol, you'd delete everything in your bags :grin:

try this:

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then PickupContainerItem(bag,slot); DeleteCursorItem() end; end; end

it's the same as my previous but without the announce.

Thanx mate, this 1 works... perfectly...

StealthAssasin
31-01-2007, 03:28 PM
um i say just lvl your enchanting up and disenchant items you dont need. Thats what ima do when i hit 70. Just thought of it as to what i can do with junk items :) since ima convert to enchanter at lvl 70 on my hunter as a way to help get my epic flying mount

Rowaa
31-01-2007, 04:07 PM
@JHawx, if you're asking about addon I've mentioned, then it does exactly what you want - sell or drop happens only on command. Speaking about long /script - just pack it into Lua function, load it as addon and call it by name. There's no limit on size in Lua files.

@StealthAssasin, if you didn't knew, DE works only for equipable items of green quality and better.

JHawx
01-02-2007, 06:23 AM
@JHawx...
Speaking about long /script - just pack it into Lua function, load it as addon and call it by name. There's no limit on size in Lua files.
....

WOW! didnt knew that 1, thanx...

JHawx
04-02-2007, 05:07 PM
ok, im little lost with these lua funktions, i have coded javascript before. I have some training in coding, and i got basic idea of it all, how to call etch...

So i set the xml , lua & toc files, but how do i set the commands?
the original elp intr file is just so darn confusing, as it gets messages out of internet and just loads 2hello world" on load... but how do i set commandline funktions and where i pace the coding itself?

in lua section i create?

---
funktion Stuffer_drop()
/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Dropping "..name); PickupContainerItem(bag,slot); DeleteCursorItem() end; end; end
end
---
&
---
funktion Stuffer_sell()
/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Selling "..name); UseContainerItem(bag,slot) end; end; end
end
---

Can somebody make me an example file how this is done so i can DEcode the coding so i can understand? Im not very good at this yet, but id like to learn how its going... when i see final example, i usually understand by decoding it, not by making the code itself...

in xml, you usually generate windowses for the prossess, but i dont want to add those... Instead im trying to do the javascript type of funktions, by adding more commands to the game. after that im gonna use mods to call em, just like suggested.

i understand also that .toc is used to list all hings & inform game itself... as toc = table of contents.

but can i also make each script into separate files? so i can modify each line separatly not affecting each other? So i could possiblycreate my own system of shortcuts... so i only add ne funktionhandlers???

Tunga
04-02-2007, 08:48 PM
Almost, this should make it clearer:
function Stuffer_drop()
for bag = 0,4,1 do
for slot = 1, GetContainerNumSlots(bag), 1 do
local name = GetContainerItemLink(bag,slot);
if name and string.find(name,"ff9d9d9d") then
DEFAULT_CHAT_FRAME:AddMessage("Dropping "..name);
PickupContainerItem(bag,slot);
DeleteCursorItem();
end;
end;
end;
end

JHawx
05-02-2007, 01:05 AM
Almost, this should make it clearer:
function Stuffer_drop()
for bag = 0,4,1 do
for slot = 1, GetContainerNumSlots(bag), 1 do
local name = GetContainerItemLink(bag,slot);
if name and string.find(name,"ff9d9d9d") then
DEFAULT_CHAT_FRAME:AddMessage("Dropping "..name);
PickupContainerItem(bag,slot);
DeleteCursorItem();
end;
end;
end;
end

aah... the infamous invoked coding portable format...
so this binds it so that if the lua consists thee, i can create macros that summon stuffer_drop. if i ad stuffer_sell below these lines, they are also binded to that addonn as fuktion?

Tunga
05-02-2007, 03:32 AM
Yup, you could just make a macro with the line:
/script Stuffer_drop()
That would call the function. And yes, you can put more functions in below that. You'll need a TOC file too of course.

JHawx
08-02-2007, 08:53 PM
Yup, you could just make a macro with the line:
/script Stuffer_drop()
That would call the function. And yes, you can put more functions in below that. You'll need a TOC file too of course.

well that i i handled allready...

---
## Interface:6337
## Title: Stuffer
## Notes: Under developement
Stuffer.xml

---

that should suffice...

Wintrow
09-02-2007, 02:46 PM
If you have really crappy Throwing Knives you're also "tossing junk" :grin: