Jump to content
  • 0

OnPCDieEvent and OnPCKillEvent


babyhon

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  04/17/12
  • Last Seen:  

Hello,

Can someone help me to fix this script.

this should give the party 2 points per kill and will lose 1 point if one of them die.

How ever I have no idea what to use in OnPCDieEvent and when i use this same format it just adds two points on the killer party not deducting on the party which has killed member.

OnPCKillEvent:
	if (strcharinfo(3) == "guild_vs1") {
		announce "The party: "+ strcharinfo(1) +" gained 2 points",bc_map;		
	if( getcharid(1) == .Teamr ){
		set .rpoints,.rpoints + 2;
		announce "The party: "+ strcharinfo(1) +" now has ("+ .rpoints +") points",0;
		}
	if( getcharid(1) == .Teamb ){
		set .bpoints,.bpoints + 2;
		announce "The party: "+ strcharinfo(1) +" now has ("+ .bpoints +") points",0;
		}
		if( getcharid(1) == .Teamg ){
		set .gpoints,.gpoints + 2;
		announce "The party: "+ strcharinfo(1) +" now has ("+ .gpoints +") points",0;
		}
	if( getcharid(1) == .Teamy ){
		set .ypoints,.ypoints + 2;
		announce "The party: "+ strcharinfo(1) +" now has ("+ .ypoints +") points",0;
		}

	}
	end;
OnPCDieEvent: <<<<<------------ dunno what to do here.
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

you would simply copy everything under onpckillevent:

 

paste it unde onpcdieevent:

 

then change the + to -
 

	if( getcharid(1) == .Teamr ){
		set .rpoints,.rpoints - 1;
		announce "The party: "+ strcharinfo(1) +" now has ("+ .rpoints +") points",0;
		}

like that

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  04/17/12
  • Last Seen:  

Thanks for your reply, I already tried that as what I have said it didn't work, somehow it isn't deducting points that's why I am wondering. it just announces the current point of the killer party twice instead of deducting points on killed party and announces their current points. it's like the onpcdieevent: is working as onpckillevent: too.

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