Making an existing item stealable:
to make something stealable, you dont actually have to make any modifications to the item's script (although you can if you want).
You can do it manually by issuing the [stealable command
[stealable true
and target an object. This sets the stealable flag on it. To check to see whether something is stealable just issue the command without an argument
[stealable
Spawning items as stealable:
to spawn something as stealable you would use the STEALABLE keyword, like this
bridle/STEALABLE/true
You can do this with anything. In your case, the bridle already has movable set to false in its script, but if you hadnt you could have spawned it as both immovable and stealable with
bridle/movable/false/STEALABLE/true
Scripting stealables:
You can also set the stealable flag in the script. Here is an example
CODE |
{
[FlipableAttribute( 0x1024, 0x1025 )] public class StrangeShafts : Item { [Constructable] public StrangeShafts() : base( 0x1024 ) { Movable = false; ItemFlags.SetStealable(this,true); }
public StrangeShafts( 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(); } } }
|
and this you can just spawn directly
Creating stealables with just an itemid:
note, you can actually create stealable rares without having to write any scripts at all. Just take the itemid you want (e.g. 3103 is a broken clock) and spawn it like
static,3103/movable/false/STEALABLE/true/weight/5/name/a rare broken clock
and now you have just created and spawned a rare stealable broken clock.
This can be an easy way to make a lot of unique stealables without having to script them all.
Having some issues on adding a static,etc to be stealable.
Tried several and tells me the static is invalid:
static,7165/movable/false/STEALABLE/true/weight/10/name/Orcish Bolts
What might i Be missing( and I think I put this in the wrong spot to ask, sorry :/ )
that looks fine. Did you make the necessary mods to stealing.cs to support the xmlspawner stealing system?
Im an idiot

Forgot to reset the spawner after I redid it on a typo....*slap*
Sorry to bother ya Arti, thanks.
Koluch