Emistry icon

[RO] Hourly Point - repeatative - 1,1

Emistry | PRO | 12/03/16 09:10:46 AM UTC | 0 ⭐ | 2316 👁️ | Never ⏰ | []
text |

1.23 KB

|

None

|

0 👍

/

0 👎

// 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;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎