Entity call an NPC Dialog

07/15/2014 00:15 hyperco#1
Hello fellas,

Would like to know if someone know a way to make an Entity like a guard (for instance) calls a dialog...

I think a simple solution is trigger an action when the entity get clicked (I think there's no packet sent when an entity is clicked), but I'm wondering to know how to do that...

Any idea?
Thanks for the help...
07/15/2014 02:24 abdoumatrix#2
i think u had to edit the client and make it be invoked

ConquerPS project have done it.
07/15/2014 02:57 hyperco#3
Quote:
Originally Posted by abdoumatrix View Post
i think u had to edit the client and make it be invoked

ConquerPS project have done it.
Are you sure this is the way they've did it?
07/15/2014 03:37 Aceking#4
I believe you need to hook the client as abdou said.

Some other members may have other ideas, but the only other thing I can think of is to have some sort of event trigger which then sends the npc dialog packet.
When you kill a mob for example.
07/15/2014 04:09 hyperco#5
Quote:
Originally Posted by Aceking View Post
I believe you need to hook the client as abdou said.

Some other members may have other ideas, but the only other thing I can think of is to have some sort of event trigger which then sends the npc dialog packet.
When you kill a mob for example.
I thinked about it, but i need do call a dialog when it's already dead or alive, i even considerated the possibility to do it with an attack packet but no success...

PS: I am not sure they did hooked the client I'm studying client files...
07/15/2014 05:29 Spirited#6
You could just copy the model you want into the NPC model folder, and create an entry in npc.ini that uses that model. It won't work well for player entities, since they'll be naked and all, but it would be a decent solution to your problem.
07/15/2014 06:26 hyperco#7
Quote:
Originally Posted by Spirited View Post
You could just copy the model you want into the NPC model folder, and create an entry in npc.ini that uses that model. It won't work well for player entities, since they'll be naked and all, but it would be a decent solution to your problem.
The problem is that i don't want to make a static npc, but I would like to move it like a player running through a pre-setted way...
And NPCs doesn't do the walk/run movement.
07/15/2014 06:39 Spirited#8
Quote:
Originally Posted by hyperco View Post
The problem is that i don't want to make a static npc, but I would like to move it like a player running through a pre-setted way...
And NPCs doesn't do the walk/run movement.
You can do it the Blizzard way... despawn the npc and spawn an entity in its place to make movements and other actions... then spawn the npc back in and despawn the entity. I would look in my source to see if there were any NPC flags that would have a similar effect, but with it not being set up currently while I program my new source, I can't really do that. I don't think there's anything of that effect.
07/15/2014 06:48 hyperco#9
Quote:
Originally Posted by Spirited View Post
You can do it the Blizzard way... despawn the npc and spawn an entity in its place to make movements and other actions... then spawn the npc back in and despawn the entity.
Good idea. The other way I've found was to spawn an invisible npc that moves together with entity. I will test both. Thanks btw...
07/15/2014 15:38 abdoumatrix#10
Quote:
Originally Posted by hyperco View Post
The problem is that i don't want to make a static npc, but I would like to move it like a player running through a pre-setted way...
And NPCs doesn't do the walk/run movement.
Npc can walk and jump but they it floating way not like the players

i think u could study thier Hook.dll it sure have all what u want :D


Quote:
Originally Posted by Spirited View Post
You can do it the Blizzard way... despawn the npc and spawn an entity in its place to make movements and other actions... then spawn the npc back in and despawn the entity. I would look in my source to see if there were any NPC flags that would have a similar effect, but with it not being set up currently while I program my new source, I can't really do that. I don't think there's anything of that effect.
successed with me in making the statue system but with normal npc failed
as the client wont respond on clicking on them.
07/16/2014 01:42 hyperco#11
Quote:
Originally Posted by abdoumatrix View Post
Npc can walk and jump but they it floating way not like the players

i think u could study thier Hook.dll it sure have all what u want :D
That's why I opted to make an invisible NPC , the entity will move and the NPC will be wherever entity is...

I will study the hook and the method they do for sure.

Quote:
Originally Posted by abdoumatrix View Post
Npc can walk and jump but they it floating way not like the players

i think u could study thier Hook.dll it sure have all what u want :D
That's why I opted to make an invisible NPC , the entity will move and the NPC will be wherever entity is...

I will study the hook and the method they do for sure.
07/16/2014 01:54 OverKillasdwqe#12
here is what i think
if you are good enough to RE conquer ps hook.dll (which i don't think it would be there, will tell you why in a sec) then you should be good enough to go the strres (i think it stands for string resources) from the client, there is 2 strings that should get you pretty close to that which goes something like "hold ctrl to attack guard", "you can't pk in this mode" and some other one i dun remember
that should get you really close enough to the routine where it checks if it's entity or npc to proceed check for pk/ctrl or to send chat packet
then an inline patch would just do the trick to check for different range for entities to proceed chat packet to them too
which is why i think a simple inline patch should be more appropriate vs doing it with loader, that's why i think you may not find this one at there loader

but the idea to spawn a mesh less npc every time an entity move is just too stupid and expensive (unless you have a very fancy vps hosting, but it will still be stupid imo)
07/16/2014 02:44 hyperco#13
Quote:
Originally Posted by OverKillasdwqe View Post
here is what i think
if you are good enough to RE conquer ps hook.dll (which i don't think it would be there, will tell you why in a sec) then you should be good enough to go the strres (i think it stands for string resources) from the client, there is 2 strings that should get you pretty close to that which goes something like "hold ctrl to attack guard", "you can't pk in this mode" and some other one i dun remember
that should get you really close enough to the routine where it checks if it's entity or npc to proceed check for pk/ctrl or to send chat packet
then an inline patch would just do the trick to check for different range for entities to proceed chat packet to them too
which is why i think a simple inline patch should be more appropriate vs doing it with loader, that's why i think you may not find this one at there loader

but the idea to spawn a mesh less npc every time an entity move is just too stupid and expensive (unless you have a very fancy vps hosting, but it will still be stupid imo)

To be honest i don't know the difference it will cause by choosing edit the Conquer.exe (or the dll where it is) or hooking the client. The result may be the same...

About that idea, it will be always the same NPC, the spawn will only change it's location, and to do it will always be only one packet that changes it's spawn location... Think it will not overload the server. I'm testing it right now...
07/16/2014 03:19 OverKillasdwqe#14
Quote:
Originally Posted by hyperco View Post
To be honest i don't know the difference it will cause by choosing edit the Conquer.exe (or the dll where it is) or hooking the client. The result may be the same...

About that idea, it will be always the same NPC, the spawn will only change it's location, and to do it will always be only one packet that changes it's spawn location... Think it will not overload the server. I'm testing it right now...
about the idea, you are testing it on one npc and entity, not on 100
so yeah you will be generating double the packets you need, im not saying it's fatal but with stacking stuff like this every once in a while you will end up with something like messi sources
also what if user clicked before/after the npc moves on the entity ?

and i for one won't hook something that i could simple achieve with an inline assembly as ill only do it once (instead of every time the client loads) to avoid hooking problems , searching for patterns also would be not as easy to leech, it's just not worthy imo
07/16/2014 04:07 hyperco#15
Quote:
Originally Posted by OverKillasdwqe View Post
about the idea, you are testing it on one npc and entity, not on 100
so yeah you will be generating double the packets you need, im not saying it's fatal but with stacking stuff like this every once in a while you will end up with something like messi sources
also what if user clicked before/after the npc moves on the entity ?
The entity contains a Dead flag so you cant click it, so it will do nothing when you dont click the npc...

Quote:
Originally Posted by OverKillasdwqe View Post
and i for one won't hook something that i could simple achieve with an inline assembly as ill only do it once (instead of every time the client loads) to avoid hooking problems , searching for patterns also would be not as easy to leech, it's just not worthy imo
That is sad, cuz I fail to crack it, or even to hooking thats why I'll try to study the ConquerPS Method.