Jump to content
  • 0

Modify Reward Attendance System


Pixel

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   38
  • Joined:  11/15/11
  • Last Seen:  

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  145
  • Reputation:   13
  • Joined:  04/28/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   38
  • Joined:  11/15/11
  • Last Seen:  

14 minutes ago, pachupappy said:

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

Is the official system

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   6
  • Joined:  11/26/12
  • Last Seen:  

the default is per account, not per character

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