NPC commands to show user count etc...

Mu online season 21 - grand opening

Bon

Legend
Legendary
Jul 29, 2004
6,741
342
330
Kent, UK
Any1 got a NPC script that shows the user count / highest mc online / highest level online etc etc


i had 1 but it didnt work lol just gave m2 errors, so guessin wasnt the right things

thx much love as always <3 x
 

Elvin

Golden Oldie
Golden Oldie
May 14, 2003
1,155
1
175
middlesex
thats not as easy as you may think to show highest stats you need lots of work doin on that sort of thing.
your script was possibly right but to show mc sc dc level etc from player it needs to be able to connect to ur db i believe to gain access to show players whats what you can show the time and the and when you logged in and minutes youve been ingame but server stats is a bit more complicated. (for the life of me i cant remember where i saw info on this ) there was some posts a while back telling you how its done but i cant find em atm but if i do i will post links or you could search for yourself :P .
 
Upvote 0

jewjewbee

Dedicated Member
Dedicated Member
May 5, 2007
99
2
35
QUOTED FROM KONI ON ANOTHER THREAD
[@main]
#say
hello <$USERNAME> welcome to the info npc\
there are currently <$USERCOUNT> players online.\
Would you like to know the highest players stats ?\ \
<yes/@next> - <no/@exit>\ \

[@next]
This information only counts the people currently logged on: \ \
<$HIGHLEVELINFO>\ \
<Back/@main> - <Thanks/@exit>\\

this is for td's files, i dont know if it is on the normal dm2 files

ok so thats a basic script for it, the command <$HIGHLEVELINFO> takes info from the string file, seach the string file (ctrl +F) and search for MyInfo=

after this you need to have this text:
HighPlayer %name, Location %map Level %level Dc %mindc-%maxdc Mc %minmc-%maxmc Sc%minsc-%maxsc

so now the sting like should look like:
MyInfo=HighPlayer %name, Location %map Level %level Dc %mindc-%maxdc Mc %minmc-%maxmc Sc%minsc-%maxsc

save the string file, the change will take effect after a reboot

you can remove the bits from it like %level etc if you dont want it to be displayed you can add your own text in so you could have "highestplayer %name etc etc, but remember the display on the game screen will not add a return it will just send the text accross the screen it wont go to a new line etc

hope this makes sence

koni
 
Upvote 0

koni

V.I.P
VIP
Mar 14, 2006
1,111
1
165
Southampton UK
the string file in the m2server folder needs some info after (myinfo=) as indicated above:

this is what mine displays:

MyInfo=HighPlayer %name, Level %level

you can add more as posted above.

the npc that reads this and displays the relevent info is scripted as this:

[@main]
Server info:\
The server has been online for: <$SERVERRUNTIME>\
The current date and time: <$DATETIME>\
There are currently <$USERCOUNT> players online\
\\
<HighPlayerinfo/@hpinfo> - <ShowmyPKpoints/@showpk>\

[@showpk]
Hi <$USERNAME> you currently have <$PKPOINT> pk points\ \
<exit/@exit>\

[@hpinfo]
This information will only display online players.\
<$HIGHLEVELINFO>\ \
<back/@main>\


thats the script, the HIGHLEVELINFO will read the info thats entered in the string myinfo= the more you add the more it will display, please note this will only read and display info from none admin / gamemaster chars, anyone with permissions above standard will not be displayed, so if your testing this offline you wil need to log in a none gm char, and then at the same time a gm char and then click the npc it will then display the details of the none gm char thats online.

if you are trying to do it with just your gm char online it will say no players found or no player online or something

the script works 100%

cheers.
 
Last edited:
Upvote 0

Jambo

Mir 2 Moderator
Staff member
Moderator
Dec 9, 2006
1,660
411
170
West Midlands
[@main]
Server info:\
The server has been online for: <$SERVERRUNTIME>\
The current date and time: <$DATETIME>\
There are currently <$USERCOUNT> players online\
\\
<HighPlayerinfo/@hpinfo> - <ShowmyPKpoints/@showpk>\

[@showpk]
Hi <$USERNAME> you currently have <$PKPOINT> pk points\ \
<exit/@exit>\

[@hpinfo]
This information will only display online players.\
<$HIGHLEVELINFO>\ \
<back/@main>\
 
Upvote 0