Jump to content

Utility: mapusers count Functions IP/GePard


sader1992

Recommended Posts


  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

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
  • Submitted
    10/29/2018
  • Category
  • Video
  • Content Author
    sader1992

 

  • Upvote 2
  • Love 1
  • MVP 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Great released, I'm just concerned for those players who are still playing in cafe's. they have the same IP's

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   5
  • Joined:  02/07/12
  • Last Seen:  

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 by Badarosk0
Link to comment
Share on other sites


  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

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

Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

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 by rmon
update OnPCLoadMapEvent
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
Reply to this topic...

×   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...