NPC functions to JS......Please!?
Posted: Fri Jun 29, 2007 3:09 pm
The players on my shard had an interesting request: Use the pet commands to create mercenaries.
Here is how I would implement it, one would be easy, the other would take a bit more work:
1- Treat an NPC as a packhorse. Export a function from C++ to .js that allows the PC to treat the NPC as a packhorse. Give the NPC all the AI functions that the pet has, IE, transfer, stay follow, etc. The only function that probably should NOT be included is RENAME.
2- This would be ideal, but I think it would require a bit more coding. Since NPCs can also be "outfitted" by GMs, allow the owning "PC" to equip via the paperdoll like the GM his hired mercenary. That would be ideal, but may require some more programming. If someone has time to do the C++ coding for this, it would be appreciated.
Thanks for your help, any other tips would be great. Once the functions are exported to .js I think I can code up a mercenary script to allow for the hiring of mercenaries with my limited knowlege of .js.
Thanks!
Here is how I would implement it, one would be easy, the other would take a bit more work:
1- Treat an NPC as a packhorse. Export a function from C++ to .js that allows the PC to treat the NPC as a packhorse. Give the NPC all the AI functions that the pet has, IE, transfer, stay follow, etc. The only function that probably should NOT be included is RENAME.
2- This would be ideal, but I think it would require a bit more coding. Since NPCs can also be "outfitted" by GMs, allow the owning "PC" to equip via the paperdoll like the GM his hired mercenary. That would be ideal, but may require some more programming. If someone has time to do the C++ coding for this, it would be appreciated.
Thanks for your help, any other tips would be great. Once the functions are exported to .js I think I can code up a mercenary script to allow for the hiring of mercenaries with my limited knowlege of .js.
Thanks!