Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 03-13-2007, 01:03 AM   #1 (permalink)
Forum Novice
 
Join Date: Oct 2003
Posts: 125
Default Mobile quest loot

Trying to get this mobile quest to give a magic weapon when completedd, just can't figure out how? anyone know?



Code:
		public override bool OnDragDrop( Mobile from, Item dropped )
		{          		
         	        Mobile m = from;
			PlayerMobile mobile = m as PlayerMobile;

			if ( mobile != null)
			{
				if( dropped is BoneBagFull )
			{
				if( dropped.Amount!=1)
				{
					this.PrivateOverheadMessage( MessageType.Regular, 1153, false, "Good Luck", mobile.NetState );
					return false;
				}
				
					dropped.Delete();
					mobile.SendGump( new UndeadFighterGump2(m) );
					
 			if( 1 > Utility.RandomDouble() ) // 1 = 100% = chance to drop 
			switch ( Utility.Random( 4 ))  
			{ 
		
					case 0: mobile.AddToBackpack( new BattleAxe() ); break;
					case 1: mobile.AddToBackpack( new Katana() ); break;
					case 2: mobile.AddToBackpack( new Bow() ); break;
					case 3: mobile.AddToBackpack( new Gold( 1000 ) ); break;
			}					
				
					return true;
         		}
				else if ( dropped is BoneBagFull )
				{
rammstine911 is offline   Reply With Quote
Old 03-13-2007, 02:00 AM   #2 (permalink)
Forum Master
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,753
Send a message via Yahoo to Lord_Greywolf
Default

right now it should be dropping 1 of the 4 items in the switch method

if you wwant it to drop something different - then switch that part out to what you want it to drop

if those are sapposed to be magical items - then need to either script them in seperate scripts or change it to add thier properties 1st before adding them to the pack
(look at how clothing, weapon and such are added to monsters to to see how to mod them and then add them in)
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is online now   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5