COD Build r0.01 Build 3 [COD,V26,Mysql,CSharp]

Status
Not open for further replies.

Zak

Posting Freak
Mar 12, 2011
847
453
Right, here another version with huge updates.

Updates:
New Kick Fighting [Using Kick button to shoot]
Code:
     case "A_": // Kick user
                            {

                                if (Room == null || roomUser == null || _inPublicroom || _hasRights == false || CODLobby.Open == false || CODLobby.STime == 0)
                                    return;

                                    string Target = currentPacket.Substring(2);
                                    if (userManager.containsUser(Target) == false)
                                        return;

                                    virtualUser _Target = userManager.getUser(Target);
                                    if (_Target._roomID != _roomID)
                                        return;
                                   // Shooting starts here.
                                   int TargetHealth = Call_Of_Duty_Core.Health().GetHealth(userID);
                                   int XP = Call_Of_Duty_Core.XP().GetXP(userID);
                                   Call_Of_Duty_Core.Game().Lobby = new List<bool>();

                                   if (Call_Of_Duty_Core.Attachment().CheckIfUserHasFMJ() == true)
                                   {
                                       Call_Of_Duty_Core.Health().TakeAwayHealth(TargetHealth - 16);
                                   }
                                   else if (Call_Of_Duty_Core.Attachment().CheckIfUserHasSilencer() == true)
                                   {
                                       Call_Of_Duty_Core.Health().TakeAwayHealth(TargetHealth - 14);
                                   }
                                   else if (Call_Of_Duty_Core.Attachment().CheckIfUserHasNoFMJOrSilencer() == true)
                                   {
                                       Call_Of_Duty_Core.Health().TakeAwayHealth(TargetHealth - 15);
                                   }
                                   Call_Of_Duty_Core.XP().UpdateXP(userID);
                                break;
                            }
Thor Pathfinder!!!
(credits to Matty13 for he's edit of it)
Code:
Coord CurrentPos = new Coord(roomUser.X, roomUser.Y);
Coord Goal = new Coord(roomUser.goalX, roomUser.goalY);
List<PathFinderNode> Route = mPathfinder.FindPath(CurrentPos, Goal);

else // Next steps found by pathfinder
                            {
                                PathFinderNode NextStep = User.Path[0];
                                User.Path.Remove(NextStep);
                                int nextX = NextStep.X;
                                int nextY = NextStep.Y;
                                squareState nextState = sqSTATE[nextX, nextY];

                                sqUNIT[roomUser.X, roomUser.Y] = false; // Free last position, allow other users to use that spot again
                                sqUNIT[nextX, nextY] = true; // Block the spot of the next steps
                                roomUser.Z1 = (byte)Rotation.Calculate(roomUser.X, roomUser.Y, nextX, nextY); // Calculate the users new rotation
                                roomUser.Z2 = roomUser.Z1;
                                roomUser.statusManager.removeStatus("sit");
                                roomUser.statusManager.removeStatus("lay");

                                double nextHeight = 0;
                                if (nextState == squareState.Rug) // If next step is on a rug, then set user's height to that of the rug [floating stacked rugs in mid-air, petals etc]
                                    nextHeight = sqITEMHEIGHT[nextX, nextY];
                                else
                                    nextHeight = (double)sqFLOORHEIGHT[nextX, nextY];

                                // Add the walk status to users status manager + add users whole status string to stringbuilder
                                roomUser.statusManager.addStatus("mv", nextX + "," + nextY + "," + nextHeight.ToString().Replace(',', '.'));
                                _statusUpdates.Append(roomUser.statusString + Convert.ToChar(13));

                                // Set new coords for virtual room user
                                roomUser.X = nextX;
                                roomUser.Y = nextY;
                                roomUser.H = nextHeight;
                                if (nextState == squareState.Seat) // The next steps are on a seat, seat the user, prepare the sit status for next cycle of thread
                                {
                                    roomUser.statusManager.removeStatus("dance"); // Remove dance status
                                    roomUser.Z1 = sqITEMROT[nextX, nextY]; // 
                                    roomUser.Z2 = roomUser.Z1;
                                    roomUser.statusManager.addStatus("sit", sqITEMHEIGHT[nextX, nextY].ToString().Replace(',', '.'));
                                }
                                else if (nextState == squareState.Bed)
                                {
                                    roomUser.statusManager.removeStatus("dance"); // Remove dance status
                                    roomUser.Z1 = sqITEMROT[nextX, nextY]; // 
                                    roomUser.Z2 = roomUser.Z1;
                                    roomUser.statusManager.addStatus("lay", sqITEMHEIGHT[nextX, nextY].ToString().Replace(',', '.'));
                                }
                            }
                        }

New Command Handling from Aleeda
(credits to Alex and me for editing so can be invoked for Holograph emulator)
Code:
                         /* Orginally Coded By Alex (Quackster) */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using Holo.Source.Call_Of_Duty_Plugin.Main;
using Holo.Virtual.Users;
using Holo.Managers;

namespace Holo.Source.Aleeda_Plugin.Command_Handling
{
    class Commands
    {
        public List<String> Command;
        private string[] args;
        private string command;
        private StringBuilder Response;
        private CallOfDutyCore Core;
        private virtualUser User;
        public Commands()
        {
            Command = new List<String>();
            Response = new StringBuilder(0);

            string[] arr = { "ha" };

            foreach (string command in arr)
            {
                Command.Add(command);
            }
        }
        public bool BoolCommand(string command)
        {
            string[] args = command.Split(' ');
            if (Command.Contains(args[0]))
            {
                this.args = args;
                this.command = command;

                MethodInfo Info = typeof(Commands).GetMethod(args[0]);
                Info.Invoke(this, null);
            }
            return true;
        }
        #region Commands
        private void ha()
        {
            if (rankManager.HasRight(User._Rank, "fuse_administrator_access") == false)
            {
                string Message = command.Substring(3);
                string Username = User._Username;
                userManager.sendData("BK" + stringManager.getString("scommand_hotelalert") + "\r" + Message + "\r" + " - " + Username);
            }
            else
            {
                User.sendData("BK" + "You don't have rights to this command!");
            }
        }
        #endregion
    }
}
What's to come?
Modified COD packets classes.
Like Specbar

DJ.UpdateInfo();
DJ.ShowResaults();
etc
Also using the tv screen packet for Kill cams!

Release r0.01 Build 3:
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901
Nice one, hope to see this continued ;]
 
Status
Not open for further replies.

Users who are viewing this thread

Top