Mirage Source
http://www.miragesource.net/forums/

[BUG]Safe Zones...
http://www.miragesource.net/forums/viewtopic.php?f=193&t=4548
Page 1 of 1

Author:  Nean [ Tue Oct 14, 2008 7:54 am ]
Post subject:  [BUG]Safe Zones...

So, I nulled out the check to see if the attacker was admin, or if the victim was admin, therefore making it possible for Admins to PK and be PK'd. However, when I went to attack my other char, it said that I couldn't attack in a safe zone. I was in the default map, and I checked the properties, and there was no map moral, selected.... Any ideas?

Author:  Vahz [ Tue Oct 14, 2008 11:41 am ]
Post subject:  Re: [BUG]Safe Zones...

teh problem is this one..
Code:
If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE Or GetPlayerPK(Victim) = NO Then


this will make all non-pk player cannot be attacked

replace it with this
Code:
If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE And GetPlayerPK(Victim) = NO Then

Author:  GIAKEN [ Tue Oct 21, 2008 7:45 pm ]
Post subject:  Re: [BUG]Safe Zones...

No that's not a bug...it's suppose to be like that. If they are in a safe zone or the player they are trying to attack isn't a PKer then it says it's a safe zone. If they aren't in a safe zone and the player they are trying to attack is a PKer then continue on with the attack.

Author:  Nean [ Tue Oct 21, 2008 7:47 pm ]
Post subject:  Re: [BUG]Safe Zones...

GIAKEN wrote:
No that's not a bug...it's suppose to be like that. If they are in a safe zone or the player they are trying to attack isn't a PKer then it says it's a safe zone. If they aren't in a safe zone and the player they are trying to attack is a PKer then continue on with the attack.


But then theres only two morals: Safe Zone, and None. In none, you should be able to attack someone... right?

Author:  GIAKEN [ Tue Oct 21, 2008 7:51 pm ]
Post subject:  Re: [BUG]Safe Zones...

Yes and that's what it does...

Author:  Nean [ Tue Oct 21, 2008 7:58 pm ]
Post subject:  Re: [BUG]Safe Zones...

GIAKEN wrote:
Yes and that's what it does...


Yes, but in a map with no moral, you still cannot attack someone. So it's impossible to attack someone at all.

Author:  GIAKEN [ Tue Oct 21, 2008 8:13 pm ]
Post subject:  Re: [BUG]Safe Zones...

Try this:

Code:
' Check if map is attackable
    If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE Then
        If GetPlayerPK(Victim) = NO Then
            Call PlayerMsg(Attacker, "This is a safe zone!", BrightRed)
            Exit Function
        End If
    End If


Delete the old If statement and replace with that.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/