• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Linux Scan Items

Vrotz

Member
Joined
Apr 7, 2011
Messages
1,071
Reaction score
7
Location
Brazil
I have a script that scans the items lasting 30 days. How do I do so that when the player look the item, see how much time remains to complete the 30 days?
 
LUA:
<attribute key="showattributes" value="1" />

If i understand you right.
 
Actually an easy way:

In the action of the item add when player use the item setPlayerstorageValue(cid, 1111,30) for example, then add another scan every 24h check the storage and decrease it -1 for example getPlayerstorageValue(cid,1111, getPlayerStorageValue(cid, 1111)-1) If you have done this part

then a onlook creatureevent

<event type="look" name="xxxx" event="script" value="XXXXX.lua"/>

check the getPlayerStorageValue(cid, 1111) on look in thing


Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
doPlayerSetSpecialDescription(thing.uid, Got .."getPlayerStorageValue(thing.uid, 1111)".. Days left of xxxx item)
end
return true
end
 
Last edited:
Back
Top