oblinez Posted July 13, 2014 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 20 Reputation: 1 Joined: 02/23/14 Last Seen: May 27, 2023 Share Posted July 13, 2014 hi can i request an npc? a simple npc who gives hourly points with a sistem security this npc dont give points for player who stay stopped for more than 15 minutes and this npc dont give points for players under @autotradeThanks in advance Quote Link to comment Share on other sites More sharing options...
Skorm Posted July 13, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 13, 2014 (edited) - script hourlypoints -1,{ OnPCLoginEvent: attachnpctimer(); startnpctimer(); end; OnTimer3600000: if( checkidle() < 900 && !@autotrade ) { .@mes$ = ""; set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt; dispbottom "You received "+.point_amt+" Kafrapoints by staying in-game for 1 hour"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; set @consecutive_hour, @consecutive_hour + 1; //Check for 3 hours consecutive if(@consecutive_hour == 3) { set @consecutive_hour,0; set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt; dispbottom "You receive "+.cpoint_amt+" Kafrapoints for 3 consecutive hours of play."; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; } } else if( !getstrlen(.@mes$) ) { .@mes$ = "While afk for 15 minutes or more you will not receive hourly points."; dispbottom .@mes$; } attachnpctimer(); initnpctimer(); end; OnCommand: @autotrade = 1; atcommand "@autotrade"; end; OnInit: bindatcmd "autotrade","hourlypoints::OnCommand"; set .cpoint_amt, 50; //Points gained for consecutive time online. set .point_amt, 10; //Normal points gained. } Edited July 13, 2014 by Skorm Caught something I missed. 1 Quote Link to comment Share on other sites More sharing options...
oblinez Posted July 18, 2014 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 20 Reputation: 1 Joined: 02/23/14 Last Seen: May 27, 2023 Author Share Posted July 18, 2014 (edited) - script hourlypoints -1,{ OnPCLoginEvent: attachnpctimer(); startnpctimer(); end; OnTimer3600000: if( checkidle() < 900 && !@autotrade ) { .@mes$ = ""; set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt; dispbottom "You received "+.point_amt+" Kafrapoints by staying in-game for 1 hour"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; set @consecutive_hour, @consecutive_hour + 1; //Check for 3 hours consecutive if(@consecutive_hour == 3) { set @consecutive_hour,0; set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt; dispbottom "You receive "+.cpoint_amt+" Kafrapoints for 3 consecutive hours of play."; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; } } else if( !getstrlen(.@mes$) ) { .@mes$ = "While afk for 15 minutes or more you will not receive hourly points."; dispbottom .@mes$; } attachnpctimer(); initnpctimer(); end; OnCommand: @autotrade = 1; atcommand "@autotrade"; end; OnInit: bindatcmd "autotrade","hourlypoints::OnCommand"; set .cpoint_amt, 50; //Points gained for consecutive time online. set .point_amt, 10; //Normal points gained. } skorm thx alot bro but i forget one detail... coud u edit this script to work with hourlypoints table on login db? and can you disable the "//Check for 3 hours consecutive" ?? skorm, if( checkidle() < 900 && !@autotrade ) <<<this part block @at too? or any command to open shop? Edited July 18, 2014 by oblinez Quote Link to comment Share on other sites More sharing options...
Question
oblinez
Thanks in advance
Link to comment
Share on other sites
2 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.