Page 1 of 1

Question on Housekeeper's Items

Posted: Sat Jan 21, 2012 3:16 pm
by Germangold
Hi @ all

Is there a way to read on a housekeepers item its remaining "life time" till it disapears?

would be cool to implement into my KS farming script

pseudocode

Code: Select all

remaining_Clear_Thought = getRemaingTime:item(207202);

if (remaining_Clear_Thought < 600) then
 delete:item(207202);
end

Re: Question on Housekeeper's Items

Posted: Sat Jan 21, 2012 3:28 pm
by M4gm4
hmmm,, evtl kann man das mit der os time machen

quasi ala
wenn du items holst beim hausmädchen then
verfallsdatum = os time

dann,

check das item erneut am verfallsdatum + 1minute (damit das auch definitv nicht mehr im beutel ist)



..oo000OOEnglishOO000oo..
hmmm, can you possibly do with the os time

quasi-ala
if you bring the items home girl - then
expiry date = os time

then,

check the item again at the expiry date + 1minute (so that's definitely not in the bag)

Re: Question on Housekeeper's Items

Posted: Sat Jan 21, 2012 3:40 pm
by Germangold
thanks for that advice
but unfortunately that wont work.

this is my procedure after 24 hours reconnect

1. start at respawn point ks < due to logging out in the middle of a run
2. recalls to sacilia
3. go to the mailbox send gold, tier III runes and guild runes to a collector character
4. go to housekeeper npc
5. >> CHECK all needed housekeepers items, magic dust, clear tought and speed and if neccessary delete those
6. if housekeeprs item are delteted enter house and talk to all 3 housemaids
7. leave the house
8. teleport to ks back with a spesific teleport locaton (cost 1 rune each time)

Re: Question on Housekeeper's Items

Posted: Sat Jan 21, 2012 4:04 pm
by M4gm4
if you do that anyway after 24 hours, then delete it but just a flat rate, and get just new.

edit: I have an idea, give me a few minutes

I think it goes in this direction

Code: Select all

GameTooltip:SetBagItem(GetBagItemInfo(207202))
edit2: possibly help you further, my head is smoking degree and I can not think http://www.solarstrike.net/phpBB3/viewt ... 432#p17432

Re: Question on Housekeeper's Items

Posted: Sat May 11, 2013 5:29 pm
by Ego95
Anyone found out, if it's possible? This would be the next thing i want to implent in my ks script :/

AlterEgo95

Re: Question on Housekeeper's Items

Posted: Sat May 11, 2013 11:43 pm
by rock5
I don't think you have to delete them. You can just merge new items with old and make them all new. The trick is getting all the item moves in the right order. I haven't done it in a while so I don't remember all the rules to make it work. Still, you probably will need to know the Expire time of the items.

Re: Question on Housekeeper's Items

Posted: Sun May 12, 2013 1:12 am
by rock5
Ok I got something for you. I couldn't find a function but the item address + 0xC is the time the item was created (in seconds since 1970, ie. "Unix epoch time"). Just compare it to os.time() and you'll get the age of the item in seconds. Then you just need to know how long the items last, in this case 24 hours, to work out how much longer they will last. Here is a little function that returns an items age in hours, I figured that would be the most useful.

Code: Select all

function GetItemAge(item)
	if type(item) == "number" and item >= 1 and 240 >= item then
		item = inventory.BagSlot[item]
	elseif type(item) ~= "table" or item.Address == nil then
		error("GetItemAge: Expected bag slot number or item table.")
	end

	local itemCreated = memoryReadUInt(getProc(), item.Address + 0xC)

	return (os.time() - itemCreated)/3600
end

Re: Question on Housekeeper's Items

Posted: Sun May 12, 2013 10:11 am
by Ego95
Nice I'm gooing to try this :) Would be awesome to check it at the rez point and then get new housemaid potions.

AlterEgo95

Re: Question on Housekeeper's Items

Posted: Sun May 12, 2013 6:10 pm
by lisa
ahh, I was looking for a countdown, didn't think of looking for a time it was created.