Jump to content
  • 0

hourly rewards


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

 

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

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

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;

}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

out of curiousity in here it mentioned gepard , s_GePard_ip and sader_variables_log did you use that ?

https://pastebin.com/YvsVirUS

and there is even a pointshop  inside of it

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