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;
Code:
if (Cmd[0] == "/dc") { GC.Disconnect(); return; }
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 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) {
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 { } }
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)); } } } }
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); } } }
But what does it really do?
PHP Code:
-You can't move or jump, when set afk
-You can't write, when set afk
-You can't get messages, when set afk
Other players can't:¨
-Write to you, when set afk
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