aguyaguy Posted December 17, 2011 Posted December 17, 2011 (edited) Is it possible to make the warp point of @go go randomly at different points? Like if I type @go 1, it would either go to 123,433 or 123,323, or 123,343. to avoid kill / hit players because i have a PK Server about @ when the normal player type @ it says "Unknown Command" how to disable it and it will be a normal chat . but in the GM side (it will be @ in command) like @item , @produce etc etc ! Edited December 18, 2011 by aguyaguy Quote
Emistry Posted December 21, 2011 Posted December 21, 2011 you are wrong..xD the topic starter is looking for a way to alter his @go command.. the defaul @go command will warp users to a fixed coordinate.. but he now wanna alter it become randomly warp into 4 spot when users used @go.. player will be warped to 4 spot randomly instead of the original 1 spot... beside...your script....it cant apply to all map..since different map have differnt location that have building or wall or obstacle... Quote
GHul Posted December 22, 2011 Posted December 22, 2011 for removing @ "unknown commands" message for unintended player gm level. Find if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) ) { sprintf(output, msg_txt(153), command); // "%s is Unknown Command." clif_displaymessage(fd, output); return true; } Replace if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) ) { return false; } Quote
GodLesZ Posted December 23, 2011 Posted December 23, 2011 for removing @ "unknown commands" message for unintended player gm level. Find if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) ) { sprintf(output, msg_txt(153), command); // "%s is Unknown Command." clif_displaymessage(fd, output); return true; } Replace if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) ) { return false; } Wrong way to remove the notification itself. Right way is to check for string length (see attachment). Always let the user know what something was wrong. Any error message like "error" is better than a player thinking like "wtf is going on here? Nothing happend? I tried it several times? WTF?" player_commands_length.patch 1 Quote
aguyaguy Posted December 24, 2011 Author Posted December 24, 2011 at godlezs . should i paste that ? or put it in below the script? Quote
GHul Posted December 27, 2011 Posted December 27, 2011 (edited) about @ when the normal player type @ it says "Unknown Command" how to disable it and it will be a "normal chat" . but in the GM side (it will be @ in command) like @item , @produce etc etc ! Or maybe you can add GM Check. Make sure you set the lowest considered GM Level on your gm.conf // The level at which a player with access is considered a GM. // An account with an access level lower than this is not effected // by gm_can_drop_lv (battle_athena.conf). lowest_gm_level: 1 if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) ) if ( battle_config.lowest_gm_level > pc_isGM(sd) ) return false; else { sprintf(output, msg_txt(153), command); // "%s is Unknown Command." clif_displaymessage(fd, output); return true; } You can try this or mix with other's dev code and decide which is best fit for you. Try this code too if you don't want "#" <# failed. Player not found.> display on normal player ID. Find if ( (ssd = map_nick2sd(charname)) == NULL && ( (ssd = map_nick2sd(charname2)) == NULL ) ) { sprintf(output, "%s failed. Player not found.", command); clif_displaymessage(fd, output); return true; } Replace if ( (ssd = map_nick2sd(charname)) == NULL && ( (ssd = map_nick2sd(charname2)) == NULL ) ) { if ( battle_config.lowest_gm_level > pc_isGM(sd) ) return false; else { sprintf(output, "%s failed. Player not found.", command); clif_displaymessage(fd, output); return true; } } Hope this help Edited December 29, 2011 by GHul Quote
Question
aguyaguy
Is it possible to make the warp point of @go go randomly at different points?
Like if I type @go 1, it would either go to 123,433 or 123,323, or 123,343. to avoid kill / hit players because i have a PK Server
about @
when the normal player type @ it says "Unknown Command" how to disable it and it will be a normal chat .
but in the GM side (it will be @ in command) like @item , @produce etc etc !
Edited by aguyaguy5 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.