Jump to content
  • 0

Online players to trigger event


Dolphin86

Question


  • Group:  Members
  • Topic Count:  275
  • Topics Per Day:  0.06
  • Content Count:  748
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

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

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2357
  • Joined:  10/28/11
  • Last Seen:  

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