Deviszh Posted September 21, 2016 Group: Members Topic Count: 51 Topics Per Day: 0.02 Content Count: 173 Reputation: 3 Joined: 09/04/16 Last Seen: November 6, 2016 Share Posted September 21, 2016 Anyone have afk for 15 mins = 1 cash points? I dont want hourly. Quote Link to comment Share on other sites More sharing options...
0 imat1 Posted September 22, 2016 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 100 Reputation: 20 Joined: 05/01/12 Last Seen: April 2 Share Posted September 22, 2016 just replace this: { #KAFRAPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #KAFRAPOINTS + " Free Cash."; } to: { #CASHPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #CASHPOINTS + " Free Cash."; } Quote Link to comment Share on other sites More sharing options...
0 nitrous Posted September 21, 2016 Group: Developer Topic Count: 4 Topics Per Day: 0.00 Content Count: 141 Reputation: 46 Joined: 08/14/12 Last Seen: April 5 Share Posted September 21, 2016 (edited) Something like this should work. - script E_afkcp -1,{ OnTimerEvent: #CASHPOINTS += .amt; OnPCLoginEvent: addtimer .delay, strnpcinfo(1)+"::OnTimerEvent"; end; OnInit: .amt = 10; .delay = 900000; end; } Edited September 21, 2016 by Nitrous Quote Link to comment Share on other sites More sharing options...
0 imat1 Posted September 22, 2016 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 100 Reputation: 20 Joined: 05/01/12 Last Seen: April 2 Share Posted September 22, 2016 Anyone have afk for 15 mins = 1 cash points? I dont want hourly. - script hourlypoints FAKE_NPC,{ OnInit: announce "[Hourly Points System]: The system have been reloaded, please relog again to get more points.", bc_all; .point_name$ = "Free Cash"; .point_amt = 1; // Normal points gained. .dlimit = 43200; // Stop points if afk greater then in seconds. 600s = 10 minutes .enable = 1; .level = 0; .online_time = 900; // One hour = 3600 seconds bindatcmd "ht", "hourlypoints::OnAtcommand", 0, 100; end; OnPCLoginEvent: if (BaseLevel >= .level) { #idle = 0; @backup_time = 0; if (!#acctick || #acctick > .online_time) #acctick = gettimetick(2) + .online_time; else #acctick += gettimetick(2); while(.enable) { @idle_time = checkidle(); if (checkvending() >= 1 || checkchatting() == 1 || @idle_time >= .dlimit) { #acctick += @idle_time; // Add idle time #idle = 1; dispbottom "The hourly points event haulted because you were vending, chatting, or idle."; dispbottom "Please relog again."; } else { sleep2 1000; @backup_time = .@time_left = #acctick - gettimetick(2); if (.@time_left <= 0) { #KAFRAPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #KAFRAPOINTS + " Free Cash."; } else { .@time_left = .online_time - .@time_left; .@Time$ = ""; .@Minutes = .@time_left / 60; .@time_left -= (.@Minutes * 60); if (.@Minutes > 1) .@Time$ += .@Minutes + " minutes, "; else if (.@Minutes > 0) .@Time$ += .@Minutes + " minute, "; if (.@time_left > 1 || .@time_left == 0) .@Time$ += .@time_left + " seconds"; else if (.@time_left == 1) .@Time$ += .@time_left + " second"; if (.@Minutes == 15 && .@time_left == 0 || .@Minutes == 30 && .@time_left == 0 || .@Minutes == 45 && .@time_left == 0) dispbottom "You spend a total of [" + .@Time$ + "] playing."; } } if (#idle) break; } } end; OnPCLogoutEvent: // BackUP online time if (BaseLevel >= .level) { if (@backup_time) #acctick = @backup_time; } end; OnAtcommand: if (BaseLevel >= .level) { if (#idle) { .@Time$ = ""; .@Minutes = @idle_time / 60; .@time_left = @idle_time - (.@Minutes * 60); if (.@Minutes > 1) .@Time$ += .@Minutes + " minutes, "; else if (.@Minutes > 0) .@Time$ += .@Minutes + " minute, "; if (.@time_left > 1 || .@time_left == 0) .@Time$ += .@time_left + " seconds"; else if (.@time_left == 1) .@Time$ += .@time_left + " second"; dispbottom "You been idle for " + .@Time$ + ". Please relog again."; } else { .@time_left = @backup_time; .@Time$ = ""; .@Minutes = .@time_left / 60; .@time_left -= (.@Minutes * 60); if (.@Minutes > 1) .@Time$ += .@Minutes + " minutes, "; else if (.@Minutes > 0) .@Time$ += .@Minutes + " minute, "; if (.@time_left > 1 || .@time_left == 0) .@Time$ += .@time_left + " seconds"; else if (.@time_left == 1) .@Time$ += .@time_left + " second"; dispbottom "You have [" + .@Time$ + "] left in able to gain a cash points."; } } end; } Quote Link to comment Share on other sites More sharing options...
0 Deviszh Posted September 22, 2016 Group: Members Topic Count: 51 Topics Per Day: 0.02 Content Count: 173 Reputation: 3 Joined: 09/04/16 Last Seen: November 6, 2016 Author Share Posted September 22, 2016 is this for 15 mins? Something like this should work. - script E_afkcp -1,{ OnTimerEvent: #CASHPOINTS += .amt; OnPCLoginEvent: addtimer .delay, strnpcinfo(1)+"::OnTimerEvent"; end; OnInit: .amt = 10; .delay = 900000; end; } Anyone have afk for 15 mins = 1 cash points? I dont want hourly. - script hourlypoints FAKE_NPC,{ OnInit: announce "[Hourly Points System]: The system have been reloaded, please relog again to get more points.", bc_all; .point_name$ = "Free Cash"; .point_amt = 1; // Normal points gained. .dlimit = 43200; // Stop points if afk greater then in seconds. 600s = 10 minutes .enable = 1; .level = 0; .online_time = 900; // One hour = 3600 seconds bindatcmd "ht", "hourlypoints::OnAtcommand", 0, 100; end; OnPCLoginEvent: if (BaseLevel >= .level) { #idle = 0; @backup_time = 0; if (!#acctick || #acctick > .online_time) #acctick = gettimetick(2) + .online_time; else #acctick += gettimetick(2); while(.enable) { @idle_time = checkidle(); if (checkvending() >= 1 || checkchatting() == 1 || @idle_time >= .dlimit) { #acctick += @idle_time; // Add idle time #idle = 1; dispbottom "The hourly points event haulted because you were vending, chatting, or idle."; dispbottom "Please relog again."; } else { sleep2 1000; @backup_time = .@time_left = #acctick - gettimetick(2); if (.@time_left <= 0) { #KAFRAPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #KAFRAPOINTS + " Free Cash."; } else { .@time_left = .online_time - .@time_left; .@Time$ = ""; .@Minutes = .@time_left / 60; .@time_left -= (.@Minutes * 60); if (.@Minutes > 1) .@Time$ += .@Minutes + " minutes, "; else if (.@Minutes > 0) .@Time$ += .@Minutes + " minute, "; if (.@time_left > 1 || .@time_left == 0) .@Time$ += .@time_left + " seconds"; else if (.@time_left == 1) .@Time$ += .@time_left + " second"; if (.@Minutes == 15 && .@time_left == 0 || .@Minutes == 30 && .@time_left == 0 || .@Minutes == 45 && .@time_left == 0) dispbottom "You spend a total of [" + .@Time$ + "] playing."; } } if (#idle) break; } } end; OnPCLogoutEvent: // BackUP online time if (BaseLevel >= .level) { if (@backup_time) #acctick = @backup_time; } end; OnAtcommand: if (BaseLevel >= .level) { if (#idle) { .@Time$ = ""; .@Minutes = @idle_time / 60; .@time_left = @idle_time - (.@Minutes * 60); if (.@Minutes > 1) .@Time$ += .@Minutes + " minutes, "; else if (.@Minutes > 0) .@Time$ += .@Minutes + " minute, "; if (.@time_left > 1 || .@time_left == 0) .@Time$ += .@time_left + " seconds"; else if (.@time_left == 1) .@Time$ += .@time_left + " second"; dispbottom "You been idle for " + .@Time$ + ". Please relog again."; } else { .@time_left = @backup_time; .@Time$ = ""; .@Minutes = .@time_left / 60; .@time_left -= (.@Minutes * 60); if (.@Minutes > 1) .@Time$ += .@Minutes + " minutes, "; else if (.@Minutes > 0) .@Time$ += .@Minutes + " minute, "; if (.@time_left > 1 || .@time_left == 0) .@Time$ += .@time_left + " seconds"; else if (.@time_left == 1) .@Time$ += .@time_left + " second"; dispbottom "You have [" + .@Time$ + "] left in able to gain a cash points."; } } end; } thanks guys, really appreciated. Quote Link to comment Share on other sites More sharing options...
0 Deviszh Posted September 22, 2016 Group: Members Topic Count: 51 Topics Per Day: 0.02 Content Count: 173 Reputation: 3 Joined: 09/04/16 Last Seen: November 6, 2016 Author Share Posted September 22, 2016 just replace this: { #KAFRAPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #KAFRAPOINTS + " Free Cash."; } to: { #CASHPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #CASHPOINTS + " Free Cash."; } thanks Quote Link to comment Share on other sites More sharing options...
Question
Deviszh
Anyone have afk for 15 mins = 1 cash points? I dont want hourly.
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.