Jump to content
  • 0

OnPCDieEvent and OnPCKillEvent


Question

Posted

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.

2 answers to this question

Recommended Posts

  • 0
Posted

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

  • 0
Posted

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.

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