Page 1 of 1

special hair dye and special beard dye v2

Posted: Thu Dec 22, 2011 2:54 am
by dragon slayer
version 2
Fixed hair and beard dye would give a error when trying to dye without any hair or beard.
Fixed so bottle deletes after one use.



here is special hair and beard dye :)

specialbearddye.js
function onUseChecked ( pUser, iUsed )
{
  var socket = pUser.socket;
  socket.tempObj = iUsed;
  if( iUsed.container != null )
  {    
           FindItemLayer=pUser.FindItemLayer(0x10);
           if( FindItemLayer == null )
           {
               pUser.SysMessage( "You have no beard to dye." );
               return false;
           }
           else
            var myGump = new Gump;
            myGump.AddPage(0);
            myGump.AddBackground( 0, 0, 420, 400, 5054 );
            myGump.AddBackground( 10, 10, 400, 380, 3000 );
        myGump.AddText( 91, 10, 1000, "Beard Color Selection Menu" );
        myGump.AddText( 81, 361, 1000, "Dye my beard this color!" );
        myGump.AddButton( 251, 360, 0xf7, 1, 0, 1 );
            myGump.AddBackground( 28, 30, 120, 315, 5054 );
        myGump.AddButton( 40, 40, 0x0a9a, 0, 1, 0 );
        myGump.AddText( 60, 40, 12, "*****" );
        myGump.AddButton( 40, 65, 0x0a9a, 0, 2, 0 );
        myGump.AddText( 60, 65, 32, "*****" );
        myGump.AddButton( 40, 90, 0x0a9a, 0, 3, 0 );
        myGump.AddText( 60, 90, 38, "*****" );
        myGump.AddButton( 40, 115, 0x0a9a, 0, 4, 0 );
        myGump.AddText( 60, 115, 54, "*****" );
        myGump.AddButton( 40, 140, 0x0a9a, 0, 5, 0 );
        myGump.AddText( 60, 140, 62, "*****" );
        myGump.AddButton( 40, 165, 0x0a9a, 0, 6, 0 );
        myGump.AddText( 60, 165, 1201, "*****" );
        myGump.AddButton( 40, 190, 0x0a9a, 0, 7, 0 );
        myGump.AddText( 60, 190, 81, "*****" );
        myGump.AddButton( 40, 215, 0x0a9a, 0, 8, 0 );
        myGump.AddText( 60, 215, 89, "*****" );
        myGump.AddButton( 40, 240, 0x0a9a, 0, 9, 0 );
        myGump.AddText( 60, 240, 1153, "*****" );

            myGump.AddPage(1);
            myGump.AddRadio( 160, 30, 0xa92, 0, 12 );
        myGump.AddText( 175, 30, 12, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 13 );
        myGump.AddText( 175, 50, 13, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 14 );
        myGump.AddText( 175, 70, 14, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 15 );
        myGump.AddText( 175, 90, 15, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 16 );
        myGump.AddText( 175, 110, 16, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 17 );
        myGump.AddText( 175, 130, 17, "*****" );
            myGump.AddRadio( 160, 150, 0xa92, 0, 18 );
        myGump.AddText( 175, 150, 18, "*****" );
            myGump.AddRadio( 160, 170, 0xa92, 0, 19 );
        myGump.AddText( 175, 170, 19, "*****" );
            myGump.AddRadio( 160, 190, 0xa92, 0, 20 );
        myGump.AddText( 175, 190, 20, "*****" );
            myGump.AddRadio( 160, 210, 0xa92, 0, 21 );
        myGump.AddText( 175, 210, 21, "*****" );
            myGump.AddRadio( 160, 230, 0xa92, 0, 22 );
        myGump.AddText( 175, 230, 22, "*****" );

            myGump.AddPage(2);
            myGump.AddRadio( 160, 30, 0xa92, 0, 32 );
        myGump.AddText( 175, 30, 32, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 33 );
        myGump.AddText( 175, 50, 33, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 34 );
        myGump.AddText( 175, 70, 34, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 35 );
        myGump.AddText( 175, 90, 35, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 36 );
        myGump.AddText( 175, 110, 36, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 37 );
        myGump.AddText( 175, 130, 37, "*****" );

            myGump.AddPage(3);
            myGump.AddRadio( 160, 30, 0xa92, 0, 38 );
        myGump.AddText( 175, 30, 38, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 39 );
        myGump.AddText( 175, 50, 39, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 40 );
        myGump.AddText( 175, 70, 40, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 41 );
        myGump.AddText( 175, 90, 41, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 42 );
        myGump.AddText( 175, 110, 42, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 43 );
        myGump.AddText( 175, 130, 43, "*****" );
            myGump.AddRadio( 160, 150, 0xa92, 0, 44 );
        myGump.AddText( 175, 150, 44, "*****" );
            myGump.AddRadio( 160, 170, 0xa92, 0, 45 );
        myGump.AddText( 175, 170, 45, "*****" );
            myGump.AddRadio( 160, 190, 0xa92, 0, 46 );
        myGump.AddText( 175, 190, 46, "*****" );

            myGump.AddPage(4);
            myGump.AddRadio( 160, 30, 0xa92, 0, 54 );
        myGump.AddText( 175, 30, 54, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 55 );
        myGump.AddText( 175, 50, 55, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 56 );
        myGump.AddText( 175, 70, 56, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 57 );
        myGump.AddText( 175, 90, 57, "*****" );

            myGump.AddPage(5);
            myGump.AddRadio( 160, 30, 0xa92, 0, 62 );
        myGump.AddText( 175, 30, 62, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 63 );
        myGump.AddText( 175, 50, 63, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 64 );
        myGump.AddText( 175, 70, 64, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 65 );
        myGump.AddText( 175, 90, 65, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 66 );
        myGump.AddText( 175, 110, 66, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 67 );
        myGump.AddText( 175, 130, 67, "*****" );
            myGump.AddRadio( 160, 150, 0xa92, 0, 68 );
        myGump.AddText( 175, 150, 68, "*****" );
            myGump.AddRadio( 160, 170, 0xa92, 0, 69 );
        myGump.AddText( 175, 170, 69, "*****" );
            myGump.AddRadio( 160, 190, 0xa92, 0, 70 );
        myGump.AddText( 175, 190, 70, "*****" );
            myGump.AddRadio( 160, 210, 0xa92, 0, 71 );
        myGump.AddText( 175, 210, 71, "*****" );
            myGump.AddRadio( 160, 230, 0xa92, 0, 72 );
        myGump.AddText( 175, 230, 72, "*****" );

            myGump.AddPage(6);
            myGump.AddRadio( 160, 30, 0xa92, 0, 81 );
        myGump.AddText( 175, 30, 81, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 82 );
        myGump.AddText( 175, 50, 82, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 83 );
        myGump.AddText( 175, 70, 83, "*****" );

            myGump.AddPage(7);
            myGump.AddRadio( 160, 30, 0xa92, 0, 89 );
        myGump.AddText( 175, 30, 89, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 90 );
        myGump.AddText( 175, 50, 90, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 91 );
        myGump.AddText( 175, 70, 91, "*****" );

            myGump.AddPage(8);
            myGump.AddRadio( 160, 30, 0xa92, 0, 1153 );
        myGump.AddText( 175, 30, 1153, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 1154 );
        myGump.AddText( 175, 50, 1154, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 1155 );
        myGump.AddText( 175, 70, 1155, "*****" );
            myGump.Send( pUser ); // send this gump to client now
            myGump.Free(); // clear this gump from uox-memory
            return false;
   }
   else
   pUser.SysMessage( "That must be in your pack for you to use it." );
    return false;
}

function onGumpPress( pSock, pButton, gumpData )
{
    var bItem = pSock.tempObj;
    var pUser = pSock.currentChar;
    switch(pButton)
    {
        case 0:
            // abort and do nothing
            break;
        case 1:
                        FindItemLayer=pUser.FindItemLayer(0x10);
                        var OtherButton = gumpData.getButton(0);
            switch( OtherButton )
            {
                case 12:
                                          FindItemLayer.colour = 0x12;
                                          bItem.Delete(); break;
                case 13:
                                          FindItemLayer.colour = 0x13;
                                          bItem.Delete(); break;
                case 14:
                                          FindItemLayer.colour = 0x14;
                                          bItem.Delete(); break;
                case 15:
                                          FindItemLayer.colour = 0x15;
                                          bItem.Delete(); break;
                case 16:
                                          FindItemLayer.colour = 0x16;
                                          bItem.Delete(); break;
                case 17:
                                          FindItemLayer.colour = 0x17;
                                          bItem.Delete(); break;
                case 18:
                                          FindItemLayer.colour = 0x18;
                                          bItem.Delete(); break;
                case 19:
                                          FindItemLayer.colour = 0x19;
                                          bItem.Delete(); break;
                case 20:
                                          FindItemLayer.colour = 0x1A;
                                          bItem.Delete(); break;
                case 21:
                                          FindItemLayer.colour = 0x1B;
                                          bItem.Delete(); break;
                case 22:
                                          FindItemLayer.colour = 0x1C;
                                          bItem.Delete(); break;
                case 32:
                                          FindItemLayer.colour = 0x20;
                                          bItem.Delete(); break;
                case 33:
                                          FindItemLayer.colour = 0x21;
                                          bItem.Delete(); break;
                case 34:
                                          FindItemLayer.colour = 0x22;
                                          bItem.Delete(); break;
                case 35:
                                          FindItemLayer.colour = 0x23;
                                          bItem.Delete(); break;
                case 36:
                                          FindItemLayer.colour = 0x24;
                                          bItem.Delete(); break;
                case 37:
                                          FindItemLayer.colour = 0x25;
                                          bItem.Delete(); break;
                case 38:
                                          FindItemLayer.colour = 0x26;
                                          bItem.Delete(); break;
                case 39:
                                          FindItemLayer.colour = 0x27;
                                          bItem.Delete(); break;
                case 40:
                                          FindItemLayer.colour = 0x28;
                                          bItem.Delete(); break;
                case 41:
                                          FindItemLayer.colour = 0x29;
                                          bItem.Delete(); break;
                case 42:
                                          FindItemLayer.colour = 0x2A;
                                          bItem.Delete(); break;
                case 43:
                                          FindItemLayer.colour = 0x2B;
                                          bItem.Delete(); break;
                case 44:
                                          FindItemLayer.colour = 0x2C;
                                          bItem.Delete(); break;
                case 45:
                                          FindItemLayer.colour = 0x2D;
                                          bItem.Delete(); break;
                case 46:
                                          FindItemLayer.colour = 0x2E;
                                          bItem.Delete(); break;
                case 54:
                                          FindItemLayer.colour = 0x36;
                                          bItem.Delete(); break;
                case 55:
                                          FindItemLayer.colour = 0x37;
                                          bItem.Delete(); break;
                case 56:
                                          FindItemLayer.colour = 0x38;
                                          bItem.Delete(); break;
                case 57:
                                          FindItemLayer.colour = 0x39;
                                          bItem.Delete(); break;
                case 62:
                                          FindItemLayer.colour = 0x3E;
                                          bItem.Delete(); break;
                case 63:
                                          FindItemLayer.colour = 0x3F;
                                          bItem.Delete(); break;
                case 64:
                                          FindItemLayer.colour = 0x40;
                                          bItem.Delete(); break;
                case 65:
                                          FindItemLayer.colour = 0x41;
                                          bItem.Delete(); break;
                case 66:
                                          FindItemLayer.colour = 0x42;
                                          bItem.Delete(); break;
                case 67:
                                          FindItemLayer.colour = 0x43;
                                          bItem.Delete(); break;
                case 68:
                                          FindItemLayer.colour = 0x44;
                                          bItem.Delete(); break;
                case 69:
                                          FindItemLayer.colour = 0x45;
                                          bItem.Delete(); break;
                case 70:
                                          FindItemLayer.colour = 0x46;
                                          bItem.Delete(); break;
                case 71:
                                          FindItemLayer.colour = 0x47;
                                          bItem.Delete(); break;
                case 72:
                                          FindItemLayer.colour = 0x48;
                                          bItem.Delete(); break;
                case 81:
                                          FindItemLayer.colour = 0x51;
                                          bItem.Delete(); break;
                case 82:
                                          FindItemLayer.colour = 0x52;
                                          bItem.Delete(); break;
                case 83:
                                          FindItemLayer.colour = 0x53;
                                          bItem.Delete(); break;
                case 89:
                                          FindItemLayer.colour = 0x59;
                                          bItem.Delete(); break;
                case 90:
                                          FindItemLayer.colour = 0x5A;
                                          bItem.Delete(); break;
                case 91:
                                          FindItemLayer.colour = 0x5B;
                                          bItem.Delete(); break;
                case 1153:
                                          FindItemLayer.colour = 0x481;
                                          bItem.Delete(); break;
                case 1154:
                                          FindItemLayer.colour = 0x482;
                                          bItem.Delete(); break;
                case 1155:
                                          FindItemLayer.colour = 0x483;
                                          bItem.Delete(); break;
            }
            break;
    }
}

Posted: Thu Dec 22, 2011 2:55 am
by dragon slayer
specialhairdye.js
function onUseChecked ( pUser, iUsed )
{
  var socket = pUser.socket;
  socket.tempObj = iUsed;
  if( iUsed.container != null )
  {    
           FindItemLayer=pUser.FindItemLayer(0x0B);
           if( FindItemLayer == null )
           {
               pUser.SysMessage( "You have no hair to dye." );
               return false;
           }
           else
            var myGump = new Gump;
            myGump.AddPage(0);
            myGump.AddBackground( 0, 0, 420, 400, 5054 );
            myGump.AddBackground( 10, 10, 400, 380, 3000 );
        myGump.AddText( 91, 10, 1000, "Hair Color Selection Menu" );
        myGump.AddText( 81, 361, 1000, "Dye my hair this color!" );
        myGump.AddButton( 251, 360, 0xf7, 1, 0, 1 );
            myGump.AddBackground( 28, 30, 120, 315, 5054 );
        myGump.AddButton( 40, 40, 0x0a9a, 0, 1, 0 );
        myGump.AddText( 60, 40, 12, "*****" );
        myGump.AddButton( 40, 65, 0x0a9a, 0, 2, 0 );
        myGump.AddText( 60, 65, 32, "*****" );
        myGump.AddButton( 40, 90, 0x0a9a, 0, 3, 0 );
        myGump.AddText( 60, 90, 38, "*****" );
        myGump.AddButton( 40, 115, 0x0a9a, 0, 4, 0 );
        myGump.AddText( 60, 115, 54, "*****" );
        myGump.AddButton( 40, 140, 0x0a9a, 0, 5, 0 );
        myGump.AddText( 60, 140, 62, "*****" );
        myGump.AddButton( 40, 165, 0x0a9a, 0, 6, 0 );
        myGump.AddText( 60, 165, 1201, "*****" );
        myGump.AddButton( 40, 190, 0x0a9a, 0, 7, 0 );
        myGump.AddText( 60, 190, 81, "*****" );
        myGump.AddButton( 40, 215, 0x0a9a, 0, 8, 0 );
        myGump.AddText( 60, 215, 89, "*****" );
        myGump.AddButton( 40, 240, 0x0a9a, 0, 9, 0 );
        myGump.AddText( 60, 240, 1153, "*****" );

            myGump.AddPage(1);
            myGump.AddRadio( 160, 30, 0xa92, 0, 12 );
        myGump.AddText( 175, 30, 12, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 13 );
        myGump.AddText( 175, 50, 13, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 14 );
        myGump.AddText( 175, 70, 14, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 15 );
        myGump.AddText( 175, 90, 15, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 16 );
        myGump.AddText( 175, 110, 16, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 17 );
        myGump.AddText( 175, 130, 17, "*****" );
            myGump.AddRadio( 160, 150, 0xa92, 0, 18 );
        myGump.AddText( 175, 150, 18, "*****" );
            myGump.AddRadio( 160, 170, 0xa92, 0, 19 );
        myGump.AddText( 175, 170, 19, "*****" );
            myGump.AddRadio( 160, 190, 0xa92, 0, 20 );
        myGump.AddText( 175, 190, 20, "*****" );
            myGump.AddRadio( 160, 210, 0xa92, 0, 21 );
        myGump.AddText( 175, 210, 21, "*****" );
            myGump.AddRadio( 160, 230, 0xa92, 0, 22 );
        myGump.AddText( 175, 230, 22, "*****" );

            myGump.AddPage(2);
            myGump.AddRadio( 160, 30, 0xa92, 0, 32 );
        myGump.AddText( 175, 30, 32, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 33 );
        myGump.AddText( 175, 50, 33, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 34 );
        myGump.AddText( 175, 70, 34, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 35 );
        myGump.AddText( 175, 90, 35, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 36 );
        myGump.AddText( 175, 110, 36, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 37 );
        myGump.AddText( 175, 130, 37, "*****" );

            myGump.AddPage(3);
            myGump.AddRadio( 160, 30, 0xa92, 0, 38 );
        myGump.AddText( 175, 30, 38, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 39 );
        myGump.AddText( 175, 50, 39, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 40 );
        myGump.AddText( 175, 70, 40, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 41 );
        myGump.AddText( 175, 90, 41, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 42 );
        myGump.AddText( 175, 110, 42, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 43 );
        myGump.AddText( 175, 130, 43, "*****" );
            myGump.AddRadio( 160, 150, 0xa92, 0, 44 );
        myGump.AddText( 175, 150, 44, "*****" );
            myGump.AddRadio( 160, 170, 0xa92, 0, 45 );
        myGump.AddText( 175, 170, 45, "*****" );
            myGump.AddRadio( 160, 190, 0xa92, 0, 46 );
        myGump.AddText( 175, 190, 46, "*****" );

            myGump.AddPage(4);
            myGump.AddRadio( 160, 30, 0xa92, 0, 54 );
        myGump.AddText( 175, 30, 54, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 55 );
        myGump.AddText( 175, 50, 55, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 56 );
        myGump.AddText( 175, 70, 56, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 57 );
        myGump.AddText( 175, 90, 57, "*****" );

            myGump.AddPage(5);
            myGump.AddRadio( 160, 30, 0xa92, 0, 62 );
        myGump.AddText( 175, 30, 62, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 63 );
        myGump.AddText( 175, 50, 63, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 64 );
        myGump.AddText( 175, 70, 64, "*****" );
            myGump.AddRadio( 160, 90, 0xa92, 0, 65 );
        myGump.AddText( 175, 90, 65, "*****" );
            myGump.AddRadio( 160, 110, 0xa92, 0, 66 );
        myGump.AddText( 175, 110, 66, "*****" );
            myGump.AddRadio( 160, 130, 0xa92, 0, 67 );
        myGump.AddText( 175, 130, 67, "*****" );
            myGump.AddRadio( 160, 150, 0xa92, 0, 68 );
        myGump.AddText( 175, 150, 68, "*****" );
            myGump.AddRadio( 160, 170, 0xa92, 0, 69 );
        myGump.AddText( 175, 170, 69, "*****" );
            myGump.AddRadio( 160, 190, 0xa92, 0, 70 );
        myGump.AddText( 175, 190, 70, "*****" );
            myGump.AddRadio( 160, 210, 0xa92, 0, 71 );
        myGump.AddText( 175, 210, 71, "*****" );
            myGump.AddRadio( 160, 230, 0xa92, 0, 72 );
        myGump.AddText( 175, 230, 72, "*****" );

            myGump.AddPage(6);
            myGump.AddRadio( 160, 30, 0xa92, 0, 81 );
        myGump.AddText( 175, 30, 81, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 82 );
        myGump.AddText( 175, 50, 82, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 83 );
        myGump.AddText( 175, 70, 83, "*****" );

            myGump.AddPage(7);
            myGump.AddRadio( 160, 30, 0xa92, 0, 89 );
        myGump.AddText( 175, 30, 89, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 90 );
        myGump.AddText( 175, 50, 90, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 91 );
        myGump.AddText( 175, 70, 91, "*****" );

            myGump.AddPage(8);
            myGump.AddRadio( 160, 30, 0xa92, 0, 1153 );
        myGump.AddText( 175, 30, 1153, "*****" );
            myGump.AddRadio( 160, 50, 0xa92, 0, 1154 );
        myGump.AddText( 175, 50, 1154, "*****" );
            myGump.AddRadio( 160, 70, 0xa92, 0, 1155 );
        myGump.AddText( 175, 70, 1155, "*****" );
            myGump.Send( pUser ); // send this gump to client now
            myGump.Free(); // clear this gump from uox-memory
            return false;
   }
   else
   pUser.SysMessage( "That must be in your pack for you to use it." );
    return false;
}

function onGumpPress( pSock, pButton, gumpData )
{
    var bItem = pSock.tempObj;
    var pUser = pSock.currentChar;
    switch(pButton)
    {
        case 0:
            // abort and do nothing
            break;
        case 1:
                        FindItemLayer=pUser.FindItemLayer(0x0B);
                        var OtherButton = gumpData.getButton(0);
            switch( OtherButton )
            {
                case 12:
                                          FindItemLayer.colour = 0x12;
                                          bItem.Delete(); break;
                case 13:
                                          FindItemLayer.colour = 0x13;
                                          bItem.Delete(); break;
                case 14:
                                          FindItemLayer.colour = 0x14;
                                          bItem.Delete(); break;
                case 15:
                                          FindItemLayer.colour = 0x15;
                                          bItem.Delete(); break;
                case 16:
                                          FindItemLayer.colour = 0x16;
                                          bItem.Delete(); break;
                case 17:
                                          FindItemLayer.colour = 0x17;
                                          bItem.Delete(); break;
                case 18:
                                          FindItemLayer.colour = 0x18;
                                          bItem.Delete(); break;
                case 19:
                                          FindItemLayer.colour = 0x19;
                                          bItem.Delete(); break;
                case 20:
                                          FindItemLayer.colour = 0x1A;
                                          bItem.Delete(); break;
                case 21:
                                          FindItemLayer.colour = 0x1B;
                                          bItem.Delete(); break;
                case 22:
                                          FindItemLayer.colour = 0x1C;
                                          bItem.Delete(); break;
                case 32:
                                          FindItemLayer.colour = 0x20;
                                          bItem.Delete(); break;
                case 33:
                                          FindItemLayer.colour = 0x21;
                                          bItem.Delete(); break;
                case 34:
                                          FindItemLayer.colour = 0x22;
                                          bItem.Delete(); break;
                case 35:
                                          FindItemLayer.colour = 0x23;
                                          bItem.Delete(); break;
                case 36:
                                          FindItemLayer.colour = 0x24;
                                          bItem.Delete(); break;
                case 37:
                                          FindItemLayer.colour = 0x25;
                                          bItem.Delete(); break;
                case 38:
                                          FindItemLayer.colour = 0x26;
                                          bItem.Delete(); break;
                case 39:
                                          FindItemLayer.colour = 0x27;
                                          bItem.Delete(); break;
                case 40:
                                          FindItemLayer.colour = 0x28;
                                          bItem.Delete(); break;
                case 41:
                                          FindItemLayer.colour = 0x29;
                                          bItem.Delete(); break;
                case 42:
                                          FindItemLayer.colour = 0x2A;
                                          bItem.Delete(); break;
                case 43:
                                          FindItemLayer.colour = 0x2B;
                                          bItem.Delete(); break;
                case 44:
                                          FindItemLayer.colour = 0x2C;
                                          bItem.Delete(); break;
                case 45:
                                          FindItemLayer.colour = 0x2D;
                                          bItem.Delete(); break;
                case 46:
                                          FindItemLayer.colour = 0x2E;
                                          bItem.Delete(); break;
                case 54:
                                          FindItemLayer.colour = 0x36;
                                          bItem.Delete(); break;
                case 55:
                                          FindItemLayer.colour = 0x37;
                                          bItem.Delete(); break;
                case 56:
                                          FindItemLayer.colour = 0x38;
                                          bItem.Delete(); break;
                case 57:
                                          FindItemLayer.colour = 0x39;
                                          bItem.Delete(); break;
                case 62:
                                          FindItemLayer.colour = 0x3E;
                                          bItem.Delete(); break;
                case 63:
                                          FindItemLayer.colour = 0x3F;
                                          bItem.Delete(); break;
                case 64:
                                          FindItemLayer.colour = 0x40;
                                          bItem.Delete(); break;
                case 65:
                                          FindItemLayer.colour = 0x41;
                                          bItem.Delete(); break;
                case 66:
                                          FindItemLayer.colour = 0x42;
                                          bItem.Delete(); break;
                case 67:
                                          FindItemLayer.colour = 0x43;
                                          bItem.Delete(); break;
                case 68:
                                          FindItemLayer.colour = 0x44;
                                          bItem.Delete(); break;
                case 69:
                                          FindItemLayer.colour = 0x45;
                                          bItem.Delete(); break;
                case 70:
                                          FindItemLayer.colour = 0x46;
                                          bItem.Delete(); break;
                case 71:
                                          FindItemLayer.colour = 0x47;
                                          bItem.Delete(); break;
                case 72:
                                          FindItemLayer.colour = 0x48;
                                          bItem.Delete(); break;
                case 81:
                                          FindItemLayer.colour = 0x51;
                                          bItem.Delete(); break;
                case 82:
                                          FindItemLayer.colour = 0x52;
                                          bItem.Delete(); break;
                case 83:
                                          FindItemLayer.colour = 0x53;
                                          bItem.Delete(); break;
                case 89:
                                          FindItemLayer.colour = 0x59;
                                          bItem.Delete(); break;
                case 90:
                                          FindItemLayer.colour = 0x5A;
                                          bItem.Delete(); break;
                case 91:
                                          FindItemLayer.colour = 0x5B;
                                          bItem.Delete(); break;
                case 1153:
                                          FindItemLayer.colour = 0x481;
                                          bItem.Delete(); break;
                case 1154:
                                          FindItemLayer.colour = 0x482;
                                          bItem.Delete(); break;
                case 1155:
                                          FindItemLayer.colour = 0x483;
                                          bItem.Delete(); break;
            }
            break;
    }
}

Re: special hair dye and special beard dye v2

Posted: Sat Mar 03, 2012 6:52 pm
by lustrianna
Where do I find the actual special hair dye in game? or what is the command to make it appear?

Re: special hair dye and special beard dye v2

Posted: Sat Mar 03, 2012 11:57 pm
by dragon slayer
Okay add the .js to your custom folder

and then go in jse_fileassociations add it under misc and look how the other js files are then take that number you give it and make a item

Code: Select all

[specialbearddye]
{
get=base_item
name=Special Beard Dye
id=0xE26
weight=100
decay=1
script=5054
value=500000 250000
restock=20
}

Code: Select all

[specialhairdye]
{
get=base_item
name=Special Hair Dye
id=0xE26
weight=100
decay=1
script=5053
value=500000 250000
restock=20
}

Re: special hair dye and special beard dye v2

Posted: Wed Mar 07, 2012 7:31 pm
by lustrianna
Still having trouble with this. i installed the scripts and dfn, the console starts up with no errors and i can add the item in game via command, yet when i double click the hair or beard dye it just says "you're not sure what to do with that" or something to that effect...

Re: special hair dye and special beard dye v2

Posted: Wed Mar 07, 2012 7:31 pm
by lustrianna
Still having trouble with this. i installed the scripts and dfn, the console starts up with no errors and i can add the item in game via command, yet when i double click the hair or beard dye it just says "you're not sure what to do with that" or something to that effect...

Re: special hair dye and special beard dye v2

Posted: Wed Mar 07, 2012 8:15 pm
by Xuri
Did you add the script to the jse_fileassociations.scp file? Just open UOX3\JS\jse_fileassociations.scp in notepad, scroll down until you see some IDs listed around 5000, then add the following lines:

Code: Select all

5053=custom\specialhairdye.js
5054=custom\specialbearddye.js
Then restart UOX3 or reload the javascripts from the UOX3 console menu (press '*' to unlock, then '8' to reload JS scripts).

Re: special hair dye and special beard dye v2

Posted: Wed Mar 07, 2012 9:45 pm
by dragon slayer
thnaks xuri i really need to seat down and write a howto doc. because i suck at howto do stuff LOL.