Advertisement
icabit

Untitled

May 8th, 2013
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 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.  
  22. - script hourlypoints -1,{
  23.  
  24. //--Start of the Script
  25. OnPCLoginEvent:
  26. attachnpctimer ""+strcharinfo(0)+"";
  27. initnpctimer;
  28. end;
  29.  
  30. OnTimer30000:
  31. //Check if Vending (normal or @at)
  32. if(checkvending() >= 1 || checkchatting() == 1) {
  33. dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
  34. stopnpctimer;
  35. end;
  36. }
  37. //Check if Idle
  38. getmapxy( .@map$, .@x, .@y, 0 );
  39. if(@map$ == .@map$ && @x == .@x && @y == .@y) {
  40. set @afk, @afk + 1;
  41. }
  42. //If move timer resets
  43. else {
  44. set @afk, 0;
  45. }
  46. set @map$, .@map$; set @x, .@x; set @y, .@y;
  47. //Idle Check for 15 Minutes
  48. if(@afk == 15) {
  49. dispbottom "The hourly points event stopped because you were idle for 15 minutes. Please relog if you wish to start again.";
  50. stopnpctimer;
  51. end;
  52. }
  53. end;
  54.  
  55. OnTimer60000:
  56. set @minute, @minute + 1;
  57. //Check for 1 Minute
  58. if(@minute == 60){
  59. set @minute,0;
  60. getitem 9189,1; dispbottom "You received 1 "+ getitemname(9189) +" by staying ingame for 1 hour";
  61.  
  62. set @consecutive_hour, @consecutive_hour + 1;
  63. }
  64. //Check for 12 hours consecutive
  65. if(@consecutive_hour == 12) {
  66. set @consecutive_hour,0;
  67. getitem 9189,1;
  68. dispbottom "You receive 1 "+ getitemname(9189) +" by staying ingame for 12 consecutive hours";
  69.  
  70. }
  71. stopnpctimer;
  72. initnpctimer;
  73. end;
  74.  
  75. }
  76. //--End of the Script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement