Jump to content
Sign in to follow this  
Poison

getserverinfo()

Recommended Posts

 

// Server name, use alternative character such as ASCII 160 for spaces.
// NOTE: Do not use spaces or any of these characters which are not allowed in 
//       Windows filenames /:*?"<>|
//       ... or else guild emblems won't work client-side!
server_name: Hercules
 
// Type of server.
// No functional side effects at the moment.
// Displayed next to the server name in the client.
// 0=normal, 1=maintenance, 2=over 18, 3=paying, 4=P2P
char_maintenance: 0
 
// Start point, Map name followed by coordinates (x,y)
start_point: dicastes01,196,46

 

*getserverinfo(<type>)

 

0 - Server Name.

1 - Character Maintenance.

2 - Starting Point Map.

 

//Other stuffs to consider:

IP Address

Server Peak (Max Online Players)

Add more here

 

Sample Script:

 

 

if (getserverinfo(0) == "Hercules") { disablenpc "Kafra"; }

 

 

 

Just my thought, what do you think guys?

Edited by Poison

Share this post


Link to post
Share on other sites

Any importance of this?

Server name and ip address of server seems to be little good for some scripts, but that can't be a reason to implement on repo, well, I just support for servername and ip

Share this post


Link to post
Share on other sites

Any importance of this?

Server name and ip address of server seems to be little good for some scripts, but that can't be a reason to implement on repo, well, I just support for servername and ip

 

Thank you for your response.

 

One purpose is able to support multi-server. Instead of disabling npcs at conf file, you can have a seperate txt file with disablenpc functions. Some npc or function text files have more than 1 npc, thus disabling a file will disable everything

 

In conclusion, this can be a  convenient method of manipulating npcs.

Edited by Poison

Share this post


Link to post
Share on other sites

Any importance of this?

Server name and ip address of server seems to be little good for some scripts, but that can't be a reason to implement on repo, well, I just support for servername and ip

 

i don't see why

as long as people can create a PR about it and tested by core devs and got merged its fine

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.