|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Oct 2003
Posts: 125
|
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 )
{
|
|
|
|
|
|
#2 (permalink) |
|
Forum Master
|
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 ..... :) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|