sprintf(cmd, "egrep -ch \"^Vnum %d\" ../player/* | gawk \'{ s += $1 }; END { print s }\' > sum.txt", vnum); |
sprintf(cmd, "egrep -ch \"^Vnum %d\" ../player/* | gawk \'{ s += $1 }; END { print s }\' > sum.txt", vnum); |
|
MPStatus command for MobprogsThis snippet allows you to store and read state in Mobprogs. In mob_prog.c add this define...
In fn_keyword[] add this...
In cmd_eval() near the end after case CHK_GRPSIZE: add...
Add the following to the CHAR_DATA structure in merc.h
Add an entry to mob_cmd_table[] in mob_cmds.c
Add this routine or similar to mob_cmds.c
Get it working and now your mprogs have the capability to save and query state. The following fight trigger is an example of usage:
|