Page 1 of 1

NPC Example

Posted: 16 Nov 2010, 17:34
by sidigrid
Hi OS Team,
I have been trying to implement an NPC which requires me to implement a custom Extension on the server side. But due to my limited knowledge in Eclipse and the language, I am finding it difficult to code one. It would greatly help the whole community if an example Extension can be posted.. Either by the OS team or anyone from the community. It would greatly help a lot of new comers..

ThankYou..

Regards,
Sid.

Posted: 17 Nov 2010, 07:26
by TiagoR
Hi
if you check your sfs install folder/examples you got there an NPC example, its a good place to start.

Re: NPC Example

Posted: 17 Nov 2010, 08:48
by Bax
sidigrid wrote:Hi OS Team,
I have been trying to implement an NPC which requires me to implement a custom Extension on the server side. But due to my limited knowledge in Eclipse and the language, I am finding it difficult to code one. It would greatly help the whole community if an example Extension can be posted.. Either by the OS team or anyone from the community. It would greatly help a lot of new comers..

ThankYou..

Regards,
Sid.
Check this document: at the bottom of the "Creating a custom extension" paragraph you will find a link to download an example of custom OpenSpace extension which shows how to create an NPC too.

Sending from Client to Server

Posted: 22 Nov 2010, 03:47
by sidigrid
Hi,
Sorry for being a noob..

I went through the extension code and it was good to understand..
How would I communicate from the client with the extension.

Lets say I am using the extension provided by you and I want to test if I am able to communicate with it. How do I send parameters from Client to Server.?

If it was a smartFox extension then I would have used smartFox.sendXtMessage("parameters");..Similarly how would I do it from client to the openSpace Extension?

Plz help out..

Posted: 22 Nov 2010, 08:12
by Bax
The OpenSpace extension IS a SmartFoxServer extension, so you communicate with it as you normally do with SmartFoxServer extensions.