Jump to content
  • 0

Once per 7 days item giver


sotf

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

Good day rAthena! I was just wondering, is there any script that when a player clicks a specific NPC, it will give an item/items, but is only allowed once per 7 days? Like let's say, I click this npc and it gives me this specific item(s), if I click it again it wont give me anything until 7 days have passed.

 

Thank you in advance!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

What I meant was I want an NPC that gives out supplies to players once a week, but I want a cliclable one instead of an automatic one.

But I don't want the NPC to give supplies on every click, just once per week. :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

 

Thanks! I'll give this one a try! :D

I get this error :

[Error]: script:set: not a variable

[Debug]: Data: number value=632224

 

From this:

celestiaj,97,98,2	script	Old Man	120,{
.@time = gettimetick(1);
if( .@time < #weekly_item ){
	if(getgroupid() >= 80)
		{
		mes "You already got your supplies, next supplies will arrive after 7 days!";
		close;}
	else
		{
		mes "[Old Man]";
		mes "Hehehe..";
		close;}
}else{
	if(getgroupid() >= 80)
	{
	#weekly_item += ( .@time + ( 7 * 86400 ) );
	getitem 25500,1000;
	getitem 21204,1000;
	getitem 21369,1000;
	rentitem 7919,604800;
	mes "Here's your supply for this week! You may get your supplies next week when your Festival Ticket expires";}
	else
		{
		mes "[Old Man]";
		mes "Hehehe..";
		close;}
}
close;
}

bump! Anyone? :/

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try

#weekly_item = ( .@time + ( 7 * 86400 ) );
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

Thanks! It now works the way I wanted to :D

Link to comment
Share on other sites

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.

×
×
  • Create New...