Jump to content
  • 0
IsabelaFernandez

hourly rewards

Question

 

Hello community,

This script is set up for every hour earn 10 points. I would like every 3 hours to earn 30 points of 10, so it would look like this:

1h = 10 points

2h = 20 points

3h = 30 points

4h = 10 points

5h = 10 points

6h = 30 points

and in this sequence would continue ... I would also like someone to confirm me if I leave and enter the game the count time is reset? If so, I wish he would not recount and continue where he left off. thanks for listening

 

https://pastebin.com/YvsVirUS

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Something like this?

-	script	Hourly_Rewards	-1,{

OnAddMinute:

	#online_time++;
	if(#online_time % 5 == 0) {
		dispbottom "Time online: "+Time2Str(#online_time*60 + gettimetick(2))+".";
		if(#online_time % 60 == 0) {
			[email protected]_points = #hourly_points;
			[email protected] = ((#online_time / 60) + 5)%6 + 1;
			switch([email protected]) {
			case 1:
				#hourly_points += 10;
				break;
			case 2:
				#hourly_points += 20;
				break;
			case 3:
				#hourly_points += 30;
				break;
			case 4:
				#hourly_points += 10;
				break;
			case 5:
				#hourly_points += 10;
				break;
			case 6:
				#hourly_points += 30;
				break
			}
			dispbottom "You won "+(#hourly_points - [email protected]_points)+" points. Current amount:"+F_InsertComma(#hourly_points)+".";
		}
	}

OnPCLoginEvent:

	addtimer 60000,"Hourly_Rewards::OnAddMinute";
	end;

}

 

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

Important Information

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