Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script PlayPoint -1,{
- end;
- OnInit:
- .Delay = 1; // how many minute player to get reward
- .Reward = 50; // Cash Point to give after delay
- .Reset = 0; // if player idle or in chatroom or vendor, counter to be reset or paused, 1 = Reset - 0 = Paused;
- // custom check
- .idle = 0; // how many second player is to be considered idle
- .chat = 1; // 1 = check if is player in chatroom, 0 = Disable check
- .vend = 1; // 1 = check if is player vending, autotrade or buyingstore, 0 = Disable check
- .check = 5; // how many time player to be checked if he is not idling, chatting or vending
- .time = .Delay * 60 / .check;
- .debug = 0;
- end;
- OnUpdate:
- if ( (.idle && checkidle() > .idle) || (.chat && checkchatting()) || (.vend && checkvending()) ) {
- if (.Reset) {
- @PlayPoint = 0;
- if (.debug)
- dispbottom "[System]: Play Point System Stoped", 0x6666FF;
- } else {
- if (.debug)
- dispbottom "[System]: Play Point System Paused", 0x6666FF;
- }
- } else {
- @PlayPoint++;
- if (.debug)
- dispbottom "[System]: Play Point System Check "+@PlayPoint+"/"+.check, 0x6666FF;
- }
- deltimer strnpcinfo(3)+"::OnUpdate";
- if (@PlayPoint >= .check) {
- #CASHPOINTS += .Reward;
- dispbottom "[System]: Play Point -- You got "+.Reward+" Cash Points for playing "+.Delay+" minute", 0x6666FF;
- @PlayPoint = 0;
- }
- .@t = 1;
- OnPCLoginEvent:
- addtimer ( .time * 1000 ), strnpcinfo(3)+"::OnUpdate";
- if (!.@t)
- dispbottom "[System]: You will get "+.Reward+" Cash Points / "+.Delay+" minutes", 0x6666FF;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement