Register for your free account! | Forgot your password?

You last visited: Today at 09:43

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE]Botjail 5165

Discussion on [RELEASE]Botjail 5165 within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
[RELEASE]Botjail 5165

Okay, i will release botjail for 5165.
I will recommend you to do the thing in
this thread first, because is required.



First go to chat.cs
and put the command for botjail.
Code:
                            if (Cmd[0] == "/botjail")
                            {
                                foreach (Character Char in World.H_Chars.Values)
                                {
                                    if (Char.Name == Cmd[1])
                                    {
                                        Char.Teleport(1021, 50, 50);
                                        GC.LocalMessage(2011, Char.Name + " Have been botjailed, hahahaha. His unaviable to move, jump, write or get write to, because his status will be set to afk. Goodluck bastard!");
                                        Char.AFK = true;
                                    }
                                }
                            }
                            if (Cmd[0] == "/release")
                            {
                                foreach (Character Char in World.H_Chars.Values)
                                {
                                    if (Char.Name == Cmd[1])
                                    {
                                        Char.Teleport(1002, 400, 400);
                                        GC.LocalMessage(2011, Char.Name + " Have been released from BotJail. Behave better next time!!");
                                        Char.AFK = false;
                                    }
                                }
                            }
Now go to WalkRun.cs and repalce the whole class with:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.PacketHandling
{
    public class WalkRun
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {
            if (GC.MyChar.AFK == true && GC.MyChar.Loc.Map == 1021)
            {
                GC.LocalMessage(2005, "YOU ARE BOTJAILED AND CAN'T MOVE");
                GC.MyChar.Teleport(1021, 50, 50);
            }
            else if (GC.MyChar.AFK == true)
            {
                GC.LocalMessage(2005, "YOU ARE AFK!!!!!!!!!! To get afk off write /afk");
                GC.MyChar.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.PreviousX, GC.MyChar.Loc.PreviousY);
            }
            else if (GC.MyChar.BuffOf(NewestCOServer.Features.SkillsClass.ExtraEffect.BlessPray).Eff == NewestCOServer.Features.SkillsClass.ExtraEffect.BlessPray && GC.MyChar.AFK == false)
                GC.MyChar.RemoveBuff(GC.MyChar.BuffOf(Features.SkillsClass.ExtraEffect.BlessPray));
            GC.MyChar.Mining = false;
            GC.MyChar.AtkMem.Attacking = false;
            GC.MyChar.Action = 100;
            Game.World.Action(GC.MyChar, Data);
            GC.MyChar.Direction = (byte)(Data[4] % 8);
            GC.MyChar.Loc.Walk((byte)(Data[4] % 8));
            Game.World.Spawns(GC.MyChar, true);
        }
    }
}
Then go to Jump.cs and replace the whole class with:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.PacketHandling
{
    public class Jump
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {
            if (GC.MyChar.AFK == true && GC.MyChar.Loc.Map == 1021)
            {
                    GC.LocalMessage(2005, "YOU ARE BOTJAILED AND CAN'T MOVE");
                    GC.MyChar.Teleport(1021, 50, 50);
                }
                else if (GC.MyChar.AFK == true)
                {
                    GC.LocalMessage(2005, "YOU ARE AFK!!!!!!!!!! To get afk off write /afk");
                    GC.MyChar.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.PreviousX, GC.MyChar.Loc.PreviousY);
                }
            if (GC.MyChar.BuffOf(NewestCOServer.Features.SkillsClass.ExtraEffect.BlessPray).Eff == NewestCOServer.Features.SkillsClass.ExtraEffect.BlessPray)
                GC.MyChar.RemoveBuff(GC.MyChar.BuffOf(Features.SkillsClass.ExtraEffect.BlessPray));
            GC.MyChar.Mining = false;
            GC.MyChar.AtkMem.Attacking = false;
            GC.MyChar.Action = 100;
            if (GC.MyChar.Loc.AbleToJump(BitConverter.ToUInt16(Data, 8), BitConverter.ToUInt16(Data, 10), GC.MyChar.StatEff.Contains(NewestCOServer.Game.StatusEffectEn.Cyclone) || GC.MyChar.StatEff.Contains(NewestCOServer.Game.StatusEffectEn.Ride)))
            {
                if (GC.MyChar.StatEff.Contains(NewestCOServer.Game.StatusEffectEn.Ride))
                {
                    if (GC.MyChar.Vigor >= 5)
                        GC.MyChar.Vigor -= 5;
                    else return;
                }
                Game.World.Action(GC.MyChar, Data);
                GC.MyChar.Loc.Jump(BitConverter.ToUInt16(Data, 8), BitConverter.ToUInt16(Data, 10));
                Game.World.Spawns(GC.MyChar, true);
            }
            else
            {
                GC.LocalMessage(2005, "Invalid Jump!");
                GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 0, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0x6c));
            }
        }
    }
}
Now open Teleport.cs and at the buttom put:
Code:
                if (GC.MyChar.Loc.Map == 1021)
                {
                    GC.MyChar.AFK = true;
                }
Now in program.cs find the command /exit.
replace it with:
Code:
                    if (Cmd[0] == "/exit")
                    {
                        Game.Character[] BaseCharacters = new Character[World.H_Chars.Count];
                        World.H_Chars.Values.CopyTo(BaseCharacters, 0);
                        NewestCOServer.Main.AuthWorker.Listener.Close();
                        NewestCOServer.Main.GameWorker.Listener.Close();
                        EndSession = true;
                        try
                        {
                            foreach (Game.Character C in BaseCharacters)
                            {
                                try
                                {
                                    if (C.Loc.Map == 1021)
                                    {
                                        C.Teleport(1021, 50, 50);
                                        C.MyClient.Disconnect();
                                        Console.WriteLine(C.Name + " has logged off successfuly.");
                                    }
                                    else
                                    {
                                        C.Teleport(1002, 400, 400);
                                        C.MyClient.Disconnect();
                                        Console.WriteLine(C.Name + " has logged off successfuly.");
                                    }
                                }
                                catch { continue; }
                            }
                        }
                        catch { }
                        Database.SaveKOs();
                        Console.WriteLine("KOs saved.");
                        Database.SaveEmpire();
                        Console.WriteLine("Empire saved.");
                        Features.Guilds.SaveGuilds();
                        Console.WriteLine("Guilds saved.");
                        Features.SkillsClass.Save();
                        Console.WriteLine("Skills saved.");
                        
                        MobThread.Close();
                        ServerStuff.Close();
                        CompanionThread.Close();
                        Database.Dispose();
                        Console.WriteLine("Database disposed.");
                        Console.WriteLine("Will close in 2Seconds.");
                        Thread.Sleep(2000);
                        Environment.Exit(0);
                    }
dats it.
Now you should have botjail.
use /botjail charname
to botjail a player
use /release charname
to release a player from botjail

Thanks, goodluck.
If you like, then a +thanks would be good :P
lol, take care.
.Summer is offline  
Thanks
2 Users
Old 05/16/2010, 05:18   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Bot jail has been released many times.
Maybe with not as much of the useless functions you have, but working botjails.
And another tip...
CharacterFromName
Arcо is offline  
Thanks
1 User
Old 05/16/2010, 05:26   #3
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
im just releasing the stuff im not using
peoples can fix them up if they want
.Summer is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[RELEASE]TDM 5165
01/31/2012 - CO2 PServer Guides & Releases - 54 Replies
Hello, i will show you how to create a team deathmatch tournament for your 5165server (tanels). What do you need? -The source -How to copy + paste :P Features: -First blood (Give +5points):P -4Teams (Red, Blue, Black, White) -Random choose team
[Release] Useless Botjail Command
05/05/2009 - CO2 PServer Guides & Releases - 7 Replies
Hello this is my first release so this might be nooby but it works.. This is for LOTF based servers I don't use LOTF or Binaries (Never Did) Anymore so I am releasing some of my codes! but here is the command I coded this myself: if (Splitter == "/botjail") { foreach (DictionaryEntry DE in World.AllChars) { ...
[Release]Botjail Command
03/11/2009 - CO2 PServer Guides & Releases - 7 Replies
Hello this is my first release so this might be nooby but it works.. This is for LOTF based servers but here is the command I coded this myself: if (Splitter == "/botjail") { foreach (DictionaryEntry DE in World.AllChars) { Character Char = (Character)DE.Value; ...



All times are GMT +2. The time now is 09:43.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.