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 06-20-2006, 10:53 AM   #1 (permalink)
Forum Novice
 
Join Date: Dec 2004
Age: 20
Posts: 289
Default Drop Holding

okay there is a small bug in the color wars script, u can hold an item and walk over the teleporter, it teleports u to the arena and then u can use the item in color wars

i know there is a command to fix this but i dont know how to make it work in the script



thanks for the help
Lagg Master is offline   Reply With Quote
Old 06-20-2006, 11:07 AM   #2 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 608
Default

Change the following script to your need:

Code:
                if (m.Backpack != null && m.Holding != null)
                    m.Backpack.DropItem(m.Holding);
b0b01 is offline   Reply With Quote
Old 06-20-2006, 11:30 AM   #3 (permalink)
Forum Novice
 
Join Date: Dec 2004
Age: 20
Posts: 289
Default

thanks man
Lagg Master is offline   Reply With Quote
Old 08-18-2006, 10:54 AM   #4 (permalink)
Forum Novice
 
Join Date: Dec 2004
Age: 20
Posts: 289
Default

did not work
what im doing is under the walkover method i want there holding to drop
so like

public override bool OnMoveOver( Mobile m )
{
if (

Code:
using System; 
using Server.Items;
using System.Collections;
using Server.Misc;
using Server.Mobiles;
using Server.Network;
using Server.Gumps;
using Server.Regions;

namespace Server.Items
{ 
   public class ColorWarBankTeleporter : Item 
   { 
      [Constructable] 
      public ColorWarBankTeleporter() : base( 7107 ) 
      { 
		Visible = false;
      } 

		public override bool OnMoveOver( Mobile m)
		{
			if ( m.Mounted == true )
			{
               		m.SendMessage( "You Cant Do That While Mounted" );
			}


			if ( m.BeginAction( typeof( LightCycle ) ) )
			{
				new LightCycle.NightSightTimer( m ).Start();
				m.LightLevel = LightCycle.DungeonLevel / 2;

				m.FixedParticles( 0x376A, 9, 32, 5007, EffectLayer.Waist );
			}
if ( m is PlayerMobile ) 
{ 


m.Map = Map.Felucca;
m.X = 5383;
m.Y = 1125;
m.Z = 0;

Backpack bag = new Backpack(); 
Container pack = m.Backpack; 
BankBox box = m.BankBox; 
ArrayList equipitems = new ArrayList(m.Items); 
ArrayList bagitems = new ArrayList( pack.Items ); 

foreach (Item item in equipitems) 
{ 
	if ((item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack) && (item.Layer != Layer.Hair) && (item.Layer != Layer.FacialHair) && (item.Layer != Layer.Mount)) 
	{ 
		pack.DropItem( item ); 
	} 

} 

Container pouch = m.Backpack; 
ArrayList finalitems = new ArrayList( pouch.Items ); 

foreach (Item items in finalitems) 
{ 
	bag.DropItem(items); 

} 
box.DropItem(bag);


}
	return false;
}
		
      public ColorWarBankTeleporter( Serial serial ) : base( serial ) 
      { 
      } 

      public override void Serialize( GenericWriter writer ) 
      { 
         base.Serialize( writer ); 

         writer.Write( (int) 0 ); // version 
      } 

      public override void Deserialize( GenericReader reader ) 
      { 
         base.Deserialize( reader ); 

         int version = reader.ReadInt(); 
      } 
   } 
}

nvm i forgot to add a else statement

Last edited by Lagg Master; 08-18-2006 at 11:11 AM.
Lagg Master is offline   Reply With Quote
Old 08-18-2006, 11:59 AM   #5 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 608
Default

Haha, you finally tried it after 2 months?
b0b01 is offline   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