Jump to content
  • 0
Sign in to follow this  
glemor123

Daily Reward Tweaks

Question

I wan't to make a small tweak, the player must be online atleast 3 hours no idle(5 minutes idle allowed only) to receive the daily reward

//======Name========================================// Daily Login Rewards//======Version=====================================// 1.0// Author: Sandbox//======Comments====================================// //==================================================-	script	DailyLoginRewards	-1,{setarray .@D_Prize[0],501,502,503,607,608; //Set to desired item prizessetarray .@D_Amt[0],1,2,3,2,1; //Amount of prize to be givenset .@Serv_Name$,"Your Server"; //Set to your server nameOnPCLoginEvent:	if(gettimetick(2) > #ClaimDelay) {		if(gettimetick(2) > #StreakDelay) set #LogStreak,0;				if(#RewardStreak == 0) {			dispbottom "Welcome to "+.@Serv_Name$+"! You've received "+.@D_Amt[#RewardStreak]+" "+getitemname(.@D_Prize[#RewardStreak])+" for logging in! Visit us daily to get more prize! When you've managed to play with us for 5 consecutive days, you will receive bonus prizes!";		}		else {			dispbottom "Welcome back to "+.@Serv_Name$+"! You've received "+.@D_Amt[#RewardStreak]+" "+getitemname(.@D_Prize[#RewardStreak])+" for logging in! Visit us daily to get more prize! When you've managed to play with us for 5 consecutive days, you will receive bonus prizes!";		}		getitem .@D_prize[#RewardStreak],.@D_Amt[#RewardStreak];		set #RewardStreak,#RewardStreak+1;		set #LogStreak,#LogStreak+1;		set #ClaimDelay,gettimetick(2)+86400;		set #StreakDelay,gettimetick(2)+172800;		if(#LogStreak >= 4) {			for( set .@i, 0; .@i < 4; set .@i, .@i +1 ) {				getitem .@D_prize[.@i],.@D_Amt[.@i];			}			dispbottom "Congratulations! You've received all the daily rewards for logging in 5 consecutive days!";			set #LogStreak,0;		}	}end;}

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

@@Winterfox I was trying to determine where to add the statement. "You've been Idle for 5 minutes, your timer will again start again when you relogin."

 

then this statement

 

"Daily Login Activated. Please Be Online for 3 hours without being Idle for more than 5 minutes to receive daily login reward."

 

Then last is

 

I want to give 2 or more prizes when the player successfully login for 5 consecutive days.

 

 

thanks 

Edited by glemor123

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
Sign in to follow this  

×
×
  • Create New...

Important Information

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