Procrastination special - Amulet of the Gourmand
Posted: Tue Feb 09, 2010 4:21 am
I have two scripts there I experimented with for this. Basically it was to be an amulet that would allow you to eat corpses for no particular reason.
I can't remember if it actually worked. I didn't get far enough to decide if I just wanted people eat devour corpses they came across with no control or target them. Maybe they would eventually turn into a ghoul or something.. 
and
//Amulet of the Gourmand
function onEquip(mChar, ourObj)
{
mChar.SysMessage( "You feel a strange hunger inside.");
var isInRange = pUser.InRange( iUsed, 3 );
if( objType == 1 ) // An item came into range
{
if( objInRange.id == corpse ) // Chow time
{
pCharacter.EmoteMessage( "*ooooooooooooo*" );
}
}
}
var isInRange = pUser.InRange( objInRange, 1 );
if( objInRange = corpse )
{
pSock.SysMessage( "You devour the " + objInRange.name + ".");
pSock.SoundEffect( (0x003A + RandomNumber( 0, 2 )), true );
myTarget.Delete();
}
}
function onEquip(mChar, ourObj)
{
mChar.SysMessage( "You feel a strange hunger inside.");
var isInRange = pUser.InRange( iUsed, 3 );
if( objType == 1 ) // An item came into range
{
if( objInRange.id == corpse ) // Chow time
{
pCharacter.EmoteMessage( "*ooooooooooooo*" );
}
}
}
var isInRange = pUser.InRange( objInRange, 1 );
if( objInRange = corpse )
{
pSock.SysMessage( "You devour the " + objInRange.name + ".");
pSock.SoundEffect( (0x003A + RandomNumber( 0, 2 )), true );
myTarget.Delete();
}
}
//Amulet of the Gourmand
function onEquip(pEquipper, iEquipped)
{
var pSock = pEquipper.socket;
AreaCharacterFunction( "myAreaFunc", iEquipped, 10, pSock );
}
function myAreaFunc( srcChar, trgChar, pSock )
{
pSock.SysMessage( "You feel a strange hunger inside.");
srcChar.SysMessage( srcChar );
trgChar.SysMessage( trgChar );
pSock.SysMessage( pSock );
}
//function inRange( pCharacter, objInRange, objType )
//{
// if( objInRange.corpse )
// {
// pCharacter.SysMessage( "You devour the " + objInRange.name + ".");
// pCharacter.SoundEffect( (0x003A + RandomNumber( 0, 2 )), true );
// objInRange.Delete();
// }
//}
function onEquip(pEquipper, iEquipped)
{
var pSock = pEquipper.socket;
AreaCharacterFunction( "myAreaFunc", iEquipped, 10, pSock );
}
function myAreaFunc( srcChar, trgChar, pSock )
{
pSock.SysMessage( "You feel a strange hunger inside.");
srcChar.SysMessage( srcChar );
trgChar.SysMessage( trgChar );
pSock.SysMessage( pSock );
}
//function inRange( pCharacter, objInRange, objType )
//{
// if( objInRange.corpse )
// {
// pCharacter.SysMessage( "You devour the " + objInRange.name + ".");
// pCharacter.SoundEffect( (0x003A + RandomNumber( 0, 2 )), true );
// objInRange.Delete();
// }
//}