|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Newbie
|
I am Tring to remake one of the distro supply bags. The script compiles fine, I just do not get the items I added to it. I must be overlooking something simple and need a little direction.
Here is the script: SicknessBag.cs Code:
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class SicknessBag : Bag
{
public override string DefaultName
{
get { return "a Medic Kit"; }
}
[Constructable]
public SicknessBag() : this( 1 )
{
Movable = true;
Hue = 0x105;
}
[Constructable]
public SicknessBag( int amount )
{
DropItem( new ColdCurePotion( 2 ) );
DropItem( new FluCurePotion( 2 ) );
DropItem( new HeadacheCurePotion( 2 ) );
DropItem( new VirusCurePotion( 1 ) );
DropItem( new VampTurnCurePotion( 1 ) );
DropItem( new Bandage( 30 ) );
}
public SicknessBag( 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();
}
}
}
|
|
|
|
|
|
#2 (permalink) |
|
Forum Master
|
ok - you based this off of like the bagofingots - good place to start, but the amount part is not used and probaly goofing you up - try replacing this:
Code:
[Constructable]
public SicknessBag() : this( 1 )
{
Movable = true;
Hue = 0x105;
}
[Constructable]
public SicknessBag( int amount )
{
DropItem( new ColdCurePotion( 2 ) );
DropItem( new FluCurePotion( 2 ) );
DropItem( new HeadacheCurePotion( 2 ) );
DropItem( new VirusCurePotion( 1 ) );
DropItem( new VampTurnCurePotion( 1 ) );
DropItem( new Bandage( 30 ) );
}
Code:
[Constructable]
public SicknessBag()
{
Movable = true;
Hue = 0x105;
DropItem( new ColdCurePotion( 2 ) );
DropItem( new FluCurePotion( 2 ) );
DropItem( new HeadacheCurePotion( 2 ) );
DropItem( new VirusCurePotion( 1 ) );
DropItem( new VampTurnCurePotion( 1 ) );
DropItem( new Bandage( 30 ) );
}
also could just replace : Code:
public override string DefaultName
{
get { return "a Medic Kit"; }
}
Code:
Hue = 0x105; Name = "a Medic Kit";
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#5 (permalink) |
|
Forum Master
|
just a quick question - do these potions use the standard "bottle" item id or something else?
if it is not the bottle item id - is it a graphic that makes it appear in a higher position? I have had graphics that you can see in chests and not bags (or in 3d make them much bigger and you can see them) and even some can not be seen in chests either (and bookcases can be realy bad for these also) can you just [add ColdCurePotion and have it appear on the ground? if not that may be your problem
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#7 (permalink) | ||
|
Forum Newbie
|
Quote:
Quote:
Thank you all for tring to help me with this, I finally got it to work. I think the problem is that this was tring to stack the potions in the bag and they are not stackable. I changed it to this and it worked fine. I still think theres a better way to code it , but this will work for now. Code:
public class SicknessBag : Bag
{
[Constructable]
public SicknessBag()
{
Movable = true;
Hue = 0x106;
Name = "Medic Kit";
DropItem( new ColdCurePotion() );
DropItem( new ColdCurePotion() );
DropItem( new FluCurePotion() );
DropItem( new FluCurePotion() );
DropItem( new HeadacheCurePotion() );
DropItem( new HeadacheCurePotion() );
DropItem( new VirusCurePotion() );
DropItem( new VampTurnCurePotion() );
DropItem( new Bandage( 30 ) );
}
![]() Last edited by baddman; 10-13-2006 at 07:22 PM. |
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|