Copy the file wearable.aslx into your gamedirectory and add it to 'Advanced/Included Libraries'.
<command name="steal_stuff">
<pattern>steal #text# from #text2#</pattern>
object_x = GetObject (text)
if (object_x = null) {
foreach (obj, GetAllChildObjects(game.pov.parent)) {
if (LCase(GetDisplayAlias(obj)) = text) {
texts = obj.name
object_x = GetObject (texts)
}
}
}
foreach (obj, GetDirectChildren(game.pov.parent)) {
if (LCase(GetDisplayAlias(obj)) = text2 or LCase(GetDisplayName(obj)) = text2) {
text2 = obj.name
object_stealing = GetObject (text2)
}
}
if (not IsDefined("object_stealing")) {
msg ("There is no-one here by that name to steal from.")
}
else if (object_x = null) {
msg ("The guard is not carrying that item.")
}
else {
msg ("You steal a " + object_x.alias + " from the guard.")
MoveObject (object_x, game.pov)
}
}
steal_x = ToInt (0)
foreach (item_x, player.equipped_objectlist) {
if (HasInt (item_x, "steal_integer") = true) {
steal_x = ToInt (steal_x) + ToInt (item_x.steal_integer)
}
}
player.steal_integer = ToInt (steal_x)
if (player.steal_integer > 100) {
player.steal_integer = 100
} else if (player.steal_integer < 0) {
player.steal_integer = 0
}
foreach (item_x, this.equipment_objectlist) {
if (RandomChance (player.steal_integer) = true) {
item_x.parent = player
}
}