Full Version : reskill protection
xmlspawner >>XMLPoints Discussion >>reskill protection
<< Prev | Next >>
ambak- 01-28-2006
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?
ArteGordon- 01-28-2006
I'm afraid that any protection from death during a game will be exploited by your players.
ambak- 01-28-2006
how can they exploit this reskill protection ?
ArteGordon- 01-28-2006
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.
ambak- 01-28-2006
hmm yes you are right but the protection can be good in deathmatch games.
DrussRob- 01-28-2006
you could maybe set a frozen attribute while protection is on
ArteGordon- 01-28-2006
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
ArteGordon- 01-28-2006
note, you can use that attachment to confer limited bless protection any time you like, through scripts, spawners, or xmldialogs.
ambak- 01-28-2006
thanks arte i am going to try it and tell the results.where is the xmlbless.cs going to ?
ArteGordon- 01-28-2006
Just put it anywhere in your custom scripts area. It doesnt matter.