OffersServicesC

< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(offersServices:bool) reference.OffersServicesC serviceFlags:short npc:ref

Returns 1 if the NPC offers all of the services specified by the services mask.


Service Flag Bit Assignments

Service flags, such as used by this function, use a bitmask. Each service flag is assigned to a single bit of a 32-bit value: when that bit is 1, that service is included, and when it is 0, it is not. Having multiple bits set to 1 allows the scripter to deal with a specific list of services at once. Multiple bits can be set to one by simply adding the listed decimal numbers together.

Hex		Dec	Service
0x00000001	1	Weapons
0x00000002	2	Armor
0x00000004	4	Clothing
0x00000008	8	Books
0x00000040	64	Ingredients
0x00000080	128	Lights
0x00000100	256	Apparatuses
0x00000400	1024	Misc.
0x00000800	2048	Spells
0x00001000	4096	Magic Items
0x00002000	8192	Potions
0x00004000	16384	Training
0x00010000	65536	Recharge
0x00020000	131072	Repair