Page 1 of 1

GM commands for accesslevel 0

Posted: Sun Jan 10, 2010 11:39 pm
by jmaniac
I want make available some GM commands for regular users... how I can do this?
I try to make Admin group in accesss_level table with accessLevel 0, and set 0 in admin_command_access_rights table... but still have regular users without GM commands :(((
I miss something or its not possible?

Re: GM commands for accesslevel 0

Posted: Sun Jan 10, 2010 11:45 pm
by MELERIX
why you don't use...

EverybodyHasAdminRights = True

?

Re: GM commands for accesslevel 0

Posted: Sun Jan 10, 2010 11:47 pm
by jmaniac
because I dont want give rigths for All commands....

I need way to make available some GM commands for all users (but not all GM commands)
So its impossible? (((

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 7:51 am
by janiii
set the group to greater than 0 and assign commands to the designed group. you can check if you could create characters with the given admin group.

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 8:11 am
by jmaniac
If I set the group to greater than 0(12 for example) and assign commands, its mean that I must manual set to each character accesslevel 12.... and do this for each newest character too worst.... :(

and why L2j remove command-privileges.properties like in T1.... I remember it was very useful... with this I can set accesslevel that I want for all users, and set gm commands that I want...

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 8:23 am
by janiii
jmaniac wrote:If I set the group to greater than 0(12 for example) and assign commands, its mean that I must manual set to each character accesslevel 12.... and do this for each newest character too worst.... :(

and why L2j remove command-privileges.properties like in T1.... I remember it was very useful... with this I can set accesslevel that I want for all users, and set gm commands that I want...
you can do the same and more in the new sql system for admin commands.

assign all existing characters an accesslevel (except given admin chars):

Code: Select all

UPDATE characters SET accesslevel = 12 WHERE char_name NOT IN ('myAdminCharName', 'hisAdminCharName');
if you want to assign newly created characters a higher access level, check AccesLevels.java class

Code: Select all

/** Reserved user access level<br> */public static final int _userAccessLevelNum = 0;
but still. if you want players to use admin commands, you have to set them isGm true and that would ruin the game, because gm have special treatment, not like players.

instead of assigning admin commands to players (really a bad idea!), you can create voiced commands for them with same functionality.

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 8:37 am
by jmaniac
_userAccessLevelNum = 0
its cant help because:

Code: Select all

 public static L2AccessLevel _userAccessLevel = new L2AccessLevel(_userAccessLevelNum, "User", Integer.decode("0xFFFFFF"), Integer.decode("0xFFFFFF"), null, false, false, false, true, false, true, true, true); 
with changed userAccessLevelNum I just get newest characters with new access level, but with same rights... admin group not give effect because userAccess have something self access group(like Master Access) how you can see... so its not solve problem...
... and if I try make childAccess its have no effect too....

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 8:43 am
by janiii
then remove also this condition from AccessLevels

Code: Select all

				if (accessLevel == _userAccessLevelNum)				{					_log.warning("AccessLevels: Access level with name " + name + " is using reserved user access level "							+ _userAccessLevelNum + ". Ignoring it!");					continue;				}
still, giving admin command rights to players is not a good idea. l2j was not designed for it. you can just enable all admin rights or nothing, or the player has to be a gm with more than only admin commands. if you want to something else, you have probably to change more code than only 1 line.

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 8:53 am
by jmaniac
Ohh my... I thinked that this only for log :D
thanks for answer... I try this...

P.S.
yep, giving admin command rights to players is not a good idea.... but I want run a server just for fun, so I need to give GM to all players, but without some dangerous commands like shutdown XD

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 10:27 am
by jmaniac
if (accessLevel == _userAccessLevelNum)
{
_log.warning("AccessLevels: Access level with name " + name + " is using reserved user access level "
+ _userAccessLevelNum + ". Ignoring it!");
continue;
}
remove.....(set _userAccessLevelNum =1) its not help. players still dont have rights... :(

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 11:39 am
by denser
choose what exact commands you want to assign to others and create in voice(as janiii told) like PowerUser.java
and place it in handlers(dont forget to register in MasterHandler.java)

then - copy commands from admin section handlers and just correct in eclipse if any errors )

Re: GM commands for accesslevel 0

Posted: Mon Jan 11, 2010 1:29 pm
by jmaniac
Oh.... its too hard for me, Im not java coder :? but I try......