Jump to content
  • 0

Help improve dualkick script with uniqueid & ip


lzm

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  08/12/17
  • Last Seen:  

Greetings all...

This script is working as intended, but this will make player that play from internet cafe with thin client got kicked from the map because have same uniqueid.


Need to make it like this:

if last_unique_id is the same, but the IP is different, player will not get kicked out from the map.

if last_unique_i is the same, and the IP is the same, player will get kicked out from the map.

 

quiz_00,0,0,0	script	dck#quiz00	111,{
OnPCLoadMapEvent:
	set .@charmap$, strcharinfo(3);
	if(.@charmap$!=.npcmap$) end;
	set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_unique_id` = (SELECT `last_unique_id` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a);
	if(.@len-1) {
		for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
			getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d]));
			if(.@map$==.@charmap$&&rid2name(.@a[.@d])!=strcharinfo(0)) {
				dispbottom "No dual in this area.";
				warp "SavePoint",0,0;
			}
		}
	}
	end;
	
OnInit:
	set        .npcmap$,	strnpcinfo(4);
	setmapflag .npcmap$,	mf_loadevent ;
}

Thank you for helping me.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.   Paste as plain text instead

  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.

×
×
  • Create New...