Author Topic: Server commands, reload NPC  (Read 972 times)

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Server commands, reload NPC
« on: August 18, 2007, 12:20:21 pm »
This is what the server console shows when requesting help. this is a comprehesive list of commands the server supports at the current status.

Code: [Select]
   15464 -- Server commands     ------------------------------------------------.
   15464 dbprofile      shows database profile info.
   15464 exec           Executes a script file.
   15464 help           Show help information.
   15464 kick           Kick player from the server.
   15464 loadmap                Loads a map into the server.
   15464 lock           Tells server to stop accepting connections.
   15464 maplist                List all mounted maps.
   15464 dumpwarpspace  Dump the warp space table.
   15464 netprofile     shows network profile info.
   15464 quit           Makes the server exit.
   15464 ready          Tells server to start accepting connections.
   15464 sectors                Display all sectors.
   15464 set            Sets a server variable.
   15464 setlog         Set server log.
   15464 setmaxfile     Set maximum message class for output file.
   15464 setmaxout      Set maximum message class for standard output.
   15464 settime                Sets the current server hour using a 24 hour clock.
   15464 showlogs       Show server logs.
   15464 spawn          Loads a map into the server.
   15464 status         Show server status.
   15464 transactions   Performs an action on the transaction history (run without parameters for options).
   15464 -- NPC commands        ------------------------------------------------.
   15464 exportdialogs  Loads NPC dialogs from the DB and stores them in a XML file.
   15464 exportnpc      Loads NPC data from the DB and stores it in a XML file.
   15464 importdialogs  Loads NPC dialogs from a XML file or a directory and inserts them into the DB.
   15464 importnpc      Loads NPC data from a XML file or a directory and inserts it into the DB.
   15464 loadnpc                Loads/Reloads an NPC from the DB into the world.
   15464 loadquest      Loads/Reloads a quest from the DB into the world.
   15464 newacct                Create a new account: newacct <user/passwd>.
   15464 -- Player commands     ------------------------------------------------.
   15464 addinv         Add an item to a player's inventory.
   15464 adjuststat     Adjust player stat [HP|HP_max|HP_rate|Mana|Mana_max|Mana_rate|Stamina|Stamina_max|Stamina_rate].
   15464 charlist       List all known characters.
   15464 delete         Delete a player from the database.
   15464 dict           Dump the NPC dictionary.
   15464 kill           kill <playerID> Kills a player.
   15464 progress       progress <player>,<event/script>.
   15464 questreward    Preforms the same action as when a player gets a quest reward.
   15465 say            Tell something to all players connected.
   15465 showinv                Show items in a player's inventory.
   15465 showinvf       Show items in a player's inventory (more item information).
   15465 -- Various commands    ------------------------------------------------.
   15465 entlist                List all known entities.
   15465 factions       Display factions.
   15465 filtermsg      Add or remove messages from the LOG_MESSAGE log.
   15465 liststats      List player stats.
   15465 motd           motd <msg> Sets the MOTD.
   15465 print          Displays debug data about a specified entity.
   15465 rain           Forces it to start or stop raining in a sector.
   15465 randomloot     Generates random loot.
   15465
   15465 PS Server:


What I extremely interested right now are the following commands:

Code: [Select]
   15464 -- NPC commands        ------------------------------------------------.
   15464 exportdialogs  Loads NPC dialogs from the DB and stores them in a XML file.
   15464 exportnpc      Loads NPC data from the DB and stores it in a XML file.
   15464 importdialogs  Loads NPC dialogs from a XML file or a directory and inserts them into the DB.
   15464 importnpc      Loads NPC data from a XML file or a directory and inserts it into the DB.
   15464 loadnpc                Loads/Reloads an NPC from the DB into the world.
   15464 loadquest      Loads/Reloads a quest from the DB into the world.

....

   15464 progress       progress <player>,<event/script>.

Can any of the devs please expand and explain?

I for one haven't managed to load anything from the database on the fly. loadnpc is a complete mystery... all my attempts to use it failed.

*edited to add*

I also opened another thread related to this one in the Wishlist section, which poses a simple question. Can I reload data from the database on the fly? - not requiring a server restart?

Engine request - reload data from the database from scripts
« Last Edit: August 18, 2007, 12:36:46 pm by Ralleyon »
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

ThomPhoenix

  • Testers
  • Forum Addict
  • *
  • Posts: 2678
  • A Phoenix, what'd you expect?
    • View Profile
Re: Server commands, reload NPC
« Reply #1 on: August 19, 2007, 07:18:38 am »
Try this: importnpc /this/data/npcbehave.xml
I think that most of these commands are used by the web console though, by settings team. To add and edit NPCs.
We're not evil. We're simply amazing.

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: Server commands, reload NPC
« Reply #2 on: August 19, 2007, 11:59:01 am »
I will, thanks for the idea! :)

I believe the Settings team uses the serverconsole tool tough, through which they can edit all the required data in the DB. However, as I saw stated in many of the posts, all changes are pending a server restart, which in effect is related to my second question - ability to load data on the fly.

I wonder if the loadnpc actually does that on the fly - although this requires access to the console of the box. And most importantly, if these actions can be scripted.
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

ThomPhoenix

  • Testers
  • Forum Addict
  • *
  • Posts: 2678
  • A Phoenix, what'd you expect?
    • View Profile
Re: Server commands, reload NPC
« Reply #3 on: August 19, 2007, 02:53:34 pm »
Serverconsole, webconsole, whatever you like to call it.

I know importnpc works on the fly, but loadnpc I'm not sure of. Try it yourself, or ask a dev on IRC.
We're not evil. We're simply amazing.