good point.Prohor Meletevich said:Players used Razor can open corpse without doubleclicking, and can avoid region looting restrictions. You can fix this by using CheckAccessibility func instead of OnDoubleClick func.
public override bool CheckAccessibility(Item item, Mobile from)
{
if (item is Corpse)
{
// dont allow other players to loot corpses while a challenge game is present
if ((ChallengeGame != null) && !ChallengeGame.Deleted && (from != null) && !(((Corpse)item).Owner is BaseCreature) &&
(((Corpse)item).Owner != from) && (from.AccessLevel == AccessLevel.Player))
{
XmlPoints.SendText(from, 100105); // "You are not allowed to open that here."
return false;
}
}
return base.CheckAccessibility(item, from);
}
ArteGordon said:good point.
Adding this to the ChallengeGameRegion.cs should take care of it
Prohor Meletevich said:I have a question. What about duels on the champs? Can people left the champ area with power scrolls by using duels?
public static bool AllowChallengeGump(Mobile from, Mobile target)
{
if (from == null || target == null) return false;
[color=red]
if (!from.Region.IsPartOf(typeof(Regions.TownRegion)) || !target.Region.IsPartOf(typeof(Regions.TownRegion)))
{
from.SendMessage("You must be in a town to issue a challenge");
return false;
}
[/color]
if (from.Region.IsPartOf(typeof(Regions.Jail)) || target.Region.IsPartOf(typeof(Regions.Jail)))
{
from.SendLocalizedMessage(1042632); // You'll need a better jailbreak plan then that!
return false;
}
return true;
}
Prohor Meletevich said:Maybe Im not understand, but I can't to add CTFBase item to the world because it isn't constructable? I mean that how can I setup CTF game?
Prohor Meletevich said:Maybe a bag. In the top players gump player deaths always have zero value.
// take points from the killed, either a fixed amount or scaled by the difference with the points of the killer
// if the killer has fewer points than the killed then lose more
XmlPoints xp = XmlAttach.FindAttachment(killer, typeof(XmlPoints)) as XmlPoints;
if(xp != null)
{
killerpoints = xp.Points;
[color=red]
// add to the recently killed list
xp.KillList.Add(new KillEntry(killed, DateTime.Now));[/color]
}
// add to the recently killed list
//KillList.Add(new KillEntry(killed, DateTime.Now));
Ah, what a great error. Glad it got fixed. [bowtoarteArteGordon said:I have found the problem and updated xmlpoints.cs in v1.24b
If you want to make the change in your current version, this is the fix
around line 2300 in the OnKilled method in xmlpoints.cs
Code:// take points from the killed, either a fixed amount or scaled by the difference with the points of the killer // if the killer has fewer points than the killed then lose more XmlPoints xp = XmlAttach.FindAttachment(killer, typeof(XmlPoints)) as XmlPoints; if(xp != null) { killerpoints = xp.Points; [color=red] // add to the recently killed list xp.KillList.Add(new KillEntry(killed, DateTime.Now));[/color] }
and comment out this line in the OnKill method around line 1975
Code:// add to the recently killed list //KillList.Add(new KillEntry(killed, DateTime.Now));
koluch said:Excellent as always
Our players love the system.
I love the system AND it is a great way to learn more on coding and scripting things the right way.
Quick Question:
Is there a time period that players are grey after a duel?
Just want to be sure that is as intended and we did not miss something.
Many Thanks, Arte !
Koluch
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Customs/XML/XML Spawner 1/XmlSpawner2.cs:
CS0029: Line 9376: Cannot implicitly convert type 'System.Collections.ArrayL
ist' to 'System.Collections.Generic.List<Server.Tile>'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
public override bool CheckAccessibility(Item item, Mobile from)
{
if (item is Corpse)
{
// dont allow other players to loot corpses while a challenge game is present
if ((ChallengeGame != null) && !ChallengeGame.Deleted && (from != null) && !(((Corpse)item).Owner is BaseCreature) &&
(((Corpse)item).Owner != from) && (from.AccessLevel == AccessLevel.Player))
{
XmlPoints.SendText(from, 100105); // "You are not allowed to open that here."
return false;
}
}
return base.CheckAccessibility(item, from);
}