Nugs0153 Posted March 13, 2014 Posted March 13, 2014 I've seen NPCs on servers in the past where people can enable at commands when they login. I'd like players to be able to turn commands off some commands if they wish. Anyone know where I can find it? Quote
Capuche Posted March 13, 2014 Posted March 13, 2014 prontera,150,160,5 script auto cmd 87,{ mes "you can enable yours commands on login"; next; while(1) { for ( .@i = 0; .@i < .size_cmd; .@i++ ) .@menu$ = .@menu$ + "[ " + ( auto_cmd & pow( 2,.@i ) ? "^00ff00ON" : "^ff0000OFF" ) + " ^000000] @" + .cmd_display_name$[.@i] + ":"; .@s = select( .@menu$ ) -1; auto_cmd = auto_cmd ^ pow( 2,.@s ); mes "ok what's next?"; .@menu$ = ""; next; } OnPCLoginEvent: if ( auto_cmd == 0 ) end; for ( .@i = 0; .@i < .size_cmd; .@i++ ) { if ( auto_cmd & pow( 2,.@i ) ) atcommand "@" + .cmd_display_name$[.@i]; } end; OnInit: setarray .cmd_display_name$[0], "autoloot", "commands"; .size_cmd = getarraysize( .cmd_display_name$ ); } or http://rathena.org/board/topic/92360-utility-onpclogin-gm-settings/?p=243632 http://rathena.org/board/topic/76131-login-commands/?p=166229 1 Quote
Question
Nugs0153
I've seen NPCs on servers in the past where people can enable at commands when they login. I'd like players to be able to turn commands off some commands if they wish. Anyone know where I can find it?
1 answer 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.