Olá pessoal, estive reparando que varias pessoas estão a procura de como criar uma nova raça no Tibia além das normais (fire, venom e undead), então estarei postando o método de como criar uma nova raça. 1 - No arquivo const.h procure por:
enum TextColor_t
{
1.2 - E coloque isso abaixo:
TEXTCOLOR_NOVARACE = 5,
2 - Agora no arquivo enums.h procure por:
enum RaceType_t{
RACE_NONE = 0,
RACE_VENOM,
RACE_BLOOD,
RACE_UNDEAD,
RACE_FIRE,
RACE_ENERGY,
2.1 - E coloque isso abaixo de RACE_ENERGY:
RACE_NOVARACE = 6,
3 - Em monsters.cpp agora procure por isso:
if(readXMLString(root, "race", strValue)){
std::string tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "venom" || atoi(strValue.c_str()) == 1)
mType->race = RACE_VENOM;
else if(tmpStrValue == "blood" || atoi(strValue.c_str()) == 2)
mType->race = RACE_BLOOD;
else if(tmpStrValue == "undead" || atoi(strValue.c_str()) == 3)
mType->race = RACE_UNDEAD;
else if(tmpStrValue == "fire" || atoi(strValue.c_str()) == 4)
mType->race = RACE_FIRE;
else if(tmpStrValue == "energy" || atoi(strValue.c_str()) == 5)
mType->race = RACE_ENERGY;
3.1 - Agora coloque isso abaixo de mType->race = RACE_ENERGY;
else if(tmpStrValue == "NOVARACE" || atoi(strValue.c_str()) == 6)
mType->race = RACE_NOVARACE;
4 - Agora em game.cpp procure por:
case RACE_BLOOD:textColor = TEXTCOLOR_RED;
magicEffect = MAGIC_EFFECT_DRAW_BLOOD;
splash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_BLOOD);
break;
4.1 - Agora coloque isso abaixo:
case RACE_NOVARACE:textColor = TEXTCOLOR_NOVARACE;
magicEffect = MAGIC_EFFECT_DRAW_BLOOD;
splash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_BLOOD);
break;
Pronto de "rebuild all" e compile sua "source" que você terá uma nova raça em seu servidor.