It's impractical to force users to type in 127 reward IDs. I suggest something more like this: // Daily Prize items (max 64 days):
// <itemID>,<amount>, // Day 1
// <itemID>,<amount>, // Day 2
// ...;
// * If players login longer than the last set
// day, they will keep getting the last prize.
setarray .Rewards[0],
512,1, // Day 1
513,2, // Day 2
514,3; // Day 3
I really don't understand .Reminder[1] at all. I think you should remove it. // What does this even do?
if( ( LOGINCOUNT + #LOGINCOUNT + $LOGINCOUNT )%.Reminder[1] == 0 ...
.Wipe -- This is really not a good feature how it's currently written. Perhaps allow whispering "wipe" execute an SQL query to delete the values, or just let users do it manually. OnWhisperGlobal:
if (getgmlevel() >= 99 && @whispervar0$ == "wipe") {
query_sql("DELETE FROM `global_reg_value` WHERE `str` = 'LOGINCOUNT'");
query_sql("DELETE FROM `global_reg_value` WHERE `str` = '#LOGINCOUNT'");
query_sql("DELETE FROM `mapreg` WHERE `str` = '$LOGINCOUNT'");
dispbottom "Cleared all login count data.";
}
end;
Your config section is a little confusing, could be formatted better, and needs spell check. Example of an easier-to-read format: // -----------------------------------------------------------
// Login Count & Welcome Message
// -----------------------------------------------------------
// Login types to track.
// 1: Character | 2: Account | 4: Server
// (a bit value, e.g. 5 = character + server)
set .LogCount,0;
// Number of logins to display welcome message.
set .Reminder,3;
// Server name to display.
set .Servername$,"Server";
// Login message
set .Message$,"Before playing, make sure you've read the rules, located in our forum at ^0000FF~TBA~^000000";
Tab properly. In particular, 'else' should always be in-line with 'if'.
You don't need to include empty strings in script lines. setd ""+.PointType$+"" --> setd .PointType$