|
||
|
|||||||
| Custom Script Releases This forum is where you can release your custom scripts for other users to use. Please note: By releasing your scripts here you are submitting them to the public and as such agree to publish them under the GPL licensing terms. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Master of the Internet
|
UPDATED!!!
have you ever noticed that when a container is full on items, but some of them are stackable and you want to add more into it that go with the stackable ones, that you can't? well here is a simple fix for it this also makes it nice for combining piles if they ever happen again lol - just drag insame bag and they combine up if possible only draw back is you can not have multiple stacks of the same item that could stack (i.e. 5 stacks of 1 coin each, would need to be 30001 or more each) also not tested but probably will hapen is in treasure chests, etc etc that stacks of reagent, etc will combine where same type it does not effect the max stacking of 60k, etc, still abides by it, etc the adding in part is optional - that would probably keep them from combining if you want seperate stacks when placing by hand in there but still need the line moved for best results open container.cs in the tiem/containers directory there are 2 sections to find 1 just needs a line moved and some inserted the 2nd one needs a line moved and a section added find the lines in blue and make their sections match up with the parts in red (remember to remove the 1st line in each) Code:
public override bool TryDropItem( Mobile from, Item dropped, bool sendFullMessage )
{
BaseHouse house = BaseHouse.FindHouseAt( this );
if ( house != null && house.IsLockedDown( this ) )
{
if ( dropped is VendorRentalContract || ( dropped is Container && ((Container)dropped).FindItemByType( typeof( VendorRentalContract ) ) != null ) )
{
from.SendLocalizedMessage( 1062492 );
return false;
}
if ( !house.LockDown( from, dropped, false ) ) return false;
}
if (!(this.RootParentEntity is PlayerVendor || this.RootParentEntity is BaseVendor))
{
List<Item> list = this.Items;
for ( int i = 0; i < list.Count; ++i )
{
Item item = list[i];
if ( !(item is Container) && item.StackWith( from, dropped, false ) ) return true;
}
}
if ( !CheckHold( from, dropped, sendFullMessage, true ) ) return false;//was 1st line in this section
DropItem( dropped );
return true;
}
public override bool OnDragDropInto( Mobile from, Item item, Point3D p )
{
BaseHouse house = BaseHouse.FindHouseAt( this );
if ( house != null && house.IsLockedDown( this ) )
{
if ( item is VendorRentalContract || ( item is Container && ((Container)item).FindItemByType( typeof( VendorRentalContract ) ) != null ) )
{
from.SendLocalizedMessage( 1062492 );
return false;
}
if ( !house.LockDown( from, item, false ) ) return false;
}
//added section for combining
if (!(this.RootParentEntity is PlayerVendor || this.RootParentEntity is BaseVendor))
{
List<Item> list = this.Items;
for ( int i = 0; i < list.Count; ++i )
{
Item item1 = list[i];
if ( !(item1 is Container) && item1.StackWith( from, item, false ) )
{
from.SendSound( GetDroppedSound( item1 ), GetWorldLocation() );
return true;
}
}
}
if ( !CheckHold( from, item, true, true ) ) return false; // was 1st line
item.Location = new Point3D( p.X, p.Y, 0 );
AddItem( item );
from.SendSound( GetDroppedSound( item ), GetWorldLocation() );
return true;
}
![]()
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) Last edited by Lord_Greywolf; 08-17-2009 at 06:37 PM. |
|
|
|
|
|
#3 (permalink) |
|
Master of the Internet
|
had a small problem when placing items on a player vendor to sell (like recall scrolls or ingots, etc)
so i made the fix and the 1st post has been updated to reflect this
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 746
|
Will this fix only work with locked down / secured containers? Or will it fix the issue with when using the [grab system gold not stacking after item count or weight max iis reached?
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
|
#5 (permalink) |
|
Master of the Internet
|
it might fix all of claim/grab issues with that - i am not certain because i had others also
but the claim/grab is what got me to do this ![]() i found other claim grab issues though of going over weight, etc - just keeps stacking, etc - so suddenly the pack has 15 tons in it lol plus if you use bless bags or bags of reduction with have item limits, it goes bonkers too when in them I had to make a lot of adjustments to claim/grab to get it working right and working with the blessed & reduction bags
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#6 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 746
|
OK Thank you that was the issue I was having.. The 15000000 items, which in the end crash people when they recall or go into a moongate. I do not use the bless bags or reduction packs so Im hoping it wont require any editing to the claim to get it to stack gold and regs.
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
|
#7 (permalink) |
|
Master of the Internet
|
it should stack right BUT will still allow to go overweight though
this is how i fixed that problem make this section look simular Code:
public static void DropLoot( Mobile from, Item loot, Container lootBag )
{
List<Item> list = lootBag.Items;
for ( int i = 0; i < list.Count; ++i )
{
Item item1 = list[i];
if ( !(item1 is Container) && item1.StackWith( from, loot, false ) )
{
from.PlaySound( 0x2E6 );
return;
}
}
if ( !lootBag.TryDropItem( from, loot, false ) ) loot.MoveToWorld( from.Location, from.Map );
from.PlaySound( 0x2E6 );
}
can do gold and silver drop simular also so they do not go overweight also and that is in claim.cs
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#8 (permalink) | |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 746
|
Quote:
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|