#chHelperz main.ms ver 1.0 export('chHelperz.version', '1.0') export('chHelperz.console.command.show', get_value('chHelperz.console.command.show')) bind(player_command, array(id: 'chHelperz.cmd'), null, @cmdevent, assign(@player, player()) assign(@cmd, reg_split(' ', @cmdevent[command])) assign(@dev, false) #List cmd used, with CH aliases showing as a different color. if(is_alias(@cmd[0]), assign(@cmdcolor, 3), assign(@cmdcolor, 6)) #show command to the console if permitted to do so. assign(@consolecmdshow, import('chHelperz.console.command.show')) #show command back to the player who issued the command, if permitted to do so. assign(@sendcmd, import('chHelperz.player.'.@player.'.command.show.all')) if(@sendcmd == null, assign(@sendcmd, get_value('chHelperz.player.'.@player.'.command.show.all')) export('chHelperz.player.'.@player.'.command.show.all', @sendcmd) ) #Show this command to the player & console. switch(@cmd[0]){ case '/.': case '/repeat': case '/\'': if(@dev == true, msg('[dev] /repeat')) if(@consolecmdshow == true, assign(@lastcmd, import('chHelperz.player.'.@player.'.last.command')) #List cmd used, with CH aliases showing as a different color. if(is_alias(@lastcmd), assign(@cmdcolor, 3), assign(@cmdcolor, 6)) console(color(7).@player.' used '.color(8).'('.@cmd[0].') '.color(@cmdcolor).@lastcmd, false) ) default: if(@sendcmd == true, if(has_permission(@player, 'commandhelper.alias.see.is.alias'), null, assign(@cmdcolor, '7') ) msg('> '.color(@cmdcolor).@cmdevent[command]) ) if(@consolecmdshow == true, console(color(7).@player.' used '.color(@cmdcolor).@cmdevent[command], false) ) #Save the last command this player used. export('chHelperz.player.'.@player.'.last.command', @cmdevent[command]) } )