Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 05:03

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

Advertisement



[RELEASE]Fully Working AFK System 5165

Discussion on [RELEASE]Fully Working AFK System 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]Fully Working AFK System 5165

Hello Elitepvpers.
I will start release things again.
I released a tdm for not long time ago, but
now i will release a fully working afk system.
If you are smart enough you can convert it with my anti bot thing.

First go to Character.cs and search for: public ulong VP;
under it put:
Code:
        public bool AFK;
Now open your Chat.cs and find:
Code:
                    if (Cmd[0] == "/dc")
                    {
                        GC.Disconnect();
                        return;
                    }
under it put:
Code:
                    if (Cmd[0] == "/afk")
                    {
                        if (GC.MyChar.AFK == false)
                        {
                            GC.LocalMessage(2000, "You are now set as AFK and you won't get effected by the anti bot system. You can't walk or jump! write /afk again to get afk off");
                            GC.MyChar.AFK = true;
                        }
                        else
                        {
                            GC.LocalMessage(2000, "You are not AFK more, feel free to walk and jump!");
                            GC.MyChar.AFK = false;
                        }
                    }
Now you can go afkon & afkoff
now we will need to make it set you afk.
First go to World.cs
and find:
Code:
        public static void Chat(Character C, ushort Type, string From, string To, string Message)
        {
replace the whole methode with:
Code:
public static void Chat(Character C, ushort Type, string From, string To, string Message)
        {
            try
            {
                if (C.AFK == true)
                {
                    C.MyClient.LocalMessage(2000, "You can't write while you are afk!!.");
                }
                else if (Type == 2000 || Type == 2104)
                {
                    foreach (Character CC in H_Chars.Values)
                        if (C != CC && CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 13))
                        {
                            CC.MyClient.AddSend(Packets.ChatMessage(CC.MyClient.MessageID, From, To, Message, Type, C.Mesh));
                        }
                }
                else if (Type == 2021)
                {
                    foreach (Character CC in H_Chars.Values)
                        if (C != CC)
                        CC.MyClient.AddSend(Packets.ChatMessage(CC.MyClient.MessageID, From, To, Message, Type, C.Mesh));
                }
                else if (Type == 2001)
                {
                    Character C2 = CharacterFromName(To);
                    if (C2 != null && C2.AFK == false)
                    {
                        C.MyClient.AddSend(Packets.ChatMessage(C2.MyClient.MessageID, From, To, Message, Type, C.Mesh));
                        C2.MyClient.AddSend(Packets.ChatMessage(C2.MyClient.MessageID, From, To, Message, Type, C.Mesh));
                        if (C2 != null)
                            C.MyClient.AddSend(Packets.SpawnViewed(C2, 2));
                    }
                    else
                    {
                        C.MyClient.LocalMessage(2000, "Character " + To + " is not online or doesn't exist. He could be set to AFK also.");
                    }
                }
                else if (Type == 2009)//Friend
                {
                    foreach (Friend F in C.Friends.Values)
                        if (F.Online)
                        {
                            F.Info.MyClient.AddSend(Packets.ChatMessage(C.MyClient.MessageID, From, To, Message, Type, 0));
                        }
                }
                else if (Type == 2004)//Guild
                {
                    if (C.MyGuild != null)
                        C.MyGuild.GuildMsg(Packets.ChatMessage(C.MyClient.MessageID, From, To, Message, Type, 0), C.EntityID);
                }
                else if (Type == 2003)
                    if (C.MyTeam != null)
                        C.MyTeam.Message(C, Packets.ChatMessage(C.MyClient.MessageID, From, To, Message, Type, 0x7d3));

            }
            catch { }
        }
Now 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.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));
            }
        }
    }
}
And then go to WalkRun.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 WalkRun
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {
            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);
        }
    }
}
Thats it, now you got an afk system for your server.
But what does it really do?
PHP Code:
-You can't move or jump, when set afk
-You can'
t writewhen set afk
-You can't get messages, when set afk

Other players can'
t:¨
-Write to youwhen set afk 
Why could you use this?
If you are afk in twincity and alot noobs are spamming you.
Then you can use this to set your self afk, so you won't get messages.
Also, if you are gm/pm you can use it, so you won't get spammed.

I hope you like.
If you do, i would appriciate a +thanks
Thanks, thats it.
Have a nice day
.Summer is offline  
Thanks
6 Users
Old 05/16/2010, 02:06   #2
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Can you make me something, make a command called @nowhisperson makes it so nobody can whisper you ( only for GMS and PMS ) and then @nowhispersoff makes it so people can whisper you that way if you login to quickly test something you get spammed by noobs but this time when they try to send a message to you it says "Cannot sent message" XD Thanks.
MonstersAbroad is offline  
Old 05/16/2010, 03:53   #3
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
Quote:
Originally Posted by MonstersAbroad View Post
Can you make me something, make a command called @nowhisperson makes it so nobody can whisper you ( only for GMS and PMS ) and then @nowhispersoff makes it so people can whisper you that way if you login to quickly test something you get spammed by noobs but this time when they try to send a message to you it says "Cannot sent message" XD Thanks.
ill do tomorrow
.Summer is offline  
Old 05/16/2010, 12:31   #4
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Someone on msn asked me if they want to tell me how I can do it so just to let all of you know I can do that command and make it work in about 2 minutes it was just an idea.
MonstersAbroad is offline  
Old 05/16/2010, 14:19   #5
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
okay, then i dont want.
and yea is an easy command.
is 1 check in chattypes
1 bool in character.cs

and then a command to set on/off
.Summer is offline  
Old 05/16/2010, 14:40   #6
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
Quote:
Originally Posted by MonstersAbroad View Post
Can you make me something, make a command called @nowhisperson makes it so nobody can whisper you ( only for GMS and PMS ) and then @nowhispersoff makes it so people can whisper you that way if you login to quickly test something you get spammed by noobs but this time when they try to send a message to you it says "Cannot sent message" XD Thanks.
Or you just code in the chat options where you can enable/disable whisper,talk,team etc etc
_Emme_ is offline  
Thanks
1 User
Old 05/16/2010, 15:00   #7
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Theres chat options lol ?
MonstersAbroad is offline  
Old 05/16/2010, 15:07   #8
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
yea, in world.cs
the chatoptions is the one i use in my thread.
search for:
public static void Chat(Character C, ushort Type, string From, string To, string Message)
in world.cs
.Summer is offline  
Old 05/16/2010, 15:56   #9
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
No I thought he ment like a new option in real co lol
MonstersAbroad is offline  
Old 05/16/2010, 16:51   #10
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
ah, i think he meant that, when i think over :P
.Summer is offline  
Reply


Similar Threads Similar Threads
[Release] 5165 Warehouses Auth System
04/01/2011 - CO2 PServer Guides & Releases - 18 Replies
this is just a simple Auth system for warehouses. It will ask for password (set from WHGuardian) each time players will open their warehouse. Attempt limit is not included in this release... btw; with this release, warehouseGuardian will now save the password in Character file. here are the screenshots: http://img408.imageshack.us/img408/6986/98867182. jpg Click The Image to see more screen shots 1. Go to NPCDialog.cs and search for this code: public static void...
[Release] Flower System (5165)
09/25/2010 - CO2 PServer Guides & Releases - 71 Replies
Heya! Mostly complete... just figure a way to save it on your server.... ScreenShots: http://img98.imageshack.us/img98/1949/164947279.j pg http://img714.imageshack.us/img714/5372/64922998. jpg http://img59.imageshack.us/img59/1025/64930238.jp g
[Re-Release] Fully Working Autopatch GUI
06/21/2010 - CO2 PServer Guides & Releases - 17 Replies
Hello ppl im re releasing the Autopatcher from AcmeOnline {Eudemons} It works on any Patch! Simple Setup. (asked the Creator and im allowed to release it for ya guys here) Acme Elite Online presents: Autopatch Server 3.0
[RELEASE]Anti bot system 5165
06/15/2010 - CO2 PServer Guides & Releases - 15 Replies
Here is an simple anti bot system. Credits goes to Arco for the npc send thing :) First go to MyThreads.cs and find: interval = Interval; T = new Thread(new ThreadStart(Run)); T.Start();
[Release]NPC system 5165 simplified
05/10/2010 - CO2 PServer Guides & Releases - 14 Replies
//



All times are GMT +2. The time now is 05:03.


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.