Would you like to react to this message? Create an account in a few clicks or log in to continue.

Settings npc

2 posters

Go down

Settings npc Empty Settings npc

Post by Radical Sun Jan 17, 2010 4:51 am

Adding an NPC that toggles One-Click healing for the healer, as well as being able to set /nc would be interesting to see on maybe the high rate server. Purely for functionality and saving time of course. Also, some players do not know about /nc and /ns.
Radical
Radical
Moderator

Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA

Back to top Go down

Settings npc Empty Re: Settings npc

Post by PhoenixTrainer Sun Jan 17, 2010 5:53 am

Radical wrote:as well as being able to set /nc

I don't really follow you here..? You'd want the healer to activate the /nc option on you when you use it?
PhoenixTrainer
PhoenixTrainer
Administrator

Posts : 112
Join date : 2009-11-09
Age : 36
Location : Morges, Switzerland

Back to top Go down

Settings npc Empty Re: Settings npc

Post by Radical Sun Jan 17, 2010 11:14 am

No, i'm sorry, i was very tired when i posted this.
I meant a SEPERATE npc, called "Settings".
In this NPC you could specify whether or not to activate one-click healing, instead of the dialogue, as well as other things like /nc and @noks protection default settings.
As in, whether or not they are on by default when you start the client.
/nc saves automatically anyways, but it would make it simpler for players that are not that familiar with the user interface of RO.
See what I am saying?
Radical
Radical
Moderator

Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA

Back to top Go down

Settings npc Empty Re: Settings npc

Post by PhoenixTrainer Sun Jan 17, 2010 12:12 pm

yeah


but the /nc thing I can't help it, because it's client-side.

But I believe the client stores somewhere (in the registry?) if it was on or off the last time you left the game...
PhoenixTrainer
PhoenixTrainer
Administrator

Posts : 112
Join date : 2009-11-09
Age : 36
Location : Morges, Switzerland

Back to top Go down

Settings npc Empty Re: Settings npc

Post by Radical Sun Jan 17, 2010 12:20 pm

Hmm i know i have seen this done somewhere, but no matter.
The healer option is why i originally posted.
Smile
Are you online now?
Radical
Radical
Moderator

Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA

Back to top Go down

Settings npc Empty Re: Settings npc

Post by PhoenixTrainer Sun Jan 17, 2010 3:21 pm

well without editing the client it's not possible....

The server can not activate (or desactivate) /nc, /ns, /bm, and all these client-side commands.
PhoenixTrainer
PhoenixTrainer
Administrator

Posts : 112
Join date : 2009-11-09
Age : 36
Location : Morges, Switzerland

Back to top Go down

Settings npc Empty Re: Settings npc

Post by Radical Sun Jan 17, 2010 6:38 pm

xD Found one to save @commands. Dynamenu i do not know, unless they mean Dyna headgears, which are headgears that can be set to appear as a number of other headgear sprites.
Code:
//Usus's Settings NPC

prontera,145,174,3   script   Settings NPC   91,{
mes .name$;
mes "Select the option to change";
next;
set .@dynamenu$, "@autoloot - " +#autoloot+ ""; //Constructs first element of dynamic menu
for (set .@i, 2; .@i < getarraysize(.settings$); set .@i, .@i + 1){ //Construct rest of dynamenu showing if setting is on or off
   set .@dynamenu$, .@dynamenu$ +":"+ .settings$[.@i] +" - "+((#settings & .settings[.@i])?"^008000on^000000":"^FF0000off^000000");
   }
set .@i, select(.@dynamenu$);
   if ( .@i == 1 ) { //For autoloot - not a binary variable so a special case is defined for it
      mes .name$; //If you add non binary settings, you would have to add cases like this
      mes "Input a number [0,100]";
      mes "0 turns this off.";
      input #autoloot;
      while (#autoloot < 0 || #autoloot > 100){ //check for incorrect range
         next;
         mes .name$;
         mes "Out of Range!";
         mes "You can only autoloot";
         mes "from 0% to 100%!";
         input #autoloot;
      }
      atcommand "@autoloot "+#autoloot;
      mes "@autoloot saved at "+#autoloot;
      close;
   }
   set #settings, #settings ^ .settings[.@i]; //This toggles binary flag on or off
   mes .name$;
   if (#settings & .settings[.@i]) { //checks if the setting is on or not
      atcommand .settings$[.@i]; //sets @command if on
      mes .settings$[.@i]+" saved as ^008000on^000000";
   } else mes .settings$[.@i]+" saved as ^FF0000off^000000";
   close;
OnInit: //Change these three settings only - the rest of the script does not need changing
   setarray .settings[2],1,2,4; // 2^n, next would be 4,8,16,32,64..
   setarray .settings$[2],"@main","@etc","@showzeny"; //add @settings to this.
   set .name$, "Settings NPC";
   end;
OnPCLoginEvent:
   if (#autoloot > 0) atcommand "@autoloot "+#autoloot; //sets autoloot
   for (set .@i, 2; .@i < getarraysize(.settings$); set .@i, .@i + 1){ //loop to set settings on login
      if (#settings & .settings[.@i]) atcommand .settings$[.@i]; //Condition checks if flag is on, then sets
   }
   end;
Just a code i dug up on eathena.ws...
You might want to look through it and make sure it actually works...
Radical
Radical
Moderator

Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA

Back to top Go down

Settings npc Empty Re: Settings npc

Post by PhoenixTrainer Mon Jan 18, 2010 1:33 am

dynamenu is just the variable they use to build their dynamic menu.
PhoenixTrainer
PhoenixTrainer
Administrator

Posts : 112
Join date : 2009-11-09
Age : 36
Location : Morges, Switzerland

Back to top Go down

Settings npc Empty Re: Settings npc

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum