Jonald Posted March 15, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 02/02/17 Last Seen: April 22, 2023 Share Posted March 15, 2017 Hi can you help me i want a hourly points event afk having it Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted March 15, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted March 15, 2017 (edited) - script hourlypoints -1,{ OnPCLoginEvent: if (getgmlevel() > 0) end; attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer60000: set @minute, @minute + 1; //Check for 1 Minute if(@minute == 60){ set @minute,0; set Hourly_Points, Hourly_Points + 10; dispbottom "You received 10 Hourly Points by staying ingame for 1 hour. You now have "+Hourly_Points+" Hourly Points."; set @consecutive_hour, @consecutive_hour + 1; } //Check for 3 hours consecutive if(@consecutive_hour == 3) { set @consecutive_hour,0; set Hourly_Points, Hourly_Points + 30; dispbottom "You received 30 additional Hourly Points by staying ingame for 3 consecutive hours. You now have "+Hourly_Points+" Hourly Points."; } stopnpctimer; initnpctimer; end; } EDIT: Even vendors are going to gain hourly points. Edited March 15, 2017 by Technoken Quote Link to comment Share on other sites More sharing options...
0 Jonald Posted March 15, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 02/02/17 Last Seen: April 22, 2023 Author Share Posted March 15, 2017 Hey @Technoken can you edit it 1 point only no more +30 points etc btw i dont have vendors at my server and thank for helping me out Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted March 15, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted March 15, 2017 2 minutes ago, Jonald said: Hey @Technoken can you edit it 1 point only no more +30 points etc btw i dont have vendors at my server and thank for helping me out - script hourlypoints -1,{ OnPCLoginEvent: if (getgmlevel() > 0) end; attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer60000: set @minute, @minute + 1; //Check for 1 Minute if(@minute == 60){ set @minute,0; set Hourly_Points, Hourly_Points + 1; dispbottom "You received 1 Hourly Points by staying ingame for 1 hour. You now have "+Hourly_Points+" Hourly Points."; } stopnpctimer; initnpctimer; end; } 1 Quote Link to comment Share on other sites More sharing options...
0 Jonald Posted March 15, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 02/02/17 Last Seen: April 22, 2023 Author Share Posted March 15, 2017 @Technoken hey man can you edit this script i found cashpoints for every 15mins and this script have a @ht to know the time remaining Spoiler - script hourlypoints -1,{ OnInit: announce "[Hourly Points System]: The system have been reloaded, please relog again to get more points.", bc_all; .point_name$ = "reward points"; .point_amt = 3; // Normal points gained. .dlimit = 60000000000; // Stop points if afk greater then in seconds. 600s = 10 minutes .enable = 1; .level = 0; .online_time = 360; // 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) { #RP += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points."; } 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 reward points."; } } end; } Hi can you help me with this cash point i dont have the global_reg_value and i using a script for players to have a cash point every 15mins but cash point not working Quote Link to comment Share on other sites More sharing options...
0 Freya Posted March 15, 2017 Group: Members Topic Count: 16 Topics Per Day: 0.01 Content Count: 120 Reputation: 54 Joined: 02/12/17 Last Seen: June 2, 2023 Share Posted March 15, 2017 2 hours ago, Jonald said: @Technoken hey man can you edit this script i found cashpoints for every 15mins and this script have a @ht to know the time remaining Hide contents - script hourlypoints -1,{ OnInit: announce "[Hourly Points System]: The system have been reloaded, please relog again to get more points.", bc_all; .point_name$ = "reward points"; .point_amt = 3; // Normal points gained. .dlimit = 60000000000; // Stop points if afk greater then in seconds. 600s = 10 minutes .enable = 1; .level = 0; .online_time = 360; // 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) { #RP += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points."; } 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 reward points."; } } end; } Hello, please use BBCode next time and consider other people's time. Try hard on editing some scripts. Thanks. Quote Link to comment Share on other sites More sharing options...
0 Sryx Posted March 15, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 520 Reputation: 64 Joined: 11/19/11 Last Seen: October 19, 2024 Share Posted March 15, 2017 38 minutes ago, Jonald said: Hi can you help me with this cash point i dont have the global_reg_value and i using a script for players to have a cash point every 15mins but cash point not working You can find the CashPoint variable on acc_reg_num. Post your script so people here in rA can check your script. Quote Link to comment Share on other sites More sharing options...
0 Jonald Posted March 15, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 02/02/17 Last Seen: April 22, 2023 Author Share Posted March 15, 2017 36 minutes ago, Sryx said: You can find the CashPoint variable on acc_reg_num. Post your script so people here in rA can check your script. Wait i post my script. my script is working but cash points not adding up - script cashpoints -1,{ OnInit: announce "The system have been reloaded, please relog again to get more points.", bc_all; .point_name$ = "cash points"; .point_amt = 1; // Normal points gained. .dlimit = 600; // Stop points if afk greater then in seconds. 600s = 10 minutes .enable = 1; .level = 0; .online_time = 360; // One hour = 3600 seconds bindatcmd "ht", "cashpoints::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) { #RP += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points."; } 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 reward points."; } } end; } 28 minutes ago, Sryx said: #RP += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points."; Find this line then change the #RP to #CASHPOINTS. Okay i will try it now ill be back later thank you @Sryx hey bro it worked thank you so much Quote Link to comment Share on other sites More sharing options...
0 Sryx Posted March 15, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 520 Reputation: 64 Joined: 11/19/11 Last Seen: October 19, 2024 Share Posted March 15, 2017 #RP += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points."; Find this line then change the #RP to #CASHPOINTS. 1 Quote Link to comment Share on other sites More sharing options...
Question
Jonald
Hi can you help me i want a hourly points event afk having it
Link to comment
Share on other sites
8 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.