Question

01/16/2009 14:03 Exia13#1
I know it's somewhere in Entites, but where exactly do i add the code that prevents GMs from being attacked by guards? Haven't look at code in months, it all looks like chicken scraths :p lol.

I'm back btw ^^. TY in advanced.
01/16/2009 16:03 Hoven#2
search for
if status 8

it should be there(not 100% sure, just guessing i would look in my C# but i dont have a computer working with it :P)
01/16/2009 19:16 yuko#3
search for this
-----------------------
public void GetTarget()
{
-----------------------
and ad this

-----------------------
if (MType == 1)//this is for the guard type
if (Target != null)
if (Target.MyClient.Status >= 7)//the character status
Target = null;
------------------------
01/16/2009 22:14 Exia13#4
Thanks for the advice but for some reason it didnt work lol. Don't worry, i'll figure it out later.
01/17/2009 04:10 Hoven#5
if (Target.MyClient.Status >= 7) should be
if (Target.MyClient.Status >= 8)

and it will work 7 is pm, 8 is gm
01/18/2009 13:25 yuko#6
hey hoven befor correcting lean some stuff
>=7 // if is = to 7 and higher
>=8 // same as 7 but then higher then 8 aswell and as fare as i know there is no higher status then 8 exept when you make one.
if you onely want to make it so that gms can attack guards and others can't you just do
== wich means exacly like

sorry for bad english
06/12/2009 15:32 WHITELIONX#7
public void TriggerMove()
{
int Distance = Info.AggroRange;
int CharToAttack = -1;
if(Distance > 14)
Distance = 14;
try
{
Monitor.Enter(Nano.ClientPool);
foreach(KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool)
{
ClientSocket Client = Clients.Value;
if((int)Client.Client.Map == Map)
{
if(Calculation.InRange(Client.Client.X, Client.Client.Y, X, Y, Distance))
{
if(Info.Name == "Guard")
{
if(Client.Client.Flashing)
{
CharToAttack = Client.Client.ID;
break;
}
}
else if(Info.Name == "Patrol")
{
if(Client.Client.PkPoints > 100)
{
CharToAttack = Client.Client.ID;
break;
}
}
else if(Info.Name == "Piglet")
{
//Nothing
}
else
{
CharToAttack = Client.Client.ID;
break;
}
}
}
}
}
catch(Exception e)

That`s what I have so how do I stop Guards from killing me when I revive?