The scripts worked pretty well, and offered a lot of new cep head choices for our players. However the scripts are also causing random server crashes. I thought it may be some buggy heads, but the scripts for wings and tails also caused the random crashes.
I'm not sure what could be causing the problem. I've seen these appearance changers on other servers, and they worked without any problems.
Here are my modified scripts from Scarface's appearance modifier. I'm posting the next head and prev head scripts for the head appearance modifier. Any help would be greatly appreciated.
My next head script:
// Created By Scarface
// Modified by Sadira
void main()
{
object oPC = GetPCSpeaker();
if (GetSubRace(oPC)== "Wemic")
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 2)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 4)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else if (GetSubRace(oPC)== "Brownie")
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 36)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 32)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else if (GetSubRace(oPC)== "Fairy")
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 36)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 32)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else if (GetRacialType(oPC)==RACIAL_TYPE_DWARF)
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 27)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 28)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else if (GetRacialType(oPC)==RACIAL_TYPE_ELF)
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 186)
{
nHead = 1;
}
if ((nHead > 43) && (nHead < 46))
{
nHead = 46;
}
if ((nHead > 49) && (nHead < 101))
{
nHead = 101;
}
if ((nHead > 103) && (nHead < 111))
{
nHead = 111;
}
if ((nHead > 112) && (nHead < 122))
{
nHead = 122;
}
if ((nHead > 122) && (nHead < 179))
{
nHead = 179;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 39)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else if (GetRacialType(oPC)==RACIAL_TYPE_GNOME)
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 20)
{
nHead = 1;
}
if ((nHead > 10) && (nHead < 15))
{
nHead = 15;
}
if ((nHead > 15) && (nHead < 18))
{
nHead = 18;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 39)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else if (GetRacialType(oPC)==RACIAL_TYPE_HALFLING)
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 176)
{
nHead = 1;
}
if ((nHead > 15) && (nHead < 161))
{
nHead = 161;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 169)
{
nHead = 1;
}
if ((nHead > 26) && (nHead < 160))
{
nHead = 160;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else if (GetRacialType(oPC)==RACIAL_TYPE_HALFORC)
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 23)
{
nHead = 1;
}
if ((nHead > 15) && (nHead < 18))
{
nHead = 18;
}
if ((nHead > 18) && (nHead < 21))
{
nHead = 21;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 36)
{
nHead = 1;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
else
{
if (GetGender(oPC) == GENDER_FEMALE)
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 191)
{
nHead = 1;
}
if ((nHead > 49) && (nHead < 100))
{
nHead = 100;
}
if ((nHead > 115) && (nHead < 132))
{
nHead = 132;
}
if ((nHead > 134) && (nHead < 140))
{
nHead = 140;
}
if ((nHead > 144) && (nHead < 147))
{
nHead = 147;
}
if ((nHead > 152) && (nHead < 155))
{
nHead = 155;
}
if ((nHead > 160) && (nHead < 168))
{
nHead = 168;
}
if ((nHead > 168) && (nHead < 172))
{
nHead = 172;
}
if ((nHead > 172) && (nHead < 175))
{
nHead = 175;
}
if ((nHead > 175) && (nHead < 180))
{
nHead = 180;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
else
{
int nHead = GetCreatureBodyPart(CREATURE_PART_HEAD, oPC) + 1;
if (nHead > 165)
{
nHead = 1;
}
if ((nHead > 49) && (nHead < 100))
{
nHead = 100;
}
if ((nHead > 113) && (nHead < 115))
{
nHead = 115;
}
if ((nHead > 123) && (nHead < 132))
{
nHead = 132;
}
if ((nHead > 132) && (nHead < 135))
{
nHead = 135;
}
if ((nHead > 135) && (nHead < 138))
{
nHead = 138;
}
if ((nHead > 138) && (nHead < 140))
{
nHead = 140;
}
SetCreatureBodyPart(CREATURE_PART_HEAD, nHead, oPC);
}
}
}
Thank you for any help you can offer.
Modifié par Sadira of Tyr, 26 janvier 2013 - 11:36 .





Retour en haut






