ID:1226975
 
Keywords: disabling, macros
(See the best response by MDC.)

Problem description:

How to disable players from creating specific macros. I want to disable the .click macro so players won't use it to constantly shoot each other without actually aiming. I used the control_freak thing but all I want is to disable one macro
Well then I'm guessing you have an aiming proc so you can just make a mob variable then create a check so see if the player is aiming or not.
Make it so they need to select a target before they deal damage.
In response to Dariuc
Dariuc wrote:
Make it so they need to select a target before they deal damage.

That's the problem, they select a target and just spam the .click macro instead of actually clicking, when you click while the player is moving you may miss, but with macro its 100% accuracy
In response to Critical172
You could give weapons a hit/miss ratio as well.

if(prob(25))//25% chance of the shot landing.
hit here


You could make it based on weapon or character stat.
Best response
You should just use control freak to disable all custom macros and just make people use your own predefined ones so they wouldn't be able to abuse things like this anyways. If you want them to add some custom macros you can program something for that while still keeping control freak on.

Edit: That way you could just let them make custom macros but control the ones they can and can't make.
MDC is kind of right. You can probably make an in game feature to make macros. If you've played BLN before, their's was a perfect example. They had a keyboard in their interface to select buttons. What you can do is that when you ask for the "command" just check if it contants ".click".

if(findtext(command,".click",1,0))
src << "NOPE!... BAD CHILD!"
world << "[src.key] has been smacked off the server for attempted to make a macro with .click in it!"
del
else
winset(src,"ID.[button]","parent=macro;name=[button];command='[command]'")
I don't think that's a good way to handle it either. That isn't what I meant. What I'm talking about is having control_freak set so that the players can't set their own macros like the one he's having a problem with, but to be able to have his own preset macros and give people the option to change the key for those preset macros. Not to restrict certain macros like that, because control_freak will stop them from making any of that from being able to be set on a key.

For example on MMO's, if any of you have played TERA. You have preset keys like F1-F12 and 1-0 keys, but you can change them to whatever you want. It'll still be the same command for the hot slot keys but just a different key. That's what he should do. People wouldn't be able to make their own macros to abuse things like that, but they can still set their keys to whatever they would like to play comfortably.
Then do what I said but remove the ability to set commands. Make it so the [command] equal the verb that they chose to change. And [button] as the button they chose themselves. He can do it either way.
In response to MDC
Preset Customizable Controls.

Verbs that the author writes, that can be assigned to buttons by the player.
In response to Dariuc
Exactly.
In response to Xirre
That's all just extra work that isn't needed and control_freak will pretty much handle for you.