Jump to content
  • 0

best way to count player in map PvP then get reward ?


MyNoobScriptz

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  75
  • Reputation:   3
  • Joined:  05/01/15
  • Last Seen:  

Hi, how to count player in map PvP (pvp_y_1-2)

1. if count = 20 get 10 Yggdrasil Berry

2. if count = 10 get 5 Yggdrasil Berry

I use OnPCDieEvent sometime script can't run to next step. because some player has left by using Alt+F4

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.02
  • Content Count:  5
  • Reputation:   2
  • Joined:  02/27/24
  • Last Seen:  

You can also check how the last man standing event does.

Basically an event onTimer1000, which is called every second where checks the count of people in the map.

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  103
  • Reputation:   17
  • Joined:  07/28/12
  • Last Seen:  

u can try with 

-	script	rewards	-1,{
	end;

OnPCKillEvent:
	getmapxy(@map$, @x, @y, BL_PC);
	if( @map$ != "pvp_y_1-2" ) end;
	if ( getmapusers("pvp_y_1-2" ) ) > 20 )
		getitem 606,2;		
	else if ( getmapusers("pvp_y_1-2") > 15 )
		getitem 606,1;

	end;
}

 

Edited by Angeluz
  • Like 1
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...