mrlongshen 22 Posted March 21, 2016 Hi all. When player type @commands, it will show what we have config in group.conf right ? How to add additional display custom command in there ? at the bottom below of the original. For example: Custom command ---- buff,rms,ii2,jump2 Quote Share this post Link to post Share on other sites
0 Cretino 48 Posted March 27, 2016 To add the custom commands to '@commands', you'll have to make a change in the source, if you want do to in script, you have to create a command using the function 'bindatcmd' (see more in 'doc/script_commands.txt') and put your custom commands. If you want the source modification example. Here is: atcommand.c.patch Sorry for my english, I only understand a little of english. 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted March 27, 2016 @@Cretino WOW that cool ! its require source editing. How about scripting ? can u make it ? Quote Share this post Link to post Share on other sites
0 Cretino 48 Posted March 27, 2016 Put '@commands2' in chat to see the custom commands. This is a little example... Here is: - script atcmd_example FAKE_NPC,{ OnInit: setarray .custom_commands$[0], "buff", "rms", "ii2", "jump2"; setarray .custom_commands_group[0], 3, 0, 10, 15; bindatcmd "commands2", strnpcinfo(3) + "::OnAtcommand"; end; OnAtcommand: message getcharid(3), "--------------------------"; message getcharid(3), "Available custom commands:"; for(.@i = 0; .@i < getarraysize(.custom_commands$); .@i++) { if (getgroupid() < .custom_commands_group[.@i]) continue; .@commands_string$ += .custom_commands$[.@i] + ((.@i + 1 == getarraysize(.custom_commands$)) ? "" : " "); .@count++; } message getcharid(3), .@commands_string$; message getcharid(3), .@count + " custom commands found."; end; } Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted March 28, 2016 @@Cretino ok thanks. How about just @commands but the custom display below the official @commands ? Quote Share this post Link to post Share on other sites
0 Cretino 48 Posted March 28, 2016 @@Cretino ok thanks. How about just @commands but the custom display below the official @commands ? Only using source modification. :x Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted March 28, 2016 @@Cretino Oh I see. Thanks for your help sir ! I wish one day you will become herc.ws source dev 1 Cretino reacted to this Quote Share this post Link to post Share on other sites
0 Cretino 48 Posted March 28, 2016 @@Cretino Oh I see. Thanks for your help sir ! I wish one day you will become herc.ws source dev Hello friend, was seeing something in the function 'bindatcmd' and I made a change that I think you will like it, you will only need apply this change and all script commands will be read and show together in '@commands'. atcommand.c_v2.patch 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 IndieRO 33 Posted May 23, 2016 @@Cretino Oh I see. Thanks for your help sir ! I wish one day you will become herc.ws source dev Hello friend, was seeing something in the function 'bindatcmd' and I made a change that I think you will like it, you will only need apply this change and all script commands will be read and show together in '@commands'. atcommand.c_v2.patch @@Cretino thx a loot bro Quote Share this post Link to post Share on other sites
Hi all.
When player type @commands, it will show what we have config in group.conf right ?
How to add additional display custom command in there ? at the bottom below of the original.
For example:
Custom command ----
buff,rms,ii2,jump2
Share this post
Link to post
Share on other sites