to change stats via perl command:
add this to client.cpp:
Code:
void Client::SetStat(int8 type,sint16 number){
// Cofruben: Setstat function
if(type>STAT_DISEASE){
printf("Error in Client::SetStat, received invalid type of: %i\n",type);
return;
}
switch(type){
case STAT_STR:
m_pp.STR=number;
break;
case STAT_STA:
m_pp.STA=number;
break;
case STAT_AGI:
m_pp.AGI=number;
break;
case STAT_DEX:
m_pp.DEX=number;
break;
case STAT_INT:
m_pp.INT=number;
break;
case STAT_WIS:
m_pp.WIS=number;
break;
case STAT_CHA:
m_pp.CHA=number;
break;
}
}
add this to client.h
Code:
void SetStat(int8 type,sint16 number); //cofruben:-For setting stats.
now,you can make a perl command that calls that client function.For example add this to a perl command.
mob->CastToClient()->SetStat(0,70); //sets 70 to STR
or
mob->CastToClient()->SetStat(1,65); //sets 65 to STA.