how I can add new gm command to my server

Kid BaKa

New member
Messages
33
Points
0
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?

 
Last edited by a moderator:
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.

 
you can also use  bindatcmd  like this

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

so thanks Garr

Angelmelody

I understand I can make script to add some commands?!

 
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.

 
Back
Top