L2JMobius

Classic Saviors How to make myself GM/Admin?

ClassicPLS · 10 · 9018

Offline ClassicPLS

  • Vassal
  • *
    • Posts: 6
Hello again :)

Cant find a way to make myself GM/Admin in my own server. I want to access gm menu or something like that.

Or use some gm/admin commands? perhaps there is a list?

Appreciate any help :)   


Offline nasseka

  • Distinguished King
  • *****
    • Posts: 1732
    • L2Unknown

Offline ClassicPLS

  • Vassal
  • *
    • Posts: 6
Hmm, not sure if i find it.

I found this code in:
C:\L2J_Mobius\db_installer\sql\login\Accounts.sql

DROP TABLE IF EXISTS `accounts`;
CREATE TABLE IF NOT EXISTS `accounts` (
  `login` VARCHAR(45) NOT NULL default '',
  `password` VARCHAR(45),
  `email` varchar(255) DEFAULT NULL,
  `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `lastactive` bigint(13) unsigned NOT NULL DEFAULT '0',
  `accessLevel` TINYINT NOT NULL DEFAULT 0,
  `lastIP` CHAR(15) NULL DEFAULT NULL,
  `lastServer` TINYINT DEFAULT 1,
  `pcIp` char(15) DEFAULT NULL,
  `hop1` char(15) DEFAULT NULL,
  `hop2` char(15) DEFAULT NULL,
  `hop3` char(15) DEFAULT NULL,
  `hop4` char(15) DEFAULT NULL,
  PRIMARY KEY (`login`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



If i change access level line to
 `accessLevel` TINYINT NOT NULL DEFAULT 100,
Would it give gm to any new account ? do i understand correctly?

Where could i find list of all created accounts/characters and give access level individually?


Offline nasseka

  • Distinguished King
  • *****
    • Posts: 1732
    • L2Unknown
Where could i find list of all created accounts/characters and give access level individually?

In database..


Offline MrNiceGuy

  • Elder
  • ****
    • Posts: 112
  • Senior bug creator
    • L2LIVE.PRO
Hi
Right now you're editing Login server database. First things first, do not edit SQL file - it is meant for server installation and they should not be changed. What you did right now is giving access level 100 by default to all new accounts.

There are two places where you can apply elevated access level (but for different purposes):
1. Login server database - "accounts" table, you set your "accessLevel" to 100 = you will be able to login to server even if GMonly = true in Gameserver configs
2. Game server database - you need to find "characters" table (open with Navicat, HeidiSQL or any other MySQL manager), find your character row and then look for "accessLevel" column. While being offline (disconnected from game), set it to 100 and save. Login and if you see your nick is yellow - well done, you're admin :)

Again - you can not make this change in SQL installation file (at least the right way). Please consider using Navicat/HeidiSQL/PHPMyAdmin or anything else that is dedicated for MySQL database management - you will need that anyway :)


Offline ClassicPLS

  • Vassal
  • *
    • Posts: 6
Thanks alot MrNiceGuy! :)

I didnt know i needed SQL database manager hehe :) i was trying with notepad only, silly me. Now i installed Heidi and it worked, thanks a million :)


Offline Barbatos

  • Heir
  • **
    • Posts: 11
  • Hell was written in Java
You can edit your game/config/General.ini file to do it without installing a database manager.

Just search for DefaultAccessLevel and then set 100

Code: [Select]
# default = 0
DefaultAccessLevel = 100

Save changes, start your game server, create your account and a character, and then set 0 again (or leave 100, so everybody will be GM).

This will grant you a quick access to a GM account but I strongly recommend you to install a database manager.

I sugest you DBeaver or Heidisql


Offline SavitarGodOfSpeed

  • Baron
  • *****
    • Posts: 252
  • Here to gain knowledge

Offline Index

  • Black Sheep
  • Marquis
  • *****
    • Posts: 536
Stupid question how do you save in navicat? xD
logout from game - make changes in navicat - login backnto game


Offline SavitarGodOfSpeed

  • Baron
  • *****
    • Posts: 252
  • Here to gain knowledge
no i didn't meant that. I know that in order the changes take effect the designated target needs to be logged out. My problem was that i couldn't locate the "Save" button in Navicat, But fortunately after some help i discovered that i had to press ctrl+S to save the to formula