Altering Temp item
Greetings.
I know that temporary items get some sort of timestamp to track when they needed to be removed from a character if he logs off for more than 30 min I believe. Would it be possible to retrieve this timestamp via quest and remove the item of a player while he still logged in? I want to set up a quest where player only has like 30 min to turn in the item before it goes poof. Another question - would it heavily tax the server if a quest script would go off every 30 min to go through all the stored characters in DB searching for item X and removing it? Thanks! |
Quote:
|
Sounds like the hot potato quest I once did, which, I cannot find now. So, this is all untested, but, along the lines of what I did (really wish I could find it, as many little neat quests were in that directory). Haven't tested any of the following for shit. If I come across that directory, then I'll share that quest, but in the meantime:
Code:
## /quests/global/global_player.pl may NOT work I would suggest placing this in each zone's /quests/<zonesn>/player.pl |
Thank you so much!
I will study this and put into good use ;) |
Well. Don't thank me just yet. Decided to give this a whirl and perhaps I'm missing something simple but:
Code:
$client->GetItemIDAt($_) |
That's probably the best way to handle it for now.
We only use client logout time to determine when no rent items should be deleted. There may be ways to use item timers (custom data) to do this..but, I've never seen it. At some point, I'll be adding something called `ItemInstance::origin_tag` - which is a base64 encoded 16-byte text field. (Later clients can use this for hotkey assignments) I don't know what live puts into this field..but, one of the things I'm looking at using is a creation timestamp. |
Ok. It should work. Oddly enough, GetItemIDAt was not working, it would return a -1 for every iteration of a loop when a variable was passed to it. Hardcoding GetItemIDAt(2) or any other valid slot number would work though. That is on a GM toon that had:
Been created days (and many restarts ago) -> world.exe flag <accountname> 255 -> #gm on -> #zone cshome -> "bought" GM items (and did a few days/months worth of melee killing, #cast killing, many many #zone's, etc.) However. Immediately following a #summonitem 50100 and equipping it (forcing a save I'm sure, though dont see how that matters, the toon has existed for quite some time), the GetItemIDAt when using a variable would work. Strange, real strange. |
Ghanja, would you like me to post your hot potato/coffee quest?
I have it from Sanctuary backups. |
Quote:
|
All times are GMT -4. The time now is 10:05 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.