you mean the day? I don't get it xD now its confused me, btw this is the script I'm using:
//set_attendance_requirement(); allow the player to get the attendance
function script set_attendance_requirement {
setd "#Attendance_" + gettime(DT_YYYYMMDD),true;
return;
}
//get_attendance_requirement(); return true if the requirement already met
function script get_attendance_requirement {
return getd("#Attendance_" + gettime(DT_YYYYMMDD));
}
- script DailyLogin -1,{
OnPCLoginEvent:
if (Baselevel < 75) {
dispbottom "You must be at least level 75 before you qualify for Daily Attendance.";
end;
}
if (get_attendance_requirement()) {
dispbottom "You already got the attendance today.";
end;
}
if (#DailyReward > gettimetick(2)) {
dispbottom .n$+": You can't currently receive the Daily Reward, you still have to wait "+callfunc("Time2Str", #DailyReward);
dispbottom .n$+": After this, visit the Attendance NPC in Prontera.";
end;
}
set #DailyReward,0;
dispbottom .n$+": Stay active for "+( (.rew_login%3600 == 0)?.rew_login/3600+" Hour(s)":.rew_login/60+" Minute(s)")+" to receive the Daily Reward.";
dispbottom .n$+": Then talk to the Attendance NPC in Prontera.";
attachnpctimer;
initnpctimer;
end;
OnTimer60000: // Every Minute
stopnpctimer;
set #daily,#daily + 60;
if(#daily == .rew_login) {
set #daily,0;
set #DailyReward,Daily + 1;
dispbottom .n$+": You can now receive your Daily Reward. Please visit the Attendance NPC in Prontera.",.bc_self;
end;
}
attachnpctimer;
initnpctimer;
end;
OnInit:
set .n$, "[Attendance]";
set .rew_time, 72000; // Timer until next Reward in seconds
// How long does someone have to stay online to recieve the reward in seconds
// Default: 3600 = 1 Hour
// Minimum: 60 = 1 Minute, because the Timer checks every Minute
set .rew_login, 3600;
end;
}
prontera,147,175,6 script Attendance Checker 888,{
if (Baselevel < 75) {
dispbottom "You must be at least level 75 to get your daily attendance bonus.";
end;
}
if (get_attendance_requirement()) {
mes "You already got the attendance today.";
end;
}
mes .n$;
mes "Welcome, "+strcharinfo(0)+"!";
if (!#DailyReward) {
mes "I'm sorry, but you can't recieve your Daily Reward yet. You still have to wait for "+callfunc("Time2Str",(getvariableofnpc(.rew_login,"DailyLogin")-#daily)+gettimetick(2));
next;
mes "Talk to me when the timer is finished.";
close;
}
mes "Your attendance has been verified. Click at the arrow button below your Alt+V.";
set_attendance_requirement();
set #DailyReward,gettimetick(2) + .rew_time;
set Daily,#DailyReward;
set #DailyReward,0;
next;
mes "Press Alt+V and click Attendance Check";
next;
mes "Then click the prize of the day. Your item will be sent via RODex.";
next;
mes "Check your RODex mail to get your item.";
close;
}