I was wondering if someone could help me. I'm using the following script but I would like @join #main and @channel leave #main to be added into it. It's just difficult because #main doesn't go by on and off.
Thanks! Help is much appreciated!
header .@npcname$ = "["+ strnpcinfo(1) +"]";// dispbottom atcommand_login +""; // debugging mes .@npcname$; mes "Hello, "+strcharinfo(0)+"!"; mes "I can permanently enable some commands you often use, this is useful so you won't need to type the commands upon each log in!"; next; mes .@npcname$; mes "The setting(s) will remain enabled or disabled until you talk to me again and want me to un-do the change."; next; for ( .@i = 0; .@i < .total; .@i++ ) .@menu$ = .@menu$ + .atname$[.@i] +" ["+( ( atcommand_login & 1 << .@i )? "^00BB22On^000000" : "^FF2200Off^000000" )+"] :"; .@s = select( .@menu$ ) -1; mes .@npcname$; mes "Status: "+( ( atcommand_login & 1 << .@s )? "^00BB22On^000000" : "^FF2200Off^000000"); next; mes .@npcname$; mes "What do you want to do?"; if ( select( "I'd like to "+( ( atcommand_login & 1 << .@s )? "^FF2200disable^000000": "^00BB22enable^000000" )+" it!", "Nothing." ) == 2 ) { mes "See ya."; close; } if ( atcommand_login & 1 << .@s ) { mes .atname$[.@s] +" is now ^FF2200disabled^000000."; atcommand "@"+ .atcommand$[.@s] +" off"; } else { mes .atname$[.@s] +" is now ^00BB22enabled^000000."; atcommand "@"+ .atcommand$[.@s] +( ( .@s == 1 )? "on": "" ); } atcommand_login = atcommand_login ^ 1 << .@s; close;OnPCLoginEvent: if ( !atcommand_login ) end; for ( .@i = 0; .@i < .total; .@i++ ) { if ( atcommand_login & 1 << .@i ) { atcommand "@"+ .atcommand$[.@i] +( ( .@i == 1 )? " on": "" ); dispbottom .atname$[.@i] +" is now enabled"; } } end;OnInit: setarray .atname$, "- @autoloot", "- @noask", "- @noks", "- @showexp"; setarray .atcommand$, "autoloot", "noask ", "noks", "showexp"; .total = 4; end;}
Hi Hercules,
I was wondering if someone could help me. I'm using the following script but I would like @join #main and @channel leave #main to be added into it. It's just difficult because #main doesn't go by on and off.
Thanks! Help is much appreciated!
Share this post
Link to post
Share on other sites