Advertisement
Emistry

[RO] Hourly Point - repeatative - 1,1

Dec 3rd, 2016
1,871
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. // https://rathena.org/board/topic/108276-hourly-points/
  2.  
  3. - script hourly_point_main -1,{
  4.  
  5. OnInit:
  6. .npc_name$ = strnpcinfo(3);
  7. bindatcmd "check",.npc_name$+"::OnAtcommand";
  8. end;
  9.  
  10. OnAtcommand:
  11. dispbottom "Accumulated "+#daily_minute_count;
  12. end;
  13.  
  14. OnUpdate:
  15. #daily_minute_count++;
  16. deltimer .npc_name$+"::OnUpdate";
  17. dispbottom "Accumulated "+#daily_minute_count+" minute(s)";
  18. switch ( #daily_minute_count ) {
  19. default:
  20. break;
  21. case 60: // 60 minutes
  22. #CASHPOINT += 1;
  23. getitem 512,1;
  24. break;
  25. case 120: // 120 minutes
  26. #CASHPOINT += 2;
  27. getitem 512,2;
  28. break;
  29. case 180: // 180 minutes
  30. #CASHPOINT += 3;
  31. getitem 512,3;
  32. break;
  33. case 240: // 240 minutes
  34. #CASHPOINT += 4;
  35. getitem 512,4;
  36. break;
  37. case 300: // 300 minutes
  38. #CASHPOINT += 5;
  39. getitem 512,6;
  40. break;
  41. case 360: // 360 minutes
  42. #CASHPOINT += 6;
  43. getitem 512,7;
  44. break;
  45. case 420: // 420 minutes
  46. #CASHPOINT += 7;
  47. getitem 512,8;
  48. break;
  49. case 480: // 480 minutes
  50. #CASHPOINT += 8;
  51. getitem 512,9;
  52. #daily_minute_count = 0; // reset.
  53. break;
  54. }
  55.  
  56. OnPCLoginEvent:
  57. addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate";
  58. end;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement