Example #1
0
        private void Script_UDP_SEND(string inp)
        {
            string st = Get_String(ref inp);
            string sp1 = Get_String(ref inp);
            string sp2 = Get_String(ref inp);
            string sp3 = Get_String(ref inp);
            string sp4 = Get_String(ref inp);

            ScriptVariable p1 = Get_Var(sp1);
            ScriptVariable p2 = Get_Var(sp2);
            ScriptVariable p3 = Get_Var(sp3);
            ScriptVariable p4 = Get_Var(sp4);

            NetPacket np = new NetPacket();

            np.Type = (uint)NetPacketType.Script;
            np.Sender = Globals.gamedata.my_char.Name;
            np.SenderID = Globals.gamedata.my_char.ID;
            np.Name = st;
            np.Param1 = System.Convert.ToInt32(p1.Value);
            np.Param2 = System.Convert.ToInt32(p2.Value);
            np.Param3 = System.Convert.ToInt32(p3.Value);
            np.Param4 = System.Convert.ToInt32(p4.Value);

            NetCode.NetSend(np.GetBytes());
        }
Example #2
0
        public static void SendStatus(NetPacket np)
        {
            np.Sender   = Globals.gamedata.my_char.Name;
            np.SenderID = Globals.gamedata.my_char.ID;

            NetCode.NetSend(np.GetBytes());
        }
Example #3
0
        public static void SendSelfStatus()
        {
            //TODO - need to update this to include pet info...
            NetPacket np = new NetPacket();

            np.Type     = (uint)NetPacketType.Update;//regular old status update
            np.Sender   = Globals.gamedata.my_char.Name;
            np.SenderID = Globals.gamedata.my_char.ID;
            np.Name     = np.Sender;
            np.ID       = np.SenderID;
            np.MaxCP    = (uint)Globals.gamedata.my_char.Max_CP;
            np.CurCP    = (uint)Globals.gamedata.my_char.Cur_CP;
            np.MaxHP    = (uint)Globals.gamedata.my_char.Max_HP;
            np.CurHP    = (uint)Globals.gamedata.my_char.Cur_HP;
            np.MaxMP    = (uint)Globals.gamedata.my_char.Max_MP;
            np.CurMP    = (uint)Globals.gamedata.my_char.Cur_MP;

            NetCode.NetSend(np.GetBytes());
        }
Example #4
0
        private void Script_UDP_SENDBB(string inp)
        {
            string sp1 = Get_String(ref inp);

            ScriptVariable p1 = Get_Var(sp1);

            NetPacket np = new NetPacket();

            np.Type = (uint)NetPacketType.ScriptBB;
            np.Sender = Globals.gamedata.my_char.Name;
            np.SenderID = Globals.gamedata.my_char.ID;
            np.BBuff = ((ByteBuffer)p1.Value);

            NetCode.NetSend(np.GetBytes());
        }
Example #5
0
        public static void SendStatus(NetPacket np)
        {
            np.Sender = Globals.gamedata.my_char.Name;
            np.SenderID = Globals.gamedata.my_char.ID;

            NetCode.NetSend(np.GetBytes());
        }
Example #6
0
        public static void SendSelfStatus()
        {
            //TODO - need to update this to include pet info...
            NetPacket np = new NetPacket();
            np.Type = (uint)NetPacketType.Update;//regular old status update
            np.Sender = Globals.gamedata.my_char.Name;
            np.SenderID = Globals.gamedata.my_char.ID;
            np.Name = np.Sender;
            np.ID = np.SenderID;
            np.MaxCP = (uint)Globals.gamedata.my_char.Max_CP;
            np.CurCP = (uint)Globals.gamedata.my_char.Cur_CP;
            np.MaxHP = (uint)Globals.gamedata.my_char.Max_HP;
            np.CurHP = (uint)Globals.gamedata.my_char.Cur_HP;
            np.MaxMP = (uint)Globals.gamedata.my_char.Max_MP;
            np.CurMP = (uint)Globals.gamedata.my_char.Cur_MP;

            NetCode.NetSend(np.GetBytes());
        }