sound fro droping items

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

sound fro droping items

Post by dragon slayer »

Code: Select all

so I wanted to move all the drop sounds out of code and into js this what I got so far. I stuck it in the global.js for it to work.

function onDropItemOnItem( iDropped, cDropper, iDroppedOn )
{
      switch( iDroppedOn.id )
      {
	    case 0x0E75:	// backpack
	    case 0x0E76:	// leather bag
	    case 0x0E79:	// pouch
            case 0x09B0:	// pouch
	    case 0x2AF8:	// Shopkeeper buy, sell and sold layers
	    case 0x2256:	// bagball
            case 0x2257:	// bagball
            cDropper.TextMessage("Testing" );
            cDropper.SoundEffect( 0x0048, true );
						break;
       }
       else
       {
	    cDropper.TextMessage( "Generic error message!" );
       }
}
Post Reply