Jump to content
  • 0

Map limitation


Psyche

Question


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   6
  • Joined:  03/12/13
  • Last Seen:  

if (getmapusers("bat_room") >=26){
	warp "SavePoint",0,0;
}

the problem is, when someone come in, that script randomly kick one of 26 player.

what if i want to make last char will be kicked, so the other player who stay inside bat_room cannot disturbed?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

add the checking condition to your warper npc.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   6
  • Joined:  03/12/13
  • Last Seen:  

add the checking condition to your warper npc.

 

already but, it can be bypassed.

so i want to make script that kick player 25th instead of max players are 24.

 

something like Euphy script

// callfunc "Check_IP","<map_name>";
function script Check_IP {

// Get list of accounts with attached character's IP address.
set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip()+"'",.@aid);

// Passed check if only the attached player is returned.
if (.@size < 2) return;

// Check all online characters using the IP address if they're on the given map.
set .@self, getcharid(3);
for(set .@i,0; .@i<.@size; set .@i,.@i+1) {
if (attachrid(.@aid[.@i])) {
if (strcharinfo(3) == getarg(0)) {
set .@name$, strcharinfo(0);
attachrid(.@self);
mes "Character "+.@name$+" is already logged into Battlegrounds with your IP.";
close;
}
}
}
attachrid(.@self);

// Passed check.
return;
}

but it read of max player, not ip address.

Edited by Psyche
Link to comment
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.   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...