Page 1 of 1

How to drop cards?

Posted: Sat Jan 18, 2014 8:01 am
by powerattack
hey again,
How can I set my cleanbag userfunction to drop cards?

Code: Select all

function KSCheckForFullInventory()
	if ((not KS_check_bag) or (getZoneId() == 6)) then return; end;
	
	CleanBag(KS_loot_discard_value,KS_loot_discard_quality);
			yrest(500);
	

	local spacesLeft = inventory:itemTotalCountForSlots(0,settings.profile.options.INV_AUTOSELL_FROMSLOT+60,settings.profile.options.INV_AUTOSELL_TOSLOT+60) + (KS_item_queue_size - ItemQueueCount());
	ksLog("Cleared bags: "..tostring(spacesLeft).." spaces free", LOGLEVEL_DEBUG);
	if (0 >= spacesLeft)  then    
		KSResetInstance();
	end 
end
this is the script, do I need to change something in there or in my profile orsomething.

I saw in Lisa's script she added

Code: Select all

if item:isType("Runes") or item:isType("Monster Cards") then 
					item:delete()
				end
but I can't seem to get that to work in my version.

Thanks in advance

Re: How to drop cards?

Posted: Sat Jan 18, 2014 8:13 am
by rock5
We would probably need to see what you tried to do because we don't know what your version of cleanbag looks like.

Re: How to drop cards?

Posted: Sat Jan 18, 2014 8:30 am
by powerattack
I'm sorry that was my waypoint script, I didn't do anything with my cleanbag yet, do I need to add that line in there? or like Lisa in my waypoint file?

Re: How to drop cards?

Posted: Sat Jan 18, 2014 8:37 am
by powerattack
found it, if people are intrested:

Code: Select all

	for i, item in pairs(inventory.BagSlot) do
		if item.SlotNumber >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 60 and
		settings.profile.options.INV_AUTOSELL_TOSLOT + 60 >= item.SlotNumber then

[color=#FF0000]				if item:isType("Runes") or item:isType("Monster Cards") then 
					item:delete()[/color]
				end
in cleanbag userfunction

the red part isn't in the original one ;)