sader1992 Posted October 28, 2018 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
Radian Posted October 28, 2018 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
Badarosk0 Posted April 12, 2020 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
sader1992 Posted April 15, 2020 Author 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
rmon Posted October 2, 2020 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
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.