I need some help with scripting a new wepon. I entred the code into the scripts.vol file, but when I launched the server, I got error messages saying "Game::EndFrame: UnknownCommand." Here is the weapon script:
Is there a different way I am supposed to enter my scripts into the files?
//****************************
// SLAYER
//****************************
$AccessoryVar[Slayer, $AccessoryType] = $SwordAccessoryType;
$AccessoryVar[Slayer, $SpecialVar] = "1 300";
$AccessoryVar[Slayer, $Weight] = 10;
$AccessoryVar[Slayer, $MiscInfo] = "A great sword used by the mighty Dragon Slayers";
$SkillType[Slayer] = $SkillSlashing;
$WeaponDelay[Slayer] = 2.5;
ItemImageData SlayerImage
{
shapeFile = "sword";
mountPoint = 0;
weaponType = 0; // Single Shot
reloadTime = 0;
fireTime = GetDelay(Slayer);
minEnergy = 0;
maxEnergy = 0;
accuFire = true;
sfxFire = SoundSwing1;
sfxActivate = AxeSlash2;
};
ItemData Slayer
{
heading = "bWeapons";
description = "Slayer";
className = "Weapon";
shapeFile = "sword";
hudIcon = "blaster";
shadowDetailMask = 4;
imageType = SlayerImage;
price = 0;
showWeaponBar = true;
};
function SlayerImage::onFire(%player, %slot)
{
MeleeAttack(%player, GetRange(Slayer), Slayer);
}