Jump to content
  • 0
Sign in to follow this  
Lord Ganja

What's wrong with my script?

Question

Hi. Can anyone check this script? It's not working fine with me..

My only problem here is it doesn't kick the party member when the party member logged out.

But if the party member changed map, the script is triggered.

 

Does this script still continue to run even when the player logged out?

Since I didnt put an 'end;' at OnPCLogoutEvent, it should continue run until OnPCStatCalcEvent right?  But doesn't work for me.

 

OnPCLogoutEvent:    if( @insta_event )        .@logged = 1;OnPCStatCalcEvent:    if( @insta_event ) { .....................................

Here's the full script:

-	script	custom_event_checker	-1,{OnPCLoadMapEvent:getmapxy(.@map$,.@x,.@y,0);	if( .@map$ == "guild_vs2-2"	 || .@map$ == "ph_dun01" 	 || .@map$ == "ph_dun02"	 || .@map$ == "ph_dun03" ) {		if(getgmlevel() > 0 && getgmlevel() < 99) {			atcommand "@storeall";			atcommand "@job novice";			atcommand "@adjgroup 30";			end;		} else {		atcommand "@autoloot 100";		@insta_event = 1;		end;		}	}	end;OnPCLogoutEvent:	if( @insta_event )		.@logged = 1;OnPCStatCalcEvent:	if( @insta_event ) {		if ( strcharinfo(3) == "ph_dun01" && !.@logged		||   strcharinfo(3) != "ph_dun01" && .@logged		||   strcharinfo(3) == "ph_dun02" && !.@logged		||   strcharinfo(3) != "ph_dun02" && .@logged		||   strcharinfo(3) == "ph_dun03" && !.@logged		||   strcharinfo(3) != "ph_dun03" && .@logged		||   strcharinfo(3) == "guild_vs2-2" && !.@logged		||   strcharinfo(3) != "guild_vs2-2" && .@logged		||   getcharid(1) == 0 ) end;		.@party_id = getcharid(1);		if ( getcharid(0) != getpartyleader( .@party_id, 2 ) )			party_delmember();		else {			.i = 0;			if ( instance_check_party(.@party_id,2) == 0 )				party_destroy(.@party_id);			else {				addrid( 2, 0, .@party_id );				if( !.i && !.@party_id ) {					.i = 1;					party_changeleader getcharid(1), getcharid(0);				} else if( .@party_id )					party_delmember();			}		}		@insta_event = 0;	}	end;}

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.