Jump to content
  • 0

Online players to trigger event


Question

Posted (edited)

hye can i request a script that will trigger an event when there is a total of 20 player online?

this is the event script:

-	script	Poring_Coin	-1,{
OnNPCKillEvent:

if ( rand( 100 ) <= 1 ) {

.@item_id = F_Rand( 40003 );

getitem .@item_id,1;

}

end;

}

also the event script will notify / broadcast how many player left before the event start?

something like this?

There is 10 players online, a drop event will start when there is a total of 20 players online!
10/20 player currently online

and when it reach total 20 player, the event will start and broadcast:

A total 20 player is online now, mini event will start, all monster will now drop Gatcha ticket by 1%

 

Edited by Dolphin86

1 answer to this question

Recommended Posts

  • 0
Posted (edited)
-	script	sample	-1,{

	OnNPCKillEvent:
		if (.player_count >= 20) {
			if (rand(1, 100) == 1) 
				getitem 40003, 1;
		}
		end;
		
	OnPCLoginEvent:
		.player_count++;
		end;
		
	OnPCLogoutEvent:
		.player_count--;
		end;
		
	OnUpdate:
		if (.player_count < 20) {
			announce "There is "+.player_count+"/20 players online, a drop event will start when there is a total of 20 players online!", bc_all;
		}
		else if (.player_count == 20) {
			announce "A total "+.player_count+" player is online now, mini event will start, all monster will now drop Gatcha ticket by 1%", bc_all;
		}
		end;
}

 

Edited by Emistry

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