Advertisement
existence_dev92

Play Points

Mar 9th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. - script PlayPoint -1,{
  2. end;
  3.  
  4. OnInit:
  5. .Delay = 1; // how many minute player to get reward
  6. .Reward = 50; // Cash Point to give after delay
  7. .Reset = 0; // if player idle or in chatroom or vendor, counter to be reset or paused, 1 = Reset - 0 = Paused;
  8.  
  9. // custom check
  10. .idle = 0; // how many second player is to be considered idle
  11. .chat = 1; // 1 = check if is player in chatroom, 0 = Disable check
  12. .vend = 1; // 1 = check if is player vending, autotrade or buyingstore, 0 = Disable check
  13. .check = 5; // how many time player to be checked if he is not idling, chatting or vending
  14.  
  15. .time = .Delay * 60 / .check;
  16. .debug = 0;
  17. end;
  18.  
  19. OnUpdate:
  20. if ( (.idle && checkidle() > .idle) || (.chat && checkchatting()) || (.vend && checkvending()) ) {
  21. if (.Reset) {
  22. @PlayPoint = 0;
  23. if (.debug)
  24. dispbottom "[System]: Play Point System Stoped", 0x6666FF;
  25. } else {
  26. if (.debug)
  27. dispbottom "[System]: Play Point System Paused", 0x6666FF;
  28. }
  29. } else {
  30. @PlayPoint++;
  31. if (.debug)
  32. dispbottom "[System]: Play Point System Check "+@PlayPoint+"/"+.check, 0x6666FF;
  33. }
  34.  
  35. deltimer strnpcinfo(3)+"::OnUpdate";
  36. if (@PlayPoint >= .check) {
  37. #CASHPOINTS += .Reward;
  38. dispbottom "[System]: Play Point -- You got "+.Reward+" Cash Points for playing "+.Delay+" minute", 0x6666FF;
  39. @PlayPoint = 0;
  40. }
  41.  
  42. .@t = 1;
  43. OnPCLoginEvent:
  44. addtimer ( .time * 1000 ), strnpcinfo(3)+"::OnUpdate";
  45. if (!.@t)
  46. dispbottom "[System]: You will get "+.Reward+" Cash Points / "+.Delay+" minutes", 0x6666FF;
  47. end;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement