Jump to content
  • 0

Once per 7 days item giver


Question

Posted

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!

6 answers to this question

Recommended Posts

Posted

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

Posted

 

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? :/

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...