Advertisement
Guest User

Untitled

a guest
Aug 31st, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. //===== Hourly Points Script =========================================
  2. //===== By: ==========================================================
  3. //= GorthexTiger modified by Nibi
  4. //===== Current Version: =============================================
  5. //= 1.0
  6. //===== Compatible With: =============================================
  7. //= Any eAthena Version
  8. //===== Description: =================================================
  9. //= Get Points every successful hours of gameplay, you cannot get
  10. //= the points even if you miss a second or a minute. A player will
  11. //= get a very big bonus if they played 12 hours consecutively
  12. //= or without logging out of the game. If the player is vending
  13. //= the script will then stop.
  14. //===== Additional Comments: =========================================
  15. //= You can modify the script to your liking.
  16. //= The default points is Kafrapoints change it anyway if you like.
  17. //= 1.1 = Check Chatting too
  18. //= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
  19. //= 1.3 = Corrected the current balance line on 12 Hours Consecutive
  20. //====================================================================
  21. - script hourlypoints -1,{
  22. //--Start of the Script
  23. OnPCLoginEvent:
  24. attachnpctimer ""+strcharinfo(0)+"";
  25. initnpctimer;
  26. end;
  27.  
  28. OnTimer30000:
  29. //Check if Vending (normal or @at)
  30. if(checkvending() >= 1 || checkchatting() == 1) {
  31. dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
  32. stopnpctimer;
  33. end;
  34. }
  35. //Check if Idle
  36. getmapxy( .@map$, .@x, .@y, 0 );
  37. if(@map$ == .@map$ && @x == .@x && @y == .@y) {
  38. set @afk, @afk + 1;
  39. }
  40. //If move timer resets
  41. else {
  42. set @afk, 0;
  43. }
  44. set @map$, .@map$; set @x, .@x; set @y, .@y;
  45. //Idle Check for 5 Minutes
  46. if(@afk == 20) {
  47. dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
  48. stopnpctimer;
  49. end;
  50. }
  51. end;
  52. OnTimer60000:
  53. set @minute, @minute + 1;
  54. //Check for 1 Minute
  55. if(@minute == 20){
  56. set @minute,0;
  57. set .@point_amt, 10; //Points to get every hour (default: 10)
  58. getitem 7959,.@point_amt;
  59. dispbottom "You received "+.@point_amt+" Hourly Coin by staying ingame for 30 Minutes";
  60. set @consecutive_hour, @consecutive_hour + 1;
  61. }
  62. //Check for 12 hours consecutive
  63. if(@consecutive_hour == 12) {
  64. set @consecutive_hour,0;
  65. set .@cpoint_amt, 500; //Points to get for 12 Consecutive hours (default: 50)
  66. getitem 7959,.@point_amt;
  67. dispbottom "You received "+.@point_amt+" Hourly Coin in playing for 12 consecutive hours";
  68. }
  69. stopnpctimer;
  70. initnpctimer;
  71. end;
  72. }
  73. //--End of the Script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement