Jump to content

Question

Posted

 

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

2 answers to this question

Recommended Posts

  • 0
Posted

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) {
			.@old_points = #hourly_points;
			.@reward = ((#online_time / 60) + 5)%6 + 1;
			switch(.@reward) {
			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 - .@old_points)+" points. Current amount:"+F_InsertComma(#hourly_points)+".";
		}
	}

OnPCLoginEvent:

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

}

 

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