Blue Jem Posted December 23, 2013 Group: Members Topic Count: 151 Topics Per Day: 0.04 Content Count: 393 Reputation: 3 Joined: 09/16/13 Last Seen: June 4, 2014 Share Posted December 23, 2013 any one know here how the add password to commands example: im using disguse before i this command have password Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 23, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 23, 2013 (edited) damn ... 2 hours on this single topic my source coding knowledge totally gone src/map/atcommand.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a5232f4..0a475b8 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9750,6 +9750,19 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message if( sscanf(atcmd_msg, "%99s %99[^\n]", command, params) < 2 ) params[0] = '\0'; + { + char aaa[100], bbb[100]; + if ( sscanf( params, "%30s %99[^\n]", aaa, bbb ) != 2 ) { + clif_displaymessage( fd, "Input the password !" ); + return false; + } + if ( strcmp( aaa, "qwer" ) ) { + clif_displaymessage( fd, "Wrong password" ); + return false; + } + strcpy( params, bbb ); + } + // @commands (script based) if((type == 1 || type == 3) && atcmd_binding_count > 0) { struct atcmd_binding_data * binding; change the qwer into your desire passwordalthough seriously, you should've limit your GM to use which command by setting in rathena\conf\groups.conf EDIT: I made this for password into all command <.< you mean just 1 single command ? Edited December 25, 2013 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Blue Jem Posted December 23, 2013 Group: Members Topic Count: 151 Topics Per Day: 0.04 Content Count: 393 Reputation: 3 Joined: 09/16/13 Last Seen: June 4, 2014 Author Share Posted December 23, 2013 (edited) i mean madam level 2 gm up to 99 have password this topic and your script for anti hack for commands Edited December 23, 2013 by Blue Jem Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 23, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 23, 2013 .... anti hack for commands now this is interesting in which cases that you want to be anti-hack ? I don't think a simple source code like this can achieve "anti-hack" ... level 2 gm up to 99just add if ( pc_get_group_level(sd) >= 2 && pc_get_group_level(sd) < 99 ) at the beginning there Quote Link to comment Share on other sites More sharing options...
Blue Jem Posted December 23, 2013 Group: Members Topic Count: 151 Topics Per Day: 0.04 Content Count: 393 Reputation: 3 Joined: 09/16/13 Last Seen: June 4, 2014 Author Share Posted December 23, 2013 (edited) + if ( pc_get_group_level(sd) >= 2 && pc_get_group_level(sd) < 99 ) + { + char aaa[100], bbb[100]; + if ( sscanf( params, "%30s %99[^\n]", aaa, bbb ) != 2 ) { + clif_displaymessage( fd, "Input the password !" ); + return false; + } like this? sorry madam im using eathena sql if (getgmlevel() == "2") i try to change the + if ( pc_get_group_level(sd) >= 2 && pc_get_group_level(sd) < 99 ) but is error Edited December 23, 2013 by Blue Jem Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 23, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 23, 2013 there is no pc_get_group_level in the patch provided in this topic achivement.c .... what can be the error ... hm ? I don't think I have ever touch achievement.c in rathena board before Quote Link to comment Share on other sites More sharing options...
Question
Blue Jem
any one know here how the add password to commands
example: im using disguse before i this command have password
Link to comment
Share on other sites
5 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.