Jump to content
  • 0

Rental Item That Will Expire In The End OF Month


Question

Posted

i want to make an NPC that will give the player an Item That Will Expire in the End Off Desember that will be on 31 Desember 2013

 

ex :

if A player Accept it on 21 dessember it will expire 10 days after

else if player accept it on 29 desember it will expire 2 days after

 

if i make it with "rentitem" i am afraid my player will exploit its, can any one guide me to make this npc ??

2 answers to this question

Recommended Posts

Posted

Assuming you will allow the npc who will use the renitem command in December

rentitem, (31*24*60*60 - gettime(5)*24*60*60);

PS : This will not do the full work. It only consider the day difference from now up to 12-31-2013. And convert it to seconds. If you want to go into detailed portion of your request. And want an accurate calculation of seconds from now to 12-31-2013. then you need to do a dirty math. I have no time right now as i am doing many things. This is the least i could help :P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...