Jump to content
  • 0
Yoh Asakura

Announce when player has x pvp points

Question

Hi,

 

This is another script I would like to have...

When the player makes x pvp points it will announce to the whole server.

 

Example:

The player kills someone in the pvp arena, after he/she gets 100 pvp points it will announce "The Player xxx just made 100 PvP Points!"

 

Here it is my OnPcKillEvent:

 

http://upaste.me/041118008b04978c1

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

PointsPvP:getitem 7420,1;if (playerattached() == killedrid) end;getmapxy(@map$,@x,@y,0);set @CID,getcharid(0);set @points,0;set @name$,"";query_sql "SELECT `pointss_pvp` FROM `rank_pvp` WHERE `char_id`="+@CID+"",@points;query_sql "SELECT `char_name` FROM `rank_pvp` WHERE `char_id`="+@CID+"",@name$;if (@nome$ == ""){query_sql "INSERT INTO `rank_pvp` (`char_id`,`char_name`,`points_pvp`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$;dispbottom "Pontos PvP Master: 1";end;}query_sql "UPDATE `rank_pvp` SET `points_pvp` = `points_pvp` +1 WHERE `char_id`="+@CID+"",@esc$;dispbottom "Total PvP Points: "+(@points+1);setarray .@point_announce, 100, 200, 300, 400; // set point you want to announcefor (.@p = 0; .@p < getarraysize(.@point_announce); .@p++) {	if ((@points+1) == .@point_announce[.@p]) {		announce strcharinfo(0)+" just made "+.@point_announce[.@p]+" PvP Points!.",bc_all,0x00FF00;}end;}

You just forget to add one more } before "end";

 

It's working, thank you.

Edited by Yoh Asakura

Share this post


Link to post
Share on other sites
  • 0
PointsPvP:getitem 7420,1;if (playerattached() == killedrid) end;getmapxy(@map$,@x,@y,0);set @CID,getcharid(0);set @points,0;set @name$,"";query_sql "SELECT `pointss_pvp` FROM `rank_pvp` WHERE `char_id`="+@CID+"",@points;query_sql "SELECT `char_name` FROM `rank_pvp` WHERE `char_id`="+@CID+"",@name$;if (@nome$ == ""){query_sql "INSERT INTO `rank_pvp` (`char_id`,`char_name`,`points_pvp`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$;dispbottom "Pontos PvP Master: 1";end;}query_sql "UPDATE `rank_pvp` SET `points_pvp` = `points_pvp` +1 WHERE `char_id`="+@CID+"",@esc$;dispbottom "Total PvP Points: "+(@points+1);setarray .@point_announce, 100, 200, 300, 400; // set point you want to announcefor (.@p = 0; .@p < getarraysize(.@point_announce); .@p++) {	if ((@points+1) == .@point_announce[.@p]) {		announce strcharinfo(0)+" just made "+.@point_announce[.@p]+" PvP Points!.",bc_all,0x00FF00;}end;}

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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