Hello can i ask how to add hourly points (will not work for people vending/auto-trading) script link https://pastebin.com/ry0JJp6U credit Emistry
/ https://rathena.org/board/topic/108276-hourly-points/
- script hourly_point_main -1,{
OnInit:
.npc_name$ = strnpcinfo(3);
bindatcmd "check",.npc_name$+"::OnAtcommand";
end;
OnAtcommand:
dispbottom "Accumulated "+#daily_minute_count;
end;
OnUpdate:
#daily_minute_count++;
deltimer .npc_name$+"::OnUpdate";
dispbottom "Accumulated "+#daily_minute_count+" minute(s)";
switch ( #daily_minute_count ) {
default:
break;
case 60: // 60 minutes
#CASHPOINT += 1;
getitem 512,1;
break;
case 120: // 120 minutes
#CASHPOINT += 2;
getitem 512,2;
break;
case 180: // 180 minutes
#CASHPOINT += 3;
getitem 512,3;
break;
case 240: // 240 minutes
#CASHPOINT += 4;
getitem 512,4;
break;
case 300: // 300 minutes
#CASHPOINT += 5;
getitem 512,6;
break;
case 360: // 360 minutes
#CASHPOINT += 6;
getitem 512,7;
break;
case 420: // 420 minutes
#CASHPOINT += 7;
getitem 512,8;
break;
case 480: // 480 minutes
#CASHPOINT += 8;
getitem 512,9;
#daily_minute_count = 0; // reset.
break;
}
OnPCLoginEvent:
addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate";
end;
}