Real Line Of Sight!
Hallo,
Some days ago saw something in one shard that shocked me up! I was a "real" line of sight! Working! I mean - when you step into a room you don't see anyone outside! You walk out - and there they are! You don't see around the corner, but you can see through a window!
Now, I know the guy who did it. He's like "I'm the best programmer there is! I'm the first to did this! Noone else but me! Muhahaahah!". Needles to say he don't like to share . Even if that's only worth something in a RP shard and his is not one.
I'm not a good scripter, hell I'm not even an average scripter. I just mess with things and hope the best . But I'm gona try and do this if I can. At least now I know it can be done. In fact, the guy did it in one day, so I gues for someone with experience it's not a big deal. And I know there are lot of experianced guys in here, so I'm askin for your help.
By the way if you like to see how it works - IP: 217.30.220.10,2593 auto accounting is on (this is not an ad, I don't even like the shard).
The thing is - this can't be done without changeing the core. So I gues not many people would know how to go about it. But this is a chalenge and I hope there are some skillful programmers that will take it. Or at least help me do it. All I know is that it's worth the effort. And I would sure like to see this as part of the original core. Maybe optional?
So far I've found some code in Mobile.cs, that may have something to do with it:
Please help!
P.S. I just thought of something - isn't that guy required to share anything he made from the original source under the GPL terms?
Hallo,
Some days ago saw something in one shard that shocked me up! I was a "real" line of sight! Working! I mean - when you step into a room you don't see anyone outside! You walk out - and there they are! You don't see around the corner, but you can see through a window!
Now, I know the guy who did it. He's like "I'm the best programmer there is! I'm the first to did this! Noone else but me! Muhahaahah!". Needles to say he don't like to share . Even if that's only worth something in a RP shard and his is not one.
I'm not a good scripter, hell I'm not even an average scripter. I just mess with things and hope the best . But I'm gona try and do this if I can. At least now I know it can be done. In fact, the guy did it in one day, so I gues for someone with experience it's not a big deal. And I know there are lot of experianced guys in here, so I'm askin for your help.
By the way if you like to see how it works - IP: 217.30.220.10,2593 auto accounting is on (this is not an ad, I don't even like the shard).
The thing is - this can't be done without changeing the core. So I gues not many people would know how to go about it. But this is a chalenge and I hope there are some skillful programmers that will take it. Or at least help me do it. All I know is that it's worth the effort. And I would sure like to see this as part of the original core. Maybe optional?
So far I've found some code in Mobile.cs, that may have something to do with it:
Code:
public bool InLOS( Mobile target )
{
if ( m_Deleted || m_Map == null )
return false;
else if ( target == this || m_AccessLevel > AccessLevel.Player )
return true;
return m_Map.LineOfSight( this, target );
}
Code:
public virtual bool CanSee( object o )
{
if ( o is Item )
{
return CanSee( (Item) o );
}
else if ( o is Mobile )
{
return CanSee( (Mobile) o );
}
else
{
return true;
}
}
Please help!
P.S. I just thought of something - isn't that guy required to share anything he made from the original source under the GPL terms?