Sallycantdance Posted September 10, 2024 Group: Members Topic Count: 225 Topics Per Day: 0.14 Content Count: 798 Reputation: 12 Joined: 12/04/20 Last Seen: 8 hours ago Share Posted September 10, 2024 hello everyone can i ask for help i would like to test this script i would like to change the 1 hour in 1 minute so i can test it but i dont know how to compute it can someone help me Quote - script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); .reward_minutes = 60; bindatcmd("check", .npc_name$ + "::OnAtcommand"); end; OnAtcommand: dispbottom("Accumulated " + #daily_minute_count); end; OnPCLoginEvent: addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); end; OnUpdate: deltimer(.npc_name$ + "::OnUpdate"); addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); if (checkvending() & 2) { end; } #daily_minute_count += .reward_minutes; switch(#daily_minute_count) { case 60: // 60 minutes #CASHPOINT += 1; getitem 677,1; break; case 120: // 120 minutes #CASHPOINT += 1; getitem 677,1; break; case 180: // 180 minutes #CASHPOINT += 1; getitem 677,1; break; case 240: // 240 minutes #CASHPOINT += 1; getitem 677,1; break; case 300: // 300 minutes #CASHPOINT += 1; getitem 677,1; break; case 360: // 360 minutes #CASHPOINT += 1; getitem 677,1; break; case 420: // 420 minutes #CASHPOINT += 1; getitem 677,1; break; case 480: // 480 minutes #CASHPOINT += 1; getitem 677,1; #daily_minute_count = 0; // reset. break; default: break; } } Quote Link to comment Share on other sites More sharing options...
0 Winterfox Posted September 13, 2024 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 245 Reputation: 93 Joined: 06/30/18 Last Seen: November 27, 2024 Share Posted September 13, 2024 - script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); .reward_minutes = 1; bindatcmd("check", .npc_name$ + "::OnAtcommand"); end; OnAtcommand: dispbottom("Accumulated " + #daily_minute_count); end; OnPCLoginEvent: addtimer(.reward_minutes * 10000, .npc_name$ + "::OnUpdate"); end; OnUpdate: deltimer(.npc_name$ + "::OnUpdate"); addtimer(.reward_minutes * 10000, .npc_name$ + "::OnUpdate"); if (checkvending() & 2) { end; } #daily_minute_count += .reward_minutes; switch(#daily_minute_count) { case 60: // 60 minutes #CASHPOINT += 1; getitem 677,1; break; case 120: // 120 minutes #CASHPOINT += 1; getitem 677,1; break; case 180: // 180 minutes #CASHPOINT += 1; getitem 677,1; break; case 240: // 240 minutes #CASHPOINT += 1; getitem 677,1; break; case 300: // 300 minutes #CASHPOINT += 1; getitem 677,1; break; case 360: // 360 minutes #CASHPOINT += 1; getitem 677,1; break; case 420: // 420 minutes #CASHPOINT += 1; getitem 677,1; break; case 480: // 480 minutes #CASHPOINT += 1; getitem 677,1; #daily_minute_count = 0; // reset. break; default: break; } } Quote Link to comment Share on other sites More sharing options...
0 Sallycantdance Posted September 14, 2024 Group: Members Topic Count: 225 Topics Per Day: 0.14 Content Count: 798 Reputation: 12 Joined: 12/04/20 Last Seen: 8 hours ago Author Share Posted September 14, 2024 18 hours ago, Winterfox said: - script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); .reward_minutes = 1; bindatcmd("check", .npc_name$ + "::OnAtcommand"); end; OnAtcommand: dispbottom("Accumulated " + #daily_minute_count); end; OnPCLoginEvent: addtimer(.reward_minutes * 10000, .npc_name$ + "::OnUpdate"); end; OnUpdate: deltimer(.npc_name$ + "::OnUpdate"); addtimer(.reward_minutes * 10000, .npc_name$ + "::OnUpdate"); if (checkvending() & 2) { end; } #daily_minute_count += .reward_minutes; switch(#daily_minute_count) { case 60: // 60 minutes #CASHPOINT += 1; getitem 677,1; break; case 120: // 120 minutes #CASHPOINT += 1; getitem 677,1; break; case 180: // 180 minutes #CASHPOINT += 1; getitem 677,1; break; case 240: // 240 minutes #CASHPOINT += 1; getitem 677,1; break; case 300: // 300 minutes #CASHPOINT += 1; getitem 677,1; break; case 360: // 360 minutes #CASHPOINT += 1; getitem 677,1; break; case 420: // 420 minutes #CASHPOINT += 1; getitem 677,1; break; case 480: // 480 minutes #CASHPOINT += 1; getitem 677,1; #daily_minute_count = 0; // reset. break; default: break; } } hello sir ive tried it and its not working theres no hourly reward every minute Quote Link to comment Share on other sites More sharing options...
0 Nyaniverse Posted September 28, 2024 Group: Members Topic Count: 13 Topics Per Day: 0.02 Content Count: 51 Reputation: 33 Joined: 09/09/23 Last Seen: Thursday at 02:30 PM Share Posted September 28, 2024 On 9/13/2024 at 10:00 PM, GM Winter said: hello sir ive tried it and its not working theres no hourly reward every minute If you don't mind using a different script for an hourly reward system. Here's one that I made. Spoiler /* Author: Nyani Version 1.0 ---------------------------------------------- Playtime System ---------------------------------------------- Changelogs 1.0 - Initial Release */ - script PlaytimeCount -1,{ end; OnPCLoginEvent: //if(BaseLevel < 30) end; @starttime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21); message strcharinfo(0),"Playtime Point System is now enabled. Please note that vending will disqualify you from gaining points."; addtimer 300000,"PlaytimeCount::OnPointUpdate"; // 5 minutes dispbottom "Play Point System start time: "+@starttime$; dispbottom "[ "+#playtimepts+"0/60 ] minutes completed."; end; OnPointUpdate: if ( checkvending(strcharinfo(0)) == 2 ){ dispbottom "You have been removed from the Playtime Point System. Please re-log to opt-in again."; deltimer strnpcinfo(3)+"::OnPointUpdate"; end; } @playtime += 1; if(@playtime == 2){ @playtime = 0; #playtimepts += 1; if(#playtimepts == 6){ #playtimepts = 0; #valkafkpts += 1; @playtime = 0; message strcharinfo(0),"[Playtime Points]: You have received your Playtime Reward at "+gettimestr("%Y-%m-%d %H:%M:%S", 21)+"."; @prevtime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21); } } deltimer "PlaytimeCount::OnPointUpdate"; addtimer 300000,"PlaytimeCount::OnPointUpdate"; end; OnPlaytimeCheck: dispbottom "Last Reward: "+@prevtime$; dispbottom "Minutes: "+#playtimepts+"0/60"; dispbottom "Current points: "+#valkafkpts; end; OnInit: bindatcmd "playtime",strnpcinfo(0)+"::OnPlaytimeCheck"; end; } Quote Link to comment Share on other sites More sharing options...
Question
Sallycantdance
hello everyone can i ask for help i would like to test this script i would like to change the 1 hour in 1 minute so i can test it but i dont know how to compute it can someone help me
Link to comment
Share on other sites
3 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.