Jump to content
  • 0
Sign in to follow this  
Kid BaKa

how I can add new gm command to my server

Question

GOod day

I want know how I can add new command to my server
For example let us say I want make @localrecall

And I want recall all player on my map
from where I can do it?

Edited by Mhalicot
Moved to General Server Support

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

First, you need to add the actual code inside src/map/atcommand.c, along with adding command to the list in the bottom of it. Plugin is a good (and even better imo) alternative to editing src files. Then you recompile (or compile and activate plugin), and edit conf/groups.conf to make the command accessible by players/GMs. That's pretty much it.

Share this post


Link to post
Share on other sites
  • 0

you can also use  bindatcmd  like this

-	script	asdfjkl	-1,{OnInit:	bindatcmd "localrecall", strnpcinfo(0)+"::Onwarp",60,99;	end;Onwarp:	getmapxy(.@m$,.@x,.@y,0);	mapwarp .@m$,.@m$,.@x,.@y;	end;}

Share this post


Link to post
Share on other sites
  • 0

Yep, you can add some atcommands via script if the scripting language is powerful enough (which in most cases is). But beware these command scripts won't appear anywhere on the @commands list of available commands.

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
Answer this question...

×   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.