Jump to content
  • 0

Limit Reward


Lukasek

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  11/23/12
  • Last Seen:  

Hello,
I need help with daily reward.

I woul like the reward to be by mail. Not IP or MAC but mail control.

NPC SCRIPT:
 

-	script	Coin Reward	-1,{
OnPCLoginEvent:
	.@pow = 1 << 10;
	.@todays = gettime(8);
	if ( #login_reward % .@pow == .@todays ) end;
	.@count += .reward_day;
	#login_reward = ( login_reward &~ ( login_reward % .@pow ) ) + .@todays + .@pow;//day/count day/check week/check month
	if ( #login_reward != .@todays + .@pow ) {
		.@count_day = ( #login_reward >> 10 ) % .@pow;
		.@cond_ofthemonth = ( ( #login_reward >> 30 ) % .@pow ) != ( .@count_day / 31 );
		if ( ( ( #login_reward >> 20 ) % .@pow ) != ( .@count_day / 7 ) ) {
			.@count += .reward_week;
			#login_reward = #login_reward + pow( 2,20 );
			.@weekly_message$ = ( .@cond_ofthemonth ? ", " : " and " ) + .reward_week +" coin for being online a week";
		}
		if ( .@cond_ofthemonth ) {
			.@count += .reward_month;
			#login_reward = #login_reward + pow( 2,30 );
			.@montly_message$ = " and " + .reward_month +" coin for being online a month";
		}
	}
	getitem 60001, .@count;
	dispbottom "Here your daily reward ! You got "+ .reward_day +" coin"+ .@weekly_message$ + .@montly_message$ +".";
	set #login_reward,.@todays;
	end;
OnInit:
	.reward_day = 1;
	.reward_week = 2;
	.reward_month = 3;
	end;
}

Thank You

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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