Aargh! it's just 1 error after another!:
void main()
{
object oPC = GetEnteringObject();
if(!GetIsPC(oPC)) return;
// Check Equip Items and get rid of them
int i;
for(i=0; i
{
object oEquip = GetItemInSlot(i,oPC);
if(GetIsObjectValid(oEquip))
{
SetPlotFlag(oEquip,FALSE);
DestroyObject(oEquip);
}
}
// Check general Inventory and clear it out.
object oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem))
{
SetPlotFlag(oItem,FALSE);
DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
//Give them Gold
int iclass = GetclassByPosition(1,oPC);
if (iclass == class_TYPE_BARBARIAN)
{
string sArmour = "hidearmour";
string sWeapon = "handaxe";
string sOther = "sling";
CreateItemOnObject("bullet", oPC);
}
if (iclass == class_TYPE_SORCERER)
{
string sArmour = "plainrobe";
string sWeapon = "staff";
string sOther = "ringofinsight";
}
if (iclass == class_TYPE_WIZARD)
{
string sArmour = "plainrobe";
string sWeapon = "staff";
string sOther = "ringofinsight";
}
if (iclass == class_TYPE_DRUID)
{
string sArmour = "plainrobe";
string sWeapon = "staff";
string sOther = "sickleberry";
}
if (iclass == class_TYPE_MONK)
{
string sArmour = "plainrobe";
string sWeapon = "staff";
string sOther = "medicinalherb";
}
if (iclass == class_TYPE_BARD)
{
string sArmour = "plainrobe";
string sWeapon = "staff";
string sOther = "medicinalherb";
}
if (iclass == class_TYPE_FIGHTER)
{
string sArmour = "heavyleather";
string sWeapon = "longsword";
string sOther = "smallshield";
}
if (iclass == class_TYPE_PALADIN)
{
string sArmour = "chainmail";
string sWeapon = "greatsword";
string sOther = "ringoftheorder";
}
if (iclass == class_TYPE_RANGER)
{
string sArmour = "leatherarmour";
string sWeapon = "shortbow";
string sOther = "arrow";
}
else
{
string sArmour = "plainrobe";
string sWeapon = "staff";
string sOther = "medicinalherb";
}
CreateItemOnObject(sArmour, oPC);
CreateItemOnObject(sWeapon, oPC);
CreateItemOnObject(sOther, oPC);
CreateItemOnObject("medicinalherb", oPC);
CreateItemOnObject("medicinalherb", oPC);
CreateItemOnObject("medicinalherb", oPC);
}
Modifié par Dylmani555, 21 décembre 2010 - 08:52 .