A Rubber Chicken of Fortune

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
User avatar
Jediman
UOX3 Apprentice
Posts: 177
Joined: Fri Jul 16, 2004 1:38 am
Location: New England
Has thanked: 0
Been thanked: 0
Contact:

A Rubber Chicken of Fortune

Post by Jediman »

This is a quick little script I whipped up for fun.
I use the chicken statues as a base for these..0x20D1 and set the script to the ID of this one

Code: Select all


//Rubber Chicken of Fortune Script
//By Jediman (Erich Weihrauch) 2-2009

function onUseChecked( pUser, iUsed )
{
	var pSock = pUser.socket;
        var goldTotal = RandomNumber( 10, 10000 ); //set the amount of gold that could be given from 10gp to 10kgp
	pUser.SoundEffect( 0x72, true ); //play the chicken sound effect 'BUCKAW!'
	pUser.SysMessage( "You squeeze the Rubber Chicken of Fortune and get... " + goldTotal + " gold!!");
	var rewardGold = CreateDFNItem (pUser.socket, pUser, "0x0EED", goldTotal, "ITEM", false);
	rewardGold.container = pUser.pack;
	iUsed.Delete();
	return false;
	
}

Great fun!
You may get 10 gold, or you may get 10k gold..so use it next to a bank to be safe or deal with the consequences!

Hmm..gonna test this on a regular chicken now.. ;)
Realms of Valor
- -=- http://www.realmsofvalor.com -=-
-=-Powered By UOX3-=-

Have you read the installation documentation?
http://www.uox3.org/documentation.shtml

'I have a moongate in my backpack' sounds like a bad Brittanian pickup line!
Post Reply