NosSmooth.Packets
3.6.0
dotnet add package NosSmooth.Packets --version 3.6.0
NuGet\Install-Package NosSmooth.Packets -Version 3.6.0
<PackageReference Include="NosSmooth.Packets" Version="3.6.0" />
paket add NosSmooth.Packets --version 3.6.0
#r "nuget: NosSmooth.Packets, 3.6.0"
// Install NosSmooth.Packets as a Cake Addin #addin nuget:?package=NosSmooth.Packets&version=3.6.0 // Install NosSmooth.Packets as a Cake Tool #tool nuget:?package=NosSmooth.Packets&version=3.6.0
Work in progress
This library is work in progress, currently only some parts are finished, see issue #19 to track the progress. This README may contain some information that aren't done yet. I've tried to make these parts crossed out. I've included them so it's clear what this library is for.
NosSmooth
A multi-platform library with an interface for NosTale packets, data, game state and such.
Can be used for local (injected) as well as remote (clientless) bots.
The library is splitted into multiple assemblies to allow for
using only specific features. Bots that can be both locally
and remotely can be implemented that way using the same code base.
For local-specific libraries see NosSmooth.Local.
How to use
All of the packages are on NuGet. Search for NosSmooth.
There is not a full documentation, but there are some samples and the
library methods and objects are documented.
You can find the samples in Samples
folder in this repository,
NosSmooth.Local repository and
NosSmooth.Remote repository.
Projects that use NosSmooth
- Rutherther/NosSmooth.Local A set of libraries used for injecting into a running NosTale instance, hooking some functions and reading memory
- Rutherther/NosSmooth.Comms A set of libraries used for communicating with a NosTale project using named pipes or tcp. Uses NosSmooth.Local
- Rutherther/NosTale-PacketLogger A standalone packet logger that may open and filter packet files or connect to a running NosTale instance using named pipes
- Rutherther/NosTale-Anonymizer A CLI used for changing names and ids inside of logged packets to make the contents anonymous, untraceable, but keep them consistent
Features
Data
NosTale data can be retrieved either using .NOS files or a sqlite3 database.
The database can be created by starting NosSmooth.Data.CLI
with arguments migrate {NostaleDataDirectoryPath}
.
Currently only translations and data about skills, items and monsters are stored.
The migration will migrate all languages NosTale supports.
See the sample DataBrowser
for more details about the usage.
Packets
NosTale packets are located inside of NosSmooth.Packets
.
Serializers and deserializers are generated using source generators.
The source generator is located in NosSmooth.PacketSerializersGenerator
.
Serializing the packets may be done using NosSmooth.PacketSerializer
.
Core (Low level)
The core contains abstractions for the NosTale client, packets and commands. You can register your packet responders (IPacketResponder) that will be called by the client when there is a new packet of the given type.
If there is an unknown packet, UnresolvedPacket
will be created
and can be handled by the user. If there is other parsing error,
ParsingFailedPacket
will be created and can be handled.
Game state (High level)
The game state is built using the core, it stores useful information about the state
such as the current map, entities, information about the current character, mates, skills, family, group.
The game project also has custom events that contain more information
than packets would. In some cases, there would be no gain in information,
for these packets there is no event and a packet responder should be registered instead.
It uses NosTale data for a few features, so setting up the data provider
is required. If no provider is found, an exception will be thrown
as ILanguageService
and IInfoService
will not be found.
Extensions
Combat
Attacks entities, players using techniques that execute operations.
See SimpleAttackTechnique
for example on how to make a technique.
Simple technique just attacks one target by walking to it and using skills
from a skill selector.
Pathfinding
Finds paths on NosTale maps using A* algorithm.
May take (walk) the given path, using WalkCommand
in the process.
Will support walking through more maps in the future.
Commands
The library uses commands for features that may be implemented differently on local and remote bots. For examples, walking on local client is done calling the walk function on the client, whereas on the remote client just packets have to be sent directly.
- TakeControlCommand
- Makes sure there is just one command in the given group running at the same time
- Useful for operations that do not support two simultaneous states such as walking.
- For local client this can also disable the users controls or be cancelled upon user making any action
- Everything stated here can be configured and should be clear from the documentation of the constructor members
- WalkCommand
- Uses PlayerWalkCommand and PetWalkCommand
- PetSelectors specify the indices of the pets the player has and should be moved to the specified position
- This is a TakeControlCommand
- Used for walking in straight lines
- IMPORTANT: doesn't support obstacles, pathfinding mechanism must be used
- AttackCommand
- This is a TakeControlCommand
- Usually a long-running command that controls the client, walks, kills entities
NosSmooth.Combat.Extensions
usesAttackCommand
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- NosSmooth.PacketSerializer.Abstractions (>= 1.3.1)
-
net7.0
- NosSmooth.PacketSerializer.Abstractions (>= 1.3.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on NosSmooth.Packets:
Package | Downloads |
---|---|
NosSmooth.Core
NosSmooth Core library allowing implementing nostale client, handling packets and commands. |
|
NosSmooth.PacketSerializer
NosSmooth's packet string serializer implementation. |
|
NosSmooth.Extensions.Combat
Manages NosSmooth combat state, currently exposing a simple technique to kill one enemy at a time. |
|
NosSmooth.Comms.Abstractions
Package Description |
|
NosSmooth.ChatCommands
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.6.0 | 1,060 | 2/13/2023 |
3.5.1 | 1,656 | 1/31/2023 |
3.5.0 | 860 | 1/21/2023 |
3.4.4 | 1,278 | 1/18/2023 |
3.4.3 | 294 | 1/17/2023 |
3.4.2 | 475 | 1/17/2023 |
3.4.0 | 643 | 1/15/2023 |
3.3.3 | 420 | 1/15/2023 |
3.3.2 | 291 | 1/15/2023 |
3.3.1 | 430 | 1/15/2023 |
3.3.0 | 283 | 1/14/2023 |
3.2.0 | 620 | 1/14/2023 |
3.1.0 | 668 | 1/8/2023 |
3.0.0 | 630 | 1/5/2023 |
2.3.4 | 325 | 1/1/2023 |
2.3.3 | 291 | 1/1/2023 |
2.3.2 | 544 | 1/1/2023 |
2.3.1 | 689 | 12/31/2022 |
2.2.1 | 983 | 2/19/2022 |
2.2.0 | 406 | 2/18/2022 |
2.1.1 | 1,546 | 2/13/2022 |
2.1.0 | 943 | 2/12/2022 |
2.0.0 | 430 | 2/3/2022 |
1.0.1 | 1,237 | 1/31/2022 |
1.0.0 | 935 | 1/27/2022 |
Add missing ptctl fields.