Jump to content
  • 0

Auto At Commands


Nugs0153

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  02/25/14
  • Last Seen:  

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?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...