Jump to content
  • 0
Sign in to follow this  
Pixel

Modify Reward Attendance System

Question

how to change a reward to attendance system be on account and not per character?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
21 minutes ago, Pixel said:

how to change a reward to attendance system be on account and not per character?

can you post the full script here? it should be included in your config.

Share this post


Link to post
Share on other sites
  • 0
14 minutes ago, pachupappy said:

você pode postar o script completo aqui? deve ser incluído na sua configuração.

Is the official system

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Not tested but do let me know :


in pc.cpp

Spoiler

Search for the line with (-) then change to (+)..

-return pc_readreg2( sd, ATTENDANCE_DATE_VAR ) >= date_get(DT_YYYYMMDD);
+return pc_readaccountreg( sd, ATTENDANCE_DATE_VAR ) >= date_get(DT_YYYYMMDD);
// Get the counter for the current period
-int counter = pc_readreg2( sd, ATTENDANCE_COUNT_VAR );
+int counter = pc_readaccountreg( sd, ATTENDANCE_COUNT_VAR );
// Check if we have a remaining counter from a previous period
-if( counter > 0 && pc_readreg2( sd, ATTENDANCE_DATE_VAR ) < period->start ){
+if( counter > 0 && pc_readaccountreg( sd, ATTENDANCE_DATE_VAR ) < period->start ){
	// Reset the counter to zero
	-pc_setreg2( sd, ATTENDANCE_COUNT_VAR, 0 );
	+pc_setaccountreg( sd, ATTENDANCE_COUNT_VAR, 0 );

	return 0;
}
-int32 attendance_counter = pc_readreg2( sd, ATTENDANCE_COUNT_VAR );
+int32 attendance_counter = pc_readaccountreg( sd, ATTENDANCE_COUNT_VAR );
-pc_setreg2( sd, ATTENDANCE_DATE_VAR, date_get(DT_YYYYMMDD) );
-pc_setreg2( sd, ATTENDANCE_COUNT_VAR, attendance_counter );
+pc_setaccountreg( sd, ATTENDANCE_DATE_VAR, date_get(DT_YYYYMMDD) );
+pc_setaccountreg( sd, ATTENDANCE_COUNT_VAR, attendance_counter );

 

 

 

Edited by Mabuhay
  • Upvote 1

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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