Skip to content

SetItemWear

How fast items wear on this server.

rate is a percent of the game’s own wear: 100 the game’s, 0 never, 50 half as fast, 200 twice as fast. It applies to one item class, a kind - "weapon" (swords, maces, axes, bows, crossbows, the dagger), "shield" or "armor" (armour, helmets, hoods) - or, without one, every item. The most specific rate set applies to an item: its class’s, then its kind’s, then every item’s. Every player’s game applies it to all the wear its own items take - a blow, a block, a shot, and the shoes’ wear on the road; a repair is never scaled, nor a repair kit’s spent charge (a kit is not made endless by a rate of 0), and OnPlayerItemWear still hears every whole percent. At most 64 rates.

"walk" is the road wear: what the shoes lose for the distance walked. Set, it takes that wear before any other rate - SetItemWear(10, "walk") keeps the shoes whole ten times longer on the road while a fight still wears them at their own rate. Unset, the road wear is the shoes’ own rate (they are armour).

SetItemWear(rate [, kind])
Parameter Type
rate number percent of the game’s wear, 0..1000
kind string "weapon", "shield", "armor", "walk" (the road wear), an item (name, id or GUID), or nothing for every item (optional)

boolean - false for an item the catalogue does not know or a rate out of range

SetItemWear(50) -- everything wears half as fast
SetItemWear(0, "armor") -- armour never wears
SetItemWear(150, "weapon") -- weapons a little faster
SetItemWear(10, "walk") -- the shoes last ten times longer on the road

GetItemWear · OnPlayerItemWear · SetPlayerItemHealth · the Items and inventory group of the index