Thanks, where i put the number of vocation? xD!Code:int voc = player->getVocationId();
Is it that easy or do you have to add more?
I am currently into C++ and already followed 30 lessons. I would like to know more about the OTServ c++ codes I can use.
Any tutorials or something? I know some basic c++ coding. Just have to get into otserv
ITEM_MALE_CORPSE = 6007,
ITEM_FEMALE_CORPSE = 2826,
ITEM_MALE_NEWA = 2827,
ITEM_MALE_NEWB = 2828,
vITEM_MALE_NEWC = 2829,
{
if(sex % 2)
return ITEM_MALE_CORPSE;
return ITEM_FEMALE_CORPSE;
}
{
if(int voc = player->getVocationId(2);)
return ITEM_MALE_CORPSE;
if(int voc = player->getVocationId(3);)
return ITEM_MALE_NEWA;
}
{
int voc = player->getVocationId(2);)
if(voc == 2);
return ITEM_MALE_CORPSE;
else if(voc == 3);
return ITEM_MALE_NEWA;
}
I don't know much about C++ but i think you need to change te vocation code to this
Or something like itLUA:{ int voc = player->getVocationId(2);) if(voc == 2); return ITEM_MALE_CORPSE; else if(voc == 3); return ITEM_MALE_NEWA; }
[cpp]{
switch(player->getVocationId())
{
case 2:
return ITEM_MALE_CORPSE;
case 3:
return ITEM_MALE_NEWA;
default:
break;
}
}[/cpp]
[cpp]
{
if(vocation_id == 1)
return ITEM_MALE_CORPSE;
else if(vocation_id == 2)
return ITEM_MALE_NEWA;
}
[/cpp]
Try that?