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;
}
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..