private static void Share(LoginReply data, bool isClientless) { if (data != null) { if (data.Result == 1) { Metadata.Globals.session = data.Session; if (isClientless) { ThreadProxy.ProxyClientless.SetAgentRemoteEndPoint(data.AgentRemoteEP); ThreadProxy.ProxyClientless.StartAgent(); } else { ThreadProxy.Proxy.SetAgentRemoteEndPoint(data.AgentRemoteEP); var agentLocalEP = ThreadProxy.Proxy.GetAgentLocalEndPoint(); var packet = GeneratePacket.LoginReply(data.Result, data.Session, agentLocalEP.Address.ToString(), (ushort)agentLocalEP.Port); ThreadProxy.Proxy.SendPacketToGatewayLocal(packet); ThreadProxy.Proxy.StartAgent(); } } } }
private static void Share(string data, bool isClientless) { if (string.IsNullOrEmpty(data)) { return; } byte local = Metadata.Configs.ClientConfig.Locale; uint version = Metadata.Configs.ClientConfig.Version; if (data == "GatewayServer") { if (isClientless) { var packet = GeneratePacket.AcceptConnect(local, version); ThreadProxy.ProxyClientless.SendPacketToGatewayRemote(packet); } } else if (data == "AgentServer") { if (isClientless) { var user = Metadata.Configs.LoginConfig.Username; var pass = Metadata.Configs.LoginConfig.Password; var packet = GeneratePacket.LoginRequest(local, user, pass, Metadata.Globals.session); ThreadProxy.ProxyClientless.SendPacketToAgentRemote(packet); // difference: this seds the packts that came from client to the server(remote) } } }
static void timerWaitingCastedSkill_Elapsed(object sender, EventArgs e) { //Views.BindingFrom.WriteLine("[timerWaitingCastedSkill_Elapsed] call [Character.GetNextSkillTrain] => request cast skill"); timerWaitingCastedSkill.Stop(); timerWaitingCastedSkill.Enabled = false; Packet packet = new Packet(0x7074); uint objectId = _mobId; var nextSkill = Globals.Character.GetNextSkillTrain(); if (nextSkill != null && nextSkill.ID > 0) { if (nextSkill.UsingType != 2) { Views.BindingFrom.WriteLine("[timerWaitingCastedSkill_Elapsed] Request BuffSkill :" + nextSkill.Name + "|" + nextSkill.ID + "|" + nextSkill.TemporaryID); packet = GeneratePacket.BuffSkill(nextSkill.ID); } else { Views.BindingFrom.WriteLine("[timerWaitingCastedSkill_Elapsed] Request AttackSkill :" + nextSkill.Name + "|" + nextSkill.ID + "|" + nextSkill.TemporaryID); packet = GeneratePacket.AttackSkill(nextSkill.ID, objectId); } } else { Views.BindingFrom.WriteLine("[timerWaitingCastedSkill_Elapsed] Request AttackNormal "); packet = GeneratePacket.AttackNormal(objectId); } ThreadProxy.Proxy.SendPacketToAgentRemote(packet); }
private static void Share(Image data, bool isClientless) { if (isClientless) { var p = GeneratePacket.SubmitCaptcha("1"); ProxyClientless.SendPacketToGatewayRemote(p); } }
internal static void AutoUsingZerk() { if (_status != BotStatus.Start) { return; } if (Globals.Character.Zerk == 5 && Configs.IsAutoZerk) { Packet packet = GeneratePacket.Berserk(); ThreadProxy.Proxy.SendPacketToAgentRemote(packet); } }
private static void Share(List <Server> data, bool isClientless) { if (data != null & data.Count > 0) { Views.BindingFrom.BindingServerCombobox(data); if (isClientless) { var locale = Configs.ClientConfig.Locale; var user = Configs.LoginConfig.Username; var pass = Configs.LoginConfig.Password; var p = GeneratePacket.LoginServer(locale, user, pass, data[0].ID); ProxyClientless.SendPacketToGatewayRemote(p); } } }
internal static void AutoIncreaseStatPoint() { if (_status != BotStatus.Start) { return; } if (Configs.IncreaseStatPointType == IncreaseStatPointType.FullStrength) { Packet packet = GeneratePacket.IncreaseStrength(); ThreadProxy.Proxy.SendPacketToAgentRemote(packet); } else if (Configs.IncreaseStatPointType == IncreaseStatPointType.FullIntellect) { Packet packet = GeneratePacket.IncreaseIntellect(); ThreadProxy.Proxy.SendPacketToAgentRemote(packet); } }
/// <summary> /// <para>From: _0xB072_BuffDell</para> /// </summary> /// <param name="tempId"></param> public static void RepeatBuffSkill(uint tempId) { if (_status != BotStatus.Start) { return; } //if (!timerWaitingCastedSkill.Enabled) //{ Packet packet = new Packet(0x7074); var skill = Globals.Character.GetSkillTrainByTempId(tempId); if (skill != null && skill.UsingType != 2) { //Views.BindingFrom.WriteLine("RepeatBuffSkill :" + skill.Name); packet = GeneratePacket.BuffSkill(skill.ID); ThreadProxy.Proxy.SendPacketToAgentRemote(packet); } //} }
private void btnLoginServer_Click(object sender, EventArgs e) { uint serverId = Convert.ToUInt32(cboLoginServer.SelectedValue); var locale = Configs.ClientConfig.Locale; var user = Configs.LoginConfig.Username; var pass = Configs.LoginConfig.Password; var p = GeneratePacket.LoginServer(locale, user, pass, serverId); if (chkClientless.Checked) { ProxyClientless.SendPacketToGatewayRemote(p); } else { Proxy.SendPacketToGatewayRemote(p); } grpLogin.Enabled = false; }
private void btnStartZerk_Click(object sender, EventArgs e) { Packet packet = GeneratePacket.Berserk(); SroBasic.Controllers.ThreadProxy.Proxy.SendPacketToAgentRemote(packet); }