Procrastination special - Amulet of the Gourmand

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
Mindless Automaton
UOX3 Apprentice
Posts: 189
Joined: Wed May 10, 2006 3:48 am
Has thanked: 0
Been thanked: 1 time
Contact:

Procrastination special - Amulet of the Gourmand

Post by Mindless Automaton »

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.. :)
//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();
    }
   
}
and
//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();
//  }
//}
Mindless Automaton
Linux - UOX3 - 0.99.5 dev branch
Win10Pro 19042.572 - UOX3 0.99.3a; Razor 1.0.14; Client 7.0.87.11 or 4.0.11c (Patch 0)
Post Reply