Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. //===== Hourly Points Script =========================================
  2. //===== By: ==========================================================
  3. //= GorthexTiger modified by Nibi
  4. //===== Current Version: =============================================
  5. //= 1.4
  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 3 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. //= 1.4 = Added command to check remaining time and updated idle check. (Skorm)
  21. //====================================================================
  22. - script hourlypoints -1,{
  23.  
  24. OnPointGet:
  25.  
  26. set #CASHPOINTS, #CASHPOINTS + .point_amt;
  27. dispbottom "You received "+.point_amt+" Kafrapoints by staying ingame for 1 Min";
  28. dispbottom "Current Balance = "+#CASHPOINTS+" Kafrapoints";
  29. set @consecutive_hour, @consecutive_hour + 1;
  30.  
  31. //Check for 3 hours consecutive
  32. if(@consecutive_hour == 3) {
  33. set @consecutive_hour,0;
  34. set #CASHPOINTS, #CASHPOINTS + .cpoint_amt;
  35. dispbottom "You receive "+.cpoint_amt+" Kafrapoints in playing for 12 consecutive Min";
  36. dispbottom "Current Balance = "+#CASHPOINTS+" Kafrapoints";
  37. }
  38.  
  39. OnPCLoginEvent:
  40. addtimer .timer,"hourlypoints::OnPointGet";
  41. set @hourly_points_timer, gettimetick(2) + ( .timer / 1000 );
  42. end;
  43.  
  44. OnCmdHour:
  45. message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" remaining before you get your Hourly Reward(s).":"Something went wrong or you're considered idle at the moment try relogging!";
  46. end;
  47.  
  48. OnInit:
  49. bindatcmd "ctr","hourlypoints::OnCmdHour";
  50. set .timer, 1000*15*15; //Timer in milliseconds.
  51. set .cpoint_amt, 100; //Points gained for consecutive time online.
  52. set .point_amt, 20; //Normal points gained.
  53. set .delay, 1000; //Delay for idle re-check check.
  54. set .idle, 60; //Player is idle after not moving for this many seconds.
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement