RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Carpentry and Fletcher Bod System for Karmageddons Ores!

Johabius

Johabius said:
Just a quick question, Dan, are you using the same updated ACC & CM from Lucids custom BOD's package, or are you using A_Li_N's package which was last updated in May?
It is located on my custom bod release. I modified to work with 2.0. Small edit.
 

Johabius

Knight
Groovy, thanks! Reinstalling everything, and going to see if I can get it working again. Knowing me, I probably missed an installation step or something.

*EDIT*
Well damn, still no carpenter bod is offered when it says you can get an order now. I'm going to post my carpenter on the off chance that someone might see something that I'm missing. The Bulk order regions in both the carpenter and fletcher look the same to me, but the fletcher is the only one that actually gives the BOD correctly, so I'm at a loss:(

Code:
/* 
-<>>--<<>>--<0>>--<< <<2005>> >>--<<0>--<<>>--<<>-
| ____________________________ |
| -=(_)__________________________)=- |
| \_ All Crafts 1.0.0 _\ |
| \_ ------------------- _\ |
| ) Created By: ) |
| /_ Sirsly & Lucid Nagual _/ |
| _/__________________________/ |
| -=(_)__________________________)=- |
| |
-<>>-<< Based off of Daat99's OWLTR system >>-<<>-
*/
using System;
using System.Collections;
using Server;
using Server.Engines.BulkOrders;
using Server.ACC.CM;
 
namespace Server.Mobiles
{
public class Carpenter : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } }
[Constructable]
public Carpenter() : base( "the carpenter" )
{
SetSkill( SkillName.Carpentry, 85.0, 100.0 );
SetSkill( SkillName.Lumberjacking, 60.0, 83.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBStavesWeapon() );
m_SBInfos.Add( new SBCarpenter() );
m_SBInfos.Add( new SBWoodenShields() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron() );
}
 
#region Bulk Orders
public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
{
PlayerMobile pm = from as PlayerMobile;
BODModule bod_mod = ( BODModule )CentralMemory.GetModule( from.Serial, typeof( BODModule ) );
 
if ( bod_mod == null && from == null )
return null;
if ( bod_mod != null && bod_mod.NextCarpenterBulkOrder == TimeSpan.Zero && ( fromContextMenu || 0.2 > Utility.RandomDouble() ) )
{
double theirSkill = pm.Skills[SkillName.Carpentry].Base;
if ( theirSkill >= 70.1 )
bod_mod.NextCarpenterBulkOrder = TimeSpan.FromHours( 1.0 );
else if ( theirSkill >= 50.1 )
bod_mod.NextCarpenterBulkOrder = TimeSpan.FromHours( 1.0 );
else
bod_mod.NextCarpenterBulkOrder = TimeSpan.FromHours( 1.0 );
if ( theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble() )
return new LargeCarpenterBOD();
return SmallCarpenterBOD.CreateRandomFor( from );
}
else
{
CentralMemory.AppendModule( from.Serial, new BODModule( from.Serial ), true );
from.SendMessage( "Please try again" );
}
return null;
}
public override bool IsValidBulkOrder( Item item )
{
return ( item is SmallCarpenterBOD || item is LargeCarpenterBOD );
}
public override bool SupportsBulkOrders( Mobile from )
{
return ( from is PlayerMobile && from.Skills[SkillName.Carpentry].Base > 0 );
}
public override TimeSpan GetNextBulkOrder( Mobile from )
{
BODModule bod_mod = ( BODModule )CentralMemory.GetModule( from.Serial, typeof( BODModule ) );
 
if ( bod_mod != null && from != null )
return bod_mod.NextCarpenterBulkOrder;
 
//if ( from is PlayerMobile )
// return ((PlayerMobile)from).NextCarpenterBulkOrder;
return TimeSpan.Zero;
}
#endregion
public Carpenter( 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();
}
}
}
I'd really rather not put the bod vendors onto the server at this time, but I guess I might just have to if I can't figure this out.
*EDIT*
Nevermind I'm a tard. I just had a chance to look and the CTFB vendors just replace the current vendors. Added them in, and testing them with my owner account works, and a bod is given, now testing with my player account.
Just wanted to note that you do not need to respawn your vendors for these to work. Thanks.
*EDIT 2*
Arrrgh! I just don't get it. The carpenter vendor will still not give a carpenter BOD to my player account. It tells me that I can get one, and then one is never offered. Fletcher BODs work just fine, but carpenter BODs don't.
*EDIT 3*
Could this line of code from BaseVendor have anything to do with the problem I'm getting.
Code:
public virtual bool SupportsBulkOrders( Mobile from )
{
return false;
}

I really don't think that it does because I'm able to get a carpentry BOD on my Owner account. Right now I'm just kind of grasping at straws;)
 

Ravenloff

Wanderer
Great system :)
I had np receiving the two kinds of bods & the timer works for me.

They problem I'm having is when i drop these colored bods into the bulk order books then remove them they lose thier color & come out looking like smith bods.
 
Johabius

Johabius said:
Groovy, thanks! Reinstalling everything, and going to see if I can get it working again. Knowing me, I probably missed an installation step or something.

*EDIT*
Well damn, still no carpenter bod is offered when it says you can get an order now. I'm going to post my carpenter on the off chance that someone might see something that I'm missing. The Bulk order regions in both the carpenter and fletcher look the same to me, but the fletcher is the only one that actually gives the BOD correctly, so I'm at a loss:(

Code:
/* 
-<>>--<<>>--<0>>--<< <<2005>> >>--<<0>--<<>>--<<>-
| ____________________________ |
| -=(_)__________________________)=- |
| \_ All Crafts 1.0.0 _\ |
| \_ ------------------- _\ |
| ) Created By: ) |
| /_ Sirsly & Lucid Nagual _/ |
| _/__________________________/ |
| -=(_)__________________________)=- |
| |
-<>>-<< Based off of Daat99's OWLTR system >>-<<>-
*/
using System;
using System.Collections;
using Server;
using Server.Engines.BulkOrders;
using Server.ACC.CM;
 
namespace Server.Mobiles
{
public class Carpenter : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } }
[Constructable]
public Carpenter() : base( "the carpenter" )
{
SetSkill( SkillName.Carpentry, 85.0, 100.0 );
SetSkill( SkillName.Lumberjacking, 60.0, 83.0 );
}
public override void InitSBInfo()
{
m_SBInfos.Add( new SBStavesWeapon() );
m_SBInfos.Add( new SBCarpenter() );
m_SBInfos.Add( new SBWoodenShields() );
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Server.Items.HalfApron() );
}
 
#region Bulk Orders
public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
{
PlayerMobile pm = from as PlayerMobile;
BODModule bod_mod = ( BODModule )CentralMemory.GetModule( from.Serial, typeof( BODModule ) );
 
if ( bod_mod == null && from == null )
return null;
if ( bod_mod != null && bod_mod.NextCarpenterBulkOrder == TimeSpan.Zero && ( fromContextMenu || 0.2 > Utility.RandomDouble() ) )
{
double theirSkill = pm.Skills[SkillName.Carpentry].Base;
if ( theirSkill >= 70.1 )
bod_mod.NextCarpenterBulkOrder = TimeSpan.FromHours( 1.0 );
else if ( theirSkill >= 50.1 )
bod_mod.NextCarpenterBulkOrder = TimeSpan.FromHours( 1.0 );
else
bod_mod.NextCarpenterBulkOrder = TimeSpan.FromHours( 1.0 );
if ( theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble() )
return new LargeCarpenterBOD();
return SmallCarpenterBOD.CreateRandomFor( from );
}
else
{
CentralMemory.AppendModule( from.Serial, new BODModule( from.Serial ), true );
from.SendMessage( "Please try again" );
}
return null;
}
public override bool IsValidBulkOrder( Item item )
{
return ( item is SmallCarpenterBOD || item is LargeCarpenterBOD );
}
public override bool SupportsBulkOrders( Mobile from )
{
return ( from is PlayerMobile && from.Skills[SkillName.Carpentry].Base > 0 );
}
public override TimeSpan GetNextBulkOrder( Mobile from )
{
BODModule bod_mod = ( BODModule )CentralMemory.GetModule( from.Serial, typeof( BODModule ) );
 
if ( bod_mod != null && from != null )
return bod_mod.NextCarpenterBulkOrder;
 
//if ( from is PlayerMobile )
// return ((PlayerMobile)from).NextCarpenterBulkOrder;
return TimeSpan.Zero;
}
#endregion
public Carpenter( 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();
}
}
}
I'd really rather not put the bod vendors onto the server at this time, but I guess I might just have to if I can't figure this out.
*EDIT*
Nevermind I'm a tard. I just had a chance to look and the CTFB vendors just replace the current vendors. Added them in, and testing them with my owner account works, and a bod is given, now testing with my player account.
Just wanted to note that you do not need to respawn your vendors for these to work. Thanks.
*EDIT 2*
Arrrgh! I just don't get it. The carpenter vendor will still not give a carpenter BOD to my player account. It tells me that I can get one, and then one is never offered. Fletcher BODs work just fine, but carpenter BODs don't.
*EDIT 3*
Could this line of code from BaseVendor have anything to do with the problem I'm getting.
Code:
public virtual bool SupportsBulkOrders( Mobile from )
{
return false;
}

I really don't think that it does because I'm able to get a carpentry BOD on my Owner account. Right now I'm just kind of grasping at straws;)
No and the reason for that is each vendor has an override on that method.

Make sure your carpentry is higher than 0.
Code:
[B][SIZE=2][COLOR=#0000ff]public [/B][/COLOR][/SIZE][SIZE=2][COLOR=#a52a2a]override [/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]bool [/COLOR][/SIZE][SIZE=2][COLOR=#191970]SupportsBulkOrders[/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400]( [/COLOR][/SIZE][SIZE=2]Mobile from [/SIZE][SIZE=2][COLOR=#006400])
{
[/COLOR][/SIZE][B][SIZE=2][COLOR=#0000ff]if [/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400]( [/COLOR][/SIZE][SIZE=2]from[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]AccessLevel [/SIZE][SIZE=2][COLOR=#006400]< [/COLOR][/SIZE][SIZE=2]AccessLevel[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]GameMaster [/SIZE][SIZE=2][COLOR=#006400])
[/COLOR][/SIZE][B][SIZE=3][COLOR=sienna]return ( from is PlayerMobile && from.Skills[SkillName.Carpentry].Base > 0 [/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400][B][SIZE=3][COLOR=sienna]);[/COLOR][/SIZE][/B]
[/COLOR][/SIZE][B][SIZE=2][COLOR=#0000ff]else
[/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400]{
[/COLOR][/SIZE][SIZE=2]from[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]SendMessage[/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400]( [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]32[/COLOR][/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][SIZE=2][COLOR=#ff00ff]"Your god status has been recognized, the bods can now be accessed!" [/COLOR][/SIZE][SIZE=2][COLOR=#006400]);
[/COLOR][/SIZE][SIZE=2][COLOR=#000080]return [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]true[/B][/COLOR][/SIZE][SIZE=2][COLOR=#006400];
}
}
[/COLOR][/SIZE]

Also do an [add spawner
add Carpenter to the list and spawn it. That way you know for sure it is the new vendor you are working with.
 
Ravenloff

Ravenloff said:
Great system :)
I had np receiving the two kinds of bods & the timer works for me.

They problem I'm having is when i drop these colored bods into the bulk order books then remove them they lose thier color & come out looking like smith bods.
I will check into this problem and get back with you.

OK I tested it and it works fine on my install.
 

Grimklash

Wanderer
For some reason some players can't get the carpenter bods while others can, they get the message they can get one now but no bod and then have to wait like they have gotten one before trying again.Any idea why some can't get them?

I've tested this myself with multiple characters and accounts and seem to have no problem getting them on player or staff characters.

Any help on this issue would be appreciated.
 
Grimklash said:
For some reason some players can't get the carpenter bods while others can, they get the message they can get one now but no bod and then have to wait like they have gotten one before trying again.Any idea why some can't get them?

I've tested this myself with multiple characters and accounts and seem to have no problem getting them on player or staff characters.

Any help on this issue would be appreciated.
They cannot get BODs if their carpentry is less than one skill point.
 

manofwar

Sorceror
Lucid and others.....

I have checked into this some since i use Lucids Bods and the reason i think you cant get bods is because there is no bod small enough in skill to actually give you one. All the stuff i seen that has to made is 72 skill points or higher. I am gonna put a couple of items in the data bod script to see if this is the problem, something that takes no skill or hardly any skill. My testers noticed this when they started testing it all other bods work right except the carpentry bods. But once you get close to 72 in skill it starts giving bods. So this might be the solution since the bod system isnt suppost to give a player a bod to far ahead of the players skill that they cant do them.
 

Grimklash

Wanderer
Its not the skill they have thats what has me stumped even a few that can't get them have 100 carpentry and every test I did I had no trouble getting them its just a few seem to have the problem.
 
Grimklash said:
Its not the skill they have thats what has me stumped even a few that can't get them have 100 carpentry and every test I did I had no trouble getting them its just a few seem to have the problem.
Sounds a lil fishy to me. I would tag them to see if they are lying.
 

Grimklash

Wanderer
Lucid I've actualy watched a couple that have the problem and reset thier bod timer and they never got the bod and they are pretty much players that have been around over a year so they know lying wouldn't get them anything.

Any ideas on what could be causing it?
 

Ravenloff

Wanderer
I have had at least 20 different player charas testing getting carp & fletching bods & np reported yet.

I'm still having the problem of dropping them in the bod book & they losing color when they are removed. They still look like smithing bods after they are removed. I don't know what to do or where to look to figure it out. any suggestions where to look? Thanx
 

Cheetah2003

Wanderer
I like this BOD system, but there's a few serious problems with it.

Worst of them is how the new BODs interact with BOD books. When you place them in a book, they come back out as Smithy BODs. I'm including a patch to the affected files for this, in this post.

The second problem took me a while to figure out. It seems, since the pool of Carpentry BOD items is so tiny, low level carpenters don't get bods, and high level carpenters don't get bods if they've no musicianship.

Sadly, without a pool of lower skill requirement items, there's no elegant fix to this. My fix was to just crank up the minimum skill to even GET a BOD to the minimum needed to make a quarter staff, then I added a check in the CreateRandomFor method that excludes the musicianship BODs if the player doesn't have the necessary skill.

It'd be nice if you'd include some lower skill items for BOD's, like boxes, crates, furniture, etc.

Anyway, fixes for the books are here.
 

Attachments

  • BOBGump.cs
    18.7 KB · Views: 80
  • BOBLargeEntry.cs
    3.7 KB · Views: 79
  • BOBSmallEntry.cs
    3.5 KB · Views: 82

Cheetah2003

Wanderer
Just wanted to add my two cents about ACC.

I hate it. It needs to be able to respond to requests for information IMMEDIATELY, its just soo annoying how I get that 'Please try again' like 5 times in a row before it gets a clue.

I'd rather deal with a butchered PlayerMobile.cs than that. That's just irritating. I removed ACC from this system about an hour after I got it installed and working.
 

Ravenloff

Wanderer
Cheetah 2003 Thanx for the fixes :) but have a problem now when i add the bods to the bulk order book I can't see them listed in the bulk order book.

I dropped one of each, the carp & the fletching & when i open the book nothing listed in there. I have the filter set default on the book. Now i put cursor over the book it says two bods in there but not listing so i can't get them back out either.
 

Cheetah2003

Wanderer
Ravenloff said:
Cheetah 2003 Thanx for the fixes :) but have a problem now when i add the bods to the bulk order book I can't see them listed in the bulk order book.

I dropped one of each, the carp & the fletching & when i open the book nothing listed in there. I have the filter set default on the book. Now i put cursor over the book it says two bods in there but not listing so i can't get them back out either.
Try clicking on the bottom of the gump: Clear filter.
 

Ravenloff

Wanderer
Thanx Cheetah I had a brain fart LOL added in the bobgumpfilter a carpenter section with the wood & forgot to increase the gump size & couldn't see the set filter & clear filter & apply ect..... at the bottom & forgot they were there.

Thanx for the fixes they work great :)
 

Cheetah2003

Wanderer
Ravenloff said:
Thanx Cheetah I had a brain fart LOL added in the bobgumpfilter a carpenter section with the wood & forgot to increase the gump size & couldn't see the set filter & clear filter & apply ect..... at the bottom & forgot they were there.

Thanx for the fixes they work great :)
Wanna share the filter changes with the rest of us? :)
 
Top