View Full Version : SQL Query to make account and set GM Level !

09-18-2014, 03:41 PM
Hello. This is probably completely useless but i want to share it anyway ! Maybe someone find it usefull. This is a query that will make you an ingame account and also set a GM Level to the account. You can do it from worldserver too just by typing account create username password and then account set gmlevel 3 -1. So that's why i'm saying it's useless hehe. Anyway, Here it is

@username = "YOURACCOUNT",
@password = "YOURPASSWORD",
@email = "YOUREMAIL",
@expansion = 2, /* Set this to 0 for vanilla expansion, 1 for TBC Expansion, 2 for WOTLK, 3 for Cataclysm, 4 for MoP, 5 for WoD */
@gmlevel = 0, /* 0 = player, 1=GM, 2=Moderator, 3=Admin, 4=Console */
@realmid = -1; /* -1 = All Realms */

INSERT INTO account (username, sha_pass_hash, email, expansion)
VALUES (UPPER(@username), ( SHA1(CONCAT(UPPER(@username), ':', UPPER (@password))) ), @email, @expansion);

INSERT INTO account_access (id, gmlevel, RealmID)
VALUES ((SELECT id FROM account WHERE username = @username), @gmlevel, @realmid);

A guy asked for help on how to create an account for TrinityCore on another forum so i made this query for him so i'd like to share that here aswell :)

Do ONLY edit the green values !