xFranko Posted December 21, 2025 Posted December 21, 2025 (edited) Hey guys I'm using v6609, I was playing with my NPCs a little I found out the Guild Controller has a note which says [Guild] I know that to get the correct lookface we multiply the NpcType by 10 so for this one it will be 1150 (0 to 9 for directions), mine is 1156 However, I found another npc in that npc.ini file and calculated the lookface from it and it was 33230, so I tried to add that npc to my npcs table but when I open the game I can't see the note, also it has a weird avatar on it? Here's my NpcSpawnInfo packet following https://gitlab.com/conquer-online/wiki/-/wikis/Packets/MsgNpcInfo using System; using MTA.Client; namespace MTA.Network.GamePackets { public class NpcSpawn : Writer, Interfaces.IPacket, Interfaces.INpc, Interfaces.IMapObject { private byte[] _buffer; public NpcSpawn(bool created = true) { if (!created) return; _buffer = new byte[36]; WriteUInt16(28, 0, _buffer); WriteUInt16(2030, 2, _buffer); WriteUInt32((uint)Time32.timeGetTime().GetHashCode(), 4, _buffer); // WriteUInt16(1, 22, Buffer); } public uint UID { get => BitConverter.ToUInt32(_buffer, 8); set => WriteUInt32(value, 8, _buffer); } public ushort X { get => BitConverter.ToUInt16(_buffer, 16); set => WriteUInt16(value, 16, _buffer); } public ushort Y { get => BitConverter.ToUInt16(_buffer, 18); set => WriteUInt16(value, 18, _buffer); } public ushort Mesh { get => BitConverter.ToUInt16(_buffer, 20); set => WriteUInt16(value, 20, _buffer); } public Game.Enums.NpcType Type { get => (Game.Enums.NpcType)_buffer[22]; set => _buffer[22] = (byte)value; } public string Name { get => _name; set { _name = value; byte[] buffer = new byte[90]; _buffer.CopyTo(buffer, 0); WriteUInt16((ushort)(buffer.Length - 8), 0, buffer); buffer[32] = 1; WriteStringWithLength(value, 33, buffer); _buffer = buffer; } } public _String Effect { get; set; } public ushort MapID { get; set; } public Game.MapObjectType MapObjType => Game.MapObjectType.Npc; public GameState Owner => null; public byte[] SpawnPacket; private string _name; public string effect { get; set; } public void SendSpawn(GameState client, bool checkScreen) { if (!client.Screen.Add(this) && checkScreen) return; client.Send(_buffer); if (effect != "") { client.SendScreen(new _String(true) { UID = UID, TextsCount = 22, Type = 10, Texts = { effect } }); } } public void SendSpawn(GameState client) { SendSpawn(client, false); if (effect != "") { client.SendScreen(new _String(true) { UID = UID, TextsCount = 22, Type = 10, Texts = { effect } }); } } public byte[] ToArray() { return _buffer; } public void Deserialize(byte[] buffer) { _buffer = buffer; } public void Send(GameState client) { SendSpawn(client, false); } } } Edited December 28, 2025 by xFranko Quote
xFranko Posted December 23, 2025 Author Posted December 23, 2025 is there a way to maybe attach the Note to the packet ? Quote
Konichu Posted December 23, 2025 Posted December 23, 2025 You're not respecting the ID ranges. NPCs are from 1 to 99999, Dynamic NPCs from 100000 to 199999 etc public const uint SysnpcidFirst = 1; public const uint SysnpcidLast = 99999; public const uint DynanpcidFirst = 100000; public const uint DynanpcidLast = 199999; public const uint SceneNpcMin = 200000; public const uint SceneNpcMax = 299999; public const uint MonsteridFirst = 400001; public const uint MonsteridLast = 499999; public const uint PetidFirst = 500001; public const uint PetidLast = 599999; public const uint CallpetidFirst = 700001; public const uint CallpetidLast = 799999; public const uint MapitemFirst = 800001; public const uint MapitemLast = 899999; public const uint MagictrapidFirst = 900001; public const uint MagictrapidLast = 989999; public const uint SystrapidFirst = 990001; public const uint SystrapidLast = 999999; public const uint PlayerIdFirst = 1000000; public const uint PlayerIdLast = 1999999999; Quote
xFranko Posted December 24, 2025 Author Posted December 24, 2025 (edited) On 12/23/2025 at 2:32 PM, Konichu said: You're not respecting the ID ranges. NPCs are from 1 to 99999, Dynamic NPCs from 100000 to 199999 etc public const uint SysnpcidFirst = 1; public const uint SysnpcidLast = 99999; public const uint DynanpcidFirst = 100000; public const uint DynanpcidLast = 199999; public const uint SceneNpcMin = 200000; public const uint SceneNpcMax = 299999; public const uint MonsteridFirst = 400001; public const uint MonsteridLast = 499999; public const uint PetidFirst = 500001; public const uint PetidLast = 599999; public const uint CallpetidFirst = 700001; public const uint CallpetidLast = 799999; public const uint MapitemFirst = 800001; public const uint MapitemLast = 899999; public const uint MagictrapidFirst = 900001; public const uint MagictrapidLast = 989999; public const uint SystrapidFirst = 990001; public const uint SystrapidLast = 999999; public const uint PlayerIdFirst = 1000000; public const uint PlayerIdLast = 1999999999; You're my superhero! Thank you, I didn't know there was this limitation! Mind if I ask please what is the difference between NPCs and Dynamic NPCs (are those the shop ones etc, or the ones that are sobnpcs and have a heal etc?) Edited December 24, 2025 by xFranko Quote
Konichu Posted December 26, 2025 Posted December 26, 2025 I don't think they have any difference, since dynamic npcs also have IDs below 100k and some npcs has some dynamic npc ids. You will have issues using Monster, Traps and Players IDs. Probably map item ids too. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.