Jump to content
  • 0
hadiesyafiq

How to create npc give item 24Hours once per character?

Question

hi all

i just want make npc that give item/exp per day for character

how to make it?

i try use daily supply but it for an account and 12hours per claim 

i want make it 24hour per claim and make it per character

 

thanks in advance

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
6 minutes ago, botka4aet said:

Well.

Create new npc.

After claiming item add new char var with current time + 24h.

If char talk again with npc and if(current time < saved) {gtfo} 

i sir thanks for reply...can you make one npc that can i use for example?

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, hadiesyafiq said:

i sir thanks for reply...can you make one npc that can i use for example?

Did you try this?

 

 

Share this post


Link to post
Share on other sites
  • 0

uhm, maybe you can do it in a easy way.

 

something like this...

 

	if ( time_down > gettimetick(2) && 1 ) {
		mes ("Sorry, try again in : "+callfunc( "Time2Str", time_down )+".");
		close;

	}

		time_down  = gettimetick(2) + .cooldown;
		getitem Apple,1;
                    
	OnInit:
		.cooldown = ( 24 * 3600 ); // 24 hours.
		end;

 

Share this post


Link to post
Share on other sites
  • 0

i all ready success to make it give 24hours per reward

but it only work per account not per character

here my script

function	script	getmercenary	{
	set .Hour,24;
	if( #dailymercenary < gettimetick(2) ) {
		mes "Here your Mercenary Contract for today.";
		set #dailymercenary,gettimetick(2) + ( .Hour * 3600 );
		getitem 12160,5; //set the price here
	}else{
		set .@last,#dailymercenary - gettimetick(2);
		set .@hour, .@last % ( 24 * 3600 ) / 3600;
		set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
		set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
		mes "You have to wait ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000 countdown to get next Mercenary Contract";
	}
	close;
}

how to make it give per character?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.