Jump to content
  • 0

H>Script Problem


Bringer

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  742
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

Hello i want to only announce when the players Killed the Super Fabre But the problem all monster has been killed announce it
 

pvp_n_1-2,0,0,0,0	monster	1 Point	1007,60,0,60000,"fabre_punch_main::OnKill_1"
pvp_n_1-2,0,0,0,0	monster	10 Points	1007,30,0,60000,"fabre_punch_main::OnKill_2"
pvp_n_1-2,0,0,0,0	monster	-20 Points	1007,50,0,60000,"fabre_punch_main::OnKill_3"
pvp_n_1-2,0,0,0,0	monster	Super Points	1229,10,0,60000,"fabre_punch_main::OnKill_4"

	OnKill_1:
		callsub( L_Point,( .point_rate * 1 ) ); // Fabre = 1 Point
		end;
		
	OnKill_2:
		callsub( L_Point,( .point_rate * 10 ) ); // Fabre = 10 Point
		end;
		
	OnKill_3:
		callsub( L_Point,( .point_rate * -20 ) ); // Fabre = -20 Point
		end;
		
	OnKill_4:
		callsub( L_Point, rand( 1,100 ), bc_map ); // Fabre = random 1~100 Point
		end;
		
	L_Point:
		if ( .status == 2 ) {
			.@value = getarg( 0,0 );
			.@announce = getarg( 1,bc_self );
			
			query_sql( "INSERT INTO `e_fabre_punch_rank` (`cid`, `name`, `point`) VALUES ( "+getcharid(0)+", '"+escape_sql( strcharinfo(0) )+"', "+.@value+" ) ON DUPLICATE KEY UPDATE `point` = `point` + "+.@value );
			dispbottom "<Fabre Punch Event> Gained " + .@value + " Point.";
			if ( .@announce )
				announce "Super Fabre has been killed by [ " + strcharinfo(0) + " ] for " + .@value + " Point(s) !",.@announce;
		}
		else if ( .status == 0 ) {
			dispbottom "Event not yet start, please wait.";
		}
		return;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1677
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

try this

pvp_n_1-2,0,0,0,0	monster	1 Point	1007,60,0,60000,"fabre_punch_main::OnKill_1"
pvp_n_1-2,0,0,0,0	monster	10 Points	1007,30,0,60000,"fabre_punch_main::OnKill_2"
pvp_n_1-2,0,0,0,0	monster	-20 Points	1007,50,0,60000,"fabre_punch_main::OnKill_3"
pvp_n_1-2,0,0,0,0	monster	Super Points	1229,10,0,60000,"fabre_punch_main::OnKill_4"

	OnKill_1:
		callsub( L_Point,( .point_rate * 1 ) ); // Fabre = 1 Point
		end;
		
	OnKill_2:
		callsub( L_Point,( .point_rate * 10 ) ); // Fabre = 10 Point
		end;
		
	OnKill_3:
		callsub( L_Point,( .point_rate * -20 ) ); // Fabre = -20 Point
		end;
		
	OnKill_4:
		callsub( L_Point, rand( 1,100 ), 1 ); // Fabre = random 1~100 Point
		end;
		
	L_Point:
		if ( .status == 2 ) {
			.@value = getarg( 0,0 );
			
			
			query_sql( "INSERT INTO `e_fabre_punch_rank` (`cid`, `name`, `point`) VALUES ( "+getcharid(0)+", '"+escape_sql( strcharinfo(0) )+"', "+.@value+" ) ON DUPLICATE KEY UPDATE `point` = `point` + "+.@value );
			dispbottom "<Fabre Punch Event> Gained " + .@value + " Point.";
			if(getarg(1))
				announce "Super Fabre has been killed by [ " + strcharinfo(0) + " ] for " + .@value + " Point(s) !",bc_map;
		}
		else if ( .status == 0 ) {
			dispbottom "Event not yet start, please wait.";
		}
		return;
}

 

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  742
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

20 minutes ago, sader1992 said:

try this


pvp_n_1-2,0,0,0,0	monster	1 Point	1007,60,0,60000,"fabre_punch_main::OnKill_1"
pvp_n_1-2,0,0,0,0	monster	10 Points	1007,30,0,60000,"fabre_punch_main::OnKill_2"
pvp_n_1-2,0,0,0,0	monster	-20 Points	1007,50,0,60000,"fabre_punch_main::OnKill_3"
pvp_n_1-2,0,0,0,0	monster	Super Points	1229,10,0,60000,"fabre_punch_main::OnKill_4"

	OnKill_1:
		callsub( L_Point,( .point_rate * 1 ) ); // Fabre = 1 Point
		end;
		
	OnKill_2:
		callsub( L_Point,( .point_rate * 10 ) ); // Fabre = 10 Point
		end;
		
	OnKill_3:
		callsub( L_Point,( .point_rate * -20 ) ); // Fabre = -20 Point
		end;
		
	OnKill_4:
		callsub( L_Point, rand( 1,100 ), 1 ); // Fabre = random 1~100 Point
		end;
		
	L_Point:
		if ( .status == 2 ) {
			.@value = getarg( 0,0 );
			
			
			query_sql( "INSERT INTO `e_fabre_punch_rank` (`cid`, `name`, `point`) VALUES ( "+getcharid(0)+", '"+escape_sql( strcharinfo(0) )+"', "+.@value+" ) ON DUPLICATE KEY UPDATE `point` = `point` + "+.@value );
			dispbottom "<Fabre Punch Event> Gained " + .@value + " Point.";
			if(getarg(1))
				announce "Super Fabre has been killed by [ " + strcharinfo(0) + " ] for " + .@value + " Point(s) !",bc_map;
		}
		else if ( .status == 0 ) {
			dispbottom "Event not yet start, please wait.";
		}
		return;
}

 

Announce is Working Fine now BUT Error on map server

sader.png

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1677
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

pass with other events 0

example

OnKill_1:
		callsub( L_Point,( .point_rate * 1 ),0 ); // Fabre = 1 Point
Link to comment
Share on other sites

  • 0

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

2 hours ago, Bringer said:

But the problem all monster has been killed announce it

the default script broadcast the announce to the player him/herself only. only the super fabre will be broadcast to everyone in the same map.

 

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