Xhiro Posted October 30, 2012 Posted October 30, 2012 (edited) Either I'm absolutely lousy at searching or I'm just blind. How do I add new @commands in using the groups ID? Previously when using GM level, the steps was to edit the following :- adding your @command in src/map/atcommand.c adding a line similar to this in the same file { "font", 1,1, atcommand_font }, etc etc Step 2 doesn't exist now though... So what else am I supposed to edit? What I have edited are Edited the atcommand.c in trunk/src/map Didn't edit the groups.conf since it says the following commands: { /* not necessary due all_commands: true */ } Edited November 1, 2012 by Xhiro 1 Quote
Ichisito Posted October 31, 2012 Posted October 31, 2012 It's easy, you only need to know the src command, an example: commands: { item: true job: true customcommand: true } :3 i hope you understand and i help in something xP PD: Sorry for my bad english DX Quote
Xhiro Posted November 1, 2012 Author Posted November 1, 2012 I meant for it to be an admin (group id 99) only command. Since admins have all_commands : true, i didn't edit that. Still doesn't work though. Not sure what I'm missing exactly Quote
GmOcean Posted November 1, 2012 Posted November 1, 2012 By default, gm lvl 99, will be able to use ALL commands. If you don't want a specific group to have a command, just enter: command_name: false (assuming it is inherting another group). Quote
clydelion Posted November 1, 2012 Posted November 1, 2012 for the step 2 in atcommand.c, search for this part /** * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(autostore), ACMD_DEF(jumpto), add your command there ex. /** * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { + ACMD_DEF(newcommand), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(autostore), ACMD_DEF(jumpto), 3 Quote
Xhiro Posted November 1, 2012 Author Posted November 1, 2012 Ah... thanks clydelion. I was looking for that Kinda proves that I am blind Quote
GmOcean Posted November 1, 2012 Posted November 1, 2012 If that is what you were trying to do, then you no longer need to do that, since rAthena made a conf file for that. rAthena/conf/atcommand_athena.conf /* Command aliases You can define aliases for any command. Aliases work just like original command. Format is <commandname>: ["<alias>", ...] */ aliases: { mobinfo: ["monsterinfo", "mi"] iteminfo: ["ii"] Quote
Xhiro Posted November 1, 2012 Author Posted November 1, 2012 If that is what you were trying to do, then you no longer need to do that, since rAthena made a conf file for that. rAthena/conf/atcommand_athena.conf /* Command aliases You can define aliases for any command. Aliases work just like original command. Format is <commandname>: ["<alias>", ...] */ aliases: { mobinfo: ["monsterinfo", "mi"] iteminfo: ["ii"] If that is what you were trying to do, then you no longer need to do that, since rAthena made a conf file for that. rAthena/conf/atcommand_athena.conf /* Command aliases You can define aliases for any command. Aliases work just like original command. Format is <commandname>: ["<alias>", ...] */ aliases: { mobinfo: ["monsterinfo", "mi"] iteminfo: ["ii"] This is aliases for alternative @command names, but it doesn't define the new @commands. clydelion found what I wanted already. Thanks all~ 1 Quote
Question
Xhiro
Either I'm absolutely lousy at searching or I'm just blind.
How do I add new @commands in using the groups ID?
Previously when using GM level, the steps was to edit the following :-
Step 2 doesn't exist now though... So what else am I supposed to edit?
What I have edited are
- Edited the atcommand.c in trunk/src/map
- Didn't edit the groups.conf since it says the following
Edited by Xhiro7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.