Cutting Up cheese

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Cutting Up cheese

Post by dragon slayer »

I guess you all would like to cut the cheese one day. so i beging cutting the cheese. Nose Plugs hehe

open up swords.js
find this line
                if( tileID >= 0x09CC && tileID <0x09CF> 1 )
            ourObj.amount = ourObj.amount-1;
        else
            ourObj.Delete();
    }
    else
        socket.SysMessage( GetDictionaryEntry( 775, socket.Language ) );
}
add this line after that
                if( tileID == 0x097E )  // wheel of Cheese
                    CutCheese( socket, mChar, ourObj );
then find functions at the bottom add this function in.
function CutCheese( socket, mChar, ourObj )
{
    var ownerObj = GetPackOwner( ourObj, 0 );
    if( ownerObj && mChar.serial == ownerObj.serial )
    {
        var itemMade = CreateDFNItem( mChar.socket, mChar, "0x097C", 10, "ITEM", true );
        mChar.SysMessage( "You cut 10 wedges of cheese!" );
        if( ourObj.amount > 1 )
            ourObj.amount = ourObj.amount-1;
        else
            ourObj.Delete();
    }
    else
        socket.SysMessage( GetDictionaryEntry( 775, socket.Language ) );
}
Post Reply