Jump to content
  • 0

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


Question

Posted

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

2 answers to this question

Recommended Posts

  • 0
Posted

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
  • 0
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...