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 07-06-2003, 03:36 PM   #1 (permalink)
 
Join Date: Jun 2003
Posts: 36
Default Bulk Order Deed Vendor - need some advice

This is not my original code, I just used someone's InsuranceBroker
to test out my idea of a Bulk Order Deed Vendor, but I'm having a
little trouble.

I was able to create the BOD's and they show up on the vendor, but
they don't tell you what type of Bulk Order they are, except that they
are small or large BODs.

Is there a way to create specific types of BODs, say all plate or chain,
different ores and thus being able to place a range of prices on each
BOD, to make it more like what players charge on the offical shards?

I'd like to make it so that there are a few smallBOD's and maybe one
LargeBOD on the vendor that players can check out and then the list
be refreshed like every 6 hours so a player can come back and check
again later if they didn't find what they were looking for.

Here's the code, it's very simple

Quote:
using System;
using System.Collections;
using Server.Items;
using Server.Engines.BulkOrders;

namespace Server.Mobiles
{
public class SBBODSeller : SBInfo
{
private ArrayList m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();

public SBBODSeller()
{
}

public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override ArrayList BuyInfo { get { return m_BuyInfo; } }

public class InternalBuyInfo : ArrayList
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( "Small BOD", typeof( SmallSmithBOD ), 1000, Utility.Random( 5, 10 ), 0x14F0, 0 ) );
Add( new GenericBuyInfo( "Small BOD", typeof( SmallSmithBOD ), 1000, Utility.Random( 5, 10 ), 0x14F0, 0 ) );
Add( new GenericBuyInfo( "Small BOD", typeof( SmallSmithBOD ), 1000, Utility.Random( 5, 10 ), 0x14F0, 0 ) );
Add( new GenericBuyInfo( "Small BOD", typeof( SmallSmithBOD ), 1000, Utility.Random( 5, 10 ), 0x14F0, 0 ) );
Add( new GenericBuyInfo( "Small BOD", typeof( SmallSmithBOD ), 1000, Utility.Random( 5, 10 ), 0x14F0, 0 ) );
Add( new GenericBuyInfo( "Large BOD", typeof( LargeSmithBOD ), 10000, Utility.Random( 5, 10 ), 0x14F0, 0 ) );
Add( new GenericBuyInfo( "Large BOD", typeof( LargeSmithBOD ), 10000, Utility.Random( 5, 10 ), 0x14F0, 0 ) );
}
}

public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
}
}
}
}
DanielV is offline   Reply With Quote
Old 07-06-2003, 03:52 PM   #2 (permalink)
Timea Shard Owner
 
dean968's Avatar
 
Join Date: Jun 2003
Location: Decatur Alabama
Age: 31
Posts: 379
Send a message via ICQ to dean968
Default

what did u use to spawn the bod vendor ? sbbodseller? i did that and it takes it in the spawner but wont spawn the vendor
dean968 is offline   Reply With Quote
Old 07-06-2003, 03:58 PM   #3 (permalink)
 
Join Date: Jun 2003
Posts: 36
Default

Quote:
what did u use to spawn the bod vendor ? sbbodseller? i did that and it takes it in the spawner but wont spawn the vendor
I just used [add BODSeller
I was just testing the vendor.

If I were going to create a spawn of it,
I would use some program like Pandora's Box
to create and xml of the vendor, then use xmlspawnerload
to load the spawns.

I used someone's Insurance Broker vendor to test my idea.
It was SBInsuranceBroker.cs that I modified to test out my
idea. I'm afraid you're asking a novice as far as scripting
in C#. I'm just basically modifing someone else's script
*I'm sorry if that offends the original creator*, and trying
to see if I can implement my ideas with the limited knowledge
I have of programming.
DanielV is offline   Reply With Quote
Old 07-06-2003, 04:01 PM   #4 (permalink)
 
Join Date: Jun 2003
Posts: 36
Default

oh, wait! You mean, you want to test my creation? Well, Let me add
the other file you need to be able to run this test vendor I created.

Here is the other file you need.

The filename of the other script above is SBBODSeller.cs

This one below is BODSeller.cs

Quote:
using System;
using System.Collections;
using Server;
using Server.Items;

namespace Server.Mobiles
{
public class BODSeller : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }

[Constructable()]
public BODSeller() : base( "The Bulk Order Deed Seller" )
{
NameHue = 0x35;
SetSkill( SkillName.EvalInt, 80.0, 100.0 );
SetSkill( SkillName.MagicResist, 80.0, 100.0 );
SetSkill( SkillName.Tactics, 80.0, 100.0 );
SetSkill( SkillName.Macing, 80.0, 100.0 );
SetSkill( SkillName.Wrestling, 80.0, 100.0 );
}

public override void InitSBInfo()
{
m_SBInfos.Add( new SBBODSeller() );
}

public override void InitOutfit()
{
base.InitOutfit();
AddItem( new Robe( Utility.RandomList( 0x3B9, 0x346, 0x768, 0x718 ) ) );
AddItem( new ThighBoots() );
Item hair = new Item( 0x204A );

hair.Hue = Utility.RandomList( 0x3B9, 0x346 );
hair.Layer = Layer.Hair;
hair.Movable = false;
AddItem( hair );

}
public BODSeller( 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();
}
}
}
DanielV is offline   Reply With Quote
Old 07-06-2003, 04:02 PM   #5 (permalink)
Timea Shard Owner
 
dean968's Avatar
 
Join Date: Jun 2003
Location: Decatur Alabama
Age: 31
Posts: 379
Send a message via ICQ to dean968
Default

so is this the only script or do u have a bodseller.cs script that goes along with this one ?
dean968 is offline   Reply With Quote
Old 07-06-2003, 04:02 PM   #6 (permalink)
Timea Shard Owner
 
dean968's Avatar
 
Join Date: Jun 2003
Location: Decatur Alabama
Age: 31
Posts: 379
Send a message via ICQ to dean968
Default

ty
dean968 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