[help]Allowing and disabling PKing

07/01/2009 07:41 ~RapidBlade~#1
Hey everyone, i know i already posted this, but now i have gotten further and further into my PK Event so i figure this would be most useful now since no one helped last time lol... I use a LOTF Source

This is what i did to make it not able to pk in a map until i command or the timer allows it, but it didnt work:

Other.CS
Code:
public static bool NoPK(ushort Map)
        {
            bool Rt = false;

            foreach (ushort map in DataBase.NoPKMaps)
            {
                if (map == Map || map == World.PKCity && World.StartPK == false)
                {
                    Rt = true;
                    break;
                }
            }
            return Rt;
        }
        public static bool CanPK(ushort Map)
        {
            bool Rt = false;

            foreach (uint map in DataBase.PKMaps)
            {
                if (map == Map || map == World.PKCity && World.StartPK == true)
                {
                    Rt = true;
                    break;
                }
            }
            return Rt;
        }
As you see i added World.PKCity && World.StartPK == true to that coding, and i also changed in database.cs:
Code:
public static ushort[] NoPKMaps = new ushort[] { 1002, 1039, 1036, 1010, 500, 1004, 700, World.PKCity};
        public static ushort[] PKMaps = new ushort[] { 1038, 1005, 6000, 1080, 1090, 1018, World.PKCity};
If any1 could tell me what i missed or help me figure out a problem with what i did, id really appreciate it =) thanks!

REMEMBER: THIS IS A LOTF SOURCE!!!! LOTF CODING ONLY!


~Rapid
07/01/2009 08:38 _tao4229_#2
if (Splitter[0] == "/allowpk")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character char = DE.Value as Character;
char.PKMode = 1;
}
}
07/01/2009 16:29 0105653642#3
is that working with CoEmu v2
07/01/2009 16:39 ~RapidBlade~#4
Eh, got a bunch of errors trying that, ones that really made no sence... thanks for trying tho
07/01/2009 19:17 ~RapidBlade~#5
Bump (sorry)