| GetRaceCount | ||
|---|---|---|
| Prototype | int GetRaceCount(); | |
| Purpose | Counts all Races available on the Server. | |
| Example of Usage | Could be used for a RaceSelector using a Gump...
for (var i = 0; i < GetRaceCount(); i++) {
if (IsPlayerRace(i)) {
// Display the race on the gump
}
}
| |
| IsRaceWeakToWeather | ||
|---|---|---|
| Prototype | bool IsRaceWeakToWeather( race, weatherType ); | |
| Purpose | Returns true if race is weak to weatherType. The list of weather types are: 0 - Light 1 - Rain 2 - Cold 3 - Heat 4 - Lightning 5 - Snow | |
| Example of Usage | if( IsRaceWeakToWeather( GetRace( pTalking ), 0 ) ) | |
| RaceRequiresBeard | ||
|---|---|---|
| Prototype | bool RaceRequiresBeard( raceID ); | |
| Purpose | Returns true if raceID requires a beard | |
| Example of Usage | if( RaceRequiresBeard( GetRace( pTalking ) ) ) | |
| RaceRequiresNoBeard | ||
|---|---|---|
| Prototype | bool RaceRequiresNoBeard( raceID ); | |
| Purpose | Returns true if the race requires the person has no beard. | |
| Example of Usage | if( RaceRequiresNoBeard( GetRace( pTalking ) ) ) | |
| CanWearArmour | ||
|---|---|---|
| Prototype | bool CanWearArmour( tItem ); | |
| Purpose | Returns true if the race raceID can equip the item tItem. | |
| Example of Usage | if( pTalking.race.CanWearArmour( tItem )
{
pTalking.TextMessage( "Whoo hoo, I can wear it" );
}
| |
| GetRaceSkillAdjustment | ||
|---|---|---|
| Prototype | signed char GetRaceSkillAdjustment( raceID, skillNum ); | |
| Purpose | Returns the % increase that raceID gets for skillNum. | |
| Example of Usage | if( GetRaceSkillAdjustment( GetRace( pTalking ), 32 ) > 10 ) | |
| IsValidHairColour | ||
|---|---|---|
| Prototype | bool IsValidHairColour( tColour ); | |
| Purpose | Returns true if the hair colour is valid for raceID. | |
| Example of Usage | if( pTalking.race.IsValidHairColour( 1 )) | |
| IsValidSkinColour | ||
|---|---|---|
| Prototype | bool IsValidSkinColour( tColour ); | |
| Purpose | Returns true if the skin colour is valid for raceID. | |
| Example of Usage | if( pTalking.race.IsValidSkinColour( 1 )) | |
| IsValidBeardColour | ||
|---|---|---|
| Prototype | bool IsValidBeardColour( tColour ); | |
| Purpose | Returns true if the beard colour is valid for raceID. | |
| Example of Usage | if( pTalking.race.IsValidBeardColour( 1 )) | |
| RaceCompare | ||
|---|---|---|
| Prototype | char RaceCompare( srcChar, trgChar ); | |
| Purpose | Returns the relationship between the races of the 2 characters. If it's 0, then they're neutral. If it's bigger than 0 and less than 100, then they're allies. If it's less than 0 and greater than -100, then it's an enemy. | |
| Example of Usage | if( RaceCompare( pTalkingTo, pTalking ) < 0 ) | |
| RaceCompareByRace | ||
|---|---|---|
| Prototype | char RaceCompareByRace( srcRace, trgRace ); | |
| Purpose | Returns the relationship of the two races. If it's 0, then they're neutral. If it's greater than 0 and less than 100, then they're allies. If it's less than 0 and greater than -100, then they're enemies. | |
| Example of Usage | if( RaceCompareByRace( GetRace( pTalkingTo ), GetRace( pTalking ) ) < 0 ) | |
| RaceGate | ||
|---|---|---|
| Prototype | void RaceGate( socket, character, raceID ); | |
| Purpose | Sets the characters race. | |
| Example of Usage | RaceGate( mSock, mChar, newRace ); | |