• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Outfits and exhaustion.set

Vikarious

New Member
Joined
Dec 16, 2008
Messages
93
Reaction score
2
Hello there everybody!

I'm trying to make my Santa Claus NPC work with
Lua:
exhaustion.set()
, the NPC work just perfect.

My problem is that it also use the same storage to christmas outfit.

When I do manually set this storage to 1, player can use christimas outfit, if this value is greater than 1 (2 for example), player cannot use the oufit.

With
Lua:
 exhaustion.set(cid, storage, time)
the 'value' of this storage will always be a timestamp number, always bigger than just 1.

Any ideas on how to change this storage == 1 to storage >=1 to use outfit?

Where can I edit it, or any other ideas?


Many thanks in advance!!

This can be an important information, because it would free us to select for how much time or how outfits would be using during events like halloween or christmas itself.

I use
Lua:
doCreatureEraseStorage(cid, storage)
into some NPC's, I can suppose that it would help in order to make a more complex script of onlogin, that would delete player storage that have completed 30 days with selected outfit.
 
What code are you using to make the outfit work only if you got x storage?
Server version?
 
I don't have a code to make outfit work with X storagevalue, is that what I'm looking for. By default server takes only value '1' as a condition to make outfit wearable.

My server version I'm not sure, but it is a 8.54 base server. The most recent scripts that I found here seem fully compatible. I have not the sources too. And I fear it might be a problem.

I'm thinking of make a globalevent on startup to erase all xxx storagevalues. So when I finish the cristhmas event on my server, I run this script and people just will loose their outfits and on next event I put NPC on map again and so on.

Or use 2 storage values. First storage value will be xxxx and will be exhaust time, when this exhaust time finish it triggers the second part of the script that is relationed to erase all storages of outfit.

But in both cases it seems that the only way is trough globalevents.

I can't think of another solution.
 
Back
Top