NPC packet

03/22/2014 18:55 szymek111#1
Hello guys . I have one question . Does someone know packet for spawning npc ? Or do i need to spawn them in any other way ?
03/22/2014 19:03 Guiso90#2
mh
Login on Official Nostale(with packetlogger) and you have the packets
03/22/2014 19:25 Paint3r#3
in 2 310 5118597 79 5 5 50 50 0 0 0 -1 1 0 -1 - 0 -1 0 0 0 0 0 0 0 0

This is the packet

vnum

coordinates


direction

Hp

falling from sky 1 = no 2 = yes
03/22/2014 19:38 szymek111#4
And what is this ? 5118597
03/22/2014 19:45 Paint3r#5
Quote:
Originally Posted by szymek111 View Post
And what is this ? 5118597
The id if u spawn 5118597 and u want a second npc then use 5118598 and forward this
03/23/2014 13:12 szymek111#6
I dont know what's wrong in this code . It's like mob spawn in nosfun files .

Code:
int spawnnpc(SOCKET *accetta, std::string n_npc, std::string hp, int client, int numeronemici){
	numeronemici += 1;
	npcstruct[numeronemici].x_npc = pstruct[client].x, npcstruct[numeronemici].y_npc = pstruct[client].y, npcstruct[numeronemici].ingame = true, npcstruct[numeronemici].hp_npc = hp, npcstruct[numeronemici].id_npc = intostr(numeronemici + 1500), npcstruct[numeronemici].n_npc = n_npc, npcstruct[numeronemici].maxhp_npc = hp, npcstruct[numeronemici].map_npc = pstruct[client].map;
	std::string spawnnpc = EncryptGamePacket("in 2" + npcstruct[numeronemici].n_npc + " " + npcstruct[numeronemici].id_npc + " " + npcstruct[numeronemici].x_npc + " " + npcstruct[numeronemici].y_npc + " 5 " + npcstruct[numeronemici].hp_npc + " 50 0 0 0 -1 1 0 -1 - 0 -1 0 0 0 0 0 0 0 0");
	for (int i = 0; i <= utenti; i++) if (npcstruct[numeronemici].map_npc == pstruct[i].map) send(accetta[i], spawnnpc.c_str(), spawnnpc.size(), 0);
	std::cout << numeronemici << std::endl;
	std::cout << npcstruct[numeronemici].id_npc << std::endl;
	return numeronemici;
}
03/24/2014 02:04 Kingrap#7
Quote:
Originally Posted by Paint3r View Post
in 2 310 5118597 79 5 5 50 50 0 0 0 -1 1 0 -1 - 0 -1 0 0 0 0 0 0 0 0

This is the packet

vnum

coordinates


direction

Hp

falling from sky 1 = no 2 = yes
There is also another packet first of it, shop and something if i remember ^^
04/02/2014 16:46 Paint3r#8
Quote:
Originally Posted by Kingrap View Post
There is also another packet first of it, shop and something if i remember ^^
Nah shop is a new packet

shop 2 8737 1 0 45 NosBasar