Alexandria 53 Posted November 11, 2015 Hello guys. The npc is working good but i want to change the #main to ON by default. If someone wants to turn it off. the user has to talk to npc. http://upaste.me/817a219353c51c97c Thank you! Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted November 11, 2015 @@Alexandria prontera,157,190,5 script Login Settings 4_F_JOB_HUNTER,{ .@npcname$ = "["+ strnpcinfo(1) +"]";// dispbottom atcommand_login +""; // debugging mes .@npcname$; mes "Hello, "+strcharinfo(0); mes "What setting do you want to 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$; if ( select( "I want 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 ^FF2200Off^000000."; atcommand "@"+ .atcommand$[.@s] +" off"; } else { mes .atname$[.@s] +" is now ^00BB22On^000000."; atcommand "@"+ .atcommand$[.@s] +( ( .@s == 1 )? " on": "" ); } atcommand_login = atcommand_login ^ 1 << .@s; close;OnPCLoginEvent: if ( !atcommand_login & 1 << 5 ) { atcommand_login = atcommand_login ^ 1 << 4; atcommand_login = atcommand_login ^ 1 << 5; } for ( .@i = 0; .@i < .total; .@i++ ) { if ( atcommand_login & 1 << .@i ) { atcommand "@"+ .atcommand$[.@i] +( ( .@i == 1 )? " on": "" ); dispbottom .atname$[.@i] +" is now On"; } } end;OnInit: setarray .atname$, "Autoloot ", "Show Zeny ", "Show exp ", "No Ask ", "Main Chat "; setarray .atcommand$, "autoloot", "showzeny", "showexp", "noask", "join #main"; .total = 5; end;} Quote Share this post Link to post Share on other sites
Hello guys.
The npc is working good but i want to change the #main to ON by default. If someone wants to turn it off. the user has to talk to npc.
http://upaste.me/817a219353c51c97c
Thank you!
Share this post
Link to post
Share on other sites