private static void SetupUser1() { Client.Send(NFriendAddMessage.ById(NakamaManager.Instance.Session.Id), b => { }, ErrorHandler); var builder = new NGroupCreateMessage.Builder("Thanksgiving"); builder.Description("Turkey eating at my house!"); builder.Lang("en"); Client.Send(builder.Build(), b => { }, ErrorHandler); }
public void Sit() { State.IsSitted = !State.IsSitted; if (State.IsSitted) { State.SitStartTime = Environment.TickCount; NClient.Send("ILS1000"); } else { int regenerated = (int)(Environment.TickCount - State.SitStartTime) / 1000; int missing = Stats.GetStat(StatEnum.MaxLife).Total - Life; if (regenerated > missing) { regenerated = missing; } NClient.Player.Life += regenerated; NClient.Send("ILF" + regenerated); NClient.Send("ILS360000"); } }
private void LevelUp() { if (this.Level == Entities.Requests.LevelsRequests.MaxLevel()) { return; } if (Exp >= Entities.Requests.LevelsRequests.ReturnLevel(Level + 1).Character) { while (Exp >= Entities.Requests.LevelsRequests.ReturnLevel(Level + 1).Character) { if (this.Level == Entities.Requests.LevelsRequests.MaxLevel()) { break; } Level++; SpellPoint++; CharactPoint += 5; } if (IsConnected) { NClient.Send(string.Concat("AN", Level)); } SpellsInventary.LearnSpells(); SendChararacterStats(); } }
private void btnSend_Click(object sender, EventArgs e) { string message = tbxText.Text; if (message != "") { Nclient.Send(message); } tbxText.Text = ""; }
public void TeleportNewMap(int _mapID, int _cell) { NClient.Send(string.Format("GA;2;{0};", ID)); GetMap().DelPlayer(this); var map = Entities.Requests.MapsRequests.MapsList.First(x => x.Model.ID == _mapID); MapID = map.Model.ID; MapCell = _cell; LoadMap(); }
public void LoadMap() { if (Entities.Requests.MapsRequests.MapsList.Any(x => x.Model.ID == this.MapID)) { var map = Entities.Requests.MapsRequests.MapsList.First(x => x.Model.ID == this.MapID); NClient.Send(string.Format("GDM|{0}|{1}|{2}", map.Model.ID, map.Model.Date, map.Model.Key)); if (this.State.IsFollow) { foreach (var character in this.State.Followers) { character.NClient.Send(string.Format("IC{0}|{1}", GetMap().Model.PosX, GetMap().Model.PosY)); } } } }
public void SendPods() { NClient.Send(string.Format("Ow{0}|{1}", Pods, Stats.GetStat(StatEnum.MaxPods).Total)); }
public void SendChararacterStats() { NClient.Send(string.Concat("As", this.ToString())); }