Jump to content
  • 0

R> Npc Count


StonedLover

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  11/23/13
  • Last Seen:  

Hello,

I create an Event at the Moment and i want to limit the participant. How can i do this?

At the moment i have this:

prontera,148,178,5	script	Radin	405,{
mes	"[Radin]";
mes "Do you want to join the Event?";
	switch(select("Yes.:No.")){
		case 1: 
	{   
	mes "Great!";
	next;
	mes "I will warp you to the waitingroom.";
	warp waitroom,26,0; 
// Now I want to Count how many player allready joined the Event, so that i can trigger the stop command and disable the npc for joining
	close;
	}
		case 2:
	{ close; }
}
}
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Assuming that is the only way for players to go to the waiting room. You can use :

getmapusers("<map name>")
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  11/23/13
  • Last Seen:  

Will this command check the mapuser all the time?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

it only check once, depends on when you trigger it

me love write event script, how about tell me whats the idea of your event is ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

You can keep a list (array or SQL, depending on what level of permanence you want) of all the players who join, and active a PCLogoutEvent to check if the player was part of the event + remove their name from the list if they were.

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