Jump to content

Question

Posted (edited)

Hi all!

i need one script basead in Miss Annie System queue!

 

3 peoples enter in room but only 1 win, others dead go to prontera and winner go to izlude.

 

Edited by brunoshp

2 answers to this question

Recommended Posts

Posted
-	script	Sample	-1,{
	function push; function pull; function display; function size;
	OnPCLoadMapEvent:
		getmapxy( .@map$, .@x, .@y, 0 );
		if ( .@map$ == "prontera" )
			push( getcharid( 3 ) );
		end;
	OnPCDieEvent:
                if ( strcharinfo( 3 ) != "prontera" ) end;
		warp "SavePoint", 0, 0;
		pull( getcharid( 3 ) );
		end;
	OnPCKillEvent:
		if ( size() == 1 && strcharinfo( 3 ) == "prontera" )
			display();
		end;
	
	function	display	{
		for ( .@x = 0; .@x < getarraysize( .Queue ); .@x++ )
			announce "" + rid2name( .Queue[ .@x ] ) + "", 0;
		return;
	}
	function	size	{
		return getarraysize( .Queue );
	}
	function	push	{
		for ( .@i = 0; .@i < getargcount(); .@i++ ) {
			for ( .@x = 0; .@x < getarraysize( .Queue ); .@x++ ) {
				if ( .Queue[ .@x ] == getarg( .@i ) )
					deletearray .Queue[ .@x ], 1;
			}
			.Queue[ getarraysize( .Queue ) ] = getarg( .@i );
		}
		return;
	}
	function	pull	{
		for ( .@i = 0; .@i < getargcount(); .@i++ ) {
			for ( .@x = 0; .@x < getarraysize( .Queue ); .@x++ ) {
				if ( .Queue[ .@x ] == getarg( .@i ) )
					deletearray .Queue[ .@x ], 1;
			}
		}
		return;	
	}
}

prontera	mapflag	loadevent

Not tested though. Change prontera to your desired map

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