sader1992 Posted October 28, 2018 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: Tuesday at 07:50 PM Share Posted October 28, 2018 View File mapusers count Functions IP/GePard You need at lest rAthena 10e7035bebdbc2ec25a392ee2cf14172ecf169e5 or above! (for old rAthena you should add the pr manually!) SCRIPT HEADER (INFO) //===== rAthena Script ======================================= //= getgpmapunits command //= getipmapunits command //===== By: ================================================== //= Sader1992 //= Free!! // https://rathena.org/board/profile/30766-sader1992/ //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project // https://github.com/sader1992/sader_scripts //===== Description: ========================================= // getgpmapunits("map"); return the number of players with the same GePard id in the given map. (You must have GePard to work!) // getipmapunits("map"); return the number of players with the same IP in the given map. //============================================================ //==== please report any error you find //============================================================ //============================================================ you should add the functions to your rAthena/npc/other/Global_Functions.txt to work (add it in that file where ever you like, no need for guide for that !) Examples: scenario > you want a Warper NPC (or maybe event NPC) that allow only one player per IP in the map ? //============================================== //NPC EXAMPLE FOR IP FUNCTION //============================================== prontera,152,183,5 script Warper IP Test 446,{ if(getipmapunits("prontera") > 0){ mes "you already have a char inside this map"; }else{ warp "prontera",152,183; } end; } //============================================== Same as above but per GePard ID not IP //============================================== //NPC EXAMPLE FOR GEPARD FUNCTION //============================================== prontera,155,183,5 script Warper GePard Test 446,{ if(getipmapunits("prontera") > 0){ mes "you already have a char inside this map"; }else{ warp "prontera",155,183; } end; } //============================================== BONUS Test: pvp warper prontera,158,183,5 script PVP Warper IP Test 446,{ mes "would you like to teleport to the pvp map?"; if(select("yes:no") == 2) close; if(getipmapunits("pvp_n_1-1") > 0){ mes "there is another character with the same ip inside the map!"; mes "only 1 character per IP allowed in this map!"; }else{ warp "pvp_n_1-1",0,0; } end; } Submitter sader1992 Submitted 10/29/2018 Category Utilities Video Content Author sader1992 2 1 1 Quote Link to comment Share on other sites More sharing options...
Radian Posted October 28, 2018 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted October 28, 2018 Great released, I'm just concerned for those players who are still playing in cafe's. they have the same IP's Quote Link to comment Share on other sites More sharing options...
Badarosk0 Posted April 12, 2020 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 81 Reputation: 5 Joined: 02/07/12 Last Seen: April 6 Share Posted April 12, 2020 (edited) Good Thank you! Is there any way to work in instance? I want to use this system to block entry in instance with dual. If any player is in instance, gepard check does not work. Edited April 12, 2020 by Badarosk0 Quote Link to comment Share on other sites More sharing options...
sader1992 Posted April 15, 2020 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: Tuesday at 07:50 PM Author Share Posted April 15, 2020 On 4/12/2020 at 4:21 AM, Badarosk0 said: Good Thank you! Is there any way to work in instance? I want to use this system to block entry in instance with dual. If any player is in instance, gepard check does not work. if it's an instance , you should give the function the map name in the instance , check instance_mapname command Quote Link to comment Share on other sites More sharing options...
rmon Posted October 2, 2020 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 97 Reputation: 2 Joined: 04/27/16 Last Seen: 22 hours ago Share Posted October 2, 2020 (edited) Hi everyone, Can anyone share how i can use this on OnPCLoadMapEvent: like when they go on a certain map which is on the list of the loadevent Edited October 10, 2020 by rmon update OnPCLoadMapEvent Quote Link to comment Share on other sites More sharing options...
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.