Eross Posted September 14, 2021 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 378 Reputation: 12 Joined: 04/05/20 Last Seen: May 16 Share Posted September 14, 2021 Hi ! Im using an old Hourly System, I just want to add a feature that will: 1. Allow first player of first account to login and activate hourly system 2. the second and next dual character will automatically been hault its system and wont get any hourly points 3. Regardless the map, even they have different maps it will check the gepard id Sorry for my bad english. I hope you can help me The Script im using : - script hourlypoints FAKE_NPC,{ OnInit: //announce "[30 Minutes Points System]: The system have been reloaded, please relog again to get more points.", bc_all; announce "[Hourly Reward System]: Hourly system has been reloaded, please relog again to get more points.", bc_all; .point_name$ = "Hourly Points"; .point_amt = 5; // Normal points gained. .dlimit = 900; // Stop points if afk greater then in seconds. 600s = 10 minutes //43200 .enable = 1; .level = 0; .online_time = 3600; // One hour = 3600 seconds bindatcmd "hourlyinfo", "hourlypoints::OnAtcommand", 0, 100; //bindatcmd "hourlypoints", "hourlypoints::OnCheckPoints", 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."; } else { sleep2 1000; @backup_time = .@time_left = #acctick - gettimetick(2); if (.@time_left <= 0) { if (vip_status(1)) { #HOURLYPOINTS += .point_amt + 1; #acctick = gettimetick(2) + .online_time; dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + " +1 " + .point_name$ + " [Vip Bonus]. Stay online and gain more points."; } else { #HOURLYPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + ". Total " + #HOURLYPOINTS + " Hourly Points. Stay online to gain more 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 "[Hourly Reward System]: 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; OnCheckPoints: dispbottom "[Hourly Reward System]: You have a total of ["+ #HOURLYPOINTS +"] Hourly Points.",0xRRGGBB; 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 "[Hourly Reward System]: You been idle for " + .@Time$ + ". Please relog again.",0xRRGGBB; } 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 "[Hourly Reward System]: You have [" + .@Time$ + "] left in able to gain a hourly points.",0xRRGGBB; } } end; } Quote Link to comment Share on other sites More sharing options...
0 Eross Posted September 16, 2021 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 378 Reputation: 12 Joined: 04/05/20 Last Seen: May 16 Author Share Posted September 16, 2021 Hi ! Im using hourly point system from rathena .. I just want to add a feature that check if there are other logged in players with same Gepard ID. regardless the map or area ... For example I logged in my first account , The hourly system will start the countdown for rewards, But if I login my 2nd account there will be a message that "We have detected same Gepard ID logged in in game. We will hault your hourly points system." Heres the script .. I hope someone can help me - script hourlypoints FAKE_NPC,{ OnInit: //announce "[30 Minutes Points System]: The system have been reloaded, please relog again to get more points.", bc_all; announce "[Hourly Reward System]: Hourly system has been reloaded, please relog again to get more points.", bc_all; .point_name$ = "Hourly Points"; .point_amt = 5; // Normal points gained. .dlimit = 900; // Stop points if afk greater then in seconds. 600s = 10 minutes //43200 .enable = 1; .level = 0; .online_time = 3600; // One hour = 3600 seconds bindatcmd "hourlyinfo", "hourlypoints::OnAtcommand", 0, 100; //bindatcmd "hourlypoints", "hourlypoints::OnCheckPoints", 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."; } else { sleep2 1000; @backup_time = .@time_left = #acctick - gettimetick(2); if (.@time_left <= 0) { if (vip_status(1)) { #HOURLYPOINTS += .point_amt + 1; #acctick = gettimetick(2) + .online_time; dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + " +1 " + .point_name$ + " [Vip Bonus]. Stay online and gain more points."; } else { #HOURLYPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + ". Total " + #HOURLYPOINTS + " Hourly Points. Stay online to gain more 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 "[Hourly Reward System]: 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; OnCheckPoints: dispbottom "[Hourly Reward System]: You have a total of ["+ #HOURLYPOINTS +"] Hourly Points.",0xRRGGBB; 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 "[Hourly Reward System]: You been idle for " + .@Time$ + ". Please relog again.",0xRRGGBB; } 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 "[Hourly Reward System]: You have [" + .@Time$ + "] left in able to gain a hourly points.",0xRRGGBB; } } end; } Quote Link to comment Share on other sites More sharing options...
Question
Eross
Hi ! Im using an old Hourly System, I just want to add a feature that will:
1. Allow first player of first account to login and activate hourly system
2. the second and next dual character will automatically been hault its system and wont get any hourly points
3. Regardless the map, even they have different maps it will check the gepard id
Sorry for my bad english. I hope you can help me
The Script im using :
- script hourlypoints FAKE_NPC,{ OnInit: //announce "[30 Minutes Points System]: The system have been reloaded, please relog again to get more points.", bc_all; announce "[Hourly Reward System]: Hourly system has been reloaded, please relog again to get more points.", bc_all; .point_name$ = "Hourly Points"; .point_amt = 5; // Normal points gained. .dlimit = 900; // Stop points if afk greater then in seconds. 600s = 10 minutes //43200 .enable = 1; .level = 0; .online_time = 3600; // One hour = 3600 seconds bindatcmd "hourlyinfo", "hourlypoints::OnAtcommand", 0, 100; //bindatcmd "hourlypoints", "hourlypoints::OnCheckPoints", 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."; } else { sleep2 1000; @backup_time = .@time_left = #acctick - gettimetick(2); if (.@time_left <= 0) { if (vip_status(1)) { #HOURLYPOINTS += .point_amt + 1; #acctick = gettimetick(2) + .online_time; dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + " +1 " + .point_name$ + " [Vip Bonus]. Stay online and gain more points."; } else { #HOURLYPOINTS += .point_amt; #acctick = gettimetick(2) + .online_time; dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + ". Total " + #HOURLYPOINTS + " Hourly Points. Stay online to gain more 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 "[Hourly Reward System]: 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; OnCheckPoints: dispbottom "[Hourly Reward System]: You have a total of ["+ #HOURLYPOINTS +"] Hourly Points.",0xRRGGBB; 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 "[Hourly Reward System]: You been idle for " + .@Time$ + ". Please relog again.",0xRRGGBB; } 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 "[Hourly Reward System]: You have [" + .@Time$ + "] left in able to gain a hourly points.",0xRRGGBB; } } end; }
Link to comment
Share on other sites
1 answer 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.