This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] problem with custom races  (Read 1662 times)

Moridhin

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 46
    • View Profile
[QUESTION] problem with custom races
« on: March 06, 2013, 01:24:02 pm »
Ok here is the thing:
-I did client part of adding custom races(i added 2),they show up without errors in character creation screen.
-I did core edit of SharedDefines.h and compiled without problems.
-I added into database query's using tool races by Khanx.
BUT when i try to create new character with those new races i get in my world console this error:

Player::Create: Possible hacking-attempt: Account 1 tried creating a character named 'Adsdas' with an invalid race/class pair (14/1) - refusing to do so.

Any ideas how to solve this?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stan84

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 184
    • View Profile
Re: [QUESTION] problem with custom races
« Reply #1 on: March 06, 2013, 02:51:07 pm »
it seems u have not add propper entries for classs 1 race 14 in CharBaseInfo.dbc,also check again in your sql.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Moridhin

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 46
    • View Profile
Re: [QUESTION] problem with custom races
« Reply #2 on: March 06, 2013, 03:39:31 pm »
Think .dbc file is ok,but i uploaded it if anyone can check if its ok.
However about sql i am not sure,i made it using that tool and reading that guide about making races.
So maybe thats the problem,anyway here it is:
Code: [Select]
SET @NEW_RACE = '14';
SET @NEW_CLASS = '1';
SET @COPY_RACE = '1';

DELETE FROM `playercreateinfo_spell` WHERE race = @NEW_RACE AND class = @NEW_CLASS ;
INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`)SELECT @NEW_RACE, @NEW_CLASS, `Spell`, `Note` FROM `playercreateinfo_spell` WHERE race = @COPY_RACE AND class = @NEW_CLASS;

DELETE FROM `playercreateinfo_action` WHERE race = @NEW_RACE AND class = @NEW_CLASS ;
INSERT INTO `playercreateinfo_action` (`race`, `class`, `button`, `action`, `type`)SELECT @NEW_RACE, @NEW_CLASS, `button`, `action`, `type` FROM `playercreateinfo_action` WHERE race = @COPY_RACE AND class = @NEW_CLASS;

DELETE FROM `player_levelstats` WHERE race = @NEW_RACE AND class = @NEW_CLASS ;
INSERT INTO `player_levelstats` (`race`, `class`, `level`, `str`, `agi`, `sta`, `inte`, `spi`)SELECT @NEW_RACE, @NEW_CLASS, `level`, `str`, `agi`, `sta`, `inte`, `spi` FROM `player_levelstats` WHERE race = @COPY_RACE AND class = @NEW_CLASS;

DELETE FROM `playercreateinfo_spell` WHERE (race=@NEW_RACE) AND (class=@NEW_CLASS) AND ((spell='668')OR(spell='671')OR(spell='814')OR(spell='29932')OR(spell='672')OR(spell='7340')OR(spell='669')OR(spell='670')OR(spell='813')OR(spell='816')OR(spell='7341')OR(spell='17737')OR(spell='69269')OR(spell='69270'));
INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (@NEW_RACE, @NEW_CLASS, '669', 'Language Orcish');
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Zim4ik

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 407
    • View Profile
Re: [QUESTION] problem with custom races
« Reply #3 on: March 06, 2013, 03:55:54 pm »
you dont have data for your new races in "playercreateinfo" table
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Moridhin

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 46
    • View Profile
Re: [QUESTION] problem with custom races
« Reply #4 on: March 06, 2013, 05:21:45 pm »
added it into playercreateinfo,but same error.
Anyone has any ideas?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »