the topic title says everything.i found a bug.two player can easily escape from jail by making 1vs1 challenge game with [challenge
well, temporarily escape. It will put them back afterward, but if you want to block challenges in jail, note, that the teleport on duel feature gives players the ability to temporarily recall out of places that they might not normally be able to recall out of.
If you want duel teleports to obey the same restrictions as normal recalls, just add this to xmlpoints.cs around line 2870 in the IssueChallengeGump constructor
QUOTE |
AddLabel( 55, y, texthue, String.Format(GetText(from, 200661)) ); // "Duel here" AddRadio( 20, y, 9721, 9724, false, 1 ); y+= 30;
if(TeleportOnDuel && SpellHelper.CheckTravel(from, TravelCheckType.RecallFrom) && SpellHelper.CheckTravel(target, TravelCheckType.RecallFrom)) { for(int i = 0; i < XmlPoints.DuelLocations.Length; i++) { // check availability
|
but i want to disable the challenge command in jail
like if they type it
they will be warned like this message "you cannot escape so easiliy"
you could do that, but the above change will take away the teleport options, so they cant be teleported anywhere anyway.
If you want to disable challenges in jail, just add this to the beginning of that same method
QUOTE |
public IssueChallengeGump(Mobile from, Mobile target) : base ( 0, 0 ) { if(from == null || target == null) return;
if (Region.Find(from.Location, from.Map) is Jail || Region.Find(target.Location, target.Map) is Jail) { from.SendMessage("You cannot challenge in jail"); return; }
|
if you add those modifications, be sure to add this to the beginning of the xmlpoints.cs as well
CODE |
using Server.Regions; using Server.Spells;
|