Full Version : gaining points.
xmlspawner >>XMLPoints Discussion >>gaining points.
<< Prev | Next >>
ambak- 01-26-2006
i want to disable gaining points from 1vs1 challenge game.how can i do it arte?
ArteGordon- 01-26-2006
do you mean 1v1 duels?
in xmlpoints.cs around line 2054, add the line in red

QUOTE
public bool CanAffectPoints(Mobile from, Mobile killer, Mobile killed, bool assumechallenge) { // uncomment this for newbie protection //if( ((killed.SkillsTotal < 6000 && (killer.SkillsTotal - killed.SkillsTotal ) > 1000) || //(killed.RawStatTotal <= 200 && (killer.RawStatTotal - killed.RawStatTotal) > 20 ) ) && m_Challenger != killer && m_Challenger != killed) return false;
// check for within guild kills and ignore them if this has been disabled
if(!AllowWithinGuildPoints && SameGuild(killed,killer)) return false;
// check for within team kills and ignore them
if(AreTeamMembers(killer, killed)) return false;
// are the players challengers?
bool inchallenge = false;
if((from == killer && m_Challenger == killed) || (from == killed && m_Challenger == killer))
{
inchallenge = true;
return false;
}

ambak- 01-26-2006
thanks arte my last question is when will you update the xmlpoints
i am waiting for a new update everyday
will there any new games in the new release or can you tell us what will be the new features
ArteGordon- 01-26-2006
I will add the current changelog to the XmlPoints updates post.
No timetable on release yet. Just busy with other things.
ambak- 01-26-2006
i readed the chancelog these modifications are just fine thank you very much arte and thanks for giving my name (okyzan) in there but wont be any new game?
a soccer game for example is very good
ArteGordon- 01-26-2006
interesting idea
ambak- 01-26-2006
if you are interested in soccer game , here is my soccer ball you can use and develop it

CODE
using System; using Server; using Server.Mobiles; using Server.Items; using Server.Targeting;
namespace Server.MyQuests
{
// -------------------------------------------------------------------------------------------------------------------------
public class SoccerBall : Item
{
[Constructable]
public SoccerBall() : base( 0x2256 )
{
Movable = false;
Name = "Ball";
Weight = 5.0;
}
public override void OnDoubleClick( Mobile from )
{
from.Target = new TopTarget( this );
}
public SoccerBall( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
public class TopTarget : Target
{
private static Item m_Item;
public TopTarget( Item item ) : base( -1, true, TargetFlags.None )
{
m_Item = item;
}
protected override void OnTarget( Mobile from, object o )
{
IPoint3D merkez = o as IPoint3D;
Point3D loc = new Point3D( merkez.X, merkez.Y, merkez.Z );
if ( !from.InRange( m_Item.GetWorldLocation(), 1 ) )
from.SendLocalizedMessage( 500446 ); // That is too far away.
else
m_Item.MoveToWorld( loc, from.Map);
}
}
}
}

ArteGordon- 01-26-2006
thanks.