Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: AgeofCraft on July 25, 2015, 07:19:47 pm

Title: Character Create set a Character Race and Class.
Post by: AgeofCraft on July 25, 2015, 07:19:47 pm
I try since 2 hours to remove the randomize from the CharacterCreate.lua, i want to create one class and one race that choosen at the start of the CharacterCreate Screen, i tried everything but i have 0 knowledge of coding.

i tried to change in the CharacterCreate.lua
Quote
function CharacterCreate_OnLoad(self)
   self:SetSequence(0);
   self:SetCamera(0);

   CharacterCreate.numRaces = 0;
   CharacterCreate.selectedRace = 1;
   CharacterCreate.numClasses = 0;
   CharacterCreate.selectedClass = 1;
   CharacterCreate.selectedGender = 0;

So the characterscreen sets on load the Race and Class to ID 1 that is The Human and the Warrior, but the randomize continues so i tried a another code
another line:

Quote
       function CharacterCreate_OnShow()

        SetCharacterRace(1);
   CharacterCreateEnumerateRaces(GetAvailableRaces());
   SetCharacterRace(GetSelectedRace());
   
   SetCharacterClass(1);
   CharacterCreateEnumerateClasses(GetAvailableClasses());
   local_,_,index = GetSelectedClass();
   SetCharacterClass(index);

So if the characterScreen is showing it sets the Race and Class to ID 1 but its not working, what iam doing wrong ?

(http://i.imgur.com/eg36a28.png)