Jump to content
  • 0
Sign in to follow this  
karazu

Limit characters in 1 MAP v.2

Question

Related topic: http://herc.ws/board/topic/4409-limit-characters-in-1-map/


Hello I have now an Idea of how to prevent them from flooding.

I was thinking of a Ticket System, but before everything else I just want to ask if this is possible.



I want an NPC that will give an item to an account. If possible its like in the freebie system but will just check the IP instead of per account,  this NPC should determine how many accounts of that IP already claimed, I want to limit at least 5 account per IP


is this possible?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I guess its possible, since the script has to only compare the variables of the IPs that has claimed a price (npc or global variable I guess) and the last IP of the character account calling the NPC, with a SQL querie at the login table.

 

Edit: but then, think about at the time a lot of people uses that NPC, I wonder how optimized would be to check all of that everytime by script

Share this post


Link to post
Share on other sites
  • 0

/*create table freebie (ip varchar(16) primary key,claimed tinyint(4)) engine = innodb;drop table freebie;*/prontera,154,185,5	script	kjdhfksjhf	100,{	mes "freebie ...";	mes " ";	if ( #freebie_claimed ) {		mes "you have already claimed the prize";		close;	}	query_sql "select claimed from freebie where ip = '"+ getcharip() +"'", .@claimed;	if ( .@claimed >= .limit ) {		mes "this ip has reached the max limit to claimed the freebies";		close;	}		if ( !checkweight(501,1) ) {		mes "lol ... you can't even carry 1 red pot";		close;	}	getitem 501,1;	mes "gratzzzzzzz ... zzzz....";	query_sql "insert into freebie values ( '"+ getcharip() +"', 1 ) on duplicate key update claimed = claimed +1;";	#freebie_claimed = 1;	close;OnInit:	.limit = 2; // how many times 'player can actually create multiple account to cheat this system'. change to 5	// oh ... and then, reset the router again to change ip then claim again !}
.

.

.

think about at the time a lot of people uses that NPC, I wonder how optimized would be to check all of that everytime by script

if the sql query return the result within 0.1 sec, I don't think it will produce lag

and this sql table has already indexed too

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.