Jump to content
  • 0

Login Commands


Nokia

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

Hi,

can i request a login command npc? seems like all links are down.

like the player can choose what command is activated on his next login.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Login Commands v1.0

Try this one :I, @autoloot, @noask and @main

If you want another, PM me I will try my best to make modifications, but I'm busy the next weeks at work so I only have a little time.

Regards,

Chris

Edited by llchrisll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

this kind of script can eats up quite some variable space

as we only have 256 permanent player variable limitations

if I'm doing this, I'll use this as a bit-masking to save more variable space

prontera,157,173,5    script    Login Settings    100,{
   .@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 ) end;
   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", "Main Chat", "@NoAsk";
   setarray .atcommand$, "autoloot", "main", "noask";
   .total = 3;
   end;
}

also your script has a bug

the main chat can only enable by

@main on | off

using just @main will ask for the user to input some strings in order to announce something

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


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

OMG nice script AnnieRuru !

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

i just need to change the arrays if i want to add new commands?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@Capuche

already saw some of your script out there ... wanna become my student ? xD

http://www.eathena.ws/board/index.php?showtopic=154325

just guess how long have I been scripting, hahaha XD

... anyway, just continue comply the script request section here, and I'll watch over your progress

@Nokia

yup

however you have to know there are certain commands like @main that needs on|off

so you have to watch out which one works, and which one don't

well I guess you can learn by starting how to edit this script ...

Edited by AnnieRuru
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...