Author Topic: How do you make @ scripts?  (Read 873 times)

Since nobody else just gave you the code...
This is Truce's, I just edited it to make it do what you want.
Code: [Select]
package atCmd {
function NMH_Type::send(%chat) {
%msg=%chat.getValue();
%wrd=firstWord(%msg);
%cmd="atCmd"@getSubStr(%wrd,1,strLen(%wrd));
if(getSubStr(%msg,0,1)$="@"&&isFunction(%cmd)) {
call(%cmd,getWord(%msg,1),getWord(%msg,2),getWord(%msg,3),getWord(%msg,4),getWord(%msg,5));
commandToServer('stopTalking');
canvas.popdialog(newMessageHud);
%chat.setValue("");
}
Parent::send(%chat);
}
};
activatePackage(atCmd);
Use the same way as serverCmd, but with atCmd. It's client sided, by the way.