PewN Posted March 10, 2013 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted March 10, 2013 Help how to make it 1 Per IP - script faith -1,{ OnPCLoginEvent: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } if(gettime(4) == 6) goto L_7Day; message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,#consecutive+1; end; L_7Day: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } if(#consecutive == 7){ set #consecutive,1; set #LoyaltyPoints,#LoyaltyPoints+20; message strcharinfo(0), "Congratulations, You receive 20 Loyalty Points"; set #faithd,gettimetick(2); end; } message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,1; end; } Quote Link to comment Share on other sites More sharing options...
Capuche Posted March 10, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted March 10, 2013 - script faith -1,{ OnPCLoginEvent: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } .@size = query_sql( "SELECT `login`.`account_id` FROM login LEFT JOIN `char` ON `login`.`account_id`= `char`.`account_id` WHERE `login`.`last_ip` LIKE '"+ escape_sql( getcharip() ) +"' and `char`.`online` = 1", .@acc_id ); if ( .@size > 1 ) end; if(gettime(4) == 6) goto L_7Day; message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,#consecutive+1; end; L_7Day: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } if(#consecutive == 7){ set #consecutive,1; set #LoyaltyPoints,#LoyaltyPoints+20; message strcharinfo(0), "Congratulations, You receive 20 Loyalty Points"; set #faithd,gettimetick(2); end; } message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,1; end; } 1 Quote Link to comment Share on other sites More sharing options...
PewN Posted March 11, 2013 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Author Share Posted March 11, 2013 - script faith -1,{ OnPCLoginEvent: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } .@size = query_sql( "SELECT `login`.`account_id` FROM login LEFT JOIN `char` ON `login`.`account_id`= `char`.`account_id` WHERE `login`.`last_ip` LIKE '"+ escape_sql( getcharip() ) +"' and `char`.`online` = 1", .@acc_id ); if ( .@size > 1 ) end; if(gettime(4) == 6) goto L_7Day; message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,#consecutive+1; end; L_7Day: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } if(#consecutive == 7){ set #consecutive,1; set #LoyaltyPoints,#LoyaltyPoints+20; message strcharinfo(0), "Congratulations, You receive 20 Loyalty Points"; set #faithd,gettimetick(2); end; } message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,1; end; } thx capuche. i will try this Quote Link to comment Share on other sites More sharing options...
Question
PewN
Help how to make it 1 Per IP
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.