Ernest90 Posted December 15, 2014 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 46 Reputation: 0 Joined: 09/04/14 Last Seen: April 2, 2021 Share Posted December 15, 2014 looking for help for my freebies how to block same ip for claiming? thank you. freebies.txt.txt Quote Link to comment Share on other sites More sharing options...
SmokeIT Posted December 15, 2014 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 12/04/14 Last Seen: April 16, 2015 Share Posted December 15, 2014 I use: - script Only1perIP -1,{ OnPCLoadMapEvent: set .maps$, "bat_room"; set .@my_map$, strcharinfo(3); if (compare(","+.maps$+"," , ","+.@my_map$+",")) { query_sql "SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id " + "WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") " + "AND `char`.online=1 AND login.account_id!="+getcharid(3), .@account_id; for (set .@i,0; .@i<getarraysize(.@account_id); set .@i,.@i+1) { getmapxy .@map$,.@x,.@y, 0, rid2name(.@account_id[.@i]); if (.@map$ == .@my_map$) { set .@name$, strcharinfo(0); announce "Sorry, only 1 char per IP can be on this map at a time.", bc_self; sleep 1000; atcommand "@kick " + .@name$; } } } end; } Quote Link to comment Share on other sites More sharing options...
Ernest90 Posted December 15, 2014 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 46 Reputation: 0 Joined: 09/04/14 Last Seen: April 2, 2021 Author Share Posted December 15, 2014 I use: - script Only1perIP -1,{ OnPCLoadMapEvent: set .maps$, "bat_room"; set .@my_map$, strcharinfo(3); if (compare(","+.maps$+"," , ","+.@my_map$+",")) { query_sql "SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id " + "WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") " + "AND `char`.online=1 AND login.account_id!="+getcharid(3), .@account_id; for (set .@i,0; .@i<getarraysize(.@account_id); set .@i,.@i+1) { getmapxy .@map$,.@x,.@y, 0, rid2name(.@account_id[.@i]); if (.@map$ == .@my_map$) { set .@name$, strcharinfo(0); announce "Sorry, only 1 char per IP can be on this map at a time.", bc_self; sleep 1000; atcommand "@kick " + .@name$; } } } end; } just add under my script? Quote Link to comment Share on other sites More sharing options...
SmokeIT Posted December 15, 2014 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 12/04/14 Last Seen: April 16, 2015 Share Posted December 15, 2014 (edited) prontera,155,188,5 script Freebies 718,{ query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NO") > 0 || #gift > 0) { mes "[Freebies]"; mes "Good Day."; close; } if( !#Freebies ) { set #gift, 1; setd "$" + .@lip$ + "_NO", getd("$" + .@lip$ + "_NO") + 1; mes "Welcome...this is your gift..."; getitem 2624,2; getitem 2289,1; getitem2 2308,1,1,7,0,0,0,0,0; getitem2 1705,1,1,10,0,0,0,0,0; getitem2 2528,1,1,7,0,0,0,0,0; getitem2 2424,1,1,7,0,0,0,0,0; close; } for example Edited December 16, 2014 by SmokeIT Quote Link to comment Share on other sites More sharing options...
Ernest90 Posted December 15, 2014 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 46 Reputation: 0 Joined: 09/04/14 Last Seen: April 2, 2021 Author Share Posted December 15, 2014 prontera,155,188,5 script Freebies 718,{ query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NO") > 0 || #gift > 0) { mes "[Freebies]"; mes "Good Day."; close; } if( !#Freebies ) { set #gift, 1; setd "$" + .@lip$ + "_NO", getd("$" + .@lip$ + "_NO") + 1; mes "Welcome...this is your gift..."; getitem 2624,2; getitem 2289,1; getitem2 2308,1,1,7,0,0,0,0,0; getitem2 1705,1,1,10,0,0,0,0,0; getitem2 2528,1,1,7,0,0,0,0,0; getitem2 2424,1,1,7,0,0,0,0,0; close; } is not working. npc did not appear. Quote Link to comment Share on other sites More sharing options...
SmokeIT Posted December 15, 2014 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 12/04/14 Last Seen: April 16, 2015 Share Posted December 15, 2014 (edited) download Edited December 16, 2014 by SmokeIT Quote Link to comment Share on other sites More sharing options...
Ernest90 Posted December 16, 2014 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 46 Reputation: 0 Joined: 09/04/14 Last Seen: April 2, 2021 Author Share Posted December 16, 2014 download This time i click npc doesnt get anything. sorry about that Quote Link to comment Share on other sites More sharing options...
Question
Ernest90
looking for help for my freebies how to block same ip for claiming?
thank you.
freebies.txt.txt
Link to comment
Share on other sites
6 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.