i want to add reskill protection to deathmatch,ctf,deathball and koh games.
because when a player died and auto ressed its very easy to kill him again because wearing the equipments taking time.how can i do that?
I'm afraid that any protection from death during a game will be exploited by your players.
how can they exploit this reskill protection ?
since they cannot be killed, they will be able to do all of the things that are only prevented by threat of death, such as holding the hill in koth, holding the ball in deathball, holding the flag in ctf.
I suppose you could make it brief, like just a few seconds. Just enough time to reequip.
hmm yes you are right but the protection can be good in deathmatch games.
you could maybe set a frozen attribute while protection is on
what I would do would be to add this code to the DeathmatchGauntlet.cs
QUOTE |
public override void OnPlayerKilled(Mobile killer, Mobile killed) { if(killed == null) return;
if(AutoRes) { // prepare the autores callback Timer.DelayCall( RespawnTime, new TimerStateCallback( XmlPoints.AutoRes_Callback ), new object[]{ killed, true } ); }
// add 15 seconds of res kill protection XmlAttach.AttachTo(killed, new XmlBless(15.0));
// find the player in the participants list and announce it if(m_Participants != null) {
foreach(ChallengeEntry entry in m_Participants) { if(entry.Status == ChallengeStatus.Active && entry.Participant == killed) { GameBroadcast(100314, killed.Name); // "{0} has been killed" SubtractScore(entry); } } }
// see if the game is over CheckForGameEnd(); }
|
and add the XmlBless attachment script that I added to this post
note, you can use that attachment to confer limited bless protection any time you like, through scripts, spawners, or xmldialogs.
thanks arte i am going to try it and tell the results.where is the xmlbless.cs going to ?
Just put it anywhere in your custom scripts area. It doesnt matter.