Advertisement
Guest User

Untitled

a guest
Oct 13th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. - script hourlypoints -1,{
  2.  
  3. //--Start of the Script
  4. OnPCLoginEvent:
  5. attachnpctimer ""+strcharinfo(0)+"";
  6. initnpctimer;
  7. end;
  8.  
  9. OnTimer30000:
  10. //Check if Vending (normal or @at)
  11. if(checkvending() >= 1 || checkchatting() == 1) {
  12. dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
  13. stopnpctimer;
  14. end;
  15. }
  16. //Check if Idle
  17. getmapxy( .@map$, .@x, .@y, 0 );
  18. if(@map$ == .@map$ && @x == .@x && @y == .@y) {
  19. set @afk, @afk + 1;
  20. }
  21. //If move timer resets
  22. else {
  23. set @afk, 0;
  24. }
  25. set @map$, .@map$; set @x, .@x; set @y, .@y;
  26. //Idle Check for 5 Minutes
  27. if(@afk == 5) {
  28. dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
  29. stopnpctimer;
  30. end;
  31. }
  32. end;
  33.  
  34. OnTimer60000:
  35. set @minute, @minute + 1;
  36. //Check for 1 Minute
  37. if(@minute == 60){
  38. set @minute,0;
  39. getitem 7227,2;
  40. dispbottom "You received 1 "+getitemname( 7227 )+" by staying ingame for 1 hour";
  41. set @consecutive_hour, @consecutive_hour + 1;
  42. }
  43. //Check for 12 hours consecutive
  44. if(@consecutive_hour == 6) {
  45. set @consecutive_hour,0;
  46. getitem 7227,10;
  47. dispbottom "You received 6 "+getitemname( 7227 )+" by staying ingame for consecutive of 6 hour";
  48. }
  49. stopnpctimer;
  50. initnpctimer;
  51. end;
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement