tes3mp_plugin/plugin/
generated.rs

1use std::ffi::{CStr, CString};
2
3#[allow(non_upper_case_globals)]
4pub mod raw {
5    #[no_mangle]
6    pub static mut prefix: [u8; 4] = *b"rust";
7    #[no_mangle]
8    pub static mut rustCreateTimer: fn(fn(), i16) -> i16 = |_, _| { unreachable!("CreateTimer was called before set by TES3MP"); };
9    #[no_mangle]
10    pub static mut rustMakePublic: fn(fn(), *const i8, i8, *const i8) = |_, _, _, _| { unreachable!("MakePublic was called before set by TES3MP"); };
11    #[no_mangle]
12    pub static mut rustStartTimer: fn(i16) = |_| { unreachable!("StartTimer was called before set by TES3MP"); };
13    #[no_mangle]
14    pub static mut rustStopTimer: fn(i16) = |_| { unreachable!("StopTimer was called before set by TES3MP"); };
15    #[no_mangle]
16    pub static mut rustRestartTimer: fn(i16, i16) = |_, _| { unreachable!("RestartTimer was called before set by TES3MP"); };
17    #[no_mangle]
18    pub static mut rustFreeTimer: fn(i16) = |_| { unreachable!("FreeTimer was called before set by TES3MP"); };
19    #[no_mangle]
20    pub static mut rustIsTimerElapsed: fn(i16) -> bool = |_| { unreachable!("IsTimerElapsed was called before set by TES3MP"); };
21    #[no_mangle]
22    pub static mut rustReadReceivedActorList: fn() = || { unreachable!("ReadReceivedActorList was called before set by TES3MP"); };
23    #[no_mangle]
24    pub static mut rustReadCellActorList: fn(*const i8) = |_| { unreachable!("ReadCellActorList was called before set by TES3MP"); };
25    #[no_mangle]
26    pub static mut rustClearActorList: fn() = || { unreachable!("ClearActorList was called before set by TES3MP"); };
27    #[no_mangle]
28    pub static mut rustSetActorListPid: fn(u16) = |_| { unreachable!("SetActorListPid was called before set by TES3MP"); };
29    #[no_mangle]
30    pub static mut rustCopyReceivedActorListToStore: fn() = || { unreachable!("CopyReceivedActorListToStore was called before set by TES3MP"); };
31    #[no_mangle]
32    pub static mut rustGetActorListSize: fn() -> u16 = || { unreachable!("GetActorListSize was called before set by TES3MP"); };
33    #[no_mangle]
34    pub static mut rustGetActorListAction: fn() -> u8 = || { unreachable!("GetActorListAction was called before set by TES3MP"); };
35    #[no_mangle]
36    pub static mut rustGetActorCell: fn(u16) -> *const i8 = |_| { unreachable!("GetActorCell was called before set by TES3MP"); };
37    #[no_mangle]
38    pub static mut rustGetActorRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetActorRefId was called before set by TES3MP"); };
39    #[no_mangle]
40    pub static mut rustGetActorRefNum: fn(u16) -> u16 = |_| { unreachable!("GetActorRefNum was called before set by TES3MP"); };
41    #[no_mangle]
42    pub static mut rustGetActorMpNum: fn(u16) -> u16 = |_| { unreachable!("GetActorMpNum was called before set by TES3MP"); };
43    #[no_mangle]
44    pub static mut rustGetActorPosX: fn(u16) -> f64 = |_| { unreachable!("GetActorPosX was called before set by TES3MP"); };
45    #[no_mangle]
46    pub static mut rustGetActorPosY: fn(u16) -> f64 = |_| { unreachable!("GetActorPosY was called before set by TES3MP"); };
47    #[no_mangle]
48    pub static mut rustGetActorPosZ: fn(u16) -> f64 = |_| { unreachable!("GetActorPosZ was called before set by TES3MP"); };
49    #[no_mangle]
50    pub static mut rustGetActorRotX: fn(u16) -> f64 = |_| { unreachable!("GetActorRotX was called before set by TES3MP"); };
51    #[no_mangle]
52    pub static mut rustGetActorRotY: fn(u16) -> f64 = |_| { unreachable!("GetActorRotY was called before set by TES3MP"); };
53    #[no_mangle]
54    pub static mut rustGetActorRotZ: fn(u16) -> f64 = |_| { unreachable!("GetActorRotZ was called before set by TES3MP"); };
55    #[no_mangle]
56    pub static mut rustGetActorHealthBase: fn(u16) -> f64 = |_| { unreachable!("GetActorHealthBase was called before set by TES3MP"); };
57    #[no_mangle]
58    pub static mut rustGetActorHealthCurrent: fn(u16) -> f64 = |_| { unreachable!("GetActorHealthCurrent was called before set by TES3MP"); };
59    #[no_mangle]
60    pub static mut rustGetActorHealthModified: fn(u16) -> f64 = |_| { unreachable!("GetActorHealthModified was called before set by TES3MP"); };
61    #[no_mangle]
62    pub static mut rustGetActorMagickaBase: fn(u16) -> f64 = |_| { unreachable!("GetActorMagickaBase was called before set by TES3MP"); };
63    #[no_mangle]
64    pub static mut rustGetActorMagickaCurrent: fn(u16) -> f64 = |_| { unreachable!("GetActorMagickaCurrent was called before set by TES3MP"); };
65    #[no_mangle]
66    pub static mut rustGetActorMagickaModified: fn(u16) -> f64 = |_| { unreachable!("GetActorMagickaModified was called before set by TES3MP"); };
67    #[no_mangle]
68    pub static mut rustGetActorFatigueBase: fn(u16) -> f64 = |_| { unreachable!("GetActorFatigueBase was called before set by TES3MP"); };
69    #[no_mangle]
70    pub static mut rustGetActorFatigueCurrent: fn(u16) -> f64 = |_| { unreachable!("GetActorFatigueCurrent was called before set by TES3MP"); };
71    #[no_mangle]
72    pub static mut rustGetActorFatigueModified: fn(u16) -> f64 = |_| { unreachable!("GetActorFatigueModified was called before set by TES3MP"); };
73    #[no_mangle]
74    pub static mut rustGetActorEquipmentItemRefId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetActorEquipmentItemRefId was called before set by TES3MP"); };
75    #[no_mangle]
76    pub static mut rustGetActorEquipmentItemCount: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetActorEquipmentItemCount was called before set by TES3MP"); };
77    #[no_mangle]
78    pub static mut rustGetActorEquipmentItemCharge: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetActorEquipmentItemCharge was called before set by TES3MP"); };
79    #[no_mangle]
80    pub static mut rustGetActorEquipmentItemEnchantmentCharge: fn(u16, u16) -> f64 = |_, _| { unreachable!("GetActorEquipmentItemEnchantmentCharge was called before set by TES3MP"); };
81    #[no_mangle]
82    pub static mut rustDoesActorHavePlayerKiller: fn(u16) -> bool = |_| { unreachable!("DoesActorHavePlayerKiller was called before set by TES3MP"); };
83    #[no_mangle]
84    pub static mut rustGetActorKillerPid: fn(u16) -> i16 = |_| { unreachable!("GetActorKillerPid was called before set by TES3MP"); };
85    #[no_mangle]
86    pub static mut rustGetActorKillerRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetActorKillerRefId was called before set by TES3MP"); };
87    #[no_mangle]
88    pub static mut rustGetActorKillerRefNum: fn(u16) -> u16 = |_| { unreachable!("GetActorKillerRefNum was called before set by TES3MP"); };
89    #[no_mangle]
90    pub static mut rustGetActorKillerMpNum: fn(u16) -> u16 = |_| { unreachable!("GetActorKillerMpNum was called before set by TES3MP"); };
91    #[no_mangle]
92    pub static mut rustGetActorKillerName: fn(u16) -> *const i8 = |_| { unreachable!("GetActorKillerName was called before set by TES3MP"); };
93    #[no_mangle]
94    pub static mut rustDoesActorHavePosition: fn(u16) -> bool = |_| { unreachable!("DoesActorHavePosition was called before set by TES3MP"); };
95    #[no_mangle]
96    pub static mut rustDoesActorHaveStatsDynamic: fn(u16) -> bool = |_| { unreachable!("DoesActorHaveStatsDynamic was called before set by TES3MP"); };
97    #[no_mangle]
98    pub static mut rustSetActorListCell: fn(*const i8) = |_| { unreachable!("SetActorListCell was called before set by TES3MP"); };
99    #[no_mangle]
100    pub static mut rustSetActorListAction: fn(u8) = |_| { unreachable!("SetActorListAction was called before set by TES3MP"); };
101    #[no_mangle]
102    pub static mut rustSetActorCell: fn(*const i8) = |_| { unreachable!("SetActorCell was called before set by TES3MP"); };
103    #[no_mangle]
104    pub static mut rustSetActorRefId: fn(*const i8) = |_| { unreachable!("SetActorRefId was called before set by TES3MP"); };
105    #[no_mangle]
106    pub static mut rustSetActorRefNum: fn(i16) = |_| { unreachable!("SetActorRefNum was called before set by TES3MP"); };
107    #[no_mangle]
108    pub static mut rustSetActorMpNum: fn(i16) = |_| { unreachable!("SetActorMpNum was called before set by TES3MP"); };
109    #[no_mangle]
110    pub static mut rustSetActorPosition: fn(f64, f64, f64) = |_, _, _| { unreachable!("SetActorPosition was called before set by TES3MP"); };
111    #[no_mangle]
112    pub static mut rustSetActorRotation: fn(f64, f64, f64) = |_, _, _| { unreachable!("SetActorRotation was called before set by TES3MP"); };
113    #[no_mangle]
114    pub static mut rustSetActorHealthBase: fn(f64) = |_| { unreachable!("SetActorHealthBase was called before set by TES3MP"); };
115    #[no_mangle]
116    pub static mut rustSetActorHealthCurrent: fn(f64) = |_| { unreachable!("SetActorHealthCurrent was called before set by TES3MP"); };
117    #[no_mangle]
118    pub static mut rustSetActorHealthModified: fn(f64) = |_| { unreachable!("SetActorHealthModified was called before set by TES3MP"); };
119    #[no_mangle]
120    pub static mut rustSetActorMagickaBase: fn(f64) = |_| { unreachable!("SetActorMagickaBase was called before set by TES3MP"); };
121    #[no_mangle]
122    pub static mut rustSetActorMagickaCurrent: fn(f64) = |_| { unreachable!("SetActorMagickaCurrent was called before set by TES3MP"); };
123    #[no_mangle]
124    pub static mut rustSetActorMagickaModified: fn(f64) = |_| { unreachable!("SetActorMagickaModified was called before set by TES3MP"); };
125    #[no_mangle]
126    pub static mut rustSetActorFatigueBase: fn(f64) = |_| { unreachable!("SetActorFatigueBase was called before set by TES3MP"); };
127    #[no_mangle]
128    pub static mut rustSetActorFatigueCurrent: fn(f64) = |_| { unreachable!("SetActorFatigueCurrent was called before set by TES3MP"); };
129    #[no_mangle]
130    pub static mut rustSetActorFatigueModified: fn(f64) = |_| { unreachable!("SetActorFatigueModified was called before set by TES3MP"); };
131    #[no_mangle]
132    pub static mut rustSetActorSound: fn(*const i8) = |_| { unreachable!("SetActorSound was called before set by TES3MP"); };
133    #[no_mangle]
134    pub static mut rustSetActorAIAction: fn(u16) = |_| { unreachable!("SetActorAIAction was called before set by TES3MP"); };
135    #[no_mangle]
136    pub static mut rustSetActorAITargetToPlayer: fn(u16) = |_| { unreachable!("SetActorAITargetToPlayer was called before set by TES3MP"); };
137    #[no_mangle]
138    pub static mut rustSetActorAITargetToObject: fn(i16, i16) = |_, _| { unreachable!("SetActorAITargetToObject was called before set by TES3MP"); };
139    #[no_mangle]
140    pub static mut rustSetActorAICoordinates: fn(f64, f64, f64) = |_, _, _| { unreachable!("SetActorAICoordinates was called before set by TES3MP"); };
141    #[no_mangle]
142    pub static mut rustSetActorAIDistance: fn(u16) = |_| { unreachable!("SetActorAIDistance was called before set by TES3MP"); };
143    #[no_mangle]
144    pub static mut rustSetActorAIDuration: fn(u16) = |_| { unreachable!("SetActorAIDuration was called before set by TES3MP"); };
145    #[no_mangle]
146    pub static mut rustSetActorAIRepetition: fn(bool) = |_| { unreachable!("SetActorAIRepetition was called before set by TES3MP"); };
147    #[no_mangle]
148    pub static mut rustEquipActorItem: fn(u16, *const i8, u16, i16, f64) = |_, _, _, _, _| { unreachable!("EquipActorItem was called before set by TES3MP"); };
149    #[no_mangle]
150    pub static mut rustUnequipActorItem: fn(u16) = |_| { unreachable!("UnequipActorItem was called before set by TES3MP"); };
151    #[no_mangle]
152    pub static mut rustAddActor: fn() = || { unreachable!("AddActor was called before set by TES3MP"); };
153    #[no_mangle]
154    pub static mut rustSendActorList: fn() = || { unreachable!("SendActorList was called before set by TES3MP"); };
155    #[no_mangle]
156    pub static mut rustSendActorAuthority: fn() = || { unreachable!("SendActorAuthority was called before set by TES3MP"); };
157    #[no_mangle]
158    pub static mut rustSendActorPosition: fn(bool, bool) = |_, _| { unreachable!("SendActorPosition was called before set by TES3MP"); };
159    #[no_mangle]
160    pub static mut rustSendActorStatsDynamic: fn(bool, bool) = |_, _| { unreachable!("SendActorStatsDynamic was called before set by TES3MP"); };
161    #[no_mangle]
162    pub static mut rustSendActorEquipment: fn(bool, bool) = |_, _| { unreachable!("SendActorEquipment was called before set by TES3MP"); };
163    #[no_mangle]
164    pub static mut rustSendActorSpeech: fn(bool, bool) = |_, _| { unreachable!("SendActorSpeech was called before set by TES3MP"); };
165    #[no_mangle]
166    pub static mut rustSendActorAI: fn(bool, bool) = |_, _| { unreachable!("SendActorAI was called before set by TES3MP"); };
167    #[no_mangle]
168    pub static mut rustSendActorCellChange: fn(bool, bool) = |_, _| { unreachable!("SendActorCellChange was called before set by TES3MP"); };
169    #[no_mangle]
170    pub static mut rustReadLastActorList: fn() = || { unreachable!("ReadLastActorList was called before set by TES3MP"); };
171    #[no_mangle]
172    pub static mut rustInitializeActorList: fn(u16) = |_| { unreachable!("InitializeActorList was called before set by TES3MP"); };
173    #[no_mangle]
174    pub static mut rustCopyLastActorListToStore: fn() = || { unreachable!("CopyLastActorListToStore was called before set by TES3MP"); };
175    #[no_mangle]
176    pub static mut rustGetActorRefNumIndex: fn(u16) -> u16 = |_| { unreachable!("GetActorRefNumIndex was called before set by TES3MP"); };
177    #[no_mangle]
178    pub static mut rustGetActorKillerRefNumIndex: fn(u16) -> u16 = |_| { unreachable!("GetActorKillerRefNumIndex was called before set by TES3MP"); };
179    #[no_mangle]
180    pub static mut rustSetActorRefNumIndex: fn(i16) = |_| { unreachable!("SetActorRefNumIndex was called before set by TES3MP"); };
181    #[no_mangle]
182    pub static mut rustClearBookChanges: fn(u16) = |_| { unreachable!("ClearBookChanges was called before set by TES3MP"); };
183    #[no_mangle]
184    pub static mut rustGetBookChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetBookChangesSize was called before set by TES3MP"); };
185    #[no_mangle]
186    pub static mut rustAddBook: fn(u16, *const i8) = |_, _| { unreachable!("AddBook was called before set by TES3MP"); };
187    #[no_mangle]
188    pub static mut rustGetBookId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetBookId was called before set by TES3MP"); };
189    #[no_mangle]
190    pub static mut rustSendBookChanges: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendBookChanges was called before set by TES3MP"); };
191    #[no_mangle]
192    pub static mut rustInitializeBookChanges: fn(u16) = |_| { unreachable!("InitializeBookChanges was called before set by TES3MP"); };
193    #[no_mangle]
194    pub static mut rustGetCellStateChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetCellStateChangesSize was called before set by TES3MP"); };
195    #[no_mangle]
196    pub static mut rustGetCellStateType: fn(u16, u16) -> u16 = |_, _| { unreachable!("GetCellStateType was called before set by TES3MP"); };
197    #[no_mangle]
198    pub static mut rustGetCellStateDescription: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetCellStateDescription was called before set by TES3MP"); };
199    #[no_mangle]
200    pub static mut rustGetCell: fn(u16) -> *const i8 = |_| { unreachable!("GetCell was called before set by TES3MP"); };
201    #[no_mangle]
202    pub static mut rustGetExteriorX: fn(u16) -> i16 = |_| { unreachable!("GetExteriorX was called before set by TES3MP"); };
203    #[no_mangle]
204    pub static mut rustGetExteriorY: fn(u16) -> i16 = |_| { unreachable!("GetExteriorY was called before set by TES3MP"); };
205    #[no_mangle]
206    pub static mut rustIsInExterior: fn(u16) -> bool = |_| { unreachable!("IsInExterior was called before set by TES3MP"); };
207    #[no_mangle]
208    pub static mut rustGetRegion: fn(u16) -> *const i8 = |_| { unreachable!("GetRegion was called before set by TES3MP"); };
209    #[no_mangle]
210    pub static mut rustIsChangingRegion: fn(u16) -> bool = |_| { unreachable!("IsChangingRegion was called before set by TES3MP"); };
211    #[no_mangle]
212    pub static mut rustSetCell: fn(u16, *const i8) = |_, _| { unreachable!("SetCell was called before set by TES3MP"); };
213    #[no_mangle]
214    pub static mut rustSetExteriorCell: fn(u16, i16, i16) = |_, _, _| { unreachable!("SetExteriorCell was called before set by TES3MP"); };
215    #[no_mangle]
216    pub static mut rustSendCell: fn(u16) = |_| { unreachable!("SendCell was called before set by TES3MP"); };
217    #[no_mangle]
218    pub static mut rustGetDefaultClass: fn(u16) -> *const i8 = |_| { unreachable!("GetDefaultClass was called before set by TES3MP"); };
219    #[no_mangle]
220    pub static mut rustGetClassName: fn(u16) -> *const i8 = |_| { unreachable!("GetClassName was called before set by TES3MP"); };
221    #[no_mangle]
222    pub static mut rustGetClassDesc: fn(u16) -> *const i8 = |_| { unreachable!("GetClassDesc was called before set by TES3MP"); };
223    #[no_mangle]
224    pub static mut rustGetClassMajorAttribute: fn(u16, u8) -> i16 = |_, _| { unreachable!("GetClassMajorAttribute was called before set by TES3MP"); };
225    #[no_mangle]
226    pub static mut rustGetClassSpecialization: fn(u16) -> i16 = |_| { unreachable!("GetClassSpecialization was called before set by TES3MP"); };
227    #[no_mangle]
228    pub static mut rustGetClassMajorSkill: fn(u16, u8) -> i16 = |_, _| { unreachable!("GetClassMajorSkill was called before set by TES3MP"); };
229    #[no_mangle]
230    pub static mut rustGetClassMinorSkill: fn(u16, u8) -> i16 = |_, _| { unreachable!("GetClassMinorSkill was called before set by TES3MP"); };
231    #[no_mangle]
232    pub static mut rustIsClassDefault: fn(u16) -> i16 = |_| { unreachable!("IsClassDefault was called before set by TES3MP"); };
233    #[no_mangle]
234    pub static mut rustSetDefaultClass: fn(u16, *const i8) = |_, _| { unreachable!("SetDefaultClass was called before set by TES3MP"); };
235    #[no_mangle]
236    pub static mut rustSetClassName: fn(u16, *const i8) = |_, _| { unreachable!("SetClassName was called before set by TES3MP"); };
237    #[no_mangle]
238    pub static mut rustSetClassDesc: fn(u16, *const i8) = |_, _| { unreachable!("SetClassDesc was called before set by TES3MP"); };
239    #[no_mangle]
240    pub static mut rustSetClassMajorAttribute: fn(u16, u8, i16) = |_, _, _| { unreachable!("SetClassMajorAttribute was called before set by TES3MP"); };
241    #[no_mangle]
242    pub static mut rustSetClassSpecialization: fn(u16, i16) = |_, _| { unreachable!("SetClassSpecialization was called before set by TES3MP"); };
243    #[no_mangle]
244    pub static mut rustSetClassMajorSkill: fn(u16, u8, i16) = |_, _, _| { unreachable!("SetClassMajorSkill was called before set by TES3MP"); };
245    #[no_mangle]
246    pub static mut rustSetClassMinorSkill: fn(u16, u8, i16) = |_, _, _| { unreachable!("SetClassMinorSkill was called before set by TES3MP"); };
247    #[no_mangle]
248    pub static mut rustSendClass: fn(u16) = |_| { unreachable!("SendClass was called before set by TES3MP"); };
249    #[no_mangle]
250    pub static mut rustSendMessage: fn(u16, *const i8, bool, bool) = |_, _, _, _| { unreachable!("SendMessage was called before set by TES3MP"); };
251    #[no_mangle]
252    pub static mut rustCleanChatForPid: fn() = || { unreachable!("CleanChatForPid was called before set by TES3MP"); };
253    #[no_mangle]
254    pub static mut rustCleanChat: fn(u16) = |_| { unreachable!("CleanChat was called before set by TES3MP"); };
255    #[no_mangle]
256    pub static mut rustClearTopicChanges: fn(u16) = |_| { unreachable!("ClearTopicChanges was called before set by TES3MP"); };
257    #[no_mangle]
258    pub static mut rustGetTopicChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetTopicChangesSize was called before set by TES3MP"); };
259    #[no_mangle]
260    pub static mut rustAddTopic: fn(u16, *const i8) = |_, _| { unreachable!("AddTopic was called before set by TES3MP"); };
261    #[no_mangle]
262    pub static mut rustGetTopicId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetTopicId was called before set by TES3MP"); };
263    #[no_mangle]
264    pub static mut rustSendTopicChanges: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendTopicChanges was called before set by TES3MP"); };
265    #[no_mangle]
266    pub static mut rustPlayAnimation: fn(u16, *const i8, i16, i16, bool) = |_, _, _, _, _| { unreachable!("PlayAnimation was called before set by TES3MP"); };
267    #[no_mangle]
268    pub static mut rustPlaySpeech: fn(u16, *const i8) = |_, _| { unreachable!("PlaySpeech was called before set by TES3MP"); };
269    #[no_mangle]
270    pub static mut rustInitializeTopicChanges: fn(u16) = |_| { unreachable!("InitializeTopicChanges was called before set by TES3MP"); };
271    #[no_mangle]
272    pub static mut rustClearFactionChanges: fn(u16) = |_| { unreachable!("ClearFactionChanges was called before set by TES3MP"); };
273    #[no_mangle]
274    pub static mut rustGetFactionChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetFactionChangesSize was called before set by TES3MP"); };
275    #[no_mangle]
276    pub static mut rustGetFactionChangesAction: fn(u16) -> u8 = |_| { unreachable!("GetFactionChangesAction was called before set by TES3MP"); };
277    #[no_mangle]
278    pub static mut rustGetFactionId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetFactionId was called before set by TES3MP"); };
279    #[no_mangle]
280    pub static mut rustGetFactionRank: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetFactionRank was called before set by TES3MP"); };
281    #[no_mangle]
282    pub static mut rustGetFactionExpulsionState: fn(u16, u16) -> bool = |_, _| { unreachable!("GetFactionExpulsionState was called before set by TES3MP"); };
283    #[no_mangle]
284    pub static mut rustGetFactionReputation: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetFactionReputation was called before set by TES3MP"); };
285    #[no_mangle]
286    pub static mut rustSetFactionChangesAction: fn(u16, u8) = |_, _| { unreachable!("SetFactionChangesAction was called before set by TES3MP"); };
287    #[no_mangle]
288    pub static mut rustSetFactionId: fn(*const i8) = |_| { unreachable!("SetFactionId was called before set by TES3MP"); };
289    #[no_mangle]
290    pub static mut rustSetFactionRank: fn(u16) = |_| { unreachable!("SetFactionRank was called before set by TES3MP"); };
291    #[no_mangle]
292    pub static mut rustSetFactionExpulsionState: fn(bool) = |_| { unreachable!("SetFactionExpulsionState was called before set by TES3MP"); };
293    #[no_mangle]
294    pub static mut rustSetFactionReputation: fn(i16) = |_| { unreachable!("SetFactionReputation was called before set by TES3MP"); };
295    #[no_mangle]
296    pub static mut rustAddFaction: fn(u16) = |_| { unreachable!("AddFaction was called before set by TES3MP"); };
297    #[no_mangle]
298    pub static mut rustSendFactionChanges: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendFactionChanges was called before set by TES3MP"); };
299    #[no_mangle]
300    pub static mut rustInitializeFactionChanges: fn(u16) = |_| { unreachable!("InitializeFactionChanges was called before set by TES3MP"); };
301    #[no_mangle]
302    pub static mut rustCustomMessageBox: fn(u16, i16, *const i8, *const i8) = |_, _, _, _| { unreachable!("CustomMessageBox was called before set by TES3MP"); };
303    #[no_mangle]
304    pub static mut rustInputDialog: fn(u16, i16, *const i8, *const i8) = |_, _, _, _| { unreachable!("InputDialog was called before set by TES3MP"); };
305    #[no_mangle]
306    pub static mut rustPasswordDialog: fn(u16, i16, *const i8, *const i8) = |_, _, _, _| { unreachable!("PasswordDialog was called before set by TES3MP"); };
307    #[no_mangle]
308    pub static mut rustListBox: fn(u16, i16, *const i8, *const i8) = |_, _, _, _| { unreachable!("ListBox was called before set by TES3MP"); };
309    #[no_mangle]
310    pub static mut rustClearQuickKeyChanges: fn(u16) = |_| { unreachable!("ClearQuickKeyChanges was called before set by TES3MP"); };
311    #[no_mangle]
312    pub static mut rustGetQuickKeyChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetQuickKeyChangesSize was called before set by TES3MP"); };
313    #[no_mangle]
314    pub static mut rustGetQuickKeySlot: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetQuickKeySlot was called before set by TES3MP"); };
315    #[no_mangle]
316    pub static mut rustGetQuickKeyType: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetQuickKeyType was called before set by TES3MP"); };
317    #[no_mangle]
318    pub static mut rustGetQuickKeyItemId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetQuickKeyItemId was called before set by TES3MP"); };
319    #[no_mangle]
320    pub static mut rustAddQuickKey: fn(u16, u16, i16, *const i8) = |_, _, _, _| { unreachable!("AddQuickKey was called before set by TES3MP"); };
321    #[no_mangle]
322    pub static mut rustSendQuickKeyChanges: fn(u16) = |_| { unreachable!("SendQuickKeyChanges was called before set by TES3MP"); };
323    #[no_mangle]
324    pub static mut rustSetMapVisibility: fn(u16, u16, u16) = |_, _, _| { unreachable!("SetMapVisibility was called before set by TES3MP"); };
325    #[no_mangle]
326    pub static mut rustSetMapVisibilityAll: fn(u16, u16) = |_, _| { unreachable!("SetMapVisibilityAll was called before set by TES3MP"); };
327    #[no_mangle]
328    pub static mut rustInitializeQuickKeyChanges: fn(u16) = |_| { unreachable!("InitializeQuickKeyChanges was called before set by TES3MP"); };
329    #[no_mangle]
330    pub static mut rustClearInventoryChanges: fn(u16) = |_| { unreachable!("ClearInventoryChanges was called before set by TES3MP"); };
331    #[no_mangle]
332    pub static mut rustGetEquipmentSize: fn() -> i16 = || { unreachable!("GetEquipmentSize was called before set by TES3MP"); };
333    #[no_mangle]
334    pub static mut rustGetInventoryChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetInventoryChangesSize was called before set by TES3MP"); };
335    #[no_mangle]
336    pub static mut rustGetInventoryChangesAction: fn(u16) -> u16 = |_| { unreachable!("GetInventoryChangesAction was called before set by TES3MP"); };
337    #[no_mangle]
338    pub static mut rustSetInventoryChangesAction: fn(u16, u8) = |_, _| { unreachable!("SetInventoryChangesAction was called before set by TES3MP"); };
339    #[no_mangle]
340    pub static mut rustEquipItem: fn(u16, u16, *const i8, u16, i16, f64) = |_, _, _, _, _, _| { unreachable!("EquipItem was called before set by TES3MP"); };
341    #[no_mangle]
342    pub static mut rustUnequipItem: fn(u16, u16) = |_, _| { unreachable!("UnequipItem was called before set by TES3MP"); };
343    #[no_mangle]
344    pub static mut rustAddItemChange: fn(u16, *const i8, u16, i16, f64, *const i8) = |_, _, _, _, _, _| { unreachable!("AddItemChange was called before set by TES3MP"); };
345    #[no_mangle]
346    pub static mut rustHasItemEquipped: fn(u16, *const i8) -> bool = |_, _| { unreachable!("HasItemEquipped was called before set by TES3MP"); };
347    #[no_mangle]
348    pub static mut rustGetEquipmentItemRefId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetEquipmentItemRefId was called before set by TES3MP"); };
349    #[no_mangle]
350    pub static mut rustGetEquipmentItemCount: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetEquipmentItemCount was called before set by TES3MP"); };
351    #[no_mangle]
352    pub static mut rustGetEquipmentItemCharge: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetEquipmentItemCharge was called before set by TES3MP"); };
353    #[no_mangle]
354    pub static mut rustGetEquipmentItemEnchantmentCharge: fn(u16, u16) -> f64 = |_, _| { unreachable!("GetEquipmentItemEnchantmentCharge was called before set by TES3MP"); };
355    #[no_mangle]
356    pub static mut rustGetInventoryItemRefId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetInventoryItemRefId was called before set by TES3MP"); };
357    #[no_mangle]
358    pub static mut rustGetInventoryItemCount: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetInventoryItemCount was called before set by TES3MP"); };
359    #[no_mangle]
360    pub static mut rustGetInventoryItemCharge: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetInventoryItemCharge was called before set by TES3MP"); };
361    #[no_mangle]
362    pub static mut rustGetInventoryItemEnchantmentCharge: fn(u16, u16) -> f64 = |_, _| { unreachable!("GetInventoryItemEnchantmentCharge was called before set by TES3MP"); };
363    #[no_mangle]
364    pub static mut rustGetInventoryItemSoul: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetInventoryItemSoul was called before set by TES3MP"); };
365    #[no_mangle]
366    pub static mut rustGetUsedItemRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetUsedItemRefId was called before set by TES3MP"); };
367    #[no_mangle]
368    pub static mut rustGetUsedItemCount: fn(u16) -> i16 = |_| { unreachable!("GetUsedItemCount was called before set by TES3MP"); };
369    #[no_mangle]
370    pub static mut rustGetUsedItemCharge: fn(u16) -> i16 = |_| { unreachable!("GetUsedItemCharge was called before set by TES3MP"); };
371    #[no_mangle]
372    pub static mut rustGetUsedItemEnchantmentCharge: fn(u16) -> f64 = |_| { unreachable!("GetUsedItemEnchantmentCharge was called before set by TES3MP"); };
373    #[no_mangle]
374    pub static mut rustGetUsedItemSoul: fn(u16) -> *const i8 = |_| { unreachable!("GetUsedItemSoul was called before set by TES3MP"); };
375    #[no_mangle]
376    pub static mut rustSendEquipment: fn(u16) = |_| { unreachable!("SendEquipment was called before set by TES3MP"); };
377    #[no_mangle]
378    pub static mut rustSendInventoryChanges: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendInventoryChanges was called before set by TES3MP"); };
379    #[no_mangle]
380    pub static mut rustSendItemUse: fn(u16) = |_| { unreachable!("SendItemUse was called before set by TES3MP"); };
381    #[no_mangle]
382    pub static mut rustInitializeInventoryChanges: fn(u16) = |_| { unreachable!("InitializeInventoryChanges was called before set by TES3MP"); };
383    #[no_mangle]
384    pub static mut rustAddItem: fn(u16, *const i8, u16, i16, f64, *const i8) = |_, _, _, _, _, _| { unreachable!("AddItem was called before set by TES3MP"); };
385    #[no_mangle]
386    pub static mut rustGetMiscellaneousChangeType: fn(u16) -> u8 = |_| { unreachable!("GetMiscellaneousChangeType was called before set by TES3MP"); };
387    #[no_mangle]
388    pub static mut rustGetMarkCell: fn(u16) -> *const i8 = |_| { unreachable!("GetMarkCell was called before set by TES3MP"); };
389    #[no_mangle]
390    pub static mut rustGetMarkPosX: fn(u16) -> f64 = |_| { unreachable!("GetMarkPosX was called before set by TES3MP"); };
391    #[no_mangle]
392    pub static mut rustGetMarkPosY: fn(u16) -> f64 = |_| { unreachable!("GetMarkPosY was called before set by TES3MP"); };
393    #[no_mangle]
394    pub static mut rustGetMarkPosZ: fn(u16) -> f64 = |_| { unreachable!("GetMarkPosZ was called before set by TES3MP"); };
395    #[no_mangle]
396    pub static mut rustGetMarkRotX: fn(u16) -> f64 = |_| { unreachable!("GetMarkRotX was called before set by TES3MP"); };
397    #[no_mangle]
398    pub static mut rustGetMarkRotZ: fn(u16) -> f64 = |_| { unreachable!("GetMarkRotZ was called before set by TES3MP"); };
399    #[no_mangle]
400    pub static mut rustGetSelectedSpellId: fn(u16) -> *const i8 = |_| { unreachable!("GetSelectedSpellId was called before set by TES3MP"); };
401    #[no_mangle]
402    pub static mut rustDoesPlayerHavePlayerKiller: fn(u16) -> bool = |_| { unreachable!("DoesPlayerHavePlayerKiller was called before set by TES3MP"); };
403    #[no_mangle]
404    pub static mut rustGetPlayerKillerPid: fn(u16) -> i16 = |_| { unreachable!("GetPlayerKillerPid was called before set by TES3MP"); };
405    #[no_mangle]
406    pub static mut rustGetPlayerKillerRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetPlayerKillerRefId was called before set by TES3MP"); };
407    #[no_mangle]
408    pub static mut rustGetPlayerKillerRefNum: fn(u16) -> u16 = |_| { unreachable!("GetPlayerKillerRefNum was called before set by TES3MP"); };
409    #[no_mangle]
410    pub static mut rustGetPlayerKillerMpNum: fn(u16) -> u16 = |_| { unreachable!("GetPlayerKillerMpNum was called before set by TES3MP"); };
411    #[no_mangle]
412    pub static mut rustGetPlayerKillerName: fn(u16) -> *const i8 = |_| { unreachable!("GetPlayerKillerName was called before set by TES3MP"); };
413    #[no_mangle]
414    pub static mut rustGetDrawState: fn(u16) -> u16 = |_| { unreachable!("GetDrawState was called before set by TES3MP"); };
415    #[no_mangle]
416    pub static mut rustGetSneakState: fn(u16) -> bool = |_| { unreachable!("GetSneakState was called before set by TES3MP"); };
417    #[no_mangle]
418    pub static mut rustSetMarkCell: fn(u16, *const i8) = |_, _| { unreachable!("SetMarkCell was called before set by TES3MP"); };
419    #[no_mangle]
420    pub static mut rustSetMarkPos: fn(u16, f64, f64, f64) = |_, _, _, _| { unreachable!("SetMarkPos was called before set by TES3MP"); };
421    #[no_mangle]
422    pub static mut rustSetMarkRot: fn(u16, f64, f64) = |_, _, _| { unreachable!("SetMarkRot was called before set by TES3MP"); };
423    #[no_mangle]
424    pub static mut rustSetSelectedSpellId: fn(u16, *const i8) = |_, _| { unreachable!("SetSelectedSpellId was called before set by TES3MP"); };
425    #[no_mangle]
426    pub static mut rustSendMarkLocation: fn(u16) = |_| { unreachable!("SendMarkLocation was called before set by TES3MP"); };
427    #[no_mangle]
428    pub static mut rustSendSelectedSpell: fn(u16) = |_| { unreachable!("SendSelectedSpell was called before set by TES3MP"); };
429    #[no_mangle]
430    pub static mut rustJail: fn(u16, i16, bool, bool, *const i8, *const i8) = |_, _, _, _, _, _| { unreachable!("Jail was called before set by TES3MP"); };
431    #[no_mangle]
432    pub static mut rustResurrect: fn(u16, u16) = |_, _| { unreachable!("Resurrect was called before set by TES3MP"); };
433    #[no_mangle]
434    pub static mut rustGetDeathReason: fn(u16) -> *const i8 = |_| { unreachable!("GetDeathReason was called before set by TES3MP"); };
435    #[no_mangle]
436    pub static mut rustGetPlayerKillerRefNumIndex: fn(u16) -> u16 = |_| { unreachable!("GetPlayerKillerRefNumIndex was called before set by TES3MP"); };
437    #[no_mangle]
438    pub static mut rustGenerateRandomString: fn(u16) -> *const i8 = |_| { unreachable!("GenerateRandomString was called before set by TES3MP"); };
439    #[no_mangle]
440    pub static mut rustGetSHA256Hash: fn(*const i8) -> *const i8 = |_| { unreachable!("GetSHA256Hash was called before set by TES3MP"); };
441    #[no_mangle]
442    pub static mut rustGetLastPlayerId: fn() -> u16 = || { unreachable!("GetLastPlayerId was called before set by TES3MP"); };
443    #[no_mangle]
444    pub static mut rustGetCurrentMpNum: fn() -> i16 = || { unreachable!("GetCurrentMpNum was called before set by TES3MP"); };
445    #[no_mangle]
446    pub static mut rustSetCurrentMpNum: fn(i16) = |_| { unreachable!("SetCurrentMpNum was called before set by TES3MP"); };
447    #[no_mangle]
448    pub static mut rustGetPosX: fn(u16) -> f64 = |_| { unreachable!("GetPosX was called before set by TES3MP"); };
449    #[no_mangle]
450    pub static mut rustGetPosY: fn(u16) -> f64 = |_| { unreachable!("GetPosY was called before set by TES3MP"); };
451    #[no_mangle]
452    pub static mut rustGetPosZ: fn(u16) -> f64 = |_| { unreachable!("GetPosZ was called before set by TES3MP"); };
453    #[no_mangle]
454    pub static mut rustGetPreviousCellPosX: fn(u16) -> f64 = |_| { unreachable!("GetPreviousCellPosX was called before set by TES3MP"); };
455    #[no_mangle]
456    pub static mut rustGetPreviousCellPosY: fn(u16) -> f64 = |_| { unreachable!("GetPreviousCellPosY was called before set by TES3MP"); };
457    #[no_mangle]
458    pub static mut rustGetPreviousCellPosZ: fn(u16) -> f64 = |_| { unreachable!("GetPreviousCellPosZ was called before set by TES3MP"); };
459    #[no_mangle]
460    pub static mut rustGetRotX: fn(u16) -> f64 = |_| { unreachable!("GetRotX was called before set by TES3MP"); };
461    #[no_mangle]
462    pub static mut rustGetRotZ: fn(u16) -> f64 = |_| { unreachable!("GetRotZ was called before set by TES3MP"); };
463    #[no_mangle]
464    pub static mut rustSetPos: fn(u16, f64, f64, f64) = |_, _, _, _| { unreachable!("SetPos was called before set by TES3MP"); };
465    #[no_mangle]
466    pub static mut rustSetRot: fn(u16, f64, f64) = |_, _, _| { unreachable!("SetRot was called before set by TES3MP"); };
467    #[no_mangle]
468    pub static mut rustSetMomentum: fn(u16, f64, f64, f64) = |_, _, _, _| { unreachable!("SetMomentum was called before set by TES3MP"); };
469    #[no_mangle]
470    pub static mut rustSendPos: fn(u16) = |_| { unreachable!("SendPos was called before set by TES3MP"); };
471    #[no_mangle]
472    pub static mut rustSendMomentum: fn(u16) = |_| { unreachable!("SendMomentum was called before set by TES3MP"); };
473    #[no_mangle]
474    pub static mut rustClearJournalChanges: fn(u16) = |_| { unreachable!("ClearJournalChanges was called before set by TES3MP"); };
475    #[no_mangle]
476    pub static mut rustGetJournalChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetJournalChangesSize was called before set by TES3MP"); };
477    #[no_mangle]
478    pub static mut rustAddJournalEntry: fn(u16, *const i8, u16, *const i8) = |_, _, _, _| { unreachable!("AddJournalEntry was called before set by TES3MP"); };
479    #[no_mangle]
480    pub static mut rustAddJournalEntryWithTimestamp: fn(u16, *const i8, u16, *const i8, u16, u16, u16) = |_, _, _, _, _, _, _| { unreachable!("AddJournalEntryWithTimestamp was called before set by TES3MP"); };
481    #[no_mangle]
482    pub static mut rustAddJournalIndex: fn(u16, *const i8, u16) = |_, _, _| { unreachable!("AddJournalIndex was called before set by TES3MP"); };
483    #[no_mangle]
484    pub static mut rustSetReputation: fn(u16, i16) = |_, _| { unreachable!("SetReputation was called before set by TES3MP"); };
485    #[no_mangle]
486    pub static mut rustGetJournalItemQuest: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetJournalItemQuest was called before set by TES3MP"); };
487    #[no_mangle]
488    pub static mut rustGetJournalItemIndex: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetJournalItemIndex was called before set by TES3MP"); };
489    #[no_mangle]
490    pub static mut rustGetJournalItemType: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetJournalItemType was called before set by TES3MP"); };
491    #[no_mangle]
492    pub static mut rustGetJournalItemActorRefId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetJournalItemActorRefId was called before set by TES3MP"); };
493    #[no_mangle]
494    pub static mut rustGetReputation: fn(u16) -> i16 = |_| { unreachable!("GetReputation was called before set by TES3MP"); };
495    #[no_mangle]
496    pub static mut rustSendJournalChanges: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendJournalChanges was called before set by TES3MP"); };
497    #[no_mangle]
498    pub static mut rustSendReputation: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendReputation was called before set by TES3MP"); };
499    #[no_mangle]
500    pub static mut rustInitializeJournalChanges: fn(u16) = |_| { unreachable!("InitializeJournalChanges was called before set by TES3MP"); };
501    #[no_mangle]
502    pub static mut rustClearRecords: fn() = || { unreachable!("ClearRecords was called before set by TES3MP"); };
503    #[no_mangle]
504    pub static mut rustGetRecordType: fn() -> u16 = || { unreachable!("GetRecordType was called before set by TES3MP"); };
505    #[no_mangle]
506    pub static mut rustGetRecordCount: fn() -> u16 = || { unreachable!("GetRecordCount was called before set by TES3MP"); };
507    #[no_mangle]
508    pub static mut rustGetRecordEffectCount: fn(u16) -> u16 = |_| { unreachable!("GetRecordEffectCount was called before set by TES3MP"); };
509    #[no_mangle]
510    pub static mut rustGetRecordId: fn(u16) -> *const i8 = |_| { unreachable!("GetRecordId was called before set by TES3MP"); };
511    #[no_mangle]
512    pub static mut rustGetRecordBaseId: fn(u16) -> *const i8 = |_| { unreachable!("GetRecordBaseId was called before set by TES3MP"); };
513    #[no_mangle]
514    pub static mut rustGetRecordSubtype: fn(u16) -> i16 = |_| { unreachable!("GetRecordSubtype was called before set by TES3MP"); };
515    #[no_mangle]
516    pub static mut rustGetRecordName: fn(u16) -> *const i8 = |_| { unreachable!("GetRecordName was called before set by TES3MP"); };
517    #[no_mangle]
518    pub static mut rustGetRecordModel: fn(u16) -> *const i8 = |_| { unreachable!("GetRecordModel was called before set by TES3MP"); };
519    #[no_mangle]
520    pub static mut rustGetRecordIcon: fn(u16) -> *const i8 = |_| { unreachable!("GetRecordIcon was called before set by TES3MP"); };
521    #[no_mangle]
522    pub static mut rustGetRecordScript: fn(u16) -> *const i8 = |_| { unreachable!("GetRecordScript was called before set by TES3MP"); };
523    #[no_mangle]
524    pub static mut rustGetRecordEnchantmentId: fn(u16) -> *const i8 = |_| { unreachable!("GetRecordEnchantmentId was called before set by TES3MP"); };
525    #[no_mangle]
526    pub static mut rustGetRecordEnchantmentCharge: fn(u16) -> i16 = |_| { unreachable!("GetRecordEnchantmentCharge was called before set by TES3MP"); };
527    #[no_mangle]
528    pub static mut rustGetRecordAutoCalc: fn(u16) -> i16 = |_| { unreachable!("GetRecordAutoCalc was called before set by TES3MP"); };
529    #[no_mangle]
530    pub static mut rustGetRecordCharge: fn(u16) -> i16 = |_| { unreachable!("GetRecordCharge was called before set by TES3MP"); };
531    #[no_mangle]
532    pub static mut rustGetRecordCost: fn(u16) -> i16 = |_| { unreachable!("GetRecordCost was called before set by TES3MP"); };
533    #[no_mangle]
534    pub static mut rustGetRecordFlags: fn(u16) -> i16 = |_| { unreachable!("GetRecordFlags was called before set by TES3MP"); };
535    #[no_mangle]
536    pub static mut rustGetRecordValue: fn(u16) -> i16 = |_| { unreachable!("GetRecordValue was called before set by TES3MP"); };
537    #[no_mangle]
538    pub static mut rustGetRecordWeight: fn(u16) -> f64 = |_| { unreachable!("GetRecordWeight was called before set by TES3MP"); };
539    #[no_mangle]
540    pub static mut rustGetRecordEffectId: fn(u16, u16) -> u16 = |_, _| { unreachable!("GetRecordEffectId was called before set by TES3MP"); };
541    #[no_mangle]
542    pub static mut rustGetRecordEffectAttribute: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetRecordEffectAttribute was called before set by TES3MP"); };
543    #[no_mangle]
544    pub static mut rustGetRecordEffectSkill: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetRecordEffectSkill was called before set by TES3MP"); };
545    #[no_mangle]
546    pub static mut rustGetRecordEffectRangeType: fn(u16, u16) -> u16 = |_, _| { unreachable!("GetRecordEffectRangeType was called before set by TES3MP"); };
547    #[no_mangle]
548    pub static mut rustGetRecordEffectArea: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetRecordEffectArea was called before set by TES3MP"); };
549    #[no_mangle]
550    pub static mut rustGetRecordEffectDuration: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetRecordEffectDuration was called before set by TES3MP"); };
551    #[no_mangle]
552    pub static mut rustGetRecordEffectMagnitudeMax: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetRecordEffectMagnitudeMax was called before set by TES3MP"); };
553    #[no_mangle]
554    pub static mut rustGetRecordEffectMagnitudeMin: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetRecordEffectMagnitudeMin was called before set by TES3MP"); };
555    #[no_mangle]
556    pub static mut rustSetRecordType: fn(u16) = |_| { unreachable!("SetRecordType was called before set by TES3MP"); };
557    #[no_mangle]
558    pub static mut rustSetRecordId: fn(*const i8) = |_| { unreachable!("SetRecordId was called before set by TES3MP"); };
559    #[no_mangle]
560    pub static mut rustSetRecordBaseId: fn(*const i8) = |_| { unreachable!("SetRecordBaseId was called before set by TES3MP"); };
561    #[no_mangle]
562    pub static mut rustSetRecordInventoryBaseId: fn(*const i8) = |_| { unreachable!("SetRecordInventoryBaseId was called before set by TES3MP"); };
563    #[no_mangle]
564    pub static mut rustSetRecordSubtype: fn(u16) = |_| { unreachable!("SetRecordSubtype was called before set by TES3MP"); };
565    #[no_mangle]
566    pub static mut rustSetRecordName: fn(*const i8) = |_| { unreachable!("SetRecordName was called before set by TES3MP"); };
567    #[no_mangle]
568    pub static mut rustSetRecordModel: fn(*const i8) = |_| { unreachable!("SetRecordModel was called before set by TES3MP"); };
569    #[no_mangle]
570    pub static mut rustSetRecordIcon: fn(*const i8) = |_| { unreachable!("SetRecordIcon was called before set by TES3MP"); };
571    #[no_mangle]
572    pub static mut rustSetRecordScript: fn(*const i8) = |_| { unreachable!("SetRecordScript was called before set by TES3MP"); };
573    #[no_mangle]
574    pub static mut rustSetRecordEnchantmentId: fn(*const i8) = |_| { unreachable!("SetRecordEnchantmentId was called before set by TES3MP"); };
575    #[no_mangle]
576    pub static mut rustSetRecordEnchantmentCharge: fn(i16) = |_| { unreachable!("SetRecordEnchantmentCharge was called before set by TES3MP"); };
577    #[no_mangle]
578    pub static mut rustSetRecordAutoCalc: fn(i16) = |_| { unreachable!("SetRecordAutoCalc was called before set by TES3MP"); };
579    #[no_mangle]
580    pub static mut rustSetRecordCharge: fn(i16) = |_| { unreachable!("SetRecordCharge was called before set by TES3MP"); };
581    #[no_mangle]
582    pub static mut rustSetRecordCost: fn(i16) = |_| { unreachable!("SetRecordCost was called before set by TES3MP"); };
583    #[no_mangle]
584    pub static mut rustSetRecordFlags: fn(i16) = |_| { unreachable!("SetRecordFlags was called before set by TES3MP"); };
585    #[no_mangle]
586    pub static mut rustSetRecordValue: fn(i16) = |_| { unreachable!("SetRecordValue was called before set by TES3MP"); };
587    #[no_mangle]
588    pub static mut rustSetRecordWeight: fn(f64) = |_| { unreachable!("SetRecordWeight was called before set by TES3MP"); };
589    #[no_mangle]
590    pub static mut rustSetRecordQuality: fn(f64) = |_| { unreachable!("SetRecordQuality was called before set by TES3MP"); };
591    #[no_mangle]
592    pub static mut rustSetRecordUses: fn(i16) = |_| { unreachable!("SetRecordUses was called before set by TES3MP"); };
593    #[no_mangle]
594    pub static mut rustSetRecordTime: fn(i16) = |_| { unreachable!("SetRecordTime was called before set by TES3MP"); };
595    #[no_mangle]
596    pub static mut rustSetRecordRadius: fn(i16) = |_| { unreachable!("SetRecordRadius was called before set by TES3MP"); };
597    #[no_mangle]
598    pub static mut rustSetRecordColor: fn(u16, u16, u16) = |_, _, _| { unreachable!("SetRecordColor was called before set by TES3MP"); };
599    #[no_mangle]
600    pub static mut rustSetRecordArmorRating: fn(i16) = |_| { unreachable!("SetRecordArmorRating was called before set by TES3MP"); };
601    #[no_mangle]
602    pub static mut rustSetRecordHealth: fn(i16) = |_| { unreachable!("SetRecordHealth was called before set by TES3MP"); };
603    #[no_mangle]
604    pub static mut rustSetRecordDamageChop: fn(u16, u16) = |_, _| { unreachable!("SetRecordDamageChop was called before set by TES3MP"); };
605    #[no_mangle]
606    pub static mut rustSetRecordDamageSlash: fn(u16, u16) = |_, _| { unreachable!("SetRecordDamageSlash was called before set by TES3MP"); };
607    #[no_mangle]
608    pub static mut rustSetRecordDamageThrust: fn(u16, u16) = |_, _| { unreachable!("SetRecordDamageThrust was called before set by TES3MP"); };
609    #[no_mangle]
610    pub static mut rustSetRecordReach: fn(f64) = |_| { unreachable!("SetRecordReach was called before set by TES3MP"); };
611    #[no_mangle]
612    pub static mut rustSetRecordSpeed: fn(f64) = |_| { unreachable!("SetRecordSpeed was called before set by TES3MP"); };
613    #[no_mangle]
614    pub static mut rustSetRecordKeyState: fn(bool) = |_| { unreachable!("SetRecordKeyState was called before set by TES3MP"); };
615    #[no_mangle]
616    pub static mut rustSetRecordScrollState: fn(bool) = |_| { unreachable!("SetRecordScrollState was called before set by TES3MP"); };
617    #[no_mangle]
618    pub static mut rustSetRecordSkillId: fn(i16) = |_| { unreachable!("SetRecordSkillId was called before set by TES3MP"); };
619    #[no_mangle]
620    pub static mut rustSetRecordText: fn(*const i8) = |_| { unreachable!("SetRecordText was called before set by TES3MP"); };
621    #[no_mangle]
622    pub static mut rustSetRecordHair: fn(*const i8) = |_| { unreachable!("SetRecordHair was called before set by TES3MP"); };
623    #[no_mangle]
624    pub static mut rustSetRecordHead: fn(*const i8) = |_| { unreachable!("SetRecordHead was called before set by TES3MP"); };
625    #[no_mangle]
626    pub static mut rustSetRecordGender: fn(u16) = |_| { unreachable!("SetRecordGender was called before set by TES3MP"); };
627    #[no_mangle]
628    pub static mut rustSetRecordRace: fn(*const i8) = |_| { unreachable!("SetRecordRace was called before set by TES3MP"); };
629    #[no_mangle]
630    pub static mut rustSetRecordClass: fn(*const i8) = |_| { unreachable!("SetRecordClass was called before set by TES3MP"); };
631    #[no_mangle]
632    pub static mut rustSetRecordFaction: fn(*const i8) = |_| { unreachable!("SetRecordFaction was called before set by TES3MP"); };
633    #[no_mangle]
634    pub static mut rustSetRecordScale: fn(f64) = |_| { unreachable!("SetRecordScale was called before set by TES3MP"); };
635    #[no_mangle]
636    pub static mut rustSetRecordBloodType: fn(i16) = |_| { unreachable!("SetRecordBloodType was called before set by TES3MP"); };
637    #[no_mangle]
638    pub static mut rustSetRecordLevel: fn(i16) = |_| { unreachable!("SetRecordLevel was called before set by TES3MP"); };
639    #[no_mangle]
640    pub static mut rustSetRecordMagicka: fn(i16) = |_| { unreachable!("SetRecordMagicka was called before set by TES3MP"); };
641    #[no_mangle]
642    pub static mut rustSetRecordFatigue: fn(i16) = |_| { unreachable!("SetRecordFatigue was called before set by TES3MP"); };
643    #[no_mangle]
644    pub static mut rustSetRecordAIFight: fn(i16) = |_| { unreachable!("SetRecordAIFight was called before set by TES3MP"); };
645    #[no_mangle]
646    pub static mut rustSetRecordAIFlee: fn(i16) = |_| { unreachable!("SetRecordAIFlee was called before set by TES3MP"); };
647    #[no_mangle]
648    pub static mut rustSetRecordAIAlarm: fn(i16) = |_| { unreachable!("SetRecordAIAlarm was called before set by TES3MP"); };
649    #[no_mangle]
650    pub static mut rustSetRecordAIServices: fn(i16) = |_| { unreachable!("SetRecordAIServices was called before set by TES3MP"); };
651    #[no_mangle]
652    pub static mut rustSetRecordSound: fn(*const i8) = |_| { unreachable!("SetRecordSound was called before set by TES3MP"); };
653    #[no_mangle]
654    pub static mut rustSetRecordOpenSound: fn(*const i8) = |_| { unreachable!("SetRecordOpenSound was called before set by TES3MP"); };
655    #[no_mangle]
656    pub static mut rustSetRecordCloseSound: fn(*const i8) = |_| { unreachable!("SetRecordCloseSound was called before set by TES3MP"); };
657    #[no_mangle]
658    pub static mut rustSetRecordScriptText: fn(*const i8) = |_| { unreachable!("SetRecordScriptText was called before set by TES3MP"); };
659    #[no_mangle]
660    pub static mut rustSetRecordIdByIndex: fn(u16, *const i8) = |_, _| { unreachable!("SetRecordIdByIndex was called before set by TES3MP"); };
661    #[no_mangle]
662    pub static mut rustSetRecordEnchantmentIdByIndex: fn(u16, *const i8) = |_, _| { unreachable!("SetRecordEnchantmentIdByIndex was called before set by TES3MP"); };
663    #[no_mangle]
664    pub static mut rustSetRecordEffectId: fn(u16) = |_| { unreachable!("SetRecordEffectId was called before set by TES3MP"); };
665    #[no_mangle]
666    pub static mut rustSetRecordEffectAttribute: fn(i16) = |_| { unreachable!("SetRecordEffectAttribute was called before set by TES3MP"); };
667    #[no_mangle]
668    pub static mut rustSetRecordEffectSkill: fn(i16) = |_| { unreachable!("SetRecordEffectSkill was called before set by TES3MP"); };
669    #[no_mangle]
670    pub static mut rustSetRecordEffectRangeType: fn(u16) = |_| { unreachable!("SetRecordEffectRangeType was called before set by TES3MP"); };
671    #[no_mangle]
672    pub static mut rustSetRecordEffectArea: fn(i16) = |_| { unreachable!("SetRecordEffectArea was called before set by TES3MP"); };
673    #[no_mangle]
674    pub static mut rustSetRecordEffectDuration: fn(i16) = |_| { unreachable!("SetRecordEffectDuration was called before set by TES3MP"); };
675    #[no_mangle]
676    pub static mut rustSetRecordEffectMagnitudeMax: fn(i16) = |_| { unreachable!("SetRecordEffectMagnitudeMax was called before set by TES3MP"); };
677    #[no_mangle]
678    pub static mut rustSetRecordEffectMagnitudeMin: fn(i16) = |_| { unreachable!("SetRecordEffectMagnitudeMin was called before set by TES3MP"); };
679    #[no_mangle]
680    pub static mut rustSetRecordBodyPartType: fn(u16) = |_| { unreachable!("SetRecordBodyPartType was called before set by TES3MP"); };
681    #[no_mangle]
682    pub static mut rustSetRecordBodyPartIdForMale: fn(*const i8) = |_| { unreachable!("SetRecordBodyPartIdForMale was called before set by TES3MP"); };
683    #[no_mangle]
684    pub static mut rustSetRecordBodyPartIdForFemale: fn(*const i8) = |_| { unreachable!("SetRecordBodyPartIdForFemale was called before set by TES3MP"); };
685    #[no_mangle]
686    pub static mut rustSetRecordInventoryItemId: fn(*const i8) = |_| { unreachable!("SetRecordInventoryItemId was called before set by TES3MP"); };
687    #[no_mangle]
688    pub static mut rustSetRecordInventoryItemCount: fn(u16) = |_| { unreachable!("SetRecordInventoryItemCount was called before set by TES3MP"); };
689    #[no_mangle]
690    pub static mut rustAddRecord: fn() = || { unreachable!("AddRecord was called before set by TES3MP"); };
691    #[no_mangle]
692    pub static mut rustAddRecordEffect: fn() = || { unreachable!("AddRecordEffect was called before set by TES3MP"); };
693    #[no_mangle]
694    pub static mut rustAddRecordBodyPart: fn() = || { unreachable!("AddRecordBodyPart was called before set by TES3MP"); };
695    #[no_mangle]
696    pub static mut rustAddRecordInventoryItem: fn() = || { unreachable!("AddRecordInventoryItem was called before set by TES3MP"); };
697    #[no_mangle]
698    pub static mut rustSendRecordDynamic: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendRecordDynamic was called before set by TES3MP"); };
699    #[no_mangle]
700    pub static mut rustGetScale: fn(u16) -> f64 = |_| { unreachable!("GetScale was called before set by TES3MP"); };
701    #[no_mangle]
702    pub static mut rustIsWerewolf: fn(u16) -> bool = |_| { unreachable!("IsWerewolf was called before set by TES3MP"); };
703    #[no_mangle]
704    pub static mut rustGetCreatureRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetCreatureRefId was called before set by TES3MP"); };
705    #[no_mangle]
706    pub static mut rustGetCreatureNameDisplayState: fn(u16) -> bool = |_| { unreachable!("GetCreatureNameDisplayState was called before set by TES3MP"); };
707    #[no_mangle]
708    pub static mut rustSetScale: fn(u16, f64) = |_, _| { unreachable!("SetScale was called before set by TES3MP"); };
709    #[no_mangle]
710    pub static mut rustSetWerewolfState: fn(u16, bool) = |_, _| { unreachable!("SetWerewolfState was called before set by TES3MP"); };
711    #[no_mangle]
712    pub static mut rustSetCreatureRefId: fn(u16, *const i8) = |_, _| { unreachable!("SetCreatureRefId was called before set by TES3MP"); };
713    #[no_mangle]
714    pub static mut rustSetCreatureNameDisplayState: fn(u16, bool) = |_, _| { unreachable!("SetCreatureNameDisplayState was called before set by TES3MP"); };
715    #[no_mangle]
716    pub static mut rustSendShapeshift: fn(u16) = |_| { unreachable!("SendShapeshift was called before set by TES3MP"); };
717    #[no_mangle]
718    pub static mut rustLogMessage: fn(u16, *const i8) = |_, _| { unreachable!("LogMessage was called before set by TES3MP"); };
719    #[no_mangle]
720    pub static mut rustLogAppend: fn(u16, *const i8) = |_, _| { unreachable!("LogAppend was called before set by TES3MP"); };
721    #[no_mangle]
722    pub static mut rustStopServer: fn(i16) = |_| { unreachable!("StopServer was called before set by TES3MP"); };
723    #[no_mangle]
724    pub static mut rustKick: fn(u16) = |_| { unreachable!("Kick was called before set by TES3MP"); };
725    #[no_mangle]
726    pub static mut rustBanAddress: fn(*const i8) = |_| { unreachable!("BanAddress was called before set by TES3MP"); };
727    #[no_mangle]
728    pub static mut rustUnbanAddress: fn(*const i8) = |_| { unreachable!("UnbanAddress was called before set by TES3MP"); };
729    #[no_mangle]
730    pub static mut rustDoesFilePathExist: fn(*const i8) -> bool = |_| { unreachable!("DoesFilePathExist was called before set by TES3MP"); };
731    #[no_mangle]
732    pub static mut rustGetCaseInsensitiveFilename: fn(*const i8, *const i8) -> *const i8 = |_, _| { unreachable!("GetCaseInsensitiveFilename was called before set by TES3MP"); };
733    #[no_mangle]
734    pub static mut rustGetDataPath: fn() -> *const i8 = || { unreachable!("GetDataPath was called before set by TES3MP"); };
735    #[no_mangle]
736    pub static mut rustGetMillisecondsSinceServerStart: fn() -> u16 = || { unreachable!("GetMillisecondsSinceServerStart was called before set by TES3MP"); };
737    #[no_mangle]
738    pub static mut rustGetOperatingSystemType: fn() -> *const i8 = || { unreachable!("GetOperatingSystemType was called before set by TES3MP"); };
739    #[no_mangle]
740    pub static mut rustGetArchitectureType: fn() -> *const i8 = || { unreachable!("GetArchitectureType was called before set by TES3MP"); };
741    #[no_mangle]
742    pub static mut rustGetServerVersion: fn() -> *const i8 = || { unreachable!("GetServerVersion was called before set by TES3MP"); };
743    #[no_mangle]
744    pub static mut rustGetProtocolVersion: fn() -> *const i8 = || { unreachable!("GetProtocolVersion was called before set by TES3MP"); };
745    #[no_mangle]
746    pub static mut rustGetAvgPing: fn(u16) -> i16 = |_| { unreachable!("GetAvgPing was called before set by TES3MP"); };
747    #[no_mangle]
748    pub static mut rustGetIP: fn(u16) -> *const i8 = |_| { unreachable!("GetIP was called before set by TES3MP"); };
749    #[no_mangle]
750    pub static mut rustGetMaxPlayers: fn() -> u16 = || { unreachable!("GetMaxPlayers was called before set by TES3MP"); };
751    #[no_mangle]
752    pub static mut rustGetPort: fn() -> u16 = || { unreachable!("GetPort was called before set by TES3MP"); };
753    #[no_mangle]
754    pub static mut rustHasPassword: fn() -> bool = || { unreachable!("HasPassword was called before set by TES3MP"); };
755    #[no_mangle]
756    pub static mut rustGetDataFileEnforcementState: fn() -> bool = || { unreachable!("GetDataFileEnforcementState was called before set by TES3MP"); };
757    #[no_mangle]
758    pub static mut rustGetScriptErrorIgnoringState: fn() -> bool = || { unreachable!("GetScriptErrorIgnoringState was called before set by TES3MP"); };
759    #[no_mangle]
760    pub static mut rustSetGameMode: fn(*const i8) = |_| { unreachable!("SetGameMode was called before set by TES3MP"); };
761    #[no_mangle]
762    pub static mut rustSetHostname: fn(*const i8) = |_| { unreachable!("SetHostname was called before set by TES3MP"); };
763    #[no_mangle]
764    pub static mut rustSetServerPassword: fn(*const i8) = |_| { unreachable!("SetServerPassword was called before set by TES3MP"); };
765    #[no_mangle]
766    pub static mut rustSetDataFileEnforcementState: fn(bool) = |_| { unreachable!("SetDataFileEnforcementState was called before set by TES3MP"); };
767    #[no_mangle]
768    pub static mut rustSetScriptErrorIgnoringState: fn(bool) = |_| { unreachable!("SetScriptErrorIgnoringState was called before set by TES3MP"); };
769    #[no_mangle]
770    pub static mut rustSetRuleString: fn(*const i8, *const i8) = |_, _| { unreachable!("SetRuleString was called before set by TES3MP"); };
771    #[no_mangle]
772    pub static mut rustSetRuleValue: fn(*const i8, f64) = |_, _| { unreachable!("SetRuleValue was called before set by TES3MP"); };
773    #[no_mangle]
774    pub static mut rustAddDataFileRequirement: fn(*const i8, *const i8) = |_, _| { unreachable!("AddDataFileRequirement was called before set by TES3MP"); };
775    #[no_mangle]
776    pub static mut rustDoesFileExist: fn(*const i8) -> bool = |_| { unreachable!("DoesFileExist was called before set by TES3MP"); };
777    #[no_mangle]
778    pub static mut rustGetModDir: fn() -> *const i8 = || { unreachable!("GetModDir was called before set by TES3MP"); };
779    #[no_mangle]
780    pub static mut rustGetPluginEnforcementState: fn() -> bool = || { unreachable!("GetPluginEnforcementState was called before set by TES3MP"); };
781    #[no_mangle]
782    pub static mut rustSetPluginEnforcementState: fn(bool) = |_| { unreachable!("SetPluginEnforcementState was called before set by TES3MP"); };
783    #[no_mangle]
784    pub static mut rustAddPluginHash: fn(*const i8, *const i8) = |_, _| { unreachable!("AddPluginHash was called before set by TES3MP"); };
785    #[no_mangle]
786    pub static mut rustSetDifficulty: fn(u16, i16) = |_, _| { unreachable!("SetDifficulty was called before set by TES3MP"); };
787    #[no_mangle]
788    pub static mut rustSetEnforcedLogLevel: fn(u16, i16) = |_, _| { unreachable!("SetEnforcedLogLevel was called before set by TES3MP"); };
789    #[no_mangle]
790    pub static mut rustSetPhysicsFramerate: fn(u16, f64) = |_, _| { unreachable!("SetPhysicsFramerate was called before set by TES3MP"); };
791    #[no_mangle]
792    pub static mut rustSetConsoleAllowed: fn(u16, bool) = |_, _| { unreachable!("SetConsoleAllowed was called before set by TES3MP"); };
793    #[no_mangle]
794    pub static mut rustSetBedRestAllowed: fn(u16, bool) = |_, _| { unreachable!("SetBedRestAllowed was called before set by TES3MP"); };
795    #[no_mangle]
796    pub static mut rustSetWildernessRestAllowed: fn(u16, bool) = |_, _| { unreachable!("SetWildernessRestAllowed was called before set by TES3MP"); };
797    #[no_mangle]
798    pub static mut rustSetWaitAllowed: fn(u16, bool) = |_, _| { unreachable!("SetWaitAllowed was called before set by TES3MP"); };
799    #[no_mangle]
800    pub static mut rustSendSettings: fn(u16) = |_| { unreachable!("SendSettings was called before set by TES3MP"); };
801    #[no_mangle]
802    pub static mut rustClearSpellbookChanges: fn(u16) = |_| { unreachable!("ClearSpellbookChanges was called before set by TES3MP"); };
803    #[no_mangle]
804    pub static mut rustGetSpellbookChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetSpellbookChangesSize was called before set by TES3MP"); };
805    #[no_mangle]
806    pub static mut rustGetSpellbookChangesAction: fn(u16) -> u16 = |_| { unreachable!("GetSpellbookChangesAction was called before set by TES3MP"); };
807    #[no_mangle]
808    pub static mut rustSetSpellbookChangesAction: fn(u16, u8) = |_, _| { unreachable!("SetSpellbookChangesAction was called before set by TES3MP"); };
809    #[no_mangle]
810    pub static mut rustAddSpell: fn(u16, *const i8) = |_, _| { unreachable!("AddSpell was called before set by TES3MP"); };
811    #[no_mangle]
812    pub static mut rustGetSpellId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetSpellId was called before set by TES3MP"); };
813    #[no_mangle]
814    pub static mut rustSendSpellbookChanges: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendSpellbookChanges was called before set by TES3MP"); };
815    #[no_mangle]
816    pub static mut rustInitializeSpellbookChanges: fn(u16) = |_| { unreachable!("InitializeSpellbookChanges was called before set by TES3MP"); };
817    #[no_mangle]
818    pub static mut rustGetAttributeCount: fn() -> i16 = || { unreachable!("GetAttributeCount was called before set by TES3MP"); };
819    #[no_mangle]
820    pub static mut rustGetSkillCount: fn() -> i16 = || { unreachable!("GetSkillCount was called before set by TES3MP"); };
821    #[no_mangle]
822    pub static mut rustGetAttributeId: fn(*const i8) -> i16 = |_| { unreachable!("GetAttributeId was called before set by TES3MP"); };
823    #[no_mangle]
824    pub static mut rustGetSkillId: fn(*const i8) -> i16 = |_| { unreachable!("GetSkillId was called before set by TES3MP"); };
825    #[no_mangle]
826    pub static mut rustGetAttributeName: fn(u16) -> *const i8 = |_| { unreachable!("GetAttributeName was called before set by TES3MP"); };
827    #[no_mangle]
828    pub static mut rustGetSkillName: fn(u16) -> *const i8 = |_| { unreachable!("GetSkillName was called before set by TES3MP"); };
829    #[no_mangle]
830    pub static mut rustGetName: fn(u16) -> *const i8 = |_| { unreachable!("GetName was called before set by TES3MP"); };
831    #[no_mangle]
832    pub static mut rustGetRace: fn(u16) -> *const i8 = |_| { unreachable!("GetRace was called before set by TES3MP"); };
833    #[no_mangle]
834    pub static mut rustGetHead: fn(u16) -> *const i8 = |_| { unreachable!("GetHead was called before set by TES3MP"); };
835    #[no_mangle]
836    pub static mut rustGetHair: fn(u16) -> *const i8 = |_| { unreachable!("GetHair was called before set by TES3MP"); };
837    #[no_mangle]
838    pub static mut rustGetIsMale: fn(u16) -> i16 = |_| { unreachable!("GetIsMale was called before set by TES3MP"); };
839    #[no_mangle]
840    pub static mut rustGetBirthsign: fn(u16) -> *const i8 = |_| { unreachable!("GetBirthsign was called before set by TES3MP"); };
841    #[no_mangle]
842    pub static mut rustGetLevel: fn(u16) -> i16 = |_| { unreachable!("GetLevel was called before set by TES3MP"); };
843    #[no_mangle]
844    pub static mut rustGetLevelProgress: fn(u16) -> i16 = |_| { unreachable!("GetLevelProgress was called before set by TES3MP"); };
845    #[no_mangle]
846    pub static mut rustGetHealthBase: fn(u16) -> f64 = |_| { unreachable!("GetHealthBase was called before set by TES3MP"); };
847    #[no_mangle]
848    pub static mut rustGetHealthCurrent: fn(u16) -> f64 = |_| { unreachable!("GetHealthCurrent was called before set by TES3MP"); };
849    #[no_mangle]
850    pub static mut rustGetMagickaBase: fn(u16) -> f64 = |_| { unreachable!("GetMagickaBase was called before set by TES3MP"); };
851    #[no_mangle]
852    pub static mut rustGetMagickaCurrent: fn(u16) -> f64 = |_| { unreachable!("GetMagickaCurrent was called before set by TES3MP"); };
853    #[no_mangle]
854    pub static mut rustGetFatigueBase: fn(u16) -> f64 = |_| { unreachable!("GetFatigueBase was called before set by TES3MP"); };
855    #[no_mangle]
856    pub static mut rustGetFatigueCurrent: fn(u16) -> f64 = |_| { unreachable!("GetFatigueCurrent was called before set by TES3MP"); };
857    #[no_mangle]
858    pub static mut rustGetAttributeBase: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetAttributeBase was called before set by TES3MP"); };
859    #[no_mangle]
860    pub static mut rustGetAttributeModifier: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetAttributeModifier was called before set by TES3MP"); };
861    #[no_mangle]
862    pub static mut rustGetAttributeDamage: fn(u16, u16) -> f64 = |_, _| { unreachable!("GetAttributeDamage was called before set by TES3MP"); };
863    #[no_mangle]
864    pub static mut rustGetSkillBase: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetSkillBase was called before set by TES3MP"); };
865    #[no_mangle]
866    pub static mut rustGetSkillModifier: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetSkillModifier was called before set by TES3MP"); };
867    #[no_mangle]
868    pub static mut rustGetSkillDamage: fn(u16, u16) -> f64 = |_, _| { unreachable!("GetSkillDamage was called before set by TES3MP"); };
869    #[no_mangle]
870    pub static mut rustGetSkillProgress: fn(u16, u16) -> f64 = |_, _| { unreachable!("GetSkillProgress was called before set by TES3MP"); };
871    #[no_mangle]
872    pub static mut rustGetSkillIncrease: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetSkillIncrease was called before set by TES3MP"); };
873    #[no_mangle]
874    pub static mut rustGetBounty: fn(u16) -> i16 = |_| { unreachable!("GetBounty was called before set by TES3MP"); };
875    #[no_mangle]
876    pub static mut rustSetName: fn(u16, *const i8) = |_, _| { unreachable!("SetName was called before set by TES3MP"); };
877    #[no_mangle]
878    pub static mut rustSetRace: fn(u16, *const i8) = |_, _| { unreachable!("SetRace was called before set by TES3MP"); };
879    #[no_mangle]
880    pub static mut rustSetHead: fn(u16, *const i8) = |_, _| { unreachable!("SetHead was called before set by TES3MP"); };
881    #[no_mangle]
882    pub static mut rustSetHair: fn(u16, *const i8) = |_, _| { unreachable!("SetHair was called before set by TES3MP"); };
883    #[no_mangle]
884    pub static mut rustSetIsMale: fn(u16, i16) = |_, _| { unreachable!("SetIsMale was called before set by TES3MP"); };
885    #[no_mangle]
886    pub static mut rustSetBirthsign: fn(u16, *const i8) = |_, _| { unreachable!("SetBirthsign was called before set by TES3MP"); };
887    #[no_mangle]
888    pub static mut rustSetResetStats: fn(u16, bool) = |_, _| { unreachable!("SetResetStats was called before set by TES3MP"); };
889    #[no_mangle]
890    pub static mut rustSetLevel: fn(u16, i16) = |_, _| { unreachable!("SetLevel was called before set by TES3MP"); };
891    #[no_mangle]
892    pub static mut rustSetLevelProgress: fn(u16, i16) = |_, _| { unreachable!("SetLevelProgress was called before set by TES3MP"); };
893    #[no_mangle]
894    pub static mut rustSetHealthBase: fn(u16, f64) = |_, _| { unreachable!("SetHealthBase was called before set by TES3MP"); };
895    #[no_mangle]
896    pub static mut rustSetHealthCurrent: fn(u16, f64) = |_, _| { unreachable!("SetHealthCurrent was called before set by TES3MP"); };
897    #[no_mangle]
898    pub static mut rustSetMagickaBase: fn(u16, f64) = |_, _| { unreachable!("SetMagickaBase was called before set by TES3MP"); };
899    #[no_mangle]
900    pub static mut rustSetMagickaCurrent: fn(u16, f64) = |_, _| { unreachable!("SetMagickaCurrent was called before set by TES3MP"); };
901    #[no_mangle]
902    pub static mut rustSetFatigueBase: fn(u16, f64) = |_, _| { unreachable!("SetFatigueBase was called before set by TES3MP"); };
903    #[no_mangle]
904    pub static mut rustSetFatigueCurrent: fn(u16, f64) = |_, _| { unreachable!("SetFatigueCurrent was called before set by TES3MP"); };
905    #[no_mangle]
906    pub static mut rustSetAttributeBase: fn(u16, u16, i16) = |_, _, _| { unreachable!("SetAttributeBase was called before set by TES3MP"); };
907    #[no_mangle]
908    pub static mut rustClearAttributeModifier: fn(u16, u16) = |_, _| { unreachable!("ClearAttributeModifier was called before set by TES3MP"); };
909    #[no_mangle]
910    pub static mut rustSetAttributeDamage: fn(u16, u16, f64) = |_, _, _| { unreachable!("SetAttributeDamage was called before set by TES3MP"); };
911    #[no_mangle]
912    pub static mut rustSetSkillBase: fn(u16, u16, i16) = |_, _, _| { unreachable!("SetSkillBase was called before set by TES3MP"); };
913    #[no_mangle]
914    pub static mut rustClearSkillModifier: fn(u16, u16) = |_, _| { unreachable!("ClearSkillModifier was called before set by TES3MP"); };
915    #[no_mangle]
916    pub static mut rustSetSkillDamage: fn(u16, u16, f64) = |_, _, _| { unreachable!("SetSkillDamage was called before set by TES3MP"); };
917    #[no_mangle]
918    pub static mut rustSetSkillProgress: fn(u16, u16, f64) = |_, _, _| { unreachable!("SetSkillProgress was called before set by TES3MP"); };
919    #[no_mangle]
920    pub static mut rustSetSkillIncrease: fn(u16, u16, i16) = |_, _, _| { unreachable!("SetSkillIncrease was called before set by TES3MP"); };
921    #[no_mangle]
922    pub static mut rustSetBounty: fn(u16, i16) = |_, _| { unreachable!("SetBounty was called before set by TES3MP"); };
923    #[no_mangle]
924    pub static mut rustSetCharGenStage: fn(u16, i16, i16) = |_, _, _| { unreachable!("SetCharGenStage was called before set by TES3MP"); };
925    #[no_mangle]
926    pub static mut rustSendBaseInfo: fn(u16) = |_| { unreachable!("SendBaseInfo was called before set by TES3MP"); };
927    #[no_mangle]
928    pub static mut rustSendStatsDynamic: fn(u16) = |_| { unreachable!("SendStatsDynamic was called before set by TES3MP"); };
929    #[no_mangle]
930    pub static mut rustSendAttributes: fn(u16) = |_| { unreachable!("SendAttributes was called before set by TES3MP"); };
931    #[no_mangle]
932    pub static mut rustSendSkills: fn(u16) = |_| { unreachable!("SendSkills was called before set by TES3MP"); };
933    #[no_mangle]
934    pub static mut rustSendLevel: fn(u16) = |_| { unreachable!("SendLevel was called before set by TES3MP"); };
935    #[no_mangle]
936    pub static mut rustSendBounty: fn(u16) = |_| { unreachable!("SendBounty was called before set by TES3MP"); };
937    #[no_mangle]
938    pub static mut rustReadReceivedObjectList: fn() = || { unreachable!("ReadReceivedObjectList was called before set by TES3MP"); };
939    #[no_mangle]
940    pub static mut rustClearObjectList: fn() = || { unreachable!("ClearObjectList was called before set by TES3MP"); };
941    #[no_mangle]
942    pub static mut rustSetObjectListPid: fn(u16) = |_| { unreachable!("SetObjectListPid was called before set by TES3MP"); };
943    #[no_mangle]
944    pub static mut rustCopyReceivedObjectListToStore: fn() = || { unreachable!("CopyReceivedObjectListToStore was called before set by TES3MP"); };
945    #[no_mangle]
946    pub static mut rustGetObjectListSize: fn() -> u16 = || { unreachable!("GetObjectListSize was called before set by TES3MP"); };
947    #[no_mangle]
948    pub static mut rustGetObjectListOrigin: fn() -> u8 = || { unreachable!("GetObjectListOrigin was called before set by TES3MP"); };
949    #[no_mangle]
950    pub static mut rustGetObjectListClientScript: fn() -> *const i8 = || { unreachable!("GetObjectListClientScript was called before set by TES3MP"); };
951    #[no_mangle]
952    pub static mut rustGetObjectListAction: fn() -> u8 = || { unreachable!("GetObjectListAction was called before set by TES3MP"); };
953    #[no_mangle]
954    pub static mut rustGetObjectListContainerSubAction: fn() -> u8 = || { unreachable!("GetObjectListContainerSubAction was called before set by TES3MP"); };
955    #[no_mangle]
956    pub static mut rustIsObjectPlayer: fn(u16) -> bool = |_| { unreachable!("IsObjectPlayer was called before set by TES3MP"); };
957    #[no_mangle]
958    pub static mut rustGetObjectPid: fn(u16) -> i16 = |_| { unreachable!("GetObjectPid was called before set by TES3MP"); };
959    #[no_mangle]
960    pub static mut rustGetObjectRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetObjectRefId was called before set by TES3MP"); };
961    #[no_mangle]
962    pub static mut rustGetObjectRefNum: fn(u16) -> u16 = |_| { unreachable!("GetObjectRefNum was called before set by TES3MP"); };
963    #[no_mangle]
964    pub static mut rustGetObjectMpNum: fn(u16) -> u16 = |_| { unreachable!("GetObjectMpNum was called before set by TES3MP"); };
965    #[no_mangle]
966    pub static mut rustGetObjectCount: fn(u16) -> i16 = |_| { unreachable!("GetObjectCount was called before set by TES3MP"); };
967    #[no_mangle]
968    pub static mut rustGetObjectCharge: fn(u16) -> i16 = |_| { unreachable!("GetObjectCharge was called before set by TES3MP"); };
969    #[no_mangle]
970    pub static mut rustGetObjectEnchantmentCharge: fn(u16) -> f64 = |_| { unreachable!("GetObjectEnchantmentCharge was called before set by TES3MP"); };
971    #[no_mangle]
972    pub static mut rustGetObjectSoul: fn(u16) -> *const i8 = |_| { unreachable!("GetObjectSoul was called before set by TES3MP"); };
973    #[no_mangle]
974    pub static mut rustGetObjectGoldValue: fn(u16) -> i16 = |_| { unreachable!("GetObjectGoldValue was called before set by TES3MP"); };
975    #[no_mangle]
976    pub static mut rustGetObjectScale: fn(u16) -> f64 = |_| { unreachable!("GetObjectScale was called before set by TES3MP"); };
977    #[no_mangle]
978    pub static mut rustGetObjectState: fn(u16) -> bool = |_| { unreachable!("GetObjectState was called before set by TES3MP"); };
979    #[no_mangle]
980    pub static mut rustGetObjectDoorState: fn(u16) -> i16 = |_| { unreachable!("GetObjectDoorState was called before set by TES3MP"); };
981    #[no_mangle]
982    pub static mut rustGetObjectLockLevel: fn(u16) -> i16 = |_| { unreachable!("GetObjectLockLevel was called before set by TES3MP"); };
983    #[no_mangle]
984    pub static mut rustDoesObjectHavePlayerActivating: fn(u16) -> bool = |_| { unreachable!("DoesObjectHavePlayerActivating was called before set by TES3MP"); };
985    #[no_mangle]
986    pub static mut rustGetObjectActivatingPid: fn(u16) -> i16 = |_| { unreachable!("GetObjectActivatingPid was called before set by TES3MP"); };
987    #[no_mangle]
988    pub static mut rustGetObjectActivatingRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetObjectActivatingRefId was called before set by TES3MP"); };
989    #[no_mangle]
990    pub static mut rustGetObjectActivatingRefNum: fn(u16) -> u16 = |_| { unreachable!("GetObjectActivatingRefNum was called before set by TES3MP"); };
991    #[no_mangle]
992    pub static mut rustGetObjectActivatingMpNum: fn(u16) -> u16 = |_| { unreachable!("GetObjectActivatingMpNum was called before set by TES3MP"); };
993    #[no_mangle]
994    pub static mut rustGetObjectActivatingName: fn(u16) -> *const i8 = |_| { unreachable!("GetObjectActivatingName was called before set by TES3MP"); };
995    #[no_mangle]
996    pub static mut rustGetObjectSummonState: fn(u16) -> bool = |_| { unreachable!("GetObjectSummonState was called before set by TES3MP"); };
997    #[no_mangle]
998    pub static mut rustGetObjectSummonDuration: fn(u16) -> f64 = |_| { unreachable!("GetObjectSummonDuration was called before set by TES3MP"); };
999    #[no_mangle]
1000    pub static mut rustDoesObjectHavePlayerSummoner: fn(u16) -> bool = |_| { unreachable!("DoesObjectHavePlayerSummoner was called before set by TES3MP"); };
1001    #[no_mangle]
1002    pub static mut rustGetObjectSummonerPid: fn(u16) -> i16 = |_| { unreachable!("GetObjectSummonerPid was called before set by TES3MP"); };
1003    #[no_mangle]
1004    pub static mut rustGetObjectSummonerRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetObjectSummonerRefId was called before set by TES3MP"); };
1005    #[no_mangle]
1006    pub static mut rustGetObjectSummonerRefNum: fn(u16) -> u16 = |_| { unreachable!("GetObjectSummonerRefNum was called before set by TES3MP"); };
1007    #[no_mangle]
1008    pub static mut rustGetObjectSummonerMpNum: fn(u16) -> u16 = |_| { unreachable!("GetObjectSummonerMpNum was called before set by TES3MP"); };
1009    #[no_mangle]
1010    pub static mut rustGetObjectPosX: fn(u16) -> f64 = |_| { unreachable!("GetObjectPosX was called before set by TES3MP"); };
1011    #[no_mangle]
1012    pub static mut rustGetObjectPosY: fn(u16) -> f64 = |_| { unreachable!("GetObjectPosY was called before set by TES3MP"); };
1013    #[no_mangle]
1014    pub static mut rustGetObjectPosZ: fn(u16) -> f64 = |_| { unreachable!("GetObjectPosZ was called before set by TES3MP"); };
1015    #[no_mangle]
1016    pub static mut rustGetObjectRotX: fn(u16) -> f64 = |_| { unreachable!("GetObjectRotX was called before set by TES3MP"); };
1017    #[no_mangle]
1018    pub static mut rustGetObjectRotY: fn(u16) -> f64 = |_| { unreachable!("GetObjectRotY was called before set by TES3MP"); };
1019    #[no_mangle]
1020    pub static mut rustGetObjectRotZ: fn(u16) -> f64 = |_| { unreachable!("GetObjectRotZ was called before set by TES3MP"); };
1021    #[no_mangle]
1022    pub static mut rustGetVideoFilename: fn(u16) -> *const i8 = |_| { unreachable!("GetVideoFilename was called before set by TES3MP"); };
1023    #[no_mangle]
1024    pub static mut rustGetScriptVariableName: fn(u16) -> *const i8 = |_| { unreachable!("GetScriptVariableName was called before set by TES3MP"); };
1025    #[no_mangle]
1026    pub static mut rustGetScriptVariableShortValue: fn(u16) -> i16 = |_| { unreachable!("GetScriptVariableShortValue was called before set by TES3MP"); };
1027    #[no_mangle]
1028    pub static mut rustGetContainerChangesSize: fn(u16) -> u16 = |_| { unreachable!("GetContainerChangesSize was called before set by TES3MP"); };
1029    #[no_mangle]
1030    pub static mut rustGetContainerItemRefId: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetContainerItemRefId was called before set by TES3MP"); };
1031    #[no_mangle]
1032    pub static mut rustGetContainerItemCount: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetContainerItemCount was called before set by TES3MP"); };
1033    #[no_mangle]
1034    pub static mut rustGetContainerItemCharge: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetContainerItemCharge was called before set by TES3MP"); };
1035    #[no_mangle]
1036    pub static mut rustGetContainerItemEnchantmentCharge: fn(u16, u16) -> f64 = |_, _| { unreachable!("GetContainerItemEnchantmentCharge was called before set by TES3MP"); };
1037    #[no_mangle]
1038    pub static mut rustGetContainerItemSoul: fn(u16, u16) -> *const i8 = |_, _| { unreachable!("GetContainerItemSoul was called before set by TES3MP"); };
1039    #[no_mangle]
1040    pub static mut rustGetContainerItemActionCount: fn(u16, u16) -> i16 = |_, _| { unreachable!("GetContainerItemActionCount was called before set by TES3MP"); };
1041    #[no_mangle]
1042    pub static mut rustDoesObjectHaveContainer: fn(u16) -> bool = |_| { unreachable!("DoesObjectHaveContainer was called before set by TES3MP"); };
1043    #[no_mangle]
1044    pub static mut rustSetObjectListCell: fn(*const i8) = |_| { unreachable!("SetObjectListCell was called before set by TES3MP"); };
1045    #[no_mangle]
1046    pub static mut rustSetObjectListAction: fn(u8) = |_| { unreachable!("SetObjectListAction was called before set by TES3MP"); };
1047    #[no_mangle]
1048    pub static mut rustSetObjectListConsoleCommand: fn(*const i8) = |_| { unreachable!("SetObjectListConsoleCommand was called before set by TES3MP"); };
1049    #[no_mangle]
1050    pub static mut rustSetObjectRefId: fn(*const i8) = |_| { unreachable!("SetObjectRefId was called before set by TES3MP"); };
1051    #[no_mangle]
1052    pub static mut rustSetObjectRefNum: fn(i16) = |_| { unreachable!("SetObjectRefNum was called before set by TES3MP"); };
1053    #[no_mangle]
1054    pub static mut rustSetObjectMpNum: fn(i16) = |_| { unreachable!("SetObjectMpNum was called before set by TES3MP"); };
1055    #[no_mangle]
1056    pub static mut rustSetObjectCount: fn(i16) = |_| { unreachable!("SetObjectCount was called before set by TES3MP"); };
1057    #[no_mangle]
1058    pub static mut rustSetObjectCharge: fn(i16) = |_| { unreachable!("SetObjectCharge was called before set by TES3MP"); };
1059    #[no_mangle]
1060    pub static mut rustSetObjectEnchantmentCharge: fn(f64) = |_| { unreachable!("SetObjectEnchantmentCharge was called before set by TES3MP"); };
1061    #[no_mangle]
1062    pub static mut rustSetObjectSoul: fn(*const i8) = |_| { unreachable!("SetObjectSoul was called before set by TES3MP"); };
1063    #[no_mangle]
1064    pub static mut rustSetObjectGoldValue: fn(i16) = |_| { unreachable!("SetObjectGoldValue was called before set by TES3MP"); };
1065    #[no_mangle]
1066    pub static mut rustSetObjectScale: fn(f64) = |_| { unreachable!("SetObjectScale was called before set by TES3MP"); };
1067    #[no_mangle]
1068    pub static mut rustSetObjectState: fn(bool) = |_| { unreachable!("SetObjectState was called before set by TES3MP"); };
1069    #[no_mangle]
1070    pub static mut rustSetObjectLockLevel: fn(i16) = |_| { unreachable!("SetObjectLockLevel was called before set by TES3MP"); };
1071    #[no_mangle]
1072    pub static mut rustSetObjectDisarmState: fn(bool) = |_| { unreachable!("SetObjectDisarmState was called before set by TES3MP"); };
1073    #[no_mangle]
1074    pub static mut rustSetObjectSummonDuration: fn(f32) = |_| { unreachable!("SetObjectSummonDuration was called before set by TES3MP"); };
1075    #[no_mangle]
1076    pub static mut rustSetObjectSummonState: fn(bool) = |_| { unreachable!("SetObjectSummonState was called before set by TES3MP"); };
1077    #[no_mangle]
1078    pub static mut rustSetObjectPosition: fn(f64, f64, f64) = |_, _, _| { unreachable!("SetObjectPosition was called before set by TES3MP"); };
1079    #[no_mangle]
1080    pub static mut rustSetObjectRotation: fn(f64, f64, f64) = |_, _, _| { unreachable!("SetObjectRotation was called before set by TES3MP"); };
1081    #[no_mangle]
1082    pub static mut rustSetObjectActivatingPid: fn(u16) = |_| { unreachable!("SetObjectActivatingPid was called before set by TES3MP"); };
1083    #[no_mangle]
1084    pub static mut rustSetObjectDoorState: fn(i16) = |_| { unreachable!("SetObjectDoorState was called before set by TES3MP"); };
1085    #[no_mangle]
1086    pub static mut rustSetObjectDoorTeleportState: fn(bool) = |_| { unreachable!("SetObjectDoorTeleportState was called before set by TES3MP"); };
1087    #[no_mangle]
1088    pub static mut rustSetObjectDoorDestinationCell: fn(*const i8) = |_| { unreachable!("SetObjectDoorDestinationCell was called before set by TES3MP"); };
1089    #[no_mangle]
1090    pub static mut rustSetObjectDoorDestinationPosition: fn(f64, f64, f64) = |_, _, _| { unreachable!("SetObjectDoorDestinationPosition was called before set by TES3MP"); };
1091    #[no_mangle]
1092    pub static mut rustSetObjectDoorDestinationRotation: fn(f64, f64) = |_, _| { unreachable!("SetObjectDoorDestinationRotation was called before set by TES3MP"); };
1093    #[no_mangle]
1094    pub static mut rustSetScriptVariableName: fn(*const i8) = |_| { unreachable!("SetScriptVariableName was called before set by TES3MP"); };
1095    #[no_mangle]
1096    pub static mut rustSetScriptVariableShortValue: fn(i16) = |_| { unreachable!("SetScriptVariableShortValue was called before set by TES3MP"); };
1097    #[no_mangle]
1098    pub static mut rustSetPlayerAsObject: fn(u16) = |_| { unreachable!("SetPlayerAsObject was called before set by TES3MP"); };
1099    #[no_mangle]
1100    pub static mut rustSetContainerItemRefId: fn(*const i8) = |_| { unreachable!("SetContainerItemRefId was called before set by TES3MP"); };
1101    #[no_mangle]
1102    pub static mut rustSetContainerItemCount: fn(i16) = |_| { unreachable!("SetContainerItemCount was called before set by TES3MP"); };
1103    #[no_mangle]
1104    pub static mut rustSetContainerItemCharge: fn(i16) = |_| { unreachable!("SetContainerItemCharge was called before set by TES3MP"); };
1105    #[no_mangle]
1106    pub static mut rustSetContainerItemEnchantmentCharge: fn(f64) = |_| { unreachable!("SetContainerItemEnchantmentCharge was called before set by TES3MP"); };
1107    #[no_mangle]
1108    pub static mut rustSetContainerItemSoul: fn(*const i8) = |_| { unreachable!("SetContainerItemSoul was called before set by TES3MP"); };
1109    #[no_mangle]
1110    pub static mut rustSetContainerItemActionCountByIndex: fn(u16, u16, i16) = |_, _, _| { unreachable!("SetContainerItemActionCountByIndex was called before set by TES3MP"); };
1111    #[no_mangle]
1112    pub static mut rustAddObject: fn() = || { unreachable!("AddObject was called before set by TES3MP"); };
1113    #[no_mangle]
1114    pub static mut rustAddContainerItem: fn() = || { unreachable!("AddContainerItem was called before set by TES3MP"); };
1115    #[no_mangle]
1116    pub static mut rustSendObjectActivate: fn(bool, bool) = |_, _| { unreachable!("SendObjectActivate was called before set by TES3MP"); };
1117    #[no_mangle]
1118    pub static mut rustSendObjectPlace: fn(bool, bool) = |_, _| { unreachable!("SendObjectPlace was called before set by TES3MP"); };
1119    #[no_mangle]
1120    pub static mut rustSendObjectSpawn: fn(bool, bool) = |_, _| { unreachable!("SendObjectSpawn was called before set by TES3MP"); };
1121    #[no_mangle]
1122    pub static mut rustSendObjectDelete: fn(bool, bool) = |_, _| { unreachable!("SendObjectDelete was called before set by TES3MP"); };
1123    #[no_mangle]
1124    pub static mut rustSendObjectLock: fn(bool, bool) = |_, _| { unreachable!("SendObjectLock was called before set by TES3MP"); };
1125    #[no_mangle]
1126    pub static mut rustSendObjectTrap: fn(bool, bool) = |_, _| { unreachable!("SendObjectTrap was called before set by TES3MP"); };
1127    #[no_mangle]
1128    pub static mut rustSendObjectScale: fn(bool, bool) = |_, _| { unreachable!("SendObjectScale was called before set by TES3MP"); };
1129    #[no_mangle]
1130    pub static mut rustSendObjectState: fn(bool, bool) = |_, _| { unreachable!("SendObjectState was called before set by TES3MP"); };
1131    #[no_mangle]
1132    pub static mut rustSendDoorState: fn(bool, bool) = |_, _| { unreachable!("SendDoorState was called before set by TES3MP"); };
1133    #[no_mangle]
1134    pub static mut rustSendDoorDestination: fn(bool, bool) = |_, _| { unreachable!("SendDoorDestination was called before set by TES3MP"); };
1135    #[no_mangle]
1136    pub static mut rustSendContainer: fn(bool, bool) = |_, _| { unreachable!("SendContainer was called before set by TES3MP"); };
1137    #[no_mangle]
1138    pub static mut rustSendVideoPlay: fn(bool, bool) = |_, _| { unreachable!("SendVideoPlay was called before set by TES3MP"); };
1139    #[no_mangle]
1140    pub static mut rustSendScriptGlobalShort: fn(bool, bool) = |_, _| { unreachable!("SendScriptGlobalShort was called before set by TES3MP"); };
1141    #[no_mangle]
1142    pub static mut rustSendConsoleCommand: fn(bool, bool) = |_, _| { unreachable!("SendConsoleCommand was called before set by TES3MP"); };
1143    #[no_mangle]
1144    pub static mut rustReadLastObjectList: fn() = || { unreachable!("ReadLastObjectList was called before set by TES3MP"); };
1145    #[no_mangle]
1146    pub static mut rustReadLastEvent: fn() = || { unreachable!("ReadLastEvent was called before set by TES3MP"); };
1147    #[no_mangle]
1148    pub static mut rustInitializeObjectList: fn(u16) = |_| { unreachable!("InitializeObjectList was called before set by TES3MP"); };
1149    #[no_mangle]
1150    pub static mut rustInitializeEvent: fn(u16) = |_| { unreachable!("InitializeEvent was called before set by TES3MP"); };
1151    #[no_mangle]
1152    pub static mut rustCopyLastObjectListToStore: fn() = || { unreachable!("CopyLastObjectListToStore was called before set by TES3MP"); };
1153    #[no_mangle]
1154    pub static mut rustGetObjectChangesSize: fn() -> u16 = || { unreachable!("GetObjectChangesSize was called before set by TES3MP"); };
1155    #[no_mangle]
1156    pub static mut rustGetEventAction: fn() -> u8 = || { unreachable!("GetEventAction was called before set by TES3MP"); };
1157    #[no_mangle]
1158    pub static mut rustGetEventContainerSubAction: fn() -> u8 = || { unreachable!("GetEventContainerSubAction was called before set by TES3MP"); };
1159    #[no_mangle]
1160    pub static mut rustGetObjectRefNumIndex: fn(u16) -> u16 = |_| { unreachable!("GetObjectRefNumIndex was called before set by TES3MP"); };
1161    #[no_mangle]
1162    pub static mut rustGetObjectSummonerRefNumIndex: fn(u16) -> u16 = |_| { unreachable!("GetObjectSummonerRefNumIndex was called before set by TES3MP"); };
1163    #[no_mangle]
1164    pub static mut rustSetEventCell: fn(*const i8) = |_| { unreachable!("SetEventCell was called before set by TES3MP"); };
1165    #[no_mangle]
1166    pub static mut rustSetEventAction: fn(u8) = |_| { unreachable!("SetEventAction was called before set by TES3MP"); };
1167    #[no_mangle]
1168    pub static mut rustSetEventConsoleCommand: fn(*const i8) = |_| { unreachable!("SetEventConsoleCommand was called before set by TES3MP"); };
1169    #[no_mangle]
1170    pub static mut rustSetObjectRefNumIndex: fn(i16) = |_| { unreachable!("SetObjectRefNumIndex was called before set by TES3MP"); };
1171    #[no_mangle]
1172    pub static mut rustAddWorldObject: fn() = || { unreachable!("AddWorldObject was called before set by TES3MP"); };
1173    #[no_mangle]
1174    pub static mut rustReadReceivedWorldstate: fn() = || { unreachable!("ReadReceivedWorldstate was called before set by TES3MP"); };
1175    #[no_mangle]
1176    pub static mut rustCopyReceivedWorldstateToStore: fn() = || { unreachable!("CopyReceivedWorldstateToStore was called before set by TES3MP"); };
1177    #[no_mangle]
1178    pub static mut rustClearKillChanges: fn() = || { unreachable!("ClearKillChanges was called before set by TES3MP"); };
1179    #[no_mangle]
1180    pub static mut rustClearMapChanges: fn() = || { unreachable!("ClearMapChanges was called before set by TES3MP"); };
1181    #[no_mangle]
1182    pub static mut rustGetKillChangesSize: fn() -> u16 = || { unreachable!("GetKillChangesSize was called before set by TES3MP"); };
1183    #[no_mangle]
1184    pub static mut rustGetMapChangesSize: fn() -> u16 = || { unreachable!("GetMapChangesSize was called before set by TES3MP"); };
1185    #[no_mangle]
1186    pub static mut rustGetKillRefId: fn(u16) -> *const i8 = |_| { unreachable!("GetKillRefId was called before set by TES3MP"); };
1187    #[no_mangle]
1188    pub static mut rustGetKillNumber: fn(u16) -> i16 = |_| { unreachable!("GetKillNumber was called before set by TES3MP"); };
1189    #[no_mangle]
1190    pub static mut rustGetWeatherRegion: fn() -> *const i8 = || { unreachable!("GetWeatherRegion was called before set by TES3MP"); };
1191    #[no_mangle]
1192    pub static mut rustGetWeatherCurrent: fn() -> i16 = || { unreachable!("GetWeatherCurrent was called before set by TES3MP"); };
1193    #[no_mangle]
1194    pub static mut rustGetWeatherNext: fn() -> i16 = || { unreachable!("GetWeatherNext was called before set by TES3MP"); };
1195    #[no_mangle]
1196    pub static mut rustGetWeatherQueued: fn() -> i16 = || { unreachable!("GetWeatherQueued was called before set by TES3MP"); };
1197    #[no_mangle]
1198    pub static mut rustGetWeatherTransitionFactor: fn() -> f64 = || { unreachable!("GetWeatherTransitionFactor was called before set by TES3MP"); };
1199    #[no_mangle]
1200    pub static mut rustGetMapTileCellX: fn(u16) -> i16 = |_| { unreachable!("GetMapTileCellX was called before set by TES3MP"); };
1201    #[no_mangle]
1202    pub static mut rustGetMapTileCellY: fn(u16) -> i16 = |_| { unreachable!("GetMapTileCellY was called before set by TES3MP"); };
1203    #[no_mangle]
1204    pub static mut rustSetAuthorityRegion: fn(*const i8) = |_| { unreachable!("SetAuthorityRegion was called before set by TES3MP"); };
1205    #[no_mangle]
1206    pub static mut rustSetWeatherRegion: fn(*const i8) = |_| { unreachable!("SetWeatherRegion was called before set by TES3MP"); };
1207    #[no_mangle]
1208    pub static mut rustSetWeatherForceState: fn(bool) = |_| { unreachable!("SetWeatherForceState was called before set by TES3MP"); };
1209    #[no_mangle]
1210    pub static mut rustSetWeatherCurrent: fn(i16) = |_| { unreachable!("SetWeatherCurrent was called before set by TES3MP"); };
1211    #[no_mangle]
1212    pub static mut rustSetWeatherNext: fn(i16) = |_| { unreachable!("SetWeatherNext was called before set by TES3MP"); };
1213    #[no_mangle]
1214    pub static mut rustSetWeatherQueued: fn(i16) = |_| { unreachable!("SetWeatherQueued was called before set by TES3MP"); };
1215    #[no_mangle]
1216    pub static mut rustSetWeatherTransitionFactor: fn(f64) = |_| { unreachable!("SetWeatherTransitionFactor was called before set by TES3MP"); };
1217    #[no_mangle]
1218    pub static mut rustSetHour: fn(f64) = |_| { unreachable!("SetHour was called before set by TES3MP"); };
1219    #[no_mangle]
1220    pub static mut rustSetDay: fn(i16) = |_| { unreachable!("SetDay was called before set by TES3MP"); };
1221    #[no_mangle]
1222    pub static mut rustSetMonth: fn(i16) = |_| { unreachable!("SetMonth was called before set by TES3MP"); };
1223    #[no_mangle]
1224    pub static mut rustSetYear: fn(i16) = |_| { unreachable!("SetYear was called before set by TES3MP"); };
1225    #[no_mangle]
1226    pub static mut rustSetDaysPassed: fn(i16) = |_| { unreachable!("SetDaysPassed was called before set by TES3MP"); };
1227    #[no_mangle]
1228    pub static mut rustSetTimeScale: fn(f64) = |_| { unreachable!("SetTimeScale was called before set by TES3MP"); };
1229    #[no_mangle]
1230    pub static mut rustSetPlayerCollisionState: fn(bool) = |_| { unreachable!("SetPlayerCollisionState was called before set by TES3MP"); };
1231    #[no_mangle]
1232    pub static mut rustSetActorCollisionState: fn(bool) = |_| { unreachable!("SetActorCollisionState was called before set by TES3MP"); };
1233    #[no_mangle]
1234    pub static mut rustSetPlacedObjectCollisionState: fn(bool) = |_| { unreachable!("SetPlacedObjectCollisionState was called before set by TES3MP"); };
1235    #[no_mangle]
1236    pub static mut rustUseActorCollisionForPlacedObjects: fn(bool) = |_| { unreachable!("UseActorCollisionForPlacedObjects was called before set by TES3MP"); };
1237    #[no_mangle]
1238    pub static mut rustAddKill: fn(*const i8, i16) = |_, _| { unreachable!("AddKill was called before set by TES3MP"); };
1239    #[no_mangle]
1240    pub static mut rustAddSynchronizedClientScriptId: fn(*const i8) = |_| { unreachable!("AddSynchronizedClientScriptId was called before set by TES3MP"); };
1241    #[no_mangle]
1242    pub static mut rustAddSynchronizedClientGlobalId: fn(*const i8) = |_| { unreachable!("AddSynchronizedClientGlobalId was called before set by TES3MP"); };
1243    #[no_mangle]
1244    pub static mut rustAddEnforcedCollisionRefId: fn(*const i8) = |_| { unreachable!("AddEnforcedCollisionRefId was called before set by TES3MP"); };
1245    #[no_mangle]
1246    pub static mut rustClearSynchronizedClientScriptIds: fn() = || { unreachable!("ClearSynchronizedClientScriptIds was called before set by TES3MP"); };
1247    #[no_mangle]
1248    pub static mut rustClearSynchronizedClientGlobalIds: fn() = || { unreachable!("ClearSynchronizedClientGlobalIds was called before set by TES3MP"); };
1249    #[no_mangle]
1250    pub static mut rustClearEnforcedCollisionRefIds: fn() = || { unreachable!("ClearEnforcedCollisionRefIds was called before set by TES3MP"); };
1251    #[no_mangle]
1252    pub static mut rustSaveMapTileImageFile: fn(u16, *const i8) = |_, _| { unreachable!("SaveMapTileImageFile was called before set by TES3MP"); };
1253    #[no_mangle]
1254    pub static mut rustLoadMapTileImageFile: fn(i16, i16, *const i8) = |_, _, _| { unreachable!("LoadMapTileImageFile was called before set by TES3MP"); };
1255    #[no_mangle]
1256    pub static mut rustSendClientScriptSettings: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendClientScriptSettings was called before set by TES3MP"); };
1257    #[no_mangle]
1258    pub static mut rustSendWorldKillCount: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendWorldKillCount was called before set by TES3MP"); };
1259    #[no_mangle]
1260    pub static mut rustSendWorldMap: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendWorldMap was called before set by TES3MP"); };
1261    #[no_mangle]
1262    pub static mut rustSendWorldTime: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendWorldTime was called before set by TES3MP"); };
1263    #[no_mangle]
1264    pub static mut rustSendWorldWeather: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendWorldWeather was called before set by TES3MP"); };
1265    #[no_mangle]
1266    pub static mut rustSendWorldCollisionOverride: fn(u16, bool, bool) = |_, _, _| { unreachable!("SendWorldCollisionOverride was called before set by TES3MP"); };
1267    #[no_mangle]
1268    pub static mut rustSendWorldRegionAuthority: fn(u16) = |_| { unreachable!("SendWorldRegionAuthority was called before set by TES3MP"); };
1269    #[no_mangle]
1270    pub static mut rustReadLastWorldstate: fn() = || { unreachable!("ReadLastWorldstate was called before set by TES3MP"); };
1271    #[no_mangle]
1272    pub static mut rustCopyLastWorldstateToStore: fn() = || { unreachable!("CopyLastWorldstateToStore was called before set by TES3MP"); };
1273}
1274
1275///
1276///  Create a timer that will run a script function after a certain interval.
1277///
1278///  `callback` The Lua script function.  
1279///  `msec` The interval in miliseconds.
1280///
1281///  Returns the ID of the timer thus created.
1282///
1283pub fn create_timer(callback: fn(), msec: i16) -> i16 {
1284    unsafe {
1285        raw::rustCreateTimer(callback, msec)
1286    }
1287}
1288
1289pub fn make_public(public: fn(), name: &str, ret_type: i8, def: &str) {
1290    unsafe {
1291        raw::rustMakePublic(public, CString::new(name).unwrap_or_default().as_ptr(), ret_type, CString::new(def).unwrap_or_default().as_ptr())
1292    }
1293}
1294
1295///
1296///  Start the timer with a certain ID.
1297///
1298///  `timer_id` The timer ID.
1299///
1300///  Returns void
1301///
1302pub fn start_timer(timer_id: i16) {
1303    unsafe {
1304        raw::rustStartTimer(timer_id)
1305    }
1306}
1307
1308///
1309///  Stop the timer with a certain ID.
1310///
1311///  `timer_id` The timer ID.
1312///
1313///  Returns void
1314///
1315pub fn stop_timer(timer_id: i16) {
1316    unsafe {
1317        raw::rustStopTimer(timer_id)
1318    }
1319}
1320
1321///
1322///  Restart the timer with a certain ID for a certain interval.
1323///
1324///  `timer_id` The timer ID.  
1325///  `msec` The interval in miliseconds.
1326///
1327///  Returns void
1328///
1329pub fn restart_timer(timer_id: i16, msec: i16) {
1330    unsafe {
1331        raw::rustRestartTimer(timer_id, msec)
1332    }
1333}
1334
1335///
1336///  Free the timer with a certain ID.
1337///
1338///  `timer_id` The timer ID.
1339///
1340///  Returns void
1341///
1342pub fn free_timer(timer_id: i16) {
1343    unsafe {
1344        raw::rustFreeTimer(timer_id)
1345    }
1346}
1347
1348///
1349///  Check whether a timer is elapsed.
1350///
1351///  `timer_id` The timer ID.
1352///
1353///  Returns whether the timer is elapsed.
1354///
1355pub fn is_timer_elapsed(timer_id: i16) -> bool {
1356    unsafe {
1357        raw::rustIsTimerElapsed(timer_id)
1358    }
1359}
1360
1361///
1362///  Use the last actor list received by the server as the one being read.
1363///
1364///
1365///  Returns void
1366///
1367pub fn read_received_actor_list() {
1368    unsafe {
1369        raw::rustReadReceivedActorList()
1370    }
1371}
1372
1373///
1374///  Use the temporary actor list stored for a cell as the one being read.
1375///
1376///  This type of actor list is used to store actor positions and dynamic stats and is deleted  
1377///  when the cell is unloaded.
1378///
1379///  `cell_description` The description of the cell whose actor list should be read.
1380///
1381///  Returns void
1382///
1383pub fn read_cell_actor_list(cell_description: &str) {
1384    unsafe {
1385        raw::rustReadCellActorList(CString::new(cell_description).unwrap_or_default().as_ptr())
1386    }
1387}
1388
1389///
1390///  Clear the data from the actor list stored on the server.
1391///
1392///
1393///  Returns void
1394///
1395pub fn clear_actor_list() {
1396    unsafe {
1397        raw::rustClearActorList()
1398    }
1399}
1400
1401///
1402///  Set the pid attached to the ActorList.
1403///
1404///  `pid` The player ID to whom the actor list should be attached.
1405///
1406///  Returns void
1407///
1408pub fn set_actor_list_pid(pid: u16) {
1409    unsafe {
1410        raw::rustSetActorListPid(pid)
1411    }
1412}
1413
1414///
1415///  Take the contents of the read-only actor list last received by the  
1416///         server from a player and move its contents to the stored object list  
1417///         that can be sent by the server.
1418///
1419///
1420///  Returns void
1421///
1422pub fn copy_received_actor_list_to_store() {
1423    unsafe {
1424        raw::rustCopyReceivedActorListToStore()
1425    }
1426}
1427
1428///
1429///  Get the number of indexes in the read actor list.
1430///
1431///
1432///  Returns the number of indexes.
1433///
1434pub fn get_actor_list_size() -> u16 {
1435    unsafe {
1436        raw::rustGetActorListSize()
1437    }
1438}
1439
1440///
1441///  Get the action type used in the read actor list.
1442///
1443///
1444///  Returns the action type (0 for SET, 1 for ADD, 2 for REMOVE, 3 for REQUEST).
1445///
1446pub fn get_actor_list_action() -> u8 {
1447    unsafe {
1448        raw::rustGetActorListAction()
1449    }
1450}
1451
1452///
1453///  Get the cell description of the actor at a certain index in the read actor list.
1454///
1455///  `index` The index of the actor.
1456///
1457///  Returns the cell description.
1458///
1459pub fn get_actor_cell(index: u16) -> String {
1460    unsafe {
1461        CStr::from_ptr(raw::rustGetActorCell(index))
1462            .to_str()
1463            .unwrap_or_default()
1464            .to_string()
1465    }
1466}
1467
1468///
1469///  Get the refId of the actor at a certain index in the read actor list.
1470///
1471///  `index` The index of the actor.
1472///
1473///  Returns the refId.
1474///
1475pub fn get_actor_ref_id(index: u16) -> String {
1476    unsafe {
1477        CStr::from_ptr(raw::rustGetActorRefId(index))
1478            .to_str()
1479            .unwrap_or_default()
1480            .to_string()
1481    }
1482}
1483
1484///
1485///  Get the refNum of the actor at a certain index in the read actor list.
1486///
1487///  `index` The index of the actor.
1488///
1489///  Returns the refNum.
1490///
1491pub fn get_actor_ref_num(index: u16) -> u16 {
1492    unsafe {
1493        raw::rustGetActorRefNum(index)
1494    }
1495}
1496
1497///
1498///  Get the mpNum of the actor at a certain index in the read actor list.
1499///
1500///  `index` The index of the actor.
1501///
1502///  Returns the mpNum.
1503///
1504pub fn get_actor_mp_num(index: u16) -> u16 {
1505    unsafe {
1506        raw::rustGetActorMpNum(index)
1507    }
1508}
1509
1510///
1511///  Get the X position of the actor at a certain index in the read actor list.
1512///
1513///  `index` The index of the actor.
1514///
1515///  Returns the X position.
1516///
1517pub fn get_actor_pos_x(index: u16) -> f64 {
1518    unsafe {
1519        raw::rustGetActorPosX(index)
1520    }
1521}
1522
1523///
1524///  Get the Y position of the actor at a certain index in the read actor list.
1525///
1526///  `index` The index of the actor.
1527///
1528///  Returns the Y position.
1529///
1530pub fn get_actor_pos_y(index: u16) -> f64 {
1531    unsafe {
1532        raw::rustGetActorPosY(index)
1533    }
1534}
1535
1536///
1537///  Get the Z position of the actor at a certain index in the read actor list.
1538///
1539///  `index` The index of the actor.
1540///
1541///  Returns the Z position.
1542///
1543pub fn get_actor_pos_z(index: u16) -> f64 {
1544    unsafe {
1545        raw::rustGetActorPosZ(index)
1546    }
1547}
1548
1549///
1550///  Get the X rotation of the actor at a certain index in the read actor list.
1551///
1552///  `index` The index of the actor.
1553///
1554///  Returns the X rotation.
1555///
1556pub fn get_actor_rot_x(index: u16) -> f64 {
1557    unsafe {
1558        raw::rustGetActorRotX(index)
1559    }
1560}
1561
1562///
1563///  Get the Y rotation of the actor at a certain index in the read actor list.
1564///
1565///  `index` The index of the actor.
1566///
1567///  Returns the Y rotation.
1568///
1569pub fn get_actor_rot_y(index: u16) -> f64 {
1570    unsafe {
1571        raw::rustGetActorRotY(index)
1572    }
1573}
1574
1575///
1576///  Get the Z rotation of the actor at a certain index in the read actor list.
1577///
1578///  `index` The index of the actor.
1579///
1580///  Returns the Z rotation.
1581///
1582pub fn get_actor_rot_z(index: u16) -> f64 {
1583    unsafe {
1584        raw::rustGetActorRotZ(index)
1585    }
1586}
1587
1588///
1589///  Get the base health of the actor at a certain index in the read actor list.
1590///
1591///  `index` The index of the actor.
1592///
1593///  Returns the base health.
1594///
1595pub fn get_actor_health_base(index: u16) -> f64 {
1596    unsafe {
1597        raw::rustGetActorHealthBase(index)
1598    }
1599}
1600
1601///
1602///  Get the current health of the actor at a certain index in the read actor list.
1603///
1604///  `index` The index of the actor.
1605///
1606///  Returns the current health.
1607///
1608pub fn get_actor_health_current(index: u16) -> f64 {
1609    unsafe {
1610        raw::rustGetActorHealthCurrent(index)
1611    }
1612}
1613
1614///
1615///  Get the modified health of the actor at a certain index in the read actor list.
1616///
1617///  `index` The index of the actor.
1618///
1619///  Returns the modified health.
1620///
1621pub fn get_actor_health_modified(index: u16) -> f64 {
1622    unsafe {
1623        raw::rustGetActorHealthModified(index)
1624    }
1625}
1626
1627///
1628///  Get the base magicka of the actor at a certain index in the read actor list.
1629///
1630///  `index` The index of the actor.
1631///
1632///  Returns the base magicka.
1633///
1634pub fn get_actor_magicka_base(index: u16) -> f64 {
1635    unsafe {
1636        raw::rustGetActorMagickaBase(index)
1637    }
1638}
1639
1640///
1641///  Get the current magicka of the actor at a certain index in the read actor list.
1642///
1643///  `index` The index of the actor.
1644///
1645///  Returns the current magicka.
1646///
1647pub fn get_actor_magicka_current(index: u16) -> f64 {
1648    unsafe {
1649        raw::rustGetActorMagickaCurrent(index)
1650    }
1651}
1652
1653///
1654///  Get the modified magicka of the actor at a certain index in the read actor list.
1655///
1656///  `index` The index of the actor.
1657///
1658///  Returns the modified magicka.
1659///
1660pub fn get_actor_magicka_modified(index: u16) -> f64 {
1661    unsafe {
1662        raw::rustGetActorMagickaModified(index)
1663    }
1664}
1665
1666///
1667///  Get the base fatigue of the actor at a certain index in the read actor list.
1668///
1669///  `index` The index of the actor.
1670///
1671///  Returns the base fatigue.
1672///
1673pub fn get_actor_fatigue_base(index: u16) -> f64 {
1674    unsafe {
1675        raw::rustGetActorFatigueBase(index)
1676    }
1677}
1678
1679///
1680///  Get the current fatigue of the actor at a certain index in the read actor list.
1681///
1682///  `index` The index of the actor.
1683///
1684///  Returns the current fatigue.
1685///
1686pub fn get_actor_fatigue_current(index: u16) -> f64 {
1687    unsafe {
1688        raw::rustGetActorFatigueCurrent(index)
1689    }
1690}
1691
1692///
1693///  Get the modified fatigue of the actor at a certain index in the read actor list.
1694///
1695///  `index` The index of the actor.
1696///
1697///  Returns the modified fatigue.
1698///
1699pub fn get_actor_fatigue_modified(index: u16) -> f64 {
1700    unsafe {
1701        raw::rustGetActorFatigueModified(index)
1702    }
1703}
1704
1705///
1706///  Get the refId of the item in a certain slot of the equipment of the actor at a  
1707///  certain index in the read actor list.
1708///
1709///  `index` The index of the actor.  
1710///  `slot` The slot of the equipment item.
1711///
1712///  Returns the refId.
1713///
1714pub fn get_actor_equipment_item_ref_id(index: u16, slot: u16) -> String {
1715    unsafe {
1716        CStr::from_ptr(raw::rustGetActorEquipmentItemRefId(index, slot))
1717            .to_str()
1718            .unwrap_or_default()
1719            .to_string()
1720    }
1721}
1722
1723///
1724///  Get the count of the item in a certain slot of the equipment of the actor at a  
1725///  certain index in the read actor list.
1726///
1727///  `index` The index of the actor.  
1728///  `slot` The slot of the equipment item.
1729///
1730///  Returns the item count.
1731///
1732pub fn get_actor_equipment_item_count(index: u16, slot: u16) -> i16 {
1733    unsafe {
1734        raw::rustGetActorEquipmentItemCount(index, slot)
1735    }
1736}
1737
1738///
1739///  Get the charge of the item in a certain slot of the equipment of the actor at a  
1740///  certain index in the read actor list.
1741///
1742///  `index` The index of the actor.  
1743///  `slot` The slot of the equipment item.
1744///
1745///  Returns the charge.
1746///
1747pub fn get_actor_equipment_item_charge(index: u16, slot: u16) -> i16 {
1748    unsafe {
1749        raw::rustGetActorEquipmentItemCharge(index, slot)
1750    }
1751}
1752
1753///
1754///  Get the enchantment charge of the item in a certain slot of the equipment of the actor at a  
1755///  certain index in the read actor list.
1756///
1757///  `index` The index of the actor.  
1758///  `slot` The slot of the equipment item.
1759///
1760///  Returns the enchantment charge.
1761///
1762pub fn get_actor_equipment_item_enchantment_charge(index: u16, slot: u16) -> f64 {
1763    unsafe {
1764        raw::rustGetActorEquipmentItemEnchantmentCharge(index, slot)
1765    }
1766}
1767
1768///
1769///  Check whether the killer of the actor at a certain index in the read actor list is a player.
1770///
1771///  `index` The index of the actor.
1772///
1773///  Returns whether the actor was killed by a player.
1774///
1775pub fn does_actor_have_player_killer(index: u16) -> bool {
1776    unsafe {
1777        raw::rustDoesActorHavePlayerKiller(index)
1778    }
1779}
1780
1781///
1782///  Get the player ID of the killer of the actor at a certain index in the read actor list.
1783///
1784///  `index` The index of the actor.
1785///
1786///  Returns the player ID of the killer.
1787///
1788pub fn get_actor_killer_pid(index: u16) -> i16 {
1789    unsafe {
1790        raw::rustGetActorKillerPid(index)
1791    }
1792}
1793
1794///
1795///  Get the refId of the actor killer of the actor at a certain index in the read actor list.
1796///
1797///  `index` The index of the actor.
1798///
1799///  Returns the refId of the killer.
1800///
1801pub fn get_actor_killer_ref_id(index: u16) -> String {
1802    unsafe {
1803        CStr::from_ptr(raw::rustGetActorKillerRefId(index))
1804            .to_str()
1805            .unwrap_or_default()
1806            .to_string()
1807    }
1808}
1809
1810///
1811///  Get the refNum of the actor killer of the actor at a certain index in the read actor list.
1812///
1813///  `index` The index of the actor.
1814///
1815///  Returns the refNum of the killer.
1816///
1817pub fn get_actor_killer_ref_num(index: u16) -> u16 {
1818    unsafe {
1819        raw::rustGetActorKillerRefNum(index)
1820    }
1821}
1822
1823///
1824///  Get the mpNum of the actor killer of the actor at a certain index in the read actor list.
1825///
1826///  `index` The index of the actor.
1827///
1828///  Returns the mpNum of the killer.
1829///
1830pub fn get_actor_killer_mp_num(index: u16) -> u16 {
1831    unsafe {
1832        raw::rustGetActorKillerMpNum(index)
1833    }
1834}
1835
1836///
1837///  Get the name of the actor killer of the actor at a certain index in the read actor list.
1838///
1839///  `index` The index of the actor.
1840///
1841///  Returns the name of the killer.
1842///
1843pub fn get_actor_killer_name(index: u16) -> String {
1844    unsafe {
1845        CStr::from_ptr(raw::rustGetActorKillerName(index))
1846            .to_str()
1847            .unwrap_or_default()
1848            .to_string()
1849    }
1850}
1851
1852///
1853///  Check whether there is any positional data for the actor at a certain index in  
1854///  the read actor list.
1855///
1856///  This is only useful when reading the actor list data recorded for a particular cell.
1857///
1858///  `index` The index of the actor.
1859///
1860///  Returns whether the read actor list contains positional data.
1861///
1862pub fn does_actor_have_position(index: u16) -> bool {
1863    unsafe {
1864        raw::rustDoesActorHavePosition(index)
1865    }
1866}
1867
1868///
1869///  Check whether there is any dynamic stats data for the actor at a certain index in  
1870///  the read actor list.
1871///
1872///  This is only useful when reading the actor list data recorded for a particular cell.
1873///
1874///  `index` The index of the actor.
1875///
1876///  Returns whether the read actor list contains dynamic stats data.
1877///
1878pub fn does_actor_have_stats_dynamic(index: u16) -> bool {
1879    unsafe {
1880        raw::rustDoesActorHaveStatsDynamic(index)
1881    }
1882}
1883
1884///
1885///  Set the cell of the temporary actor list stored on the server.
1886///
1887///  The cell is determined to be an exterior cell if it fits the pattern of a number followed  
1888///  by a comma followed by another number.
1889///
1890///  `cell_description` The description of the cell.
1891///
1892///  Returns void
1893///
1894pub fn set_actor_list_cell(cell_description: &str) {
1895    unsafe {
1896        raw::rustSetActorListCell(CString::new(cell_description).unwrap_or_default().as_ptr())
1897    }
1898}
1899
1900///
1901///  Set the action type of the temporary actor list stored on the server.
1902///
1903///  `action` The action type (0 for SET, 1 for ADD, 2 for REMOVE, 3 for REQUEST).
1904///
1905///  Returns void
1906///
1907pub fn set_actor_list_action(action: u8) {
1908    unsafe {
1909        raw::rustSetActorListAction(action)
1910    }
1911}
1912
1913///
1914///  Set the cell of the temporary actor stored on the server.
1915///
1916///  Used for ActorCellChange packets, where a specific actor's cell now differs from that of the  
1917///  actor list.
1918///
1919///  The cell is determined to be an exterior cell if it fits the pattern of a number followed  
1920///  by a comma followed by another number.
1921///
1922///  `cell_description` The description of the cell.
1923///
1924///  Returns void
1925///
1926pub fn set_actor_cell(cell_description: &str) {
1927    unsafe {
1928        raw::rustSetActorCell(CString::new(cell_description).unwrap_or_default().as_ptr())
1929    }
1930}
1931
1932///
1933///  Set the refId of the temporary actor stored on the server.
1934///
1935///  `ref_id` The refId.
1936///
1937///  Returns void
1938///
1939pub fn set_actor_ref_id(ref_id: &str) {
1940    unsafe {
1941        raw::rustSetActorRefId(CString::new(ref_id).unwrap_or_default().as_ptr())
1942    }
1943}
1944
1945///
1946///  Set the refNum of the temporary actor stored on the server.
1947///
1948///  `ref_num` The refNum.
1949///
1950///  Returns void
1951///
1952pub fn set_actor_ref_num(ref_num: i16) {
1953    unsafe {
1954        raw::rustSetActorRefNum(ref_num)
1955    }
1956}
1957
1958///
1959///  Set the mpNum of the temporary actor stored on the server.
1960///
1961///  `mp_num` The mpNum.
1962///
1963///  Returns void
1964///
1965pub fn set_actor_mp_num(mp_num: i16) {
1966    unsafe {
1967        raw::rustSetActorMpNum(mp_num)
1968    }
1969}
1970
1971///
1972///  Set the position of the temporary actor stored on the server.
1973///
1974///  `x` The X position.  
1975///  `y` The Y position.  
1976///  `z` The Z position.
1977///
1978///  Returns void
1979///
1980pub fn set_actor_position(x: f64, y: f64, z: f64) {
1981    unsafe {
1982        raw::rustSetActorPosition(x, y, z)
1983    }
1984}
1985
1986///
1987///  Set the rotation of the temporary actor stored on the server.
1988///
1989///  `x` The X rotation.  
1990///  `y` The Y rotation.  
1991///  `z` The Z rotation.
1992///
1993///  Returns void
1994///
1995pub fn set_actor_rotation(x: f64, y: f64, z: f64) {
1996    unsafe {
1997        raw::rustSetActorRotation(x, y, z)
1998    }
1999}
2000
2001///
2002///  Set the base health of the temporary actor stored on the server.
2003///
2004///  `value` The new value.
2005///
2006///  Returns void
2007///
2008pub fn set_actor_health_base(value: f64) {
2009    unsafe {
2010        raw::rustSetActorHealthBase(value)
2011    }
2012}
2013
2014///
2015///  Set the current health of the temporary actor stored on the server.
2016///
2017///  `value` The new value.
2018///
2019///  Returns void
2020///
2021pub fn set_actor_health_current(value: f64) {
2022    unsafe {
2023        raw::rustSetActorHealthCurrent(value)
2024    }
2025}
2026
2027///
2028///  Set the modified health of the temporary actor stored on the server.
2029///
2030///  `value` The new value.
2031///
2032///  Returns void
2033///
2034pub fn set_actor_health_modified(value: f64) {
2035    unsafe {
2036        raw::rustSetActorHealthModified(value)
2037    }
2038}
2039
2040///
2041///  Set the base magicka of the temporary actor stored on the server.
2042///
2043///  `value` The new value.
2044///
2045///  Returns void
2046///
2047pub fn set_actor_magicka_base(value: f64) {
2048    unsafe {
2049        raw::rustSetActorMagickaBase(value)
2050    }
2051}
2052
2053///
2054///  Set the current magicka of the temporary actor stored on the server.
2055///
2056///  `value` The new value.
2057///
2058///  Returns void
2059///
2060pub fn set_actor_magicka_current(value: f64) {
2061    unsafe {
2062        raw::rustSetActorMagickaCurrent(value)
2063    }
2064}
2065
2066///
2067///  Set the modified magicka of the temporary actor stored on the server.
2068///
2069///  `value` The new value.
2070///
2071///  Returns void
2072///
2073pub fn set_actor_magicka_modified(value: f64) {
2074    unsafe {
2075        raw::rustSetActorMagickaModified(value)
2076    }
2077}
2078
2079///
2080///  Set the base fatigue of the temporary actor stored on the server.
2081///
2082///  `value` The new value.
2083///
2084///  Returns void
2085///
2086pub fn set_actor_fatigue_base(value: f64) {
2087    unsafe {
2088        raw::rustSetActorFatigueBase(value)
2089    }
2090}
2091
2092///
2093///  Set the current fatigue of the temporary actor stored on the server.
2094///
2095///  `value` The new value.
2096///
2097///  Returns void
2098///
2099pub fn set_actor_fatigue_current(value: f64) {
2100    unsafe {
2101        raw::rustSetActorFatigueCurrent(value)
2102    }
2103}
2104
2105///
2106///  Set the modified fatigue of the temporary actor stored on the server.
2107///
2108///  `value` The new value.
2109///
2110///  Returns void
2111///
2112pub fn set_actor_fatigue_modified(value: f64) {
2113    unsafe {
2114        raw::rustSetActorFatigueModified(value)
2115    }
2116}
2117
2118///
2119///  Set the sound of the temporary actor stored on the server.
2120///
2121///  `sound` The sound.
2122///
2123///  Returns void
2124///
2125pub fn set_actor_sound(sound: &str) {
2126    unsafe {
2127        raw::rustSetActorSound(CString::new(sound).unwrap_or_default().as_ptr())
2128    }
2129}
2130
2131///
2132///  Set the AI action of the temporary actor stored on the server.
2133///
2134///  `action` The new action.
2135///
2136///  Returns void
2137///
2138pub fn set_actor_ai_action(action: u16) {
2139    unsafe {
2140        raw::rustSetActorAIAction(action)
2141    }
2142}
2143
2144///
2145///  Set a player as the AI target of the temporary actor stored on the server.
2146///
2147///  `pid` The player ID.
2148///
2149///  Returns void
2150///
2151pub fn set_actor_ai_target_to_player(pid: u16) {
2152    unsafe {
2153        raw::rustSetActorAITargetToPlayer(pid)
2154    }
2155}
2156
2157///
2158///  Set another object as the AI target of the temporary actor stored on the server.
2159///
2160///  `ref_num` The refNum of the target object.  
2161///  `mp_num` The mpNum of the target object.
2162///
2163///  Returns void
2164///
2165pub fn set_actor_ai_target_to_object(ref_num: i16, mp_num: i16) {
2166    unsafe {
2167        raw::rustSetActorAITargetToObject(ref_num, mp_num)
2168    }
2169}
2170
2171///
2172///  Set the coordinates for the AI package associated with the current AI action.
2173///
2174///  `x` The X coordinate.  
2175///  `y` The Y coordinate.  
2176///  `z` The Z coordinate.
2177///
2178///  Returns void
2179///
2180pub fn set_actor_ai_coordinates(x: f64, y: f64, z: f64) {
2181    unsafe {
2182        raw::rustSetActorAICoordinates(x, y, z)
2183    }
2184}
2185
2186///
2187///  Set the distance of the AI package associated with the current AI action.
2188///
2189///  `duration` The distance of the package.
2190///
2191///  Returns void
2192///
2193pub fn set_actor_ai_distance(distance: u16) {
2194    unsafe {
2195        raw::rustSetActorAIDistance(distance)
2196    }
2197}
2198
2199///
2200///  Set the duration of the AI package associated with the current AI action.
2201///
2202///  `duration` The duration of the package.
2203///
2204///  Returns void
2205///
2206pub fn set_actor_ai_duration(duration: u16) {
2207    unsafe {
2208        raw::rustSetActorAIDuration(duration)
2209    }
2210}
2211
2212///
2213///  Set whether the current AI package should be repeated.
2214///
2215///  Note: This only has an effect on the WANDER package.
2216///
2217///  `should_repeat` Whether the package should be repeated.
2218///
2219///  Returns void
2220///
2221pub fn set_actor_ai_repetition(should_repeat: bool) {
2222    unsafe {
2223        raw::rustSetActorAIRepetition(should_repeat)
2224    }
2225}
2226
2227///
2228///  Equip an item in a certain slot of the equipment of the temporary actor stored  
2229///  on the server.
2230///
2231///  `slot` The equipment slot.  
2232///  `ref_id` The refId of the item.  
2233///  `count` The count of the item.  
2234///  `charge` The charge of the item.  
2235///  `enchantment_charge` The enchantment charge of the item.
2236///
2237///  Returns void
2238///
2239pub fn equip_actor_item(slot: u16, ref_id: &str, count: u16, charge: i16, enchantment_charge: f64) {
2240    unsafe {
2241        raw::rustEquipActorItem(slot, CString::new(ref_id).unwrap_or_default().as_ptr(), count, charge, enchantment_charge)
2242    }
2243}
2244
2245///
2246///  Unequip the item in a certain slot of the equipment of the temporary actor stored  
2247///  on the server.
2248///
2249///  `slot` The equipment slot.
2250///
2251///  Returns void
2252///
2253pub fn unequip_actor_item(slot: u16) {
2254    unsafe {
2255        raw::rustUnequipActorItem(slot)
2256    }
2257}
2258
2259///
2260///  Add a copy of the server's temporary actor to the server's temporary actor list.
2261///
2262///  In the process, the server's temporary actor will automatically be cleared so a new  
2263///  one can be set up.
2264///
2265///
2266///  Returns void
2267///
2268pub fn add_actor() {
2269    unsafe {
2270        raw::rustAddActor()
2271    }
2272}
2273
2274///
2275///  Send an ActorList packet.
2276///
2277///  It is sent only to the player for whom the current actor list was initialized.
2278///
2279///
2280///  Returns void
2281///
2282pub fn send_actor_list() {
2283    unsafe {
2284        raw::rustSendActorList()
2285    }
2286}
2287
2288///
2289///  Send an ActorAuthority packet.
2290///
2291///  The player for whom the current actor list was initialized is recorded in the server memory  
2292///  as the new actor authority for the actor list's cell.
2293///
2294///  The packet is sent to that player as well as all other players who have the cell loaded.
2295///
2296///
2297///  Returns void
2298///
2299pub fn send_actor_authority() {
2300    unsafe {
2301        raw::rustSendActorAuthority()
2302    }
2303}
2304
2305///
2306///  Send an ActorPosition packet.
2307///
2308///  `send_to_other_visitors` Whether this packet should be sent to cell visitors other  
2309///                             than the player attached to the packet (false by default).  
2310///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2311///                            to the packet (false by default).
2312///
2313///
2314///  Returns void
2315///
2316pub fn send_actor_position(send_to_other_visitors: bool, skip_attached_player: bool) {
2317    unsafe {
2318        raw::rustSendActorPosition(send_to_other_visitors, skip_attached_player)
2319    }
2320}
2321
2322///
2323///  Send an ActorStatsDynamic packet.
2324///
2325///  `send_to_other_visitors` Whether this packet should be sent to cell visitors other  
2326///                             than the player attached to the packet (false by default).  
2327///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2328///                            to the packet (false by default).
2329///
2330///
2331///  Returns void
2332///
2333pub fn send_actor_stats_dynamic(send_to_other_visitors: bool, skip_attached_player: bool) {
2334    unsafe {
2335        raw::rustSendActorStatsDynamic(send_to_other_visitors, skip_attached_player)
2336    }
2337}
2338
2339///
2340///  Send an ActorEquipment packet.
2341///
2342///  `send_to_other_visitors` Whether this packet should be sent to cell visitors other  
2343///                             than the player attached to the packet (false by default).  
2344///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2345///                            to the packet (false by default).
2346///
2347///
2348///  Returns void
2349///
2350pub fn send_actor_equipment(send_to_other_visitors: bool, skip_attached_player: bool) {
2351    unsafe {
2352        raw::rustSendActorEquipment(send_to_other_visitors, skip_attached_player)
2353    }
2354}
2355
2356///
2357///  Send an ActorSpeech packet.
2358///
2359///  `send_to_other_visitors` Whether this packet should be sent to cell visitors other  
2360///                             than the player attached to the packet (false by default).  
2361///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2362///                            to the packet (false by default).
2363///
2364///  Returns void
2365///
2366pub fn send_actor_speech(send_to_other_visitors: bool, skip_attached_player: bool) {
2367    unsafe {
2368        raw::rustSendActorSpeech(send_to_other_visitors, skip_attached_player)
2369    }
2370}
2371
2372///
2373///  Send an ActorAI packet.
2374///
2375///  `send_to_other_visitors` Whether this packet should be sent to cell visitors other  
2376///                             than the player attached to the packet (false by default).  
2377///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2378///                            to the packet (false by default).
2379///
2380///  Returns void
2381///
2382pub fn send_actor_ai(send_to_other_visitors: bool, skip_attached_player: bool) {
2383    unsafe {
2384        raw::rustSendActorAI(send_to_other_visitors, skip_attached_player)
2385    }
2386}
2387
2388///
2389///  Send an ActorCellChange packet.
2390///
2391///  `send_to_other_visitors` Whether this packet should be sent to cell visitors other  
2392///                             than the player attached to the packet (false by default).  
2393///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2394///                            to the packet (false by default).
2395///
2396///
2397///  Returns void
2398///
2399pub fn send_actor_cell_change(send_to_other_visitors: bool, skip_attached_player: bool) {
2400    unsafe {
2401        raw::rustSendActorCellChange(send_to_other_visitors, skip_attached_player)
2402    }
2403}
2404
2405pub fn read_last_actor_list() {
2406    unsafe {
2407        raw::rustReadLastActorList()
2408    }
2409}
2410
2411pub fn initialize_actor_list(pid: u16) {
2412    unsafe {
2413        raw::rustInitializeActorList(pid)
2414    }
2415}
2416
2417pub fn copy_last_actor_list_to_store() {
2418    unsafe {
2419        raw::rustCopyLastActorListToStore()
2420    }
2421}
2422
2423pub fn get_actor_ref_num_index(index: u16) -> u16 {
2424    unsafe {
2425        raw::rustGetActorRefNumIndex(index)
2426    }
2427}
2428
2429pub fn get_actor_killer_ref_num_index(index: u16) -> u16 {
2430    unsafe {
2431        raw::rustGetActorKillerRefNumIndex(index)
2432    }
2433}
2434
2435pub fn set_actor_ref_num_index(ref_num: i16) {
2436    unsafe {
2437        raw::rustSetActorRefNumIndex(ref_num)
2438    }
2439}
2440
2441///
2442///  Clear the last recorded book changes for a player.
2443///
2444///  This is used to initialize the sending of new PlayerBook packets.
2445///
2446///  `pid` The player ID whose book changes should be used.
2447///
2448///  Returns void
2449///
2450pub fn clear_book_changes(pid: u16) {
2451    unsafe {
2452        raw::rustClearBookChanges(pid)
2453    }
2454}
2455
2456///
2457///  Get the number of indexes in a player's latest book changes.
2458///
2459///  `pid` The player ID whose book changes should be used.
2460///
2461///  Returns the number of indexes.
2462///
2463pub fn get_book_changes_size(pid: u16) -> u16 {
2464    unsafe {
2465        raw::rustGetBookChangesSize(pid)
2466    }
2467}
2468
2469///
2470///  Add a new book to the book changes for a player.
2471///
2472///  `pid` The player ID whose book changes should be used.  
2473///  `book_id` The bookId of the book.
2474///
2475///  Returns void
2476///
2477pub fn add_book(pid: u16, book_id: &str) {
2478    unsafe {
2479        raw::rustAddBook(pid, CString::new(book_id).unwrap_or_default().as_ptr())
2480    }
2481}
2482
2483///
2484///  Get the bookId at a certain index in a player's latest book changes.
2485///
2486///  `pid` The player ID whose book changes should be used.  
2487///  `index` The index of the book.
2488///
2489///  Returns the bookId.
2490///
2491pub fn get_book_id(pid: u16, index: u16) -> String {
2492    unsafe {
2493        CStr::from_ptr(raw::rustGetBookId(pid, index))
2494            .to_str()
2495            .unwrap_or_default()
2496            .to_string()
2497    }
2498}
2499
2500///
2501///  Send a PlayerBook packet with a player's recorded book changes.
2502///
2503///  `pid` The player ID whose book changes should be used.  
2504///  `send_to_other_players` Whether this packet should be sent to players other than the  
2505///                            player attached to the packet (false by default).  
2506///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2507///                            to the packet (false by default).
2508///
2509///  Returns void
2510///
2511pub fn send_book_changes(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
2512    unsafe {
2513        raw::rustSendBookChanges(pid, send_to_other_players, skip_attached_player)
2514    }
2515}
2516
2517pub fn initialize_book_changes(pid: u16) {
2518    unsafe {
2519        raw::rustInitializeBookChanges(pid)
2520    }
2521}
2522
2523///
2524///  Get the number of indexes in a player's latest cell state changes.
2525///
2526///  `pid` The player ID whose cell state changes should be used.
2527///
2528///  Returns the number of indexes.
2529///
2530pub fn get_cell_state_changes_size(pid: u16) -> u16 {
2531    unsafe {
2532        raw::rustGetCellStateChangesSize(pid)
2533    }
2534}
2535
2536///
2537///  Get the cell state type at a certain index in a player's latest cell state changes.
2538///
2539///  `pid` The player ID whose cell state changes should be used.  
2540///  `index` The index of the cell state.
2541///
2542///  Returns the cell state type (0 for LOAD, 1 for UNLOAD).
2543///
2544pub fn get_cell_state_type(pid: u16, index: u16) -> u16 {
2545    unsafe {
2546        raw::rustGetCellStateType(pid, index)
2547    }
2548}
2549
2550///
2551///  Get the cell description at a certain index in a player's latest cell state changes.
2552///
2553///  `pid` The player ID whose cell state changes should be used.  
2554///  `index` The index of the cell state.
2555///
2556///  Returns the cell description.
2557///
2558pub fn get_cell_state_description(pid: u16, index: u16) -> String {
2559    unsafe {
2560        CStr::from_ptr(raw::rustGetCellStateDescription(pid, index))
2561            .to_str()
2562            .unwrap_or_default()
2563            .to_string()
2564    }
2565}
2566
2567///
2568///  Get the cell description of a player's cell.
2569///
2570///  `pid` The player ID.
2571///
2572///  Returns the cell description.
2573///
2574pub fn get_cell(pid: u16) -> String {
2575    unsafe {
2576        CStr::from_ptr(raw::rustGetCell(pid))
2577            .to_str()
2578            .unwrap_or_default()
2579            .to_string()
2580    }
2581}
2582
2583///
2584///  Get the X coordinate of the player's exterior cell.
2585///
2586///  `pid` The player ID.
2587///
2588///  Returns the X coordinate of the cell.
2589///
2590pub fn get_exterior_x(pid: u16) -> i16 {
2591    unsafe {
2592        raw::rustGetExteriorX(pid)
2593    }
2594}
2595
2596///
2597///  Get the Y coordinate of the player's exterior cell.
2598///
2599///  `pid` The player ID.
2600///
2601///  Returns the Y coordinate of the cell.
2602///
2603pub fn get_exterior_y(pid: u16) -> i16 {
2604    unsafe {
2605        raw::rustGetExteriorY(pid)
2606    }
2607}
2608
2609///
2610///  Check whether the player is in an exterior cell or not.
2611///
2612///  `pid` The player ID.
2613///
2614///  Returns whether the player is in an exterior cell.
2615///
2616pub fn is_in_exterior(pid: u16) -> bool {
2617    unsafe {
2618        raw::rustIsInExterior(pid)
2619    }
2620}
2621
2622///
2623///  Get the region of the player's exterior cell.
2624///
2625///  A blank value will be returned if the player is in an interior.
2626///
2627///  `pid` The player ID.
2628///
2629///  Returns the region.
2630///
2631pub fn get_region(pid: u16) -> String {
2632    unsafe {
2633        CStr::from_ptr(raw::rustGetRegion(pid))
2634            .to_str()
2635            .unwrap_or_default()
2636            .to_string()
2637    }
2638}
2639
2640///
2641///  Check whether the player's last cell change has involved a region change.
2642///
2643///  `pid` The player ID.
2644///
2645///  Returns whether the player has changed their region.
2646///
2647pub fn is_changing_region(pid: u16) -> bool {
2648    unsafe {
2649        raw::rustIsChangingRegion(pid)
2650    }
2651}
2652
2653///
2654///  Set the cell of a player.
2655///
2656///  This changes the cell recorded for that player in the server memory, but does not by itself  
2657///  send a packet.
2658///
2659///  The cell is determined to be an exterior cell if it fits the pattern of a number followed  
2660///  by a comma followed by another number.
2661///
2662///  `pid` The player ID.  
2663///  `cell_description` The cell description.
2664///
2665///  Returns void
2666///
2667pub fn set_cell(pid: u16, cell_description: &str) {
2668    unsafe {
2669        raw::rustSetCell(pid, CString::new(cell_description).unwrap_or_default().as_ptr())
2670    }
2671}
2672
2673///
2674///  Set the cell of a player to an exterior cell.
2675///
2676///  This changes the cell recorded for that player in the server memory, but does not by itself  
2677///  send a packet.
2678///
2679///  `pid` The player ID.  
2680///  `x` The X coordinate of the cell.  
2681///  `y` The Y coordinate of the cell.
2682///
2683///  Returns void
2684///
2685pub fn set_exterior_cell(pid: u16, x: i16, y: i16) {
2686    unsafe {
2687        raw::rustSetExteriorCell(pid, x, y)
2688    }
2689}
2690
2691///
2692///  Send a PlayerCellChange packet about a player.
2693///
2694///  It is only sent to the affected player.
2695///
2696///  `pid` The player ID.
2697///
2698///  Returns void
2699///
2700pub fn send_cell(pid: u16) {
2701    unsafe {
2702        raw::rustSendCell(pid)
2703    }
2704}
2705
2706///
2707///  Get the default class used by a player.
2708///
2709///  `pid` The player ID.
2710///
2711///  Returns the ID of the default class.
2712///
2713pub fn get_default_class(pid: u16) -> String {
2714    unsafe {
2715        CStr::from_ptr(raw::rustGetDefaultClass(pid))
2716            .to_str()
2717            .unwrap_or_default()
2718            .to_string()
2719    }
2720}
2721
2722///
2723///  Get the name of the custom class used by a player.
2724///
2725///  `pid` The player ID.
2726///
2727///  Returns the name of the custom class.
2728///
2729pub fn get_class_name(pid: u16) -> String {
2730    unsafe {
2731        CStr::from_ptr(raw::rustGetClassName(pid))
2732            .to_str()
2733            .unwrap_or_default()
2734            .to_string()
2735    }
2736}
2737
2738///
2739///  Get the description of the custom class used by a player.
2740///
2741///  `pid` The player ID.
2742///
2743///  Returns the description of the custom class.
2744///
2745pub fn get_class_desc(pid: u16) -> String {
2746    unsafe {
2747        CStr::from_ptr(raw::rustGetClassDesc(pid))
2748            .to_str()
2749            .unwrap_or_default()
2750            .to_string()
2751    }
2752}
2753
2754///
2755///  Get the ID of one of the two major attributes of a custom class used by a player.
2756///
2757///  `pid` The player ID.  
2758///  `slot` The slot of the major attribute (0 or 1).
2759///
2760///  Returns the ID of the major attribute.
2761///
2762pub fn get_class_major_attribute(pid: u16, slot: u8) -> i16 {
2763    unsafe {
2764        raw::rustGetClassMajorAttribute(pid, slot)
2765    }
2766}
2767
2768///
2769///  Get the specialization ID of the custom class used by a player.
2770///
2771///  `pid` The player ID.
2772///
2773///  Returns the specialization ID of the custom class (0 for Combat, 1 for Magic, 2 for Stealth).
2774///
2775pub fn get_class_specialization(pid: u16) -> i16 {
2776    unsafe {
2777        raw::rustGetClassSpecialization(pid)
2778    }
2779}
2780
2781///
2782///  Get the ID of one of the five major skills of a custom class used by a player.
2783///
2784///  `pid` The player ID.  
2785///  `slot` The slot of the major skill (0 to 4).
2786///
2787///  Returns the ID of the major skill.
2788///
2789pub fn get_class_major_skill(pid: u16, slot: u8) -> i16 {
2790    unsafe {
2791        raw::rustGetClassMajorSkill(pid, slot)
2792    }
2793}
2794
2795///
2796///  Get the ID of one of the five minor skills of a custom class used by a player.
2797///
2798///  `pid` The player ID.  
2799///  `slot` The slot of the minor skill (0 to 4).
2800///
2801///  Returns the ID of the minor skill.
2802///
2803pub fn get_class_minor_skill(pid: u16, slot: u8) -> i16 {
2804    unsafe {
2805        raw::rustGetClassMinorSkill(pid, slot)
2806    }
2807}
2808
2809///
2810///  Check whether the player is using a default class instead of a custom one.
2811///
2812///  `pid` The player ID.
2813///
2814///  Returns whether the player is using a default class.
2815///
2816pub fn is_class_default(pid: u16) -> i16 {
2817    unsafe {
2818        raw::rustIsClassDefault(pid)
2819    }
2820}
2821
2822///
2823///  Set the default class used by a player.
2824///
2825///  If this is left blank, the custom class data set for the player will be used instead.
2826///
2827///  `pid` The player ID.  
2828///  `id` The ID of the default class.
2829///
2830///  Returns void
2831///
2832pub fn set_default_class(pid: u16, id: &str) {
2833    unsafe {
2834        raw::rustSetDefaultClass(pid, CString::new(id).unwrap_or_default().as_ptr())
2835    }
2836}
2837
2838///
2839///  Set the name of the custom class used by a player.
2840///
2841///  `pid` The player ID.  
2842///  `name` The name of the custom class.
2843///
2844///  Returns void
2845///
2846pub fn set_class_name(pid: u16, name: &str) {
2847    unsafe {
2848        raw::rustSetClassName(pid, CString::new(name).unwrap_or_default().as_ptr())
2849    }
2850}
2851
2852///
2853///  Set the description of the custom class used by a player.
2854///
2855///  `pid` The player ID.  
2856///  `desc` The description of the custom class.
2857///
2858///  Returns void
2859///
2860pub fn set_class_desc(pid: u16, desc: &str) {
2861    unsafe {
2862        raw::rustSetClassDesc(pid, CString::new(desc).unwrap_or_default().as_ptr())
2863    }
2864}
2865
2866///
2867///  Set the ID of one of the two major attributes of the custom class used by a player.
2868///
2869///  `pid` The player ID.  
2870///  `slot` The slot of the major attribute (0 or 1).  
2871///  `attr_id` The ID to use for the attribute.
2872///
2873///  Returns void
2874///
2875pub fn set_class_major_attribute(pid: u16, slot: u8, attr_id: i16) {
2876    unsafe {
2877        raw::rustSetClassMajorAttribute(pid, slot, attr_id)
2878    }
2879}
2880
2881///
2882///  Set the specialization of the custom class used by a player.
2883///
2884///  `pid` The player ID.  
2885///  `spec` The specialization ID to use (0 for Combat, 1 for Magic, 2 for Stealth).
2886///
2887///  Returns void
2888///
2889pub fn set_class_specialization(pid: u16, spec: i16) {
2890    unsafe {
2891        raw::rustSetClassSpecialization(pid, spec)
2892    }
2893}
2894
2895///
2896///  Set the ID of one of the five major skills of the custom class used by a player.
2897///
2898///  `pid` The player ID.  
2899///  `slot` The slot of the major skill (0 to 4).  
2900///  `skill_id` The ID to use for the skill.
2901///
2902///  Returns void
2903///
2904pub fn set_class_major_skill(pid: u16, slot: u8, skill_id: i16) {
2905    unsafe {
2906        raw::rustSetClassMajorSkill(pid, slot, skill_id)
2907    }
2908}
2909
2910///
2911///  Set the ID of one of the five minor skills of the custom class used by a player.
2912///
2913///  `pid` The player ID.  
2914///  `slot` The slot of the minor skill (0 to 4).  
2915///  `skill_id` The ID to use for the skill.
2916///
2917///  Returns void
2918///
2919pub fn set_class_minor_skill(pid: u16, slot: u8, skill_id: i16) {
2920    unsafe {
2921        raw::rustSetClassMinorSkill(pid, slot, skill_id)
2922    }
2923}
2924
2925///
2926///  Send a PlayerCharClass packet about a player.
2927///
2928///  It is only sent to the affected player.
2929///
2930///  `pid` The player ID.
2931///
2932///  Returns void
2933///
2934pub fn send_class(pid: u16) {
2935    unsafe {
2936        raw::rustSendClass(pid)
2937    }
2938}
2939
2940///
2941///  Send a message to a certain player.
2942///
2943///  `pid` The player ID.  
2944///  `message` The contents of the message.  
2945///  `send_to_other_players` Whether this packet should be sent to players other than the  
2946///                            player attached to the packet (false by default).  
2947///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
2948///                            to the packet (false by default).
2949///
2950///  Returns void
2951///
2952pub fn send_message(pid: u16, message: &str, send_to_other_players: bool, skip_attached_player: bool) {
2953    unsafe {
2954        raw::rustSendMessage(pid, CString::new(message).unwrap_or_default().as_ptr(), send_to_other_players, skip_attached_player)
2955    }
2956}
2957
2958///
2959///  Remove all messages from chat for everyone on the server.
2960///
2961///
2962///  Returns void
2963///
2964pub fn clean_chat_for_pid() {
2965    unsafe {
2966        raw::rustCleanChatForPid()
2967    }
2968}
2969
2970///
2971///  Remove all messages from chat for a certain player.
2972///
2973///  `pid` The player ID.
2974///
2975///  Returns void
2976///
2977pub fn clean_chat(pid: u16) {
2978    unsafe {
2979        raw::rustCleanChat(pid)
2980    }
2981}
2982
2983///
2984///  Clear the last recorded topic changes for a player.
2985///
2986///  This is used to initialize the sending of new PlayerTopic packets.
2987///
2988///  `pid` The player ID whose topic changes should be used.
2989///
2990///  Returns void
2991///
2992pub fn clear_topic_changes(pid: u16) {
2993    unsafe {
2994        raw::rustClearTopicChanges(pid)
2995    }
2996}
2997
2998///
2999///  Get the number of indexes in a player's latest topic changes.
3000///
3001///  `pid` The player ID whose topic changes should be used.
3002///
3003///  Returns the number of indexes.
3004///
3005pub fn get_topic_changes_size(pid: u16) -> u16 {
3006    unsafe {
3007        raw::rustGetTopicChangesSize(pid)
3008    }
3009}
3010
3011///
3012///  Add a new topic to the topic changes for a player.
3013///
3014///  `pid` The player ID whose topic changes should be used.  
3015///  `topic_id` The topicId of the topic.
3016///
3017///  Returns void
3018///
3019pub fn add_topic(pid: u16, topic_id: &str) {
3020    unsafe {
3021        raw::rustAddTopic(pid, CString::new(topic_id).unwrap_or_default().as_ptr())
3022    }
3023}
3024
3025///
3026///  Get the topicId at a certain index in a player's latest topic changes.
3027///
3028///  `pid` The player ID whose topic changes should be used.  
3029///  `index` The index of the topic.
3030///
3031///  Returns the topicId.
3032///
3033pub fn get_topic_id(pid: u16, index: u16) -> String {
3034    unsafe {
3035        CStr::from_ptr(raw::rustGetTopicId(pid, index))
3036            .to_str()
3037            .unwrap_or_default()
3038            .to_string()
3039    }
3040}
3041
3042///
3043///  Send a PlayerTopic packet with a player's recorded topic changes.
3044///
3045///  `pid` The player ID whose topic changes should be used.  
3046///  `send_to_other_players` Whether this packet should be sent to players other than the  
3047///                            player attached to the packet (false by default).  
3048///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
3049///                            to the packet (false by default).
3050///
3051///  Returns void
3052///
3053pub fn send_topic_changes(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
3054    unsafe {
3055        raw::rustSendTopicChanges(pid, send_to_other_players, skip_attached_player)
3056    }
3057}
3058
3059///
3060///  Play a certain animation on a player's character by sending a PlayerAnimation  
3061///         packet.
3062///
3063///  `pid` The player ID of the character playing the animation.  
3064///  `groupname` The groupname of the animation.  
3065///  `mode` The mode of the animation.  
3066///  `count` The number of times the animation should be played.  
3067///  `bool` Whether the animation should persist or not.
3068///
3069///  Returns void
3070///
3071pub fn play_animation(pid: u16, groupname: &str, mode: i16, count: i16, persist: bool) {
3072    unsafe {
3073        raw::rustPlayAnimation(pid, CString::new(groupname).unwrap_or_default().as_ptr(), mode, count, persist)
3074    }
3075}
3076
3077///
3078///  Play a certain sound for a player as spoken by their character by sending  
3079///         a PlayerSpeech packet.
3080///
3081///  `pid` The player ID of the character playing the sound.  
3082///  `sound` The path of the sound file.
3083///
3084///  Returns void
3085///
3086pub fn play_speech(pid: u16, sound: &str) {
3087    unsafe {
3088        raw::rustPlaySpeech(pid, CString::new(sound).unwrap_or_default().as_ptr())
3089    }
3090}
3091
3092pub fn initialize_topic_changes(pid: u16) {
3093    unsafe {
3094        raw::rustInitializeTopicChanges(pid)
3095    }
3096}
3097
3098///
3099///  Clear the last recorded faction changes for a player.
3100///
3101///  This is used to initialize the sending of new PlayerFaction packets.
3102///
3103///  `pid` The player ID whose faction changes should be used.
3104///
3105///  Returns void
3106///
3107pub fn clear_faction_changes(pid: u16) {
3108    unsafe {
3109        raw::rustClearFactionChanges(pid)
3110    }
3111}
3112
3113///
3114///  Get the number of indexes in a player's latest faction changes.
3115///
3116///  `pid` The player ID whose faction changes should be used.
3117///
3118///  Returns the number of indexes.
3119///
3120pub fn get_faction_changes_size(pid: u16) -> u16 {
3121    unsafe {
3122        raw::rustGetFactionChangesSize(pid)
3123    }
3124}
3125
3126///
3127///  Get the action type used in a player's latest faction changes.
3128///
3129///  `pid` The player ID whose faction changes should be used.
3130///
3131///  Returns the action type (0 for RANK, 1 for EXPULSION, 2 for REPUTATION).
3132///
3133pub fn get_faction_changes_action(pid: u16) -> u8 {
3134    unsafe {
3135        raw::rustGetFactionChangesAction(pid)
3136    }
3137}
3138
3139///
3140///  Get the factionId at a certain index in a player's latest faction changes.
3141///
3142///  `pid` The player ID whose faction changes should be used.  
3143///  `index` The index of the faction.
3144///
3145///  Returns the factionId.
3146///
3147pub fn get_faction_id(pid: u16, index: u16) -> String {
3148    unsafe {
3149        CStr::from_ptr(raw::rustGetFactionId(pid, index))
3150            .to_str()
3151            .unwrap_or_default()
3152            .to_string()
3153    }
3154}
3155
3156///
3157///  Get the rank at a certain index in a player's latest faction changes.
3158///
3159///  `pid` The player ID whose faction changes should be used.  
3160///  `index` The index of the faction.
3161///
3162///  Returns the rank.
3163///
3164pub fn get_faction_rank(pid: u16, index: u16) -> i16 {
3165    unsafe {
3166        raw::rustGetFactionRank(pid, index)
3167    }
3168}
3169
3170///
3171///  Get the expulsion state at a certain index in a player's latest faction changes.
3172///
3173///  `pid` The player ID whose faction changes should be used.  
3174///  `index` The index of the faction.
3175///
3176///  Returns the expulsion state.
3177///
3178pub fn get_faction_expulsion_state(pid: u16, index: u16) -> bool {
3179    unsafe {
3180        raw::rustGetFactionExpulsionState(pid, index)
3181    }
3182}
3183
3184///
3185///  Get the reputation at a certain index in a player's latest faction changes.
3186///
3187///  `pid` The player ID whose faction changes should be used.  
3188///  `index` The index of the faction.
3189///
3190///  Returns the reputation.
3191///
3192pub fn get_faction_reputation(pid: u16, index: u16) -> i16 {
3193    unsafe {
3194        raw::rustGetFactionReputation(pid, index)
3195    }
3196}
3197
3198///
3199///  Set the action type in a player's faction changes.
3200///
3201///  `pid` The player ID whose faction changes should be used.  
3202///  `action` The action (0 for RANK, 1 for EXPULSION, 2 for REPUTATION).
3203///
3204///  Returns void
3205///
3206pub fn set_faction_changes_action(pid: u16, action: u8) {
3207    unsafe {
3208        raw::rustSetFactionChangesAction(pid, action)
3209    }
3210}
3211
3212///
3213///  Set the factionId of the temporary faction stored on the server.
3214///
3215///  `faction_id` The factionId.
3216///
3217///  Returns void
3218///
3219pub fn set_faction_id(faction_id: &str) {
3220    unsafe {
3221        raw::rustSetFactionId(CString::new(faction_id).unwrap_or_default().as_ptr())
3222    }
3223}
3224
3225///
3226///  Set the rank of the temporary faction stored on the server.
3227///
3228///  `rank` The rank.
3229///
3230///  Returns void
3231///
3232pub fn set_faction_rank(rank: u16) {
3233    unsafe {
3234        raw::rustSetFactionRank(rank)
3235    }
3236}
3237
3238///
3239///  Set the expulsion state of the temporary faction stored on the server.
3240///
3241///  `expulsion_state` The expulsion state.
3242///
3243///  Returns void
3244///
3245pub fn set_faction_expulsion_state(expulsion_state: bool) {
3246    unsafe {
3247        raw::rustSetFactionExpulsionState(expulsion_state)
3248    }
3249}
3250
3251///
3252///  Set the reputation of the temporary faction stored on the server.
3253///
3254///  `reputation` The reputation.
3255///
3256///  Returns void
3257///
3258pub fn set_faction_reputation(reputation: i16) {
3259    unsafe {
3260        raw::rustSetFactionReputation(reputation)
3261    }
3262}
3263
3264///
3265///  Add the server's temporary faction to the faction changes for a player.
3266///
3267///  In the process, the server's temporary faction will automatically be cleared so a new one  
3268///  can be set up.
3269///
3270///  `pid` The player ID whose faction changes should be used.
3271///
3272///  Returns void
3273///
3274pub fn add_faction(pid: u16) {
3275    unsafe {
3276        raw::rustAddFaction(pid)
3277    }
3278}
3279
3280///
3281///  Send a PlayerFaction packet with a player's recorded faction changes.
3282///
3283///  `pid` The player ID whose faction changes should be used.  
3284///  `send_to_other_players` Whether this packet should be sent to players other than the  
3285///                            player attached to the packet (false by default).  
3286///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
3287///                            to the packet (false by default).
3288///
3289///  Returns void
3290///
3291pub fn send_faction_changes(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
3292    unsafe {
3293        raw::rustSendFactionChanges(pid, send_to_other_players, skip_attached_player)
3294    }
3295}
3296
3297pub fn initialize_faction_changes(pid: u16) {
3298    unsafe {
3299        raw::rustInitializeFactionChanges(pid)
3300    }
3301}
3302
3303///
3304///  Display an interactive messagebox at the center of the screen that  
3305///         vanishes only when one of its buttons is clicked.
3306///
3307///  `pid` The player ID for whom the messagebox should appear.  
3308///  `id` The numerical ID of the messagebox.  
3309///  `label` The text in the messagebox.  
3310///  \parm buttons The captions of the buttons, separated by semicolons (e.g. "Yes;No;Maybe").
3311///
3312///  Returns void
3313///
3314pub fn custom_message_box(pid: u16, id: i16, label: &str, buttons: &str) {
3315    unsafe {
3316        raw::rustCustomMessageBox(pid, id, CString::new(label).unwrap_or_default().as_ptr(), CString::new(buttons).unwrap_or_default().as_ptr())
3317    }
3318}
3319
3320///
3321///  Display an input dialog at the center of the screen.
3322///
3323///  `pid` The player ID for whom the input dialog should appear.  
3324///  `id` The numerical ID of the input dialog.  
3325///  `label` The text at the top of the input dialog.  
3326///  \parm note The text at the bottom of the input dialog.
3327///
3328///  Returns void
3329///
3330pub fn input_dialog(pid: u16, id: i16, label: &str, note: &str) {
3331    unsafe {
3332        raw::rustInputDialog(pid, id, CString::new(label).unwrap_or_default().as_ptr(), CString::new(note).unwrap_or_default().as_ptr())
3333    }
3334}
3335
3336///
3337///  Display a password dialog at the center of the screen.
3338///
3339///  Although similar to an input dialog, the password dialog replaces all  
3340///  input characters with asterisks.
3341///
3342///  `pid` The player ID for whom the password dialog should appear.  
3343///  `id` The numerical ID of the password dialog.  
3344///  `label` The text at the top of the password dialog.  
3345///  \parm note The text at the bottom of the password dialog.
3346///
3347///  Returns void
3348///
3349pub fn password_dialog(pid: u16, id: i16, label: &str, note: &str) {
3350    unsafe {
3351        raw::rustPasswordDialog(pid, id, CString::new(label).unwrap_or_default().as_ptr(), CString::new(note).unwrap_or_default().as_ptr())
3352    }
3353}
3354
3355///
3356///  Display a listbox at the center of the screen where each item takes up  
3357///         a row and is selectable, with the listbox only vanishing once the Ok button  
3358///         is pressed.
3359///
3360///  `pid` The player ID for whom the listbox should appear.  
3361///  `id` The numerical ID of the listbox.  
3362///  `label` The text at the top of the listbox.  
3363///  \parm items The items in the listbox, separated by newlines (e.g. "Item 1\nItem 2").
3364///
3365///  Returns void
3366///
3367pub fn list_box(pid: u16, id: i16, label: &str, items: &str) {
3368    unsafe {
3369        raw::rustListBox(pid, id, CString::new(label).unwrap_or_default().as_ptr(), CString::new(items).unwrap_or_default().as_ptr())
3370    }
3371}
3372
3373///
3374///  Clear the last recorded quick key changes for a player.
3375///
3376///  This is used to initialize the sending of new PlayerQuickKeys packets.
3377///
3378///  `pid` The player ID whose quick key changes should be used.
3379///
3380///  Returns void
3381///
3382pub fn clear_quick_key_changes(pid: u16) {
3383    unsafe {
3384        raw::rustClearQuickKeyChanges(pid)
3385    }
3386}
3387
3388///
3389///  Get the number of indexes in a player's latest quick key changes.
3390///
3391///  `pid` The player ID whose quick key changes should be used.
3392///
3393///  Returns the number of indexes.
3394///
3395pub fn get_quick_key_changes_size(pid: u16) -> u16 {
3396    unsafe {
3397        raw::rustGetQuickKeyChangesSize(pid)
3398    }
3399}
3400
3401///
3402///  Get the slot of the quick key at a certain index in a player's latest quick key changes.
3403///
3404///  `pid` The player ID whose quick key changes should be used.  
3405///  `index` The index of the quick key in the quick key changes vector.
3406///
3407///  Returns the slot.
3408///
3409pub fn get_quick_key_slot(pid: u16, index: u16) -> i16 {
3410    unsafe {
3411        raw::rustGetQuickKeySlot(pid, index)
3412    }
3413}
3414
3415///
3416///  Get the type of the quick key at a certain index in a player's latest quick key changes.
3417///
3418///  `pid` The player ID whose quick key changes should be used.  
3419///  `index` The index of the quick key in the quick key changes vector.
3420///
3421///  Returns the quick key type.
3422///
3423pub fn get_quick_key_type(pid: u16, index: u16) -> i16 {
3424    unsafe {
3425        raw::rustGetQuickKeyType(pid, index)
3426    }
3427}
3428
3429///
3430///  Get the itemId at a certain index in a player's latest quick key changes.
3431///
3432///  `pid` The player ID whose quick key changes should be used.  
3433///  `index` The index of the quick key in the quick key changes vector.
3434///
3435///  Returns the itemId.
3436///
3437pub fn get_quick_key_item_id(pid: u16, index: u16) -> String {
3438    unsafe {
3439        CStr::from_ptr(raw::rustGetQuickKeyItemId(pid, index))
3440            .to_str()
3441            .unwrap_or_default()
3442            .to_string()
3443    }
3444}
3445
3446///
3447///  Add a new quick key to the quick key changes for a player.
3448///
3449///  `pid` The player ID whose quick key changes should be used.  
3450///  `slot` The slot to be used.  
3451///  `slot` The type of the quick key (0 for ITEM, 1 for ITEM_MAGIC, 2 for MAGIC, 3 for UNASSIGNED).  
3452///  `item_id` The itemId of the item.
3453///
3454///  Returns void
3455///
3456pub fn add_quick_key(pid: u16, slot: u16, _type: i16, item_id: &str) {
3457    unsafe {
3458        raw::rustAddQuickKey(pid, slot, _type, CString::new(item_id).unwrap_or_default().as_ptr())
3459    }
3460}
3461
3462///
3463///  Send a PlayerQuickKeys packet with a player's recorded quick key changes.
3464///
3465///  `pid` The player ID whose quick key changes should be used.
3466///
3467///  Returns void
3468///
3469pub fn send_quick_key_changes(pid: u16) {
3470    unsafe {
3471        raw::rustSendQuickKeyChanges(pid)
3472    }
3473}
3474
3475///
3476///  Determine whether a player can see the map marker of another player.
3477///
3478///  Note: This currently has no effect, and is just an unimplemented stub.
3479///
3480///  `target_pid` The player ID whose map marker should be hidden or revealed.  
3481///  `affected_pid` The player ID for whom the map marker will be hidden or revealed.  
3482///  `state` The state of the map marker (false to hide, true to reveal).
3483///
3484///  Returns void
3485///
3486pub fn set_map_visibility(target_pid: u16, affected_pid: u16, state: u16) {
3487    unsafe {
3488        raw::rustSetMapVisibility(target_pid, affected_pid, state)
3489    }
3490}
3491
3492///
3493///  Determine whether a player's map marker can be seen by all other players.
3494///
3495///  Note: This currently has no effect, and is just an unimplemented stub.
3496///
3497///  `target_pid` The player ID whose map marker should be hidden or revealed.  
3498///  `state` The state of the map marker (false to hide, true to reveal).
3499///
3500///  Returns void
3501///
3502pub fn set_map_visibility_all(target_pid: u16, state: u16) {
3503    unsafe {
3504        raw::rustSetMapVisibilityAll(target_pid, state)
3505    }
3506}
3507
3508pub fn initialize_quick_key_changes(pid: u16) {
3509    unsafe {
3510        raw::rustInitializeQuickKeyChanges(pid)
3511    }
3512}
3513
3514///
3515///  Clear the last recorded inventory changes for a player.
3516///
3517///  This is used to initialize the sending of new PlayerInventory packets.
3518///
3519///  `pid` The player ID whose inventory changes should be used.
3520///
3521///  Returns void
3522///
3523pub fn clear_inventory_changes(pid: u16) {
3524    unsafe {
3525        raw::rustClearInventoryChanges(pid)
3526    }
3527}
3528
3529///
3530///  Get the number of slots used for equipment.
3531///
3532///  The number is 19 before any dehardcoding is done in OpenMW.
3533///
3534///
3535///  Returns the number of slots.
3536///
3537pub fn get_equipment_size() -> i16 {
3538    unsafe {
3539        raw::rustGetEquipmentSize()
3540    }
3541}
3542
3543///
3544///  Get the number of indexes in a player's latest inventory changes.
3545///
3546///  `pid` The player ID whose inventory changes should be used.
3547///
3548///  Returns the number of indexes.
3549///
3550pub fn get_inventory_changes_size(pid: u16) -> u16 {
3551    unsafe {
3552        raw::rustGetInventoryChangesSize(pid)
3553    }
3554}
3555
3556///
3557///  Get the action type used in a player's latest inventory changes.
3558///
3559///  `pid` The player ID whose inventory changes should be used.
3560///
3561///  Returns the action type (0 for SET, 1 for ADD, 2 for REMOVE).
3562///
3563pub fn get_inventory_changes_action(pid: u16) -> u16 {
3564    unsafe {
3565        raw::rustGetInventoryChangesAction(pid)
3566    }
3567}
3568
3569///
3570///  Set the action type in a player's inventory changes.
3571///
3572///  `pid` The player ID whose inventory changes should be used.  
3573///  `action` The action (0 for SET, 1 for ADD, 2 for REMOVE).
3574///
3575///  Returns void
3576///
3577pub fn set_inventory_changes_action(pid: u16, action: u8) {
3578    unsafe {
3579        raw::rustSetInventoryChangesAction(pid, action)
3580    }
3581}
3582
3583///
3584///  Equip an item in a certain slot of the equipment of a player.
3585///
3586///  `pid` The player ID.  
3587///  `slot` The equipment slot.  
3588///  `ref_id` The refId of the item.  
3589///  `count` The count of the item.  
3590///  `charge` The charge of the item.  
3591///  `enchantment_charge` The enchantment charge of the item.
3592///
3593///  Returns void
3594///
3595pub fn equip_item(pid: u16, slot: u16, ref_id: &str, count: u16, charge: i16, enchantment_charge: f64) {
3596    unsafe {
3597        raw::rustEquipItem(pid, slot, CString::new(ref_id).unwrap_or_default().as_ptr(), count, charge, enchantment_charge)
3598    }
3599}
3600
3601///
3602///  Unequip the item in a certain slot of the equipment of a player.
3603///
3604///  `pid` The player ID.  
3605///  `slot` The equipment slot.
3606///
3607///  Returns void
3608///
3609pub fn unequip_item(pid: u16, slot: u16) {
3610    unsafe {
3611        raw::rustUnequipItem(pid, slot)
3612    }
3613}
3614
3615///
3616///  Add an item change to a player's inventory changes.
3617///
3618///  `pid` The player ID.  
3619///  `ref_id` The refId of the item.  
3620///  `count` The count of the item.  
3621///  `charge` The charge of the item.  
3622///  `enchantment_charge` The enchantment charge of the item.  
3623///  `soul` The soul of the item.
3624///
3625///  Returns void
3626///
3627pub fn add_item_change(pid: u16, ref_id: &str, count: u16, charge: i16, enchantment_charge: f64, soul: &str) {
3628    unsafe {
3629        raw::rustAddItemChange(pid, CString::new(ref_id).unwrap_or_default().as_ptr(), count, charge, enchantment_charge, CString::new(soul).unwrap_or_default().as_ptr())
3630    }
3631}
3632
3633///
3634///  Check whether a player has equipped an item with a certain refId in any slot.
3635///
3636///  `pid` The player ID.  
3637///  `ref_id` The refId of the item.
3638///
3639///  Returns whether the player has the item equipped.
3640///
3641pub fn has_item_equipped(pid: u16, ref_id: &str) -> bool {
3642    unsafe {
3643        raw::rustHasItemEquipped(pid, CString::new(ref_id).unwrap_or_default().as_ptr())
3644    }
3645}
3646
3647///
3648///  Get the refId of the item in a certain slot of the equipment of a player.
3649///
3650///  `pid` The player ID.  
3651///  `slot` The slot of the equipment item.
3652///
3653///  Returns the refId.
3654///
3655pub fn get_equipment_item_ref_id(pid: u16, slot: u16) -> String {
3656    unsafe {
3657        CStr::from_ptr(raw::rustGetEquipmentItemRefId(pid, slot))
3658            .to_str()
3659            .unwrap_or_default()
3660            .to_string()
3661    }
3662}
3663
3664///
3665///  Get the count of the item in a certain slot of the equipment of a player.
3666///
3667///  `pid` The player ID.  
3668///  `slot` The slot of the equipment item.
3669///
3670///  Returns the item count.
3671///
3672pub fn get_equipment_item_count(pid: u16, slot: u16) -> i16 {
3673    unsafe {
3674        raw::rustGetEquipmentItemCount(pid, slot)
3675    }
3676}
3677
3678///
3679///  Get the charge of the item in a certain slot of the equipment of a player.
3680///
3681///  `pid` The player ID.  
3682///  `slot` The slot of the equipment item.
3683///
3684///  Returns the charge.
3685///
3686pub fn get_equipment_item_charge(pid: u16, slot: u16) -> i16 {
3687    unsafe {
3688        raw::rustGetEquipmentItemCharge(pid, slot)
3689    }
3690}
3691
3692///
3693///  Get the enchantment charge of the item in a certain slot of the equipment of  
3694///         a player.
3695///
3696///  `pid` The player ID.  
3697///  `slot` The slot of the equipment item.
3698///
3699///  Returns the enchantment charge.
3700///
3701pub fn get_equipment_item_enchantment_charge(pid: u16, slot: u16) -> f64 {
3702    unsafe {
3703        raw::rustGetEquipmentItemEnchantmentCharge(pid, slot)
3704    }
3705}
3706
3707///
3708///  Get the refId of the item at a certain index in a player's latest inventory  
3709///         changes.
3710///
3711///  `pid` The player ID whose inventory changes should be used.  
3712///  `index` The index of the inventory item.
3713///
3714///  Returns the refId.
3715///
3716pub fn get_inventory_item_ref_id(pid: u16, index: u16) -> String {
3717    unsafe {
3718        CStr::from_ptr(raw::rustGetInventoryItemRefId(pid, index))
3719            .to_str()
3720            .unwrap_or_default()
3721            .to_string()
3722    }
3723}
3724
3725///
3726///  Get the count of the item at a certain index in a player's latest inventory  
3727///         changes.
3728///
3729///  `pid` The player ID whose inventory changes should be used.  
3730///  `index` The index of the inventory item.
3731///
3732///  Returns the item count.
3733///
3734pub fn get_inventory_item_count(pid: u16, index: u16) -> i16 {
3735    unsafe {
3736        raw::rustGetInventoryItemCount(pid, index)
3737    }
3738}
3739
3740///
3741///  Get the charge of the item at a certain index in a player's latest inventory  
3742///         changes.
3743///
3744///  `pid` The player ID whose inventory changes should be used.  
3745///  `index` The index of the inventory item.
3746///
3747///  Returns the charge.
3748///
3749pub fn get_inventory_item_charge(pid: u16, index: u16) -> i16 {
3750    unsafe {
3751        raw::rustGetInventoryItemCharge(pid, index)
3752    }
3753}
3754
3755///
3756///  Get the enchantment charge of the item at a certain index in a player's  
3757///         latest inventory changes.
3758///
3759///  `pid` The player ID whose inventory changes should be used.  
3760///  `index` The index of the inventory item.
3761///
3762///  Returns the enchantment charge.
3763///
3764pub fn get_inventory_item_enchantment_charge(pid: u16, index: u16) -> f64 {
3765    unsafe {
3766        raw::rustGetInventoryItemEnchantmentCharge(pid, index)
3767    }
3768}
3769
3770///
3771///  Get the soul of the item at a certain index in a player's latest inventory  
3772///         changes.
3773///
3774///  `pid` The player ID whose inventory changes should be used.  
3775///  `index` The index of the inventory item.
3776///
3777///  Returns the soul.
3778///
3779pub fn get_inventory_item_soul(pid: u16, index: u16) -> String {
3780    unsafe {
3781        CStr::from_ptr(raw::rustGetInventoryItemSoul(pid, index))
3782            .to_str()
3783            .unwrap_or_default()
3784            .to_string()
3785    }
3786}
3787
3788///
3789///  Get the refId of the item last used by a player.
3790///
3791///  `pid` The player ID.
3792///
3793///  Returns the refId.
3794///
3795pub fn get_used_item_ref_id(pid: u16) -> String {
3796    unsafe {
3797        CStr::from_ptr(raw::rustGetUsedItemRefId(pid))
3798            .to_str()
3799            .unwrap_or_default()
3800            .to_string()
3801    }
3802}
3803
3804///
3805///  Get the count of the item last used by a player.
3806///
3807///  `pid` The player ID.
3808///
3809///  Returns the item count.
3810///
3811pub fn get_used_item_count(pid: u16) -> i16 {
3812    unsafe {
3813        raw::rustGetUsedItemCount(pid)
3814    }
3815}
3816
3817///
3818///  Get the charge of the item last used by a player.
3819///
3820///  `pid` The player ID.
3821///
3822///  Returns the charge.
3823///
3824pub fn get_used_item_charge(pid: u16) -> i16 {
3825    unsafe {
3826        raw::rustGetUsedItemCharge(pid)
3827    }
3828}
3829
3830///
3831///  Get the enchantment charge of the item last used by a player.
3832///
3833///  `pid` The player ID.
3834///
3835///  Returns the enchantment charge.
3836///
3837pub fn get_used_item_enchantment_charge(pid: u16) -> f64 {
3838    unsafe {
3839        raw::rustGetUsedItemEnchantmentCharge(pid)
3840    }
3841}
3842
3843///
3844///  Get the soul of the item last used by a player.
3845///
3846///  `pid` The player ID.
3847///
3848///  Returns the soul.
3849///
3850pub fn get_used_item_soul(pid: u16) -> String {
3851    unsafe {
3852        CStr::from_ptr(raw::rustGetUsedItemSoul(pid))
3853            .to_str()
3854            .unwrap_or_default()
3855            .to_string()
3856    }
3857}
3858
3859///
3860///  Send a PlayerEquipment packet with a player's equipment.
3861///
3862///  It is always sent to all players.
3863///
3864///  `pid` The player ID whose equipment should be sent.
3865///
3866///  Returns void
3867///
3868pub fn send_equipment(pid: u16) {
3869    unsafe {
3870        raw::rustSendEquipment(pid)
3871    }
3872}
3873
3874///
3875///  Send a PlayerInventory packet with a player's recorded inventory changes.
3876///
3877///  `pid` The player ID whose inventory changes should be used.  
3878///  `send_to_other_players` Whether this packet should be sent to players other than the  
3879///                            player attached to the packet (false by default).  
3880///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
3881///                            to the packet (false by default).
3882///
3883///  Returns void
3884///
3885pub fn send_inventory_changes(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
3886    unsafe {
3887        raw::rustSendInventoryChanges(pid, send_to_other_players, skip_attached_player)
3888    }
3889}
3890
3891///
3892///  Send a PlayerItemUse causing a player to use their recorded usedItem.
3893///
3894///  `pid` The player ID affected.
3895///
3896///  Returns void
3897///
3898pub fn send_item_use(pid: u16) {
3899    unsafe {
3900        raw::rustSendItemUse(pid)
3901    }
3902}
3903
3904pub fn initialize_inventory_changes(pid: u16) {
3905    unsafe {
3906        raw::rustInitializeInventoryChanges(pid)
3907    }
3908}
3909
3910pub fn add_item(pid: u16, ref_id: &str, count: u16, charge: i16, enchantment_charge: f64, soul: &str) {
3911    unsafe {
3912        raw::rustAddItem(pid, CString::new(ref_id).unwrap_or_default().as_ptr(), count, charge, enchantment_charge, CString::new(soul).unwrap_or_default().as_ptr())
3913    }
3914}
3915
3916///
3917///  Get the type of a PlayerMiscellaneous packet.
3918///
3919///  `pid` The player ID.
3920///
3921///  Returns the type.
3922///
3923pub fn get_miscellaneous_change_type(pid: u16) -> u8 {
3924    unsafe {
3925        raw::rustGetMiscellaneousChangeType(pid)
3926    }
3927}
3928
3929///
3930///  Get the cell description of a player's Mark cell.
3931///
3932///  `pid` The player ID.
3933///
3934///  Returns the cell description.
3935///
3936pub fn get_mark_cell(pid: u16) -> String {
3937    unsafe {
3938        CStr::from_ptr(raw::rustGetMarkCell(pid))
3939            .to_str()
3940            .unwrap_or_default()
3941            .to_string()
3942    }
3943}
3944
3945///
3946///  Get the X position of a player's Mark.
3947///
3948///  `pid` The player ID.
3949///
3950///  Returns the X position.
3951///
3952pub fn get_mark_pos_x(pid: u16) -> f64 {
3953    unsafe {
3954        raw::rustGetMarkPosX(pid)
3955    }
3956}
3957
3958///
3959///  Get the Y position of a player's Mark.
3960///
3961///  `pid` The player ID.
3962///
3963///  Returns the Y position.
3964///
3965pub fn get_mark_pos_y(pid: u16) -> f64 {
3966    unsafe {
3967        raw::rustGetMarkPosY(pid)
3968    }
3969}
3970
3971///
3972///  Get the Z position of a player's Mark.
3973///
3974///  `pid` The player ID.
3975///
3976///  Returns the Z position.
3977///
3978pub fn get_mark_pos_z(pid: u16) -> f64 {
3979    unsafe {
3980        raw::rustGetMarkPosZ(pid)
3981    }
3982}
3983
3984///
3985///  Get the X rotation of a player's Mark.
3986///
3987///  `pid` The player ID.
3988///
3989///  Returns the X rotation.
3990///
3991pub fn get_mark_rot_x(pid: u16) -> f64 {
3992    unsafe {
3993        raw::rustGetMarkRotX(pid)
3994    }
3995}
3996
3997///
3998///  Get the Z rotation of a player's Mark.
3999///
4000///  `pid` The player ID.
4001///
4002///  Returns the X rotation.
4003///
4004pub fn get_mark_rot_z(pid: u16) -> f64 {
4005    unsafe {
4006        raw::rustGetMarkRotZ(pid)
4007    }
4008}
4009
4010///
4011///  Get the ID of a player's selected spell.
4012///
4013///  `pid` The player ID.
4014///
4015///  Returns the spell ID.
4016///
4017pub fn get_selected_spell_id(pid: u16) -> String {
4018    unsafe {
4019        CStr::from_ptr(raw::rustGetSelectedSpellId(pid))
4020            .to_str()
4021            .unwrap_or_default()
4022            .to_string()
4023    }
4024}
4025
4026///
4027///  Check whether the killer of a certain player is also a player.
4028///
4029///  `pid` The player ID of the killed player.
4030///
4031///  Returns whether the player was killed by another player.
4032///
4033pub fn does_player_have_player_killer(pid: u16) -> bool {
4034    unsafe {
4035        raw::rustDoesPlayerHavePlayerKiller(pid)
4036    }
4037}
4038
4039///
4040///  Get the player ID of the killer of a certain player.
4041///
4042///  `pid` The player ID of the killed player.
4043///
4044///  Returns the player ID of the killer.
4045///
4046pub fn get_player_killer_pid(pid: u16) -> i16 {
4047    unsafe {
4048        raw::rustGetPlayerKillerPid(pid)
4049    }
4050}
4051
4052///
4053///  Get the refId of the actor killer of a certain player.
4054///
4055///  `pid` The player ID of the killed player.
4056///
4057///  Returns the refId of the killer.
4058///
4059pub fn get_player_killer_ref_id(pid: u16) -> String {
4060    unsafe {
4061        CStr::from_ptr(raw::rustGetPlayerKillerRefId(pid))
4062            .to_str()
4063            .unwrap_or_default()
4064            .to_string()
4065    }
4066}
4067
4068///
4069///  Get the refNum of the actor killer of a certain player.
4070///
4071///  `pid` The player ID of the killed player.
4072///
4073///  Returns the refNum of the killer.
4074///
4075pub fn get_player_killer_ref_num(pid: u16) -> u16 {
4076    unsafe {
4077        raw::rustGetPlayerKillerRefNum(pid)
4078    }
4079}
4080
4081///
4082///  Get the mpNum of the actor killer of a certain player.
4083///
4084///  `pid` The player ID of the killed player.
4085///
4086///  Returns the mpNum of the killer.
4087///
4088pub fn get_player_killer_mp_num(pid: u16) -> u16 {
4089    unsafe {
4090        raw::rustGetPlayerKillerMpNum(pid)
4091    }
4092}
4093
4094///
4095///  Get the name of the actor killer of a certain player.
4096///
4097///  `pid` The player ID of the killed player.
4098///
4099///  Returns the name of the killer.
4100///
4101pub fn get_player_killer_name(pid: u16) -> String {
4102    unsafe {
4103        CStr::from_ptr(raw::rustGetPlayerKillerName(pid))
4104            .to_str()
4105            .unwrap_or_default()
4106            .to_string()
4107    }
4108}
4109
4110///
4111///  Get the draw state of a player (0 for nothing, 1 for drawn weapon,  
4112///         2 for drawn spell).
4113///
4114///  `pid` The player ID.
4115///
4116///  Returns the draw state.
4117///
4118pub fn get_draw_state(pid: u16) -> u16 {
4119    unsafe {
4120        raw::rustGetDrawState(pid)
4121    }
4122}
4123
4124///
4125///  Get the sneak state of a player.
4126///
4127///  `pid` The player ID.
4128///
4129///  Returns whether the player is sneaking.
4130///
4131pub fn get_sneak_state(pid: u16) -> bool {
4132    unsafe {
4133        raw::rustGetSneakState(pid)
4134    }
4135}
4136
4137///
4138///  Set the Mark cell of a player.
4139///
4140///  This changes the Mark cell recorded for that player in the server memory, but does not by itself  
4141///  send a packet.
4142///
4143///  The cell is determined to be an exterior cell if it fits the pattern of a number followed  
4144///  by a comma followed by another number.
4145///
4146///  `pid` The player ID.  
4147///  `cell_description` The cell description.
4148///
4149///  Returns void
4150///
4151pub fn set_mark_cell(pid: u16, cell_description: &str) {
4152    unsafe {
4153        raw::rustSetMarkCell(pid, CString::new(cell_description).unwrap_or_default().as_ptr())
4154    }
4155}
4156
4157///
4158///  Set the Mark position of a player.
4159///
4160///  This changes the Mark positional coordinates recorded for that player in the server memory, but  
4161///  does not by itself send a packet.
4162///
4163///  `pid` The player ID.  
4164///  `x` The X position.  
4165///  `y` The Y position.  
4166///  `z` The Z position.
4167///
4168///  Returns void
4169///
4170pub fn set_mark_pos(pid: u16, x: f64, y: f64, z: f64) {
4171    unsafe {
4172        raw::rustSetMarkPos(pid, x, y, z)
4173    }
4174}
4175
4176///
4177///  Set the Mark rotation of a player.
4178///
4179///  This changes the Mark positional coordinates recorded for that player in the server memory, but  
4180///  does not by itself send a packet.
4181///
4182///  `pid` The player ID.  
4183///  `x` The X rotation.  
4184///  `z` The Z rotation.
4185///
4186///  Returns void
4187///
4188pub fn set_mark_rot(pid: u16, x: f64, z: f64) {
4189    unsafe {
4190        raw::rustSetMarkRot(pid, x, z)
4191    }
4192}
4193
4194///
4195///  Set the ID of a player's selected spell.
4196///
4197///  This changes the spell ID recorded for that player in the server memory, but does not by itself  
4198///  send a packet.
4199///
4200///  `pid` The player ID.  
4201///  `spell_id` The spell ID.
4202///
4203///  Returns void
4204///
4205pub fn set_selected_spell_id(pid: u16, spell_id: &str) {
4206    unsafe {
4207        raw::rustSetSelectedSpellId(pid, CString::new(spell_id).unwrap_or_default().as_ptr())
4208    }
4209}
4210
4211///
4212///  Send a PlayerMiscellaneous packet with a Mark location to a player.
4213///
4214///  `pid` The player ID.
4215///
4216///  Returns void
4217///
4218pub fn send_mark_location(pid: u16) {
4219    unsafe {
4220        raw::rustSendMarkLocation(pid)
4221    }
4222}
4223
4224///
4225///  Send a PlayerMiscellaneous packet with a selected spell ID to a player.
4226///
4227///  `pid` The player ID.
4228///
4229///  Returns void
4230///
4231pub fn send_selected_spell(pid: u16) {
4232    unsafe {
4233        raw::rustSendSelectedSpell(pid)
4234    }
4235}
4236
4237///
4238///  Send a PlayerJail packet about a player.
4239///
4240///  This is similar to the player being jailed by a guard, but provides extra parameters for  
4241///  increased flexibility.
4242///
4243///  It is only sent to the player being jailed, as the other players will be informed of the  
4244///  jailing's actual consequences via other packets sent by the affected client.
4245///
4246///  `pid` The player ID.  
4247///  `jail_days` The number of days to spend jailed, where each day affects one skill point.  
4248///  `ignore_jail_teleportation` Whether the player being teleported to the nearest jail  
4249///                                 marker should be overridden.  
4250///  `ignore_jail_skill_increase` Whether the player's Sneak and Security skills should be  
4251///                                 prevented from increasing as a result of the jailing,  
4252///                                 overriding default behavior.  
4253///  `jail_progress_text` The text that should be displayed while jailed.  
4254///  `jail_end_text` The text that should be displayed once the jailing period is over.
4255///
4256///  Returns void
4257///
4258pub fn jail(pid: u16, jail_days: i16, ignore_jail_teleportation: bool, ignore_jail_skill_increases: bool, jail_progress_text: &str, jail_end_text: &str) {
4259    unsafe {
4260        raw::rustJail(pid, jail_days, ignore_jail_teleportation, ignore_jail_skill_increases, CString::new(jail_progress_text).unwrap_or_default().as_ptr(), CString::new(jail_end_text).unwrap_or_default().as_ptr())
4261    }
4262}
4263
4264///
4265///  Send a PlayerResurrect packet about a player.
4266///
4267///  This sends the packet to all players connected to the server.
4268///
4269///  `pid` The player ID.  
4270///  `_type` The type of resurrection (0 for REGULAR, 1 for IMPERIAL_SHRINE,  
4271///              2 for TRIBUNAL_TEMPLE).
4272///
4273///  Returns void
4274///
4275pub fn resurrect(pid: u16, _type: u16) {
4276    unsafe {
4277        raw::rustResurrect(pid, _type)
4278    }
4279}
4280
4281pub fn get_death_reason(pid: u16) -> String {
4282    unsafe {
4283        CStr::from_ptr(raw::rustGetDeathReason(pid))
4284            .to_str()
4285            .unwrap_or_default()
4286            .to_string()
4287    }
4288}
4289
4290pub fn get_player_killer_ref_num_index(pid: u16) -> u16 {
4291    unsafe {
4292        raw::rustGetPlayerKillerRefNumIndex(pid)
4293    }
4294}
4295
4296///
4297///  Generate a random string of a particular length that only contains  
4298///         letters and numbers.
4299///
4300///  `length` The length of the generated string.
4301///
4302///  Returns the generated string.
4303///
4304pub fn generate_random_string(length: u16) -> String {
4305    unsafe {
4306        CStr::from_ptr(raw::rustGenerateRandomString(length))
4307            .to_str()
4308            .unwrap_or_default()
4309            .to_string()
4310    }
4311}
4312
4313///
4314///  Get the SHA256 hash corresponding to an input string.
4315///
4316///  `input_string` The input string.
4317///
4318///  Returns the SHA256 hash.
4319///
4320pub fn get_sha256_hash(input_string: &str) -> String {
4321    unsafe {
4322        CStr::from_ptr(raw::rustGetSHA256Hash(CString::new(input_string).unwrap_or_default().as_ptr()))
4323            .to_str()
4324            .unwrap_or_default()
4325            .to_string()
4326    }
4327}
4328
4329///
4330///  Get the last player ID currently connected to the server.
4331///
4332///  Every player receives a unique numerical index known as their player ID upon joining the  
4333///  server.
4334///
4335///
4336///  Returns the player ID.
4337///
4338pub fn get_last_player_id() -> u16 {
4339    unsafe {
4340        raw::rustGetLastPlayerId()
4341    }
4342}
4343
4344///
4345///  Get the current (latest) mpNum generated by the server.
4346///
4347///  Every object that did not exist in an .ESM or .ESP data file and has instead been placed or  
4348///  spawned through a server-sent packet has a numerical index known as its mpNum.
4349///
4350///  When ObjectPlace and ObjectSpawn packets are received from players, their objects lack mpNums,  
4351///  so the server assigns them some based on incrementing the server's current mpNum, with the  
4352///  operation's final mpNum becoming the server's new current mpNum.
4353///
4354///
4355///  Returns the mpNum.
4356///
4357pub fn get_current_mp_num() -> i16 {
4358    unsafe {
4359        raw::rustGetCurrentMpNum()
4360    }
4361}
4362
4363///
4364///  Set the current (latest) mpNum generated by the server.
4365///
4366///  When restarting a server, it is important to revert to the previous current (latest) mpNum  
4367///  as stored in the server's data, so as to avoid starting over from 0 and ending up assigning  
4368///  duplicate mpNums to objects.
4369///
4370///  `mp_num` The number that should be used as the new current mpNum.
4371///
4372///  Returns void
4373///
4374pub fn set_current_mp_num(mp_num: i16) {
4375    unsafe {
4376        raw::rustSetCurrentMpNum(mp_num)
4377    }
4378}
4379
4380///
4381///  Get the X position of a player.
4382///
4383///  `pid` The player ID.
4384///
4385///  Returns the X position.
4386///
4387pub fn get_pos_x(pid: u16) -> f64 {
4388    unsafe {
4389        raw::rustGetPosX(pid)
4390    }
4391}
4392
4393///
4394///  Get the Y position of a player.
4395///
4396///  `pid` The player ID.
4397///
4398///  Returns the Y position.
4399///
4400pub fn get_pos_y(pid: u16) -> f64 {
4401    unsafe {
4402        raw::rustGetPosY(pid)
4403    }
4404}
4405
4406///
4407///  Get the Z position of a player.
4408///
4409///  `pid` The player ID.
4410///
4411///  Returns the Z position.
4412///
4413pub fn get_pos_z(pid: u16) -> f64 {
4414    unsafe {
4415        raw::rustGetPosZ(pid)
4416    }
4417}
4418
4419///
4420///  Get the X position of a player from before their latest cell change.
4421///
4422///  `pid` The player ID.
4423///
4424///  Returns the X position.
4425///
4426pub fn get_previous_cell_pos_x(pid: u16) -> f64 {
4427    unsafe {
4428        raw::rustGetPreviousCellPosX(pid)
4429    }
4430}
4431
4432///
4433///  Get the Y position of a player from before their latest cell change.
4434///
4435///  `pid` The player ID.
4436///
4437///  Returns the Y position.
4438///
4439pub fn get_previous_cell_pos_y(pid: u16) -> f64 {
4440    unsafe {
4441        raw::rustGetPreviousCellPosY(pid)
4442    }
4443}
4444
4445///
4446///  Get the Z position of a player from before their latest cell change.
4447///
4448///  `pid` The player ID.
4449///
4450///  Returns the Z position.
4451///
4452pub fn get_previous_cell_pos_z(pid: u16) -> f64 {
4453    unsafe {
4454        raw::rustGetPreviousCellPosZ(pid)
4455    }
4456}
4457
4458///
4459///  Get the X rotation of a player.
4460///
4461///  `pid` The player ID.
4462///
4463///  Returns the X rotation.
4464///
4465pub fn get_rot_x(pid: u16) -> f64 {
4466    unsafe {
4467        raw::rustGetRotX(pid)
4468    }
4469}
4470
4471///
4472///  Get the Z rotation of a player.
4473///
4474///  `pid` The player ID.
4475///
4476///  Returns the Z rotation.
4477///
4478pub fn get_rot_z(pid: u16) -> f64 {
4479    unsafe {
4480        raw::rustGetRotZ(pid)
4481    }
4482}
4483
4484///
4485///  Set the position of a player.
4486///
4487///  This changes the positional coordinates recorded for that player in the server memory, but  
4488///  does not by itself send a packet.
4489///
4490///  `pid` The player ID.  
4491///  `x` The X position.  
4492///  `y` The Y position.  
4493///  `z` The Z position.
4494///
4495///  Returns void
4496///
4497pub fn set_pos(pid: u16, x: f64, y: f64, z: f64) {
4498    unsafe {
4499        raw::rustSetPos(pid, x, y, z)
4500    }
4501}
4502
4503///
4504///  Set the rotation of a player.
4505///
4506///  This changes the rotational coordinates recorded for that player in the server memory, but  
4507///  does not by itself send a packet.
4508///
4509///  A player's Y rotation is always 0, which is why there is no Y rotation parameter.
4510///
4511///  `pid` The player ID.  
4512///  `x` The X position.  
4513///  `z` The Z position.
4514///
4515///  Returns void
4516///
4517pub fn set_rot(pid: u16, x: f64, z: f64) {
4518    unsafe {
4519        raw::rustSetRot(pid, x, z)
4520    }
4521}
4522
4523///
4524///  Set the momentum of a player.
4525///
4526///  This changes the coordinates recorded for that player's momentum in the server memory, but  
4527///  does not by itself send a packet.
4528///
4529///  `pid` The player ID.  
4530///  `x` The X momentum.  
4531///  `y` The Y momentum.  
4532///  `z` The Z momentum.
4533///
4534///  Returns void
4535///
4536pub fn set_momentum(pid: u16, x: f64, y: f64, z: f64) {
4537    unsafe {
4538        raw::rustSetMomentum(pid, x, y, z)
4539    }
4540}
4541
4542///
4543///  Send a PlayerPosition packet about a player.
4544///
4545///  It is only sent to the affected player.
4546///
4547///  `pid` The player ID.
4548///
4549///  Returns void
4550///
4551pub fn send_pos(pid: u16) {
4552    unsafe {
4553        raw::rustSendPos(pid)
4554    }
4555}
4556
4557///
4558///  Send a PlayerMomentum packet about a player.
4559///
4560///  It is only sent to the affected player.
4561///
4562///  `pid` The player ID.
4563///
4564///  Returns void
4565///
4566pub fn send_momentum(pid: u16) {
4567    unsafe {
4568        raw::rustSendMomentum(pid)
4569    }
4570}
4571
4572///
4573///  Clear the last recorded journal changes for a player.
4574///
4575///  This is used to initialize the sending of new PlayerJournal packets.
4576///
4577///  `pid` The player ID whose journal changes should be used.
4578///
4579///  Returns void
4580///
4581pub fn clear_journal_changes(pid: u16) {
4582    unsafe {
4583        raw::rustClearJournalChanges(pid)
4584    }
4585}
4586
4587///
4588///  Get the number of indexes in a player's latest journal changes.
4589///
4590///  `pid` The player ID whose journal changes should be used.
4591///
4592///  Returns the number of indexes.
4593///
4594pub fn get_journal_changes_size(pid: u16) -> u16 {
4595    unsafe {
4596        raw::rustGetJournalChangesSize(pid)
4597    }
4598}
4599
4600///
4601///  Add a new journal item of type ENTRY to the journal changes for a player,  
4602///   with a specific timestamp.
4603///
4604///  `pid` The player ID whose journal changes should be used.  
4605///  `quest` The quest of the journal item.  
4606///  `index` The quest index of the journal item.  
4607///  `actor_ref_id` The actor refId of the journal item.
4608///
4609///  Returns void
4610///
4611pub fn add_journal_entry(pid: u16, quest: &str, index: u16, actor_ref_id: &str) {
4612    unsafe {
4613        raw::rustAddJournalEntry(pid, CString::new(quest).unwrap_or_default().as_ptr(), index, CString::new(actor_ref_id).unwrap_or_default().as_ptr())
4614    }
4615}
4616
4617///
4618///  Add a new journal item of type ENTRY to the journal changes for a player,  
4619///   with a specific timestamp.
4620///
4621///  `pid` The player ID whose journal changes should be used.  
4622///  `quest` The quest of the journal item.  
4623///  `index` The quest index of the journal item.  
4624///  `actor_ref_id` The actor refId of the journal item.  
4625///  `the` daysPassed for the journal item.  
4626///  `the` month for the journal item.  
4627///  `the` day of the month for the journal item.
4628///
4629///  Returns void
4630///
4631pub fn add_journal_entry_with_timestamp(pid: u16, quest: &str, index: u16, actor_ref_id: &str, days_passed: u16, month: u16, day: u16) {
4632    unsafe {
4633        raw::rustAddJournalEntryWithTimestamp(pid, CString::new(quest).unwrap_or_default().as_ptr(), index, CString::new(actor_ref_id).unwrap_or_default().as_ptr(), days_passed, month, day)
4634    }
4635}
4636
4637///
4638///  Add a new journal item of type INDEX to the journal changes for a player.
4639///
4640///  `pid` The player ID whose journal changes should be used.  
4641///  `quest` The quest of the journal item.  
4642///  `index` The quest index of the journal item.
4643///
4644///  Returns void
4645///
4646pub fn add_journal_index(pid: u16, quest: &str, index: u16) {
4647    unsafe {
4648        raw::rustAddJournalIndex(pid, CString::new(quest).unwrap_or_default().as_ptr(), index)
4649    }
4650}
4651
4652///
4653///  Set the reputation of a certain player.
4654///
4655///  `pid` The player ID.  
4656///  `value` The reputation.
4657///
4658///  Returns void
4659///
4660pub fn set_reputation(pid: u16, value: i16) {
4661    unsafe {
4662        raw::rustSetReputation(pid, value)
4663    }
4664}
4665
4666///
4667///  Get the quest at a certain index in a player's latest journal changes.
4668///
4669///  `pid` The player ID whose journal changes should be used.  
4670///  `index` The index of the journalItem.
4671///
4672///  Returns the quest.
4673///
4674pub fn get_journal_item_quest(pid: u16, index: u16) -> String {
4675    unsafe {
4676        CStr::from_ptr(raw::rustGetJournalItemQuest(pid, index))
4677            .to_str()
4678            .unwrap_or_default()
4679            .to_string()
4680    }
4681}
4682
4683///
4684///  Get the quest index at a certain index in a player's latest journal changes.
4685///
4686///  `pid` The player ID whose journal changes should be used.  
4687///  `index` The index of the journalItem.
4688///
4689///  Returns the quest index.
4690///
4691pub fn get_journal_item_index(pid: u16, index: u16) -> i16 {
4692    unsafe {
4693        raw::rustGetJournalItemIndex(pid, index)
4694    }
4695}
4696
4697///
4698///  Get the journal item type at a certain index in a player's latest journal changes.
4699///
4700///  `pid` The player ID whose journal changes should be used.  
4701///  `index` The index of the journalItem.
4702///
4703///  Returns the type (0 for ENTRY, 1 for INDEX).
4704///
4705pub fn get_journal_item_type(pid: u16, index: u16) -> i16 {
4706    unsafe {
4707        raw::rustGetJournalItemType(pid, index)
4708    }
4709}
4710
4711///
4712///  Get the actor refId at a certain index in a player's latest journal changes.
4713///
4714///  Every journal change has an associated actor, which is usually the quest giver.
4715///
4716///  `pid` The player ID whose journal changes should be used.  
4717///  `index` The index of the journalItem.
4718///
4719///  Returns the actor refId.
4720///
4721pub fn get_journal_item_actor_ref_id(pid: u16, index: u16) -> String {
4722    unsafe {
4723        CStr::from_ptr(raw::rustGetJournalItemActorRefId(pid, index))
4724            .to_str()
4725            .unwrap_or_default()
4726            .to_string()
4727    }
4728}
4729
4730///
4731///  Get the a certain player's reputation.
4732///
4733///  `pid` The player ID.
4734///
4735///  Returns the reputation.
4736///
4737pub fn get_reputation(pid: u16) -> i16 {
4738    unsafe {
4739        raw::rustGetReputation(pid)
4740    }
4741}
4742
4743///
4744///  Send a PlayerJournal packet with a player's recorded journal changes.
4745///
4746///  `pid` The player ID whose journal changes should be used.  
4747///  `send_to_other_players` Whether this packet should be sent to players other than the  
4748///                            player attached to the packet (false by default).  
4749///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
4750///                            to the packet (false by default).
4751///
4752///  Returns void
4753///
4754pub fn send_journal_changes(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
4755    unsafe {
4756        raw::rustSendJournalChanges(pid, send_to_other_players, skip_attached_player)
4757    }
4758}
4759
4760///
4761///  Send a PlayerReputation packet with a player's recorded reputation.
4762///
4763///  `pid` The player ID whose reputation should be used.  
4764///  `send_to_other_players` Whether this packet should be sent to players other than the  
4765///                            player attached to the packet (false by default).  
4766///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
4767///                            to the packet (false by default).
4768///
4769///  Returns void
4770///
4771pub fn send_reputation(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
4772    unsafe {
4773        raw::rustSendReputation(pid, send_to_other_players, skip_attached_player)
4774    }
4775}
4776
4777pub fn initialize_journal_changes(pid: u16) {
4778    unsafe {
4779        raw::rustInitializeJournalChanges(pid)
4780    }
4781}
4782
4783///
4784///  Clear the data from the records stored on the server.
4785///
4786///
4787///  Returns void
4788///
4789pub fn clear_records() {
4790    unsafe {
4791        raw::rustClearRecords()
4792    }
4793}
4794
4795///
4796///  Get the type of records in the read worldstate's dynamic records.
4797///
4798///
4799///  Returns the type of records (0 for SPELL, 1 for POTION, 2 for ENCHANTMENT,  
4800///          3 for NPC).
4801///
4802pub fn get_record_type() -> u16 {
4803    unsafe {
4804        raw::rustGetRecordType()
4805    }
4806}
4807
4808///
4809///  Get the number of records in the read worldstate's dynamic records.
4810///
4811///
4812///  Returns the number of records.
4813///
4814pub fn get_record_count() -> u16 {
4815    unsafe {
4816        raw::rustGetRecordCount()
4817    }
4818}
4819
4820///
4821///  Get the number of effects for the record at a certain index in the read  
4822///  worldstate's current records.
4823///
4824///  `record_index` The index of the record.
4825///
4826///  Returns the number of effects.
4827///
4828pub fn get_record_effect_count(record_index: u16) -> u16 {
4829    unsafe {
4830        raw::rustGetRecordEffectCount(record_index)
4831    }
4832}
4833
4834///
4835///  Get the id of the record at a certain index in the read worldstate's  
4836///  dynamic records of the current type.
4837///
4838///  `index` The index of the record.
4839///
4840///  Returns the id of the record.
4841///
4842pub fn get_record_id(index: u16) -> String {
4843    unsafe {
4844        CStr::from_ptr(raw::rustGetRecordId(index))
4845            .to_str()
4846            .unwrap_or_default()
4847            .to_string()
4848    }
4849}
4850
4851///
4852///  Get the base id (i.e. the id this record should inherit default  
4853///  values from) of the record at a certain index in the read worldstate's  
4854///  dynamic records of the current type.
4855///
4856///  `index` The index of the record.
4857///
4858///  Returns the base id of the record.
4859///
4860pub fn get_record_base_id(index: u16) -> String {
4861    unsafe {
4862        CStr::from_ptr(raw::rustGetRecordBaseId(index))
4863            .to_str()
4864            .unwrap_or_default()
4865            .to_string()
4866    }
4867}
4868
4869///
4870///  Get the subtype of the record at a certain index in the read worldstate's  
4871///  dynamic records of the current type.
4872///
4873///  `index` The index of the record.
4874///
4875///  Returns the type of the record.
4876///
4877pub fn get_record_subtype(index: u16) -> i16 {
4878    unsafe {
4879        raw::rustGetRecordSubtype(index)
4880    }
4881}
4882
4883///
4884///  Get the name of the record at a certain index in the read worldstate's  
4885///  dynamic records of the current type.
4886///
4887///  `index` The index of the record.
4888///
4889///  Returns the name of the record.
4890///
4891pub fn get_record_name(index: u16) -> String {
4892    unsafe {
4893        CStr::from_ptr(raw::rustGetRecordName(index))
4894            .to_str()
4895            .unwrap_or_default()
4896            .to_string()
4897    }
4898}
4899
4900///
4901///  Get the model of the record at a certain index in the read worldstate's  
4902///  dynamic records of the current type.
4903///
4904///  `index` The index of the record.
4905///
4906///  Returns the model of the record.
4907///
4908pub fn get_record_model(index: u16) -> String {
4909    unsafe {
4910        CStr::from_ptr(raw::rustGetRecordModel(index))
4911            .to_str()
4912            .unwrap_or_default()
4913            .to_string()
4914    }
4915}
4916
4917///
4918///  Get the icon of the record at a certain index in the read worldstate's  
4919///  dynamic records of the current type.
4920///
4921///  `index` The index of the record.
4922///
4923///  Returns the icon of the record.
4924///
4925pub fn get_record_icon(index: u16) -> String {
4926    unsafe {
4927        CStr::from_ptr(raw::rustGetRecordIcon(index))
4928            .to_str()
4929            .unwrap_or_default()
4930            .to_string()
4931    }
4932}
4933
4934///
4935///  Get the script of the record at a certain index in the read worldstate's  
4936///  dynamic records of the current type.
4937///
4938///  `index` The index of the record.
4939///
4940///  Returns the script of the record.
4941///
4942pub fn get_record_script(index: u16) -> String {
4943    unsafe {
4944        CStr::from_ptr(raw::rustGetRecordScript(index))
4945            .to_str()
4946            .unwrap_or_default()
4947            .to_string()
4948    }
4949}
4950
4951///
4952///  Get the enchantment id of the record at a certain index in the read  
4953///  worldstate's dynamic records of the current type.
4954///
4955///  `index` The index of the record.
4956///
4957///  Returns the enchantment id of the record.
4958///
4959pub fn get_record_enchantment_id(index: u16) -> String {
4960    unsafe {
4961        CStr::from_ptr(raw::rustGetRecordEnchantmentId(index))
4962            .to_str()
4963            .unwrap_or_default()
4964            .to_string()
4965    }
4966}
4967
4968///
4969///  Get the enchantment charge of the record at a certain index in  
4970///  the read worldstate's dynamic records of the current type.
4971///
4972///  `index` The index of the record.
4973///
4974///  Returns the enchantment charge of the record.
4975///
4976pub fn get_record_enchantment_charge(index: u16) -> i16 {
4977    unsafe {
4978        raw::rustGetRecordEnchantmentCharge(index)
4979    }
4980}
4981
4982///
4983///  Get the auto-calculation flag value of the record at a certain index in  
4984///  the read worldstate's dynamic records of the current type.
4985///
4986///  `index` The index of the record.
4987///
4988///  Returns the auto-calculation flag value of the record.
4989///
4990pub fn get_record_auto_calc(index: u16) -> i16 {
4991    unsafe {
4992        raw::rustGetRecordAutoCalc(index)
4993    }
4994}
4995
4996///
4997///  Get the charge of the record at a certain index in the read worldstate's  
4998///  dynamic records of the current type.
4999///
5000///  `index` The index of the record.
5001///
5002///  Returns the charge of the record.
5003///
5004pub fn get_record_charge(index: u16) -> i16 {
5005    unsafe {
5006        raw::rustGetRecordCharge(index)
5007    }
5008}
5009
5010///
5011///  Get the cost of the record at a certain index in the read worldstate's  
5012///  dynamic records of the current type.
5013///
5014///  `index` The index of the record.
5015///
5016///  Returns the cost of the record.
5017///
5018pub fn get_record_cost(index: u16) -> i16 {
5019    unsafe {
5020        raw::rustGetRecordCost(index)
5021    }
5022}
5023
5024///
5025///  Get the flags of the record at a certain index in the read worldstate's  
5026///  dynamic records of the current type.
5027///
5028///  `index` The index of the record.
5029///
5030///  Returns the flags of the spell as an integer.
5031///
5032pub fn get_record_flags(index: u16) -> i16 {
5033    unsafe {
5034        raw::rustGetRecordFlags(index)
5035    }
5036}
5037
5038///
5039///  Get the value of the record at a certain index in the read worldstate's  
5040///  dynamic records of the current type.
5041///
5042///  `index` The index of the record.
5043///
5044///  Returns the value of the record.
5045///
5046pub fn get_record_value(index: u16) -> i16 {
5047    unsafe {
5048        raw::rustGetRecordValue(index)
5049    }
5050}
5051
5052///
5053///  Get the weight of the record at a certain index in the read worldstate's  
5054///  dynamic records of the current type.
5055///
5056///  `index` The index of the record.
5057///
5058///  Returns the weight of the record.
5059///
5060pub fn get_record_weight(index: u16) -> f64 {
5061    unsafe {
5062        raw::rustGetRecordWeight(index)
5063    }
5064}
5065
5066///
5067///  Get the ID of the effect at a certain index in the read worldstate's  
5068///  current records.
5069///
5070///  `record_index` The index of the record.  
5071///  `effect_index` The index of the effect.
5072///
5073///  Returns the ID of the effect.
5074///
5075pub fn get_record_effect_id(record_index: u16, effect_index: u16) -> u16 {
5076    unsafe {
5077        raw::rustGetRecordEffectId(record_index, effect_index)
5078    }
5079}
5080
5081///
5082///  Get the ID of the attribute modified by the effect at a certain index in the  
5083///  read worldstate's current records.
5084///
5085///  `record_index` The index of the record.  
5086///  `effect_index` The index of the effect.
5087///
5088///  Returns the attribute ID for the effect.
5089///
5090pub fn get_record_effect_attribute(record_index: u16, effect_index: u16) -> i16 {
5091    unsafe {
5092        raw::rustGetRecordEffectAttribute(record_index, effect_index)
5093    }
5094}
5095
5096///
5097///  Get the ID of the skill modified by the effect at a certain index in the  
5098///  read worldstate's current records.
5099///
5100///  `record_index` The index of the record.  
5101///  `effect_index` The index of the effect.
5102///
5103///  Returns the skill ID for the effect.
5104///
5105pub fn get_record_effect_skill(record_index: u16, effect_index: u16) -> i16 {
5106    unsafe {
5107        raw::rustGetRecordEffectSkill(record_index, effect_index)
5108    }
5109}
5110
5111///
5112///  Get the range type of the effect at a certain index in the read worldstate's  
5113///  current records (0 for self, 1 for touch, 2 for target).
5114///
5115///  `record_index` The index of the record.  
5116///  `effect_index` The index of the effect.
5117///
5118///  Returns the range of the effect.
5119///
5120pub fn get_record_effect_range_type(record_index: u16, effect_index: u16) -> u16 {
5121    unsafe {
5122        raw::rustGetRecordEffectRangeType(record_index, effect_index)
5123    }
5124}
5125
5126///
5127///  Get the area of the effect at a certain index in the read worldstate's current  
5128///  records.
5129///
5130///  `record_index` The index of the record.  
5131///  `effect_index` The index of the effect.
5132///
5133///  Returns the area of the effect.
5134///
5135pub fn get_record_effect_area(record_index: u16, effect_index: u16) -> i16 {
5136    unsafe {
5137        raw::rustGetRecordEffectArea(record_index, effect_index)
5138    }
5139}
5140
5141///
5142///  Get the duration of the effect at a certain index in the read worldstate's current  
5143///  records.
5144///
5145///  `record_index` The index of the record.  
5146///  `effect_index` The index of the effect.
5147///
5148///  Returns the duration of the effect.
5149///
5150pub fn get_record_effect_duration(record_index: u16, effect_index: u16) -> i16 {
5151    unsafe {
5152        raw::rustGetRecordEffectDuration(record_index, effect_index)
5153    }
5154}
5155
5156///
5157///  Get the maximum magnitude of the effect at a certain index in the read  
5158///  worldstate's current records.
5159///
5160///  `record_index` The index of the record.  
5161///  `effect_index` The index of the effect.
5162///
5163///  Returns the maximum magnitude of the effect.
5164///
5165pub fn get_record_effect_magnitude_max(record_index: u16, effect_index: u16) -> i16 {
5166    unsafe {
5167        raw::rustGetRecordEffectMagnitudeMax(record_index, effect_index)
5168    }
5169}
5170
5171///
5172///  Get the minimum magnitude of the effect at a certain index in the read  
5173///  worldstate's current records.
5174///
5175///  `record_index` The index of the record.  
5176///  `effect_index` The index of the effect.
5177///
5178///  Returns the minimum magnitude of the effect.
5179///
5180pub fn get_record_effect_magnitude_min(record_index: u16, effect_index: u16) -> i16 {
5181    unsafe {
5182        raw::rustGetRecordEffectMagnitudeMin(record_index, effect_index)
5183    }
5184}
5185
5186///
5187///  Set which type of temporary records stored on the server should have  
5188///  their data changed via setter functions.
5189///
5190///  `_type` The type of records.
5191///
5192///  Returns void
5193///
5194pub fn set_record_type(_type: u16) {
5195    unsafe {
5196        raw::rustSetRecordType(_type)
5197    }
5198}
5199
5200///
5201///  Set the id of the temporary record stored on the server for the  
5202///  currently specified record type.
5203///
5204///  `id` The id of the record.
5205///
5206///  Returns void
5207///
5208pub fn set_record_id(id: &str) {
5209    unsafe {
5210        raw::rustSetRecordId(CString::new(id).unwrap_or_default().as_ptr())
5211    }
5212}
5213
5214///
5215///  Set the base id (i.e. the id this record should inherit default  
5216///  values from) of the temporary record stored on the server for the  
5217///  currently specified record type.
5218///
5219///  `base_id` The baseId of the record.
5220///
5221///  Returns void
5222///
5223pub fn set_record_base_id(base_id: &str) {
5224    unsafe {
5225        raw::rustSetRecordBaseId(CString::new(base_id).unwrap_or_default().as_ptr())
5226    }
5227}
5228
5229///
5230///  Set the inventory base id (i.e. the id this record should inherit  
5231///  its inventory contents from) of the temporary record stored on the server for  
5232///  the currently specified record type.
5233///
5234///  `inventory_base_id` The inventoryBaseId of the record.
5235///
5236///  Returns void
5237///
5238pub fn set_record_inventory_base_id(inventory_base_id: &str) {
5239    unsafe {
5240        raw::rustSetRecordInventoryBaseId(CString::new(inventory_base_id).unwrap_or_default().as_ptr())
5241    }
5242}
5243
5244///
5245///  Set the subtype of the temporary record stored on the server for  
5246///  the currently specified record type.
5247///
5248///  `_type` The spell type.
5249///
5250///  Returns void
5251///
5252pub fn set_record_subtype(subtype: u16) {
5253    unsafe {
5254        raw::rustSetRecordSubtype(subtype)
5255    }
5256}
5257
5258///
5259///  Set the name of the temporary record stored on the server for the  
5260///  currently specified record type.
5261///
5262///  `name` The name of the record.
5263///
5264///  Returns void
5265///
5266pub fn set_record_name(name: &str) {
5267    unsafe {
5268        raw::rustSetRecordName(CString::new(name).unwrap_or_default().as_ptr())
5269    }
5270}
5271
5272///
5273///  Set the model of the temporary record stored on the server for the  
5274///  currently specified record type.
5275///
5276///  `model` The model of the record.
5277///
5278///  Returns void
5279///
5280pub fn set_record_model(model: &str) {
5281    unsafe {
5282        raw::rustSetRecordModel(CString::new(model).unwrap_or_default().as_ptr())
5283    }
5284}
5285
5286///
5287///  Set the icon of the temporary record stored on the server for the  
5288///  currently specified record type.
5289///
5290///  `icon` The icon of the record.
5291///
5292///  Returns void
5293///
5294pub fn set_record_icon(icon: &str) {
5295    unsafe {
5296        raw::rustSetRecordIcon(CString::new(icon).unwrap_or_default().as_ptr())
5297    }
5298}
5299
5300///
5301///  Set the script of the temporary record stored on the server for the  
5302///  currently specified record type.
5303///
5304///  `script` The script of the record.
5305///
5306///  Returns void
5307///
5308pub fn set_record_script(script: &str) {
5309    unsafe {
5310        raw::rustSetRecordScript(CString::new(script).unwrap_or_default().as_ptr())
5311    }
5312}
5313
5314///
5315///  Set the enchantment id of the temporary record stored on the server  
5316///  for the currently specified record type.
5317///
5318///  `enchantment_id` The enchantment id of the record.
5319///
5320///  Returns void
5321///
5322pub fn set_record_enchantment_id(enchantment_id: &str) {
5323    unsafe {
5324        raw::rustSetRecordEnchantmentId(CString::new(enchantment_id).unwrap_or_default().as_ptr())
5325    }
5326}
5327
5328///
5329///  Set the enchantment charge of the temporary record stored on the server  
5330///  for the currently specified record type.
5331///
5332///  `enchantment_charge` The enchantmentCharge of the record.
5333///
5334///  Returns void
5335///
5336pub fn set_record_enchantment_charge(enchantment_charge: i16) {
5337    unsafe {
5338        raw::rustSetRecordEnchantmentCharge(enchantment_charge)
5339    }
5340}
5341
5342///
5343///  Set the auto-calculation flag value of the temporary record stored  
5344///  on the server for the currently specified record type.
5345///
5346///  `auto_calc` The auto-calculation flag value of the record.
5347///
5348///  Returns void
5349///
5350pub fn set_record_auto_calc(auto_calc: i16) {
5351    unsafe {
5352        raw::rustSetRecordAutoCalc(auto_calc)
5353    }
5354}
5355
5356///
5357///  Set the charge of the temporary record stored on the server for the  
5358///  currently specified record type.
5359///
5360///  `charge` The charge of the record.
5361///
5362///  Returns void
5363///
5364pub fn set_record_charge(charge: i16) {
5365    unsafe {
5366        raw::rustSetRecordCharge(charge)
5367    }
5368}
5369
5370///
5371///  Set the cost of the temporary record stored on the server for the  
5372///  currently specified record type.
5373///
5374///  `cost` The cost of the record.
5375///
5376///  Returns void
5377///
5378pub fn set_record_cost(cost: i16) {
5379    unsafe {
5380        raw::rustSetRecordCost(cost)
5381    }
5382}
5383
5384///
5385///  Set the flags of the temporary record stored on the server for the  
5386///  currently specified record type.
5387///
5388///  `flags` The flags of the record.
5389///
5390///  Returns void
5391///
5392pub fn set_record_flags(flags: i16) {
5393    unsafe {
5394        raw::rustSetRecordFlags(flags)
5395    }
5396}
5397
5398///
5399///  Set the value of the temporary record stored on the server for the  
5400///  currently specified record type.
5401///
5402///  `value` The value of the record.
5403///
5404///  Returns void
5405///
5406pub fn set_record_value(value: i16) {
5407    unsafe {
5408        raw::rustSetRecordValue(value)
5409    }
5410}
5411
5412///
5413///  Set the weight of the temporary record stored on the server for the  
5414///  currently specified record type.
5415///
5416///  `weight` The weight of the record.
5417///
5418///  Returns void
5419///
5420pub fn set_record_weight(weight: f64) {
5421    unsafe {
5422        raw::rustSetRecordWeight(weight)
5423    }
5424}
5425
5426///
5427///  Set the item quality of the temporary record stored on the server for the  
5428///  currently specified record type.
5429///
5430///  `weight` The weight of the record.
5431///
5432///  Returns void
5433///
5434pub fn set_record_quality(quality: f64) {
5435    unsafe {
5436        raw::rustSetRecordQuality(quality)
5437    }
5438}
5439
5440///
5441///  Set the number of uses of the temporary record stored on the server for the  
5442///  currently specified record type.
5443///
5444///  `uses` The number of uses of the record.
5445///
5446///  Returns void
5447///
5448pub fn set_record_uses(uses: i16) {
5449    unsafe {
5450        raw::rustSetRecordUses(uses)
5451    }
5452}
5453
5454///
5455///  Set the time of the temporary record stored on the server for the currently  
5456///  specified record type.
5457///
5458///  `time` The time of the record.
5459///
5460///  Returns void
5461///
5462pub fn set_record_time(time: i16) {
5463    unsafe {
5464        raw::rustSetRecordTime(time)
5465    }
5466}
5467
5468///
5469///  Set the radius of the temporary record stored on the server for the currently  
5470///  specified record type.
5471///
5472///  `uses` The radius of the record.
5473///
5474///  Returns void
5475///
5476pub fn set_record_radius(radius: i16) {
5477    unsafe {
5478        raw::rustSetRecordRadius(radius)
5479    }
5480}
5481
5482///
5483///  Set the color of the temporary record stored on the server for the currently  
5484///  specified record type.
5485///
5486///  `color` The color of the record.
5487///
5488///  Returns void
5489///
5490pub fn set_record_color(red: u16, green: u16, blue: u16) {
5491    unsafe {
5492        raw::rustSetRecordColor(red, green, blue)
5493    }
5494}
5495
5496///
5497///  Set the armor rating of the temporary record stored on the server  
5498///  for the currently specified record type.
5499///
5500///  `armor_rating` The armor rating of the record.
5501///
5502///  Returns void
5503///
5504pub fn set_record_armor_rating(armor_rating: i16) {
5505    unsafe {
5506        raw::rustSetRecordArmorRating(armor_rating)
5507    }
5508}
5509
5510///
5511///  Set the health of the temporary record stored on the server for the  
5512///  currently specified record type.
5513///
5514///  `health` The health of the record.
5515///
5516///  Returns void
5517///
5518pub fn set_record_health(health: i16) {
5519    unsafe {
5520        raw::rustSetRecordHealth(health)
5521    }
5522}
5523
5524///
5525///  Set the chop damage of the temporary record stored on the server for the  
5526///  currently specified record type.
5527///
5528///  `min_damage` The minimum damage of the record.  
5529///  `max_damage` The maximum damage of the record.
5530///
5531///  Returns void
5532///
5533pub fn set_record_damage_chop(min_damage: u16, max_damage: u16) {
5534    unsafe {
5535        raw::rustSetRecordDamageChop(min_damage, max_damage)
5536    }
5537}
5538
5539///
5540///  Set the slash damage of the temporary record stored on the server for the  
5541///  currently specified record type.
5542///
5543///  `min_damage` The minimum damage of the record.  
5544///  `max_damage` The maximum damage of the record.
5545///
5546///  Returns void
5547///
5548pub fn set_record_damage_slash(min_damage: u16, max_damage: u16) {
5549    unsafe {
5550        raw::rustSetRecordDamageSlash(min_damage, max_damage)
5551    }
5552}
5553
5554///
5555///  Set the thrust damage of the temporary record stored on the server for the  
5556///  currently specified record type.
5557///
5558///  `min_damage` The minimum damage of the record.  
5559///  `max_damage` The maximum damage of the record.
5560///
5561///  Returns void
5562///
5563pub fn set_record_damage_thrust(min_damage: u16, max_damage: u16) {
5564    unsafe {
5565        raw::rustSetRecordDamageThrust(min_damage, max_damage)
5566    }
5567}
5568
5569///
5570///  Set the reach of the temporary record stored on the server for the  
5571///  currently specified record type.
5572///
5573///  `reach` The reach of the record.
5574///
5575///  Returns void
5576///
5577pub fn set_record_reach(reach: f64) {
5578    unsafe {
5579        raw::rustSetRecordReach(reach)
5580    }
5581}
5582
5583///
5584///  Set the speed of the temporary record stored on the server for the  
5585///  currently specified record type.
5586///
5587///  `speed` The speed of the record.
5588///
5589///  Returns void
5590///
5591pub fn set_record_speed(speed: f64) {
5592    unsafe {
5593        raw::rustSetRecordSpeed(speed)
5594    }
5595}
5596
5597///
5598///  Set whether the temporary record stored on the server for the  
5599///  currently specified record type is a key.
5600///
5601///  Note: This is only applicable to Miscellaneous records.
5602///
5603///  `key_state` Whether the record is a key.
5604///
5605///  Returns void
5606///
5607pub fn set_record_key_state(key_state: bool) {
5608    unsafe {
5609        raw::rustSetRecordKeyState(key_state)
5610    }
5611}
5612
5613///
5614///  Set whether the temporary record stored on the server for the  
5615///  currently specified record type is a scroll.
5616///
5617///  Note: This is only applicable to Book records.
5618///
5619///  `scroll_state` Whether the record is a scroll.
5620///
5621///  Returns void
5622///
5623pub fn set_record_scroll_state(scroll_state: bool) {
5624    unsafe {
5625        raw::rustSetRecordScrollState(scroll_state)
5626    }
5627}
5628
5629///
5630///  Set the skill ID of the temporary record stored on the server for the  
5631///  currently specified record type.
5632///
5633///  `skill_id` The skill ID of the record.
5634///
5635///  Returns void
5636///
5637pub fn set_record_skill_id(skill_id: i16) {
5638    unsafe {
5639        raw::rustSetRecordSkillId(skill_id)
5640    }
5641}
5642
5643///
5644///  Set the text of the temporary record stored on the server for the  
5645///  currently specified record type.
5646///
5647///  `text` The text of the record.
5648///
5649///  Returns void
5650///
5651pub fn set_record_text(text: &str) {
5652    unsafe {
5653        raw::rustSetRecordText(CString::new(text).unwrap_or_default().as_ptr())
5654    }
5655}
5656
5657///
5658///  Set the hair of the temporary record stored on the server for the  
5659///  currently specified record type.
5660///
5661///  `hair` The hair of the record.
5662///
5663///  Returns void
5664///
5665pub fn set_record_hair(hair: &str) {
5666    unsafe {
5667        raw::rustSetRecordHair(CString::new(hair).unwrap_or_default().as_ptr())
5668    }
5669}
5670
5671///
5672///  Set the head of the temporary record stored on the server for the  
5673///  currently specified record type.
5674///
5675///  `hair` The head of the record.
5676///
5677///  Returns void
5678///
5679pub fn set_record_head(head: &str) {
5680    unsafe {
5681        raw::rustSetRecordHead(CString::new(head).unwrap_or_default().as_ptr())
5682    }
5683}
5684
5685///
5686///  Set the gender of the temporary record stored on the server for the  
5687///  currently specified record type (0 for female, 1 for male).
5688///
5689///  `hair` The race of the record.
5690///
5691///  Returns void
5692///
5693pub fn set_record_gender(gender: u16) {
5694    unsafe {
5695        raw::rustSetRecordGender(gender)
5696    }
5697}
5698
5699///
5700///  Set the race of the temporary record stored on the server for the  
5701///  currently specified record type.
5702///
5703///  `hair` The race of the record.
5704///
5705///  Returns void
5706///
5707pub fn set_record_race(race: &str) {
5708    unsafe {
5709        raw::rustSetRecordRace(CString::new(race).unwrap_or_default().as_ptr())
5710    }
5711}
5712
5713///
5714///  Set the character class of the temporary record stored on the server  
5715///  for the currently specified record type.
5716///
5717///  `hair` The character class of the record.
5718///
5719///  Returns void
5720///
5721pub fn set_record_class(char_class: &str) {
5722    unsafe {
5723        raw::rustSetRecordClass(CString::new(char_class).unwrap_or_default().as_ptr())
5724    }
5725}
5726
5727///
5728///  Set the faction of the temporary record stored on the server for the  
5729///  currently specified record type.
5730///
5731///  `faction` The faction of the record.
5732///
5733///  Returns void
5734///
5735pub fn set_record_faction(faction: &str) {
5736    unsafe {
5737        raw::rustSetRecordFaction(CString::new(faction).unwrap_or_default().as_ptr())
5738    }
5739}
5740
5741///
5742///  Set the scale of the temporary record stored on the server for the  
5743///  currently specified record type.
5744///
5745///  `scale` The scale of the record.
5746///
5747///  Returns void
5748///
5749pub fn set_record_scale(scale: f64) {
5750    unsafe {
5751        raw::rustSetRecordScale(scale)
5752    }
5753}
5754
5755///
5756///  Set the blood type of the temporary record stored on the server for the  
5757///  currently specified record type.
5758///
5759///  `blood_type` The blood type of the record.
5760///
5761///  Returns void
5762///
5763pub fn set_record_blood_type(blood_type: i16) {
5764    unsafe {
5765        raw::rustSetRecordBloodType(blood_type)
5766    }
5767}
5768
5769///
5770///  Set the level of the temporary record stored on the server for the  
5771///  currently specified record type.
5772///
5773///  `level` The level of the record.
5774///
5775///  Returns void
5776///
5777pub fn set_record_level(level: i16) {
5778    unsafe {
5779        raw::rustSetRecordLevel(level)
5780    }
5781}
5782
5783///
5784///  Set the magicka of the temporary record stored on the server for the  
5785///  currently specified record type.
5786///
5787///  `magicka` The magicka of the record.
5788///
5789///  Returns void
5790///
5791pub fn set_record_magicka(magicka: i16) {
5792    unsafe {
5793        raw::rustSetRecordMagicka(magicka)
5794    }
5795}
5796
5797///
5798///  Set the fatigue of the temporary record stored on the server for the  
5799///  currently specified record type.
5800///
5801///  `fatigue` The fatigue of the record.
5802///
5803///  Returns void
5804///
5805pub fn set_record_fatigue(fatigue: i16) {
5806    unsafe {
5807        raw::rustSetRecordFatigue(fatigue)
5808    }
5809}
5810
5811///
5812///  Set the AI fight value of the temporary record stored on the server for the  
5813///  currently specified record type.
5814///
5815///  `ai_fight` The AI fight value of the record.
5816///
5817///  Returns void
5818///
5819pub fn set_record_ai_fight(ai_fight: i16) {
5820    unsafe {
5821        raw::rustSetRecordAIFight(ai_fight)
5822    }
5823}
5824
5825///
5826///  Set the AI flee value of the temporary record stored on the server for the  
5827///  currently specified record type.
5828///
5829///  `ai_flee` The AI flee value of the record.
5830///
5831///  Returns void
5832///
5833pub fn set_record_ai_flee(ai_flee: i16) {
5834    unsafe {
5835        raw::rustSetRecordAIFlee(ai_flee)
5836    }
5837}
5838
5839///
5840///  Set the AI alarm value of the temporary record stored on the server for the  
5841///  currently specified record type.
5842///
5843///  `ai_alarm` The AI alarm value of the record.
5844///
5845///  Returns void
5846///
5847pub fn set_record_ai_alarm(ai_alarm: i16) {
5848    unsafe {
5849        raw::rustSetRecordAIAlarm(ai_alarm)
5850    }
5851}
5852
5853///
5854///  Set the AI services value of the temporary record stored on the server for the  
5855///  currently specified record type.
5856///
5857///  `ai_services` The AI services value of the record.
5858///
5859///  Returns void
5860///
5861pub fn set_record_ai_services(ai_services: i16) {
5862    unsafe {
5863        raw::rustSetRecordAIServices(ai_services)
5864    }
5865}
5866
5867///
5868///  Set the sound of the temporary record stored on the server for the currently  
5869///  specified record type.
5870///
5871///  `sound` The sound of the record.
5872///
5873///  Returns void
5874///
5875pub fn set_record_sound(sound: &str) {
5876    unsafe {
5877        raw::rustSetRecordSound(CString::new(sound).unwrap_or_default().as_ptr())
5878    }
5879}
5880
5881///
5882///  Set the opening sound of the temporary record stored on the server for the  
5883///  currently specified record type.
5884///
5885///  `sound` The opening sound of the record.
5886///
5887///  Returns void
5888///
5889pub fn set_record_open_sound(sound: &str) {
5890    unsafe {
5891        raw::rustSetRecordOpenSound(CString::new(sound).unwrap_or_default().as_ptr())
5892    }
5893}
5894
5895///
5896///  Set the closing sound of the temporary record stored on the server for the  
5897///  currently specified record type.
5898///
5899///  `sound` The closing sound of the record.
5900///
5901///  Returns void
5902///
5903pub fn set_record_close_sound(sound: &str) {
5904    unsafe {
5905        raw::rustSetRecordCloseSound(CString::new(sound).unwrap_or_default().as_ptr())
5906    }
5907}
5908
5909///
5910///  Set the script text of the temporary record stored on the server for the  
5911///  currently specified record type.
5912///
5913///  `sound` The script text of the record.
5914///
5915///  Returns void
5916///
5917pub fn set_record_script_text(script_text: &str) {
5918    unsafe {
5919        raw::rustSetRecordScriptText(CString::new(script_text).unwrap_or_default().as_ptr())
5920    }
5921}
5922
5923///
5924///  Set the id of the record at a certain index in the records stored on the server.
5925///
5926///  When resending a received RecordsDynamic packet, this allows you to set the server-generated  
5927///  id of a record without having to clear and recreate the packet.
5928///
5929///  `index` The index of the record.  
5930///  `id` The id of the record.
5931///
5932///  Returns void
5933///
5934pub fn set_record_id_by_index(index: u16, id: &str) {
5935    unsafe {
5936        raw::rustSetRecordIdByIndex(index, CString::new(id).unwrap_or_default().as_ptr())
5937    }
5938}
5939
5940///
5941///  Set the enchantment id of the record at a certain index in the records stored on  
5942///  the server.
5943///
5944///  When resending a received RecordsDynamic packet, this allows you to set the server-generated  
5945///  enchantment id of a record without having to clear and recreate the packet.
5946///
5947///  `index` The index of the record.  
5948///  `enchantment_id` The enchantment id of the record.
5949///
5950///  Returns void
5951///
5952pub fn set_record_enchantment_id_by_index(index: u16, enchantment_id: &str) {
5953    unsafe {
5954        raw::rustSetRecordEnchantmentIdByIndex(index, CString::new(enchantment_id).unwrap_or_default().as_ptr())
5955    }
5956}
5957
5958///
5959///  Set the ID of the temporary effect stored on the server.
5960///
5961///  `effect_id` The ID of the effect.
5962///
5963///  Returns void
5964///
5965pub fn set_record_effect_id(effect_id: u16) {
5966    unsafe {
5967        raw::rustSetRecordEffectId(effect_id)
5968    }
5969}
5970
5971///
5972///  Set the ID of the attribute modified by the temporary effect stored on  
5973///  the server.
5974///
5975///  `attribute_id` The ID of the attribute.
5976///
5977///  Returns void
5978///
5979pub fn set_record_effect_attribute(attribute_id: i16) {
5980    unsafe {
5981        raw::rustSetRecordEffectAttribute(attribute_id)
5982    }
5983}
5984
5985///
5986///  Set the ID of the skill modified by the temporary effect stored on the  
5987///  server.
5988///
5989///  `skill_id` The ID of the skill.
5990///
5991///  Returns void
5992///
5993pub fn set_record_effect_skill(skill_id: i16) {
5994    unsafe {
5995        raw::rustSetRecordEffectSkill(skill_id)
5996    }
5997}
5998
5999///
6000///  Set the range type of the temporary effect stored on the server (0 for  
6001///  self, 1 for touch, 2 for target).
6002///
6003///  `range_type` The range type of the effect.
6004///
6005///  Returns void
6006///
6007pub fn set_record_effect_range_type(range_type: u16) {
6008    unsafe {
6009        raw::rustSetRecordEffectRangeType(range_type)
6010    }
6011}
6012
6013///
6014///  Set the area of the temporary effect stored on the server.
6015///
6016///  `area` The area of the effect.
6017///
6018///  Returns void
6019///
6020pub fn set_record_effect_area(area: i16) {
6021    unsafe {
6022        raw::rustSetRecordEffectArea(area)
6023    }
6024}
6025
6026///
6027///  Set the duration of the temporary effect stored on the server.
6028///
6029///  `duration` The duration of the effect.
6030///
6031///  Returns void
6032///
6033pub fn set_record_effect_duration(duration: i16) {
6034    unsafe {
6035        raw::rustSetRecordEffectDuration(duration)
6036    }
6037}
6038
6039///
6040///  Set the maximum magnitude of the temporary effect stored on the server.
6041///
6042///  `magnitude_max` The maximum magnitude of the effect.
6043///
6044///  Returns void
6045///
6046pub fn set_record_effect_magnitude_max(magnitude_max: i16) {
6047    unsafe {
6048        raw::rustSetRecordEffectMagnitudeMax(magnitude_max)
6049    }
6050}
6051
6052///
6053///  Set the minimum magnitude of the temporary effect stored on the server.
6054///
6055///  `magnitude_min` The minimum magnitude of the effect.
6056///
6057///  Returns void
6058///
6059pub fn set_record_effect_magnitude_min(magnitude_min: i16) {
6060    unsafe {
6061        raw::rustSetRecordEffectMagnitudeMin(magnitude_min)
6062    }
6063}
6064
6065///
6066///  Set the type of the temporary body part stored on the server.
6067///
6068///  `part_type` The type of the body part.
6069///
6070///  Returns void
6071///
6072pub fn set_record_body_part_type(part_type: u16) {
6073    unsafe {
6074        raw::rustSetRecordBodyPartType(part_type)
6075    }
6076}
6077
6078///
6079///  Set the id of the male version of the temporary body part stored on the  
6080///  server.
6081///
6082///  `part_id` The id of the body part.
6083///
6084///  Returns void
6085///
6086pub fn set_record_body_part_id_for_male(part_id: &str) {
6087    unsafe {
6088        raw::rustSetRecordBodyPartIdForMale(CString::new(part_id).unwrap_or_default().as_ptr())
6089    }
6090}
6091
6092///
6093///  Set the id of the female version of the temporary body part stored on the  
6094///  server.
6095///
6096///  `part_id` The id of the body part.
6097///
6098///  Returns void
6099///
6100pub fn set_record_body_part_id_for_female(part_id: &str) {
6101    unsafe {
6102        raw::rustSetRecordBodyPartIdForFemale(CString::new(part_id).unwrap_or_default().as_ptr())
6103    }
6104}
6105
6106///
6107///  Set the id of the of the temporary inventory item stored on the server.
6108///
6109///  `part_id` The id of the inventory item.
6110///
6111///  Returns void
6112///
6113pub fn set_record_inventory_item_id(item_id: &str) {
6114    unsafe {
6115        raw::rustSetRecordInventoryItemId(CString::new(item_id).unwrap_or_default().as_ptr())
6116    }
6117}
6118
6119///
6120///  Set the count of the of the temporary inventory item stored on the server.
6121///
6122///  `count` The count of the inventory item.
6123///
6124///  Returns void
6125///
6126pub fn set_record_inventory_item_count(count: u16) {
6127    unsafe {
6128        raw::rustSetRecordInventoryItemCount(count)
6129    }
6130}
6131
6132///
6133///  Add a copy of the server's temporary record of the current specified  
6134///  type to the stored records.
6135///
6136///  In the process, the server's temporary record will automatically be cleared  
6137///  so a new one can be set up.
6138///
6139///
6140///  Returns void
6141///
6142pub fn add_record() {
6143    unsafe {
6144        raw::rustAddRecord()
6145    }
6146}
6147
6148///
6149///  Add a copy of the server's temporary effect to the temporary record  
6150///  of the current specified type.
6151///
6152///  In the process, the server's temporary effect will automatically be cleared  
6153///  so a new one can be set up.
6154///
6155///
6156///  Returns void
6157///
6158pub fn add_record_effect() {
6159    unsafe {
6160        raw::rustAddRecordEffect()
6161    }
6162}
6163
6164///
6165///  Add a copy of the server's temporary body part to the temporary record  
6166///  of the current specified type.
6167///
6168///  In the process, the server's temporary body part will automatically be cleared  
6169///  so a new one can be set up.
6170///
6171///
6172///  Returns void
6173///
6174pub fn add_record_body_part() {
6175    unsafe {
6176        raw::rustAddRecordBodyPart()
6177    }
6178}
6179
6180///
6181///  Add a copy of the server's temporary inventory item to the temporary record  
6182///  of the current specified type.
6183///
6184///  In the process, the server's temporary inventory item will automatically be cleared  
6185///  so a new one can be set up.
6186///
6187///  Note: Any items added this way will be ignored if the record already has a valid  
6188///        inventoryBaseId.
6189///
6190///
6191///  Returns void
6192///
6193pub fn add_record_inventory_item() {
6194    unsafe {
6195        raw::rustAddRecordInventoryItem()
6196    }
6197}
6198
6199///
6200///  Send a RecordDynamic packet with the current specified record type.
6201///
6202///  `pid` The player ID attached to the packet.  
6203///  `send_to_other_players` Whether this packet should be sent to players other than the  
6204///                            player attached to the packet (false by default).  
6205///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
6206///                            to the packet (false by default).
6207///
6208///  Returns void
6209///
6210pub fn send_record_dynamic(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
6211    unsafe {
6212        raw::rustSendRecordDynamic(pid, send_to_other_players, skip_attached_player)
6213    }
6214}
6215
6216///
6217///  Get the scale of a player.
6218///
6219///  `pid` The player ID.
6220///
6221///  Returns the scale.
6222///
6223pub fn get_scale(pid: u16) -> f64 {
6224    unsafe {
6225        raw::rustGetScale(pid)
6226    }
6227}
6228
6229///
6230///  Check whether a player is a werewolf.
6231///
6232///  This is based on the last PlayerShapeshift packet received or sent for that player.
6233///
6234///  `pid` The player ID.
6235///
6236///  Returns the werewolf state.
6237///
6238pub fn is_werewolf(pid: u16) -> bool {
6239    unsafe {
6240        raw::rustIsWerewolf(pid)
6241    }
6242}
6243
6244///
6245///  Get the refId of the creature the player is disguised as.
6246///
6247///  `pid` The player ID.
6248///
6249///  Returns the creature refId.
6250///
6251pub fn get_creature_ref_id(pid: u16) -> String {
6252    unsafe {
6253        CStr::from_ptr(raw::rustGetCreatureRefId(pid))
6254            .to_str()
6255            .unwrap_or_default()
6256            .to_string()
6257    }
6258}
6259
6260///
6261///  Check whether a player's name is replaced by that of the creature they are  
6262///         disguised as when other players hover over them.
6263///
6264///  This is based on the last PlayerShapeshift packet received or sent for that player.
6265///
6266///  `pid` The player ID.
6267///
6268///  Returns the creature name display state.
6269///
6270pub fn get_creature_name_display_state(pid: u16) -> bool {
6271    unsafe {
6272        raw::rustGetCreatureNameDisplayState(pid)
6273    }
6274}
6275
6276///
6277///  Set the scale of a player.
6278///
6279///  This changes the scale recorded for that player in the server memory, but  
6280///  does not by itself send a packet.
6281///
6282///  `pid` The player ID.  
6283///  `scale` The new scale.
6284///
6285///  Returns void
6286///
6287pub fn set_scale(pid: u16, scale: f64) {
6288    unsafe {
6289        raw::rustSetScale(pid, scale)
6290    }
6291}
6292
6293///
6294///  Set the werewolf state of a player.
6295///
6296///  This changes the werewolf state recorded for that player in the server memory, but  
6297///  does not by itself send a packet.
6298///
6299///  `pid` The player ID.  
6300///  `is_werewolf` The new werewolf state.
6301///
6302///  Returns void
6303///
6304pub fn set_werewolf_state(pid: u16, is_werewolf: bool) {
6305    unsafe {
6306        raw::rustSetWerewolfState(pid, is_werewolf)
6307    }
6308}
6309
6310///
6311///  Set the refId of the creature a player is disguised as.
6312///
6313///  This changes the creature refId recorded for that player in the server memory, but  
6314///  does not by itself send a packet.
6315///
6316///  `pid` The player ID.  
6317///  `ref_id` The creature refId.  
6318///  `displays_creature_name` Whether the player's name appears as that of the creature  
6319///                              when hovered over by others.
6320///
6321///  Returns void
6322///
6323pub fn set_creature_ref_id(pid: u16, ref_id: &str) {
6324    unsafe {
6325        raw::rustSetCreatureRefId(pid, CString::new(ref_id).unwrap_or_default().as_ptr())
6326    }
6327}
6328
6329///
6330///  Set whether a player's name is replaced by that of the creature they are  
6331///         disguised as when other players hover over them.
6332///
6333///  `pid` The player ID.  
6334///  `display_state` The creature name display state.
6335///
6336///  Returns void
6337///
6338pub fn set_creature_name_display_state(pid: u16, display_state: bool) {
6339    unsafe {
6340        raw::rustSetCreatureNameDisplayState(pid, display_state)
6341    }
6342}
6343
6344///
6345///  Send a PlayerShapeshift packet about a player.
6346///
6347///  This sends the packet to all players connected to the server. It is currently used  
6348///  only to communicate werewolf states.
6349///
6350///  `pid` The player ID.
6351///
6352///  Returns void
6353///
6354pub fn send_shapeshift(pid: u16) {
6355    unsafe {
6356        raw::rustSendShapeshift(pid)
6357    }
6358}
6359
6360///
6361///  Write a log message with its own timestamp.
6362///
6363///  It will have `[Script]:` prepended to it so as to mark it as a script-generated log message.
6364///
6365///  `level` The logging level used (0 for LOG_VERBOSE, 1 for LOG_INFO, 2 for LOG_WARN,  
6366///               3 for LOG_ERROR, 4 for LOG_FATAL).  
6367///  `message` The message logged.
6368///
6369///  Returns void
6370///
6371pub fn log_message(level: u16, message: &str) {
6372    unsafe {
6373        raw::rustLogMessage(level, CString::new(message).unwrap_or_default().as_ptr())
6374    }
6375}
6376
6377///
6378///  Write a log message without its own timestamp.
6379///
6380///  It will have `[Script]:` prepended to it so as to mark it as a script-generated log message.
6381///
6382///  `level` The logging level used (0 for LOG_VERBOSE, 1 for LOG_INFO, 2 for LOG_WARN,  
6383///               3 for LOG_ERROR, 4 for LOG_FATAL).  
6384///  `message` The message logged.
6385///
6386///  Returns void
6387///
6388pub fn log_append(level: u16, message: &str) {
6389    unsafe {
6390        raw::rustLogAppend(level, CString::new(message).unwrap_or_default().as_ptr())
6391    }
6392}
6393
6394///
6395///  Shut down the server.
6396///
6397///  `code` The shutdown code.
6398///
6399///  Returns void
6400///
6401pub fn stop_server(code: i16) {
6402    unsafe {
6403        raw::rustStopServer(code)
6404    }
6405}
6406
6407///
6408///  Kick a certain player from the server.
6409///
6410///  `pid` The player ID.
6411///
6412///  Returns void
6413///
6414pub fn kick(pid: u16) {
6415    unsafe {
6416        raw::rustKick(pid)
6417    }
6418}
6419
6420///
6421///  Ban a certain IP address from the server.
6422///
6423///  `ip_address` The IP address.
6424///
6425///  Returns void
6426///
6427pub fn ban_address(ip_address: &str) {
6428    unsafe {
6429        raw::rustBanAddress(CString::new(ip_address).unwrap_or_default().as_ptr())
6430    }
6431}
6432
6433///
6434///  Unban a certain IP address from the server.
6435///
6436///  `ip_address` The IP address.
6437///
6438///  Returns void
6439///
6440pub fn unban_address(ip_address: &str) {
6441    unsafe {
6442        raw::rustUnbanAddress(CString::new(ip_address).unwrap_or_default().as_ptr())
6443    }
6444}
6445
6446///
6447///  Check whether a certain file path exists.
6448///
6449///  This will be a case sensitive check on case sensitive filesystems.
6450///
6451///  Whenever you want to enforce case insensitivity, use GetCaseInsensitiveFilename() instead.
6452///
6453///
6454///  Returns whether the file exists or not.
6455///
6456pub fn does_file_path_exist(file_path: &str) -> bool {
6457    unsafe {
6458        raw::rustDoesFilePathExist(CString::new(file_path).unwrap_or_default().as_ptr())
6459    }
6460}
6461
6462///
6463///  Get the first filename in a folder that has a case insensitive match with the filename  
6464///  argument.
6465///
6466///  This is used to retain case insensitivity when opening data files on Linux.
6467///
6468///
6469///  Returns the filename that matches.
6470///
6471pub fn get_case_insensitive_filename(folder_path: &str, filename: &str) -> String {
6472    unsafe {
6473        CStr::from_ptr(raw::rustGetCaseInsensitiveFilename(CString::new(folder_path).unwrap_or_default().as_ptr(), CString::new(filename).unwrap_or_default().as_ptr()))
6474            .to_str()
6475            .unwrap_or_default()
6476            .to_string()
6477    }
6478}
6479
6480///
6481///  Get the path of the server's data folder.
6482///
6483///
6484///  Returns the data path.
6485///
6486pub fn get_data_path() -> String {
6487    unsafe {
6488        CStr::from_ptr(raw::rustGetDataPath())
6489            .to_str()
6490            .unwrap_or_default()
6491            .to_string()
6492    }
6493}
6494
6495///
6496///  Get the milliseconds elapsed since the server was started.
6497///
6498///
6499///  Returns the time since the server's startup in milliseconds.
6500///
6501pub fn get_milliseconds_since_server_start() -> u16 {
6502    unsafe {
6503        raw::rustGetMillisecondsSinceServerStart()
6504    }
6505}
6506
6507///
6508///  Get the type of the operating system used by the server.
6509///
6510///  Note: Currently, the type can be "Windows", "Linux", "OS X" or "Unknown OS".
6511///
6512///
6513///  Returns the type of the operating system.
6514///
6515pub fn get_operating_system_type() -> String {
6516    unsafe {
6517        CStr::from_ptr(raw::rustGetOperatingSystemType())
6518            .to_str()
6519            .unwrap_or_default()
6520            .to_string()
6521    }
6522}
6523
6524///
6525///  Get the architecture type used by the server.
6526///
6527///  Note: Currently, the type can be "64-bit", "32-bit", "ARMv#" or "Unknown architecture".
6528///
6529///
6530///  Returns the architecture type.
6531///
6532pub fn get_architecture_type() -> String {
6533    unsafe {
6534        CStr::from_ptr(raw::rustGetArchitectureType())
6535            .to_str()
6536            .unwrap_or_default()
6537            .to_string()
6538    }
6539}
6540
6541///
6542///  Get the TES3MP version of the server.
6543///
6544///
6545///  Returns the server version.
6546///
6547pub fn get_server_version() -> String {
6548    unsafe {
6549        CStr::from_ptr(raw::rustGetServerVersion())
6550            .to_str()
6551            .unwrap_or_default()
6552            .to_string()
6553    }
6554}
6555
6556///
6557///  Get the protocol version of the server.
6558///
6559///
6560///  Returns the protocol version.
6561///
6562pub fn get_protocol_version() -> String {
6563    unsafe {
6564        CStr::from_ptr(raw::rustGetProtocolVersion())
6565            .to_str()
6566            .unwrap_or_default()
6567            .to_string()
6568    }
6569}
6570
6571///
6572///  Get the average ping of a certain player.
6573///
6574///  `pid` The player ID.
6575///
6576///  Returns the average ping.
6577///
6578pub fn get_avg_ping(pid: u16) -> i16 {
6579    unsafe {
6580        raw::rustGetAvgPing(pid)
6581    }
6582}
6583
6584///
6585///  Get the IP address of a certain player.
6586///
6587///  `pid` The player ID.
6588///
6589///  Returns the IP address.
6590///
6591pub fn get_ip(pid: u16) -> String {
6592    unsafe {
6593        CStr::from_ptr(raw::rustGetIP(pid))
6594            .to_str()
6595            .unwrap_or_default()
6596            .to_string()
6597    }
6598}
6599
6600///
6601///  Get the maximum number of players.
6602///
6603///
6604///  Returns max players
6605///
6606pub fn get_max_players() -> u16 {
6607    unsafe {
6608        raw::rustGetMaxPlayers()
6609    }
6610}
6611
6612///
6613///  Get the port used by the server.
6614///
6615///
6616///  Returns the port.
6617///
6618pub fn get_port() -> u16 {
6619    unsafe {
6620        raw::rustGetPort()
6621    }
6622}
6623
6624///
6625///  Checking if the server requires a password to connect.
6626///
6627///  @return
6628///
6629pub fn has_password() -> bool {
6630    unsafe {
6631        raw::rustHasPassword()
6632    }
6633}
6634
6635///
6636///  Get the data file enforcement state of the server.
6637///
6638///  If true, clients are required to use the same data files as set for the server.
6639///
6640///
6641///  Returns the enforcement state.
6642///
6643pub fn get_data_file_enforcement_state() -> bool {
6644    unsafe {
6645        raw::rustGetDataFileEnforcementState()
6646    }
6647}
6648
6649///
6650///  Get the script error ignoring state of the server.
6651///
6652///  If true, script errors will not crash the server.
6653///
6654///
6655///  Returns the script error ignoring state.
6656///
6657pub fn get_script_error_ignoring_state() -> bool {
6658    unsafe {
6659        raw::rustGetScriptErrorIgnoringState()
6660    }
6661}
6662
6663///
6664///  Set the game mode of the server, as displayed in the server browser.
6665///
6666///  `name` The new game mode.
6667///
6668///  Returns void
6669///
6670pub fn set_game_mode(game_mode: &str) {
6671    unsafe {
6672        raw::rustSetGameMode(CString::new(game_mode).unwrap_or_default().as_ptr())
6673    }
6674}
6675
6676///
6677///  Set the name of the server, as displayed in the server browser.
6678///
6679///  `name` The new name.
6680///
6681///  Returns void
6682///
6683pub fn set_hostname(name: &str) {
6684    unsafe {
6685        raw::rustSetHostname(CString::new(name).unwrap_or_default().as_ptr())
6686    }
6687}
6688
6689///
6690///  Set the password required to join the server.
6691///
6692///  `password` The password.
6693///
6694///  Returns void
6695///
6696pub fn set_server_password(password: &str) {
6697    unsafe {
6698        raw::rustSetServerPassword(CString::new(password).unwrap_or_default().as_ptr())
6699    }
6700}
6701
6702///
6703///  Set the data file enforcement state of the server.
6704///
6705///  If true, clients are required to use the same data files as set for the server.
6706///
6707///  `state` The new enforcement state.
6708///
6709///  Returns void
6710///
6711pub fn set_data_file_enforcement_state(state: bool) {
6712    unsafe {
6713        raw::rustSetDataFileEnforcementState(state)
6714    }
6715}
6716
6717///
6718///  Set whether script errors should be ignored or not.
6719///
6720///  If true, script errors will not crash the server, but could have any number  
6721///  of unforeseen consequences, which is why this is a highly experimental  
6722///  setting.
6723///
6724///  `state` The new script error ignoring state.
6725///
6726///  Returns void
6727///
6728pub fn set_script_error_ignoring_state(state: bool) {
6729    unsafe {
6730        raw::rustSetScriptErrorIgnoringState(state)
6731    }
6732}
6733
6734///
6735///  Set a rule string for the server details displayed in the server browser.
6736///
6737///  `key` The name of the rule.  
6738///  `value` The string value of the rule.
6739///
6740///  Returns void
6741///
6742pub fn set_rule_string(key: &str, value: &str) {
6743    unsafe {
6744        raw::rustSetRuleString(CString::new(key).unwrap_or_default().as_ptr(), CString::new(value).unwrap_or_default().as_ptr())
6745    }
6746}
6747
6748///
6749///  Set a rule value for the server details displayed in the server browser.
6750///
6751///  `key` The name of the rule.  
6752///  `value` The numerical value of the rule.
6753///
6754///  Returns void
6755///
6756pub fn set_rule_value(key: &str, value: f64) {
6757    unsafe {
6758        raw::rustSetRuleValue(CString::new(key).unwrap_or_default().as_ptr(), value)
6759    }
6760}
6761
6762///
6763///  Add a data file and a corresponding CRC32 checksum to the data file loadout  
6764///         that connecting clients need to match.
6765///
6766///  It can be used multiple times to set multiple checksums for the same data file.
6767///
6768///  Note: If an empty string is provided for the checksum, a checksum will not be  
6769///        required for that data file.
6770///
6771///  `data_filename` The filename of the data file.  
6772///  `checksum_string` A string with the CRC32 checksum required.
6773///
6774pub fn add_data_file_requirement(data_filename: &str, checksum_string: &str) {
6775    unsafe {
6776        raw::rustAddDataFileRequirement(CString::new(data_filename).unwrap_or_default().as_ptr(), CString::new(checksum_string).unwrap_or_default().as_ptr())
6777    }
6778}
6779
6780pub fn does_file_exist(file_path: &str) -> bool {
6781    unsafe {
6782        raw::rustDoesFileExist(CString::new(file_path).unwrap_or_default().as_ptr())
6783    }
6784}
6785
6786pub fn get_mod_dir() -> String {
6787    unsafe {
6788        CStr::from_ptr(raw::rustGetModDir())
6789            .to_str()
6790            .unwrap_or_default()
6791            .to_string()
6792    }
6793}
6794
6795pub fn get_plugin_enforcement_state() -> bool {
6796    unsafe {
6797        raw::rustGetPluginEnforcementState()
6798    }
6799}
6800
6801pub fn set_plugin_enforcement_state(state: bool) {
6802    unsafe {
6803        raw::rustSetPluginEnforcementState(state)
6804    }
6805}
6806
6807pub fn add_plugin_hash(plugin_name: &str, checksum_string: &str) {
6808    unsafe {
6809        raw::rustAddPluginHash(CString::new(plugin_name).unwrap_or_default().as_ptr(), CString::new(checksum_string).unwrap_or_default().as_ptr())
6810    }
6811}
6812
6813///
6814///  Set the difficulty for a player.
6815///
6816///  This changes the difficulty for that player in the server memory, but does not by itself  
6817///  send a packet.
6818///
6819///  `pid` The player ID.  
6820///  `difficulty` The difficulty.
6821///
6822///  Returns void
6823///
6824pub fn set_difficulty(pid: u16, difficulty: i16) {
6825    unsafe {
6826        raw::rustSetDifficulty(pid, difficulty)
6827    }
6828}
6829
6830///
6831///  Set the client log level enforced for a player.
6832///
6833///  This changes the enforced log level for that player in the server memory, but does not by itself  
6834///  send a packet.
6835///
6836///  Enforcing a certain log level is necessary to prevent players from learning information from  
6837///  their console window that they are otherwise unable to obtain, such as the locations of  
6838///  other players.
6839///
6840///  If you do not wish to enforce a log level, simply set enforcedLogLevel to -1
6841///
6842///  `pid` The player ID.  
6843///  `enforced_log_level` The enforced log level.
6844///
6845///  Returns void
6846///
6847pub fn set_enforced_log_level(pid: u16, enforced_log_level: i16) {
6848    unsafe {
6849        raw::rustSetEnforcedLogLevel(pid, enforced_log_level)
6850    }
6851}
6852
6853///
6854///  Set the physics framerate for a player.
6855///
6856///  This changes the physics framerate for that player in the server memory, but does not by itself  
6857///  send a packet.
6858///
6859///  `pid` The player ID.  
6860///  `physics_framerate` The physics framerate.
6861///
6862///  Returns void
6863///
6864pub fn set_physics_framerate(pid: u16, physics_framerate: f64) {
6865    unsafe {
6866        raw::rustSetPhysicsFramerate(pid, physics_framerate)
6867    }
6868}
6869
6870///
6871///  Set whether the console is allowed for a player.
6872///
6873///  This changes the console permission for that player in the server memory, but does not  
6874///  by itself send a packet.
6875///
6876///  `pid` The player ID.  
6877///  `state` The console permission state.
6878///
6879///  Returns void
6880///
6881pub fn set_console_allowed(pid: u16, state: bool) {
6882    unsafe {
6883        raw::rustSetConsoleAllowed(pid, state)
6884    }
6885}
6886
6887///
6888///  Set whether resting in beds is allowed for a player.
6889///
6890///  This changes the resting permission for that player in the server memory, but does not  
6891///  by itself send a packet.
6892///
6893///  `pid` The player ID.  
6894///  `state` The resting permission state.
6895///
6896///  Returns void
6897///
6898pub fn set_bed_rest_allowed(pid: u16, state: bool) {
6899    unsafe {
6900        raw::rustSetBedRestAllowed(pid, state)
6901    }
6902}
6903
6904///
6905///  Set whether resting in the wilderness is allowed for a player.
6906///
6907///  This changes the resting permission for that player in the server memory, but does not  
6908///  by itself send a packet.
6909///
6910///  `pid` The player ID.  
6911///  `state` The resting permission state.
6912///
6913///  Returns void
6914///
6915pub fn set_wilderness_rest_allowed(pid: u16, state: bool) {
6916    unsafe {
6917        raw::rustSetWildernessRestAllowed(pid, state)
6918    }
6919}
6920
6921///
6922///  Set whether waiting is allowed for a player.
6923///
6924///  This changes the waiting permission for that player in the server memory, but does not  
6925///  by itself send a packet.
6926///
6927///  `pid` The player ID.  
6928///  `state` The waiting permission state.
6929///
6930///  Returns void
6931///
6932pub fn set_wait_allowed(pid: u16, state: bool) {
6933    unsafe {
6934        raw::rustSetWaitAllowed(pid, state)
6935    }
6936}
6937
6938///
6939///  Send a PlayerSettings packet to the player affected by it.
6940///
6941///  `pid` The player ID to send it to.
6942///
6943///  Returns void
6944///
6945pub fn send_settings(pid: u16) {
6946    unsafe {
6947        raw::rustSendSettings(pid)
6948    }
6949}
6950
6951///
6952///  Clear the last recorded spellbook changes for a player.
6953///
6954///  This is used to initialize the sending of new PlayerSpellbook packets.
6955///
6956///  `pid` The player ID whose spellbook changes should be used.
6957///
6958///  Returns void
6959///
6960pub fn clear_spellbook_changes(pid: u16) {
6961    unsafe {
6962        raw::rustClearSpellbookChanges(pid)
6963    }
6964}
6965
6966///
6967///  Get the number of indexes in a player's latest spellbook changes.
6968///
6969///  `pid` The player ID whose spellbook changes should be used.
6970///
6971///  Returns the number of indexes.
6972///
6973pub fn get_spellbook_changes_size(pid: u16) -> u16 {
6974    unsafe {
6975        raw::rustGetSpellbookChangesSize(pid)
6976    }
6977}
6978
6979///
6980///  Get the action type used in a player's latest spellbook changes.
6981///
6982///  `pid` The player ID whose spellbook changes should be used.
6983///
6984///  Returns the action type (0 for SET, 1 for ADD, 2 for REMOVE).
6985///
6986pub fn get_spellbook_changes_action(pid: u16) -> u16 {
6987    unsafe {
6988        raw::rustGetSpellbookChangesAction(pid)
6989    }
6990}
6991
6992///
6993///  Set the action type in a player's spellbook changes.
6994///
6995///  `pid` The player ID whose spellbook changes should be used.  
6996///  `action` The action (0 for SET, 1 for ADD, 2 for REMOVE).
6997///
6998///  Returns void
6999///
7000pub fn set_spellbook_changes_action(pid: u16, action: u8) {
7001    unsafe {
7002        raw::rustSetSpellbookChangesAction(pid, action)
7003    }
7004}
7005
7006///
7007///  Add a new spell to the spellbook changes for a player.
7008///
7009///  `pid` The player ID whose spellbook changes should be used.  
7010///  `spell_id` The spellId of the spell.
7011///
7012///  Returns void
7013///
7014pub fn add_spell(pid: u16, spell_id: &str) {
7015    unsafe {
7016        raw::rustAddSpell(pid, CString::new(spell_id).unwrap_or_default().as_ptr())
7017    }
7018}
7019
7020///
7021///  Get the spellId at a certain index in a player's latest spellbook changes.
7022///
7023///  `pid` The player ID whose spellbook changes should be used.  
7024///  `index` The index of the spell.
7025///
7026///  Returns the spellId.
7027///
7028pub fn get_spell_id(pid: u16, index: u16) -> String {
7029    unsafe {
7030        CStr::from_ptr(raw::rustGetSpellId(pid, index))
7031            .to_str()
7032            .unwrap_or_default()
7033            .to_string()
7034    }
7035}
7036
7037///
7038///  Send a PlayerSpellbook packet with a player's recorded spellbook changes.
7039///
7040///  `pid` The player ID whose spellbook changes should be used.  
7041///  `send_to_other_players` Whether this packet should be sent to players other than the  
7042///                            player attached to the packet (false by default).  
7043///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
7044///                            to the packet (false by default).
7045///
7046///  Returns void
7047///
7048pub fn send_spellbook_changes(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
7049    unsafe {
7050        raw::rustSendSpellbookChanges(pid, send_to_other_players, skip_attached_player)
7051    }
7052}
7053
7054pub fn initialize_spellbook_changes(pid: u16) {
7055    unsafe {
7056        raw::rustInitializeSpellbookChanges(pid)
7057    }
7058}
7059
7060///
7061///  Get the number of attributes.
7062///
7063///  The number is 8 before any dehardcoding is done in OpenMW.
7064///
7065///
7066///  Returns the number of attributes.
7067///
7068pub fn get_attribute_count() -> i16 {
7069    unsafe {
7070        raw::rustGetAttributeCount()
7071    }
7072}
7073
7074///
7075///  Get the number of skills.
7076///
7077///  The number is 27 before any dehardcoding is done in OpenMW.
7078///
7079///
7080///  Returns the number of skills.
7081///
7082pub fn get_skill_count() -> i16 {
7083    unsafe {
7084        raw::rustGetSkillCount()
7085    }
7086}
7087
7088///
7089///  Get the numerical ID of an attribute with a certain name.
7090///
7091///  If an invalid name is used, the ID returned is -1
7092///
7093///  `name` The name of the attribute.
7094///
7095///  Returns the ID of the attribute.
7096///
7097pub fn get_attribute_id(name: &str) -> i16 {
7098    unsafe {
7099        raw::rustGetAttributeId(CString::new(name).unwrap_or_default().as_ptr())
7100    }
7101}
7102
7103///
7104///  Get the numerical ID of a skill with a certain name.
7105///
7106///  If an invalid name is used, the ID returned is -1
7107///
7108///  `name` The name of the skill.
7109///
7110///  Returns the ID of the skill.
7111///
7112pub fn get_skill_id(name: &str) -> i16 {
7113    unsafe {
7114        raw::rustGetSkillId(CString::new(name).unwrap_or_default().as_ptr())
7115    }
7116}
7117
7118///
7119///  Get the name of the attribute with a certain numerical ID.
7120///
7121///  If an invalid ID is used, "invalid" is returned.
7122///
7123///  `attribute_id` The ID of the attribute.
7124///
7125///  Returns the name of the attribute.
7126///
7127pub fn get_attribute_name(attribute_id: u16) -> String {
7128    unsafe {
7129        CStr::from_ptr(raw::rustGetAttributeName(attribute_id))
7130            .to_str()
7131            .unwrap_or_default()
7132            .to_string()
7133    }
7134}
7135
7136///
7137///  Get the name of the skill with a certain numerical ID.
7138///
7139///  If an invalid ID is used, "invalid" is returned.
7140///
7141///  `skill_id` The ID of the skill.
7142///
7143///  Returns the name of the skill.
7144///
7145pub fn get_skill_name(skill_id: u16) -> String {
7146    unsafe {
7147        CStr::from_ptr(raw::rustGetSkillName(skill_id))
7148            .to_str()
7149            .unwrap_or_default()
7150            .to_string()
7151    }
7152}
7153
7154///
7155///  Get the name of a player.
7156///
7157///  `pid` The player ID.
7158///
7159///  Returns the name of the player.
7160///
7161pub fn get_name(pid: u16) -> String {
7162    unsafe {
7163        CStr::from_ptr(raw::rustGetName(pid))
7164            .to_str()
7165            .unwrap_or_default()
7166            .to_string()
7167    }
7168}
7169
7170///
7171///  Get the race of a player.
7172///
7173///  `pid` The player ID.
7174///
7175///  Returns the race of the player.
7176///
7177pub fn get_race(pid: u16) -> String {
7178    unsafe {
7179        CStr::from_ptr(raw::rustGetRace(pid))
7180            .to_str()
7181            .unwrap_or_default()
7182            .to_string()
7183    }
7184}
7185
7186///
7187///  Get the head mesh used by a player.
7188///
7189///  `pid` The player ID.
7190///
7191///  Returns the head mesh of the player.
7192///
7193pub fn get_head(pid: u16) -> String {
7194    unsafe {
7195        CStr::from_ptr(raw::rustGetHead(pid))
7196            .to_str()
7197            .unwrap_or_default()
7198            .to_string()
7199    }
7200}
7201
7202///
7203///  Get the hairstyle mesh used by a player.
7204///
7205///  `pid` The player ID.
7206///
7207///  Returns the hairstyle mesh of the player.
7208///
7209pub fn get_hair(pid: u16) -> String {
7210    unsafe {
7211        CStr::from_ptr(raw::rustGetHair(pid))
7212            .to_str()
7213            .unwrap_or_default()
7214            .to_string()
7215    }
7216}
7217
7218///
7219///  Check whether a player is male or not.
7220///
7221///  `pid` The player ID.
7222///
7223///  Returns whether the player is male.
7224///
7225pub fn get_is_male(pid: u16) -> i16 {
7226    unsafe {
7227        raw::rustGetIsMale(pid)
7228    }
7229}
7230
7231///
7232///  Get the birthsign of a player.
7233///
7234///  `pid` The player ID.
7235///
7236///  Returns the birthsign of the player.
7237///
7238pub fn get_birthsign(pid: u16) -> String {
7239    unsafe {
7240        CStr::from_ptr(raw::rustGetBirthsign(pid))
7241            .to_str()
7242            .unwrap_or_default()
7243            .to_string()
7244    }
7245}
7246
7247///
7248///  Get the character level of a player.
7249///
7250///  `pid` The player ID.
7251///
7252///  Returns the level of the player.
7253///
7254pub fn get_level(pid: u16) -> i16 {
7255    unsafe {
7256        raw::rustGetLevel(pid)
7257    }
7258}
7259
7260///
7261///  Get the player's progress to their next character level.
7262///
7263///  `pid` The player ID.
7264///
7265///  Returns the level progress.
7266///
7267pub fn get_level_progress(pid: u16) -> i16 {
7268    unsafe {
7269        raw::rustGetLevelProgress(pid)
7270    }
7271}
7272
7273///
7274///  Get the base health of the player.
7275///
7276///  `pid` The player ID.
7277///
7278///  Returns the base health.
7279///
7280pub fn get_health_base(pid: u16) -> f64 {
7281    unsafe {
7282        raw::rustGetHealthBase(pid)
7283    }
7284}
7285
7286///
7287///  Get the current health of the player.
7288///
7289///  `pid` The player ID.
7290///
7291///  Returns the current health.
7292///
7293pub fn get_health_current(pid: u16) -> f64 {
7294    unsafe {
7295        raw::rustGetHealthCurrent(pid)
7296    }
7297}
7298
7299///
7300///  Get the base magicka of the player.
7301///
7302///  `pid` The player ID.
7303///
7304///  Returns the base magicka.
7305///
7306pub fn get_magicka_base(pid: u16) -> f64 {
7307    unsafe {
7308        raw::rustGetMagickaBase(pid)
7309    }
7310}
7311
7312///
7313///  Get the current magicka of the player.
7314///
7315///  `pid` The player ID.
7316///
7317///  Returns the current magicka.
7318///
7319pub fn get_magicka_current(pid: u16) -> f64 {
7320    unsafe {
7321        raw::rustGetMagickaCurrent(pid)
7322    }
7323}
7324
7325///
7326///  Get the base fatigue of the player.
7327///
7328///  `pid` The player ID.
7329///
7330///  Returns the base fatigue.
7331///
7332pub fn get_fatigue_base(pid: u16) -> f64 {
7333    unsafe {
7334        raw::rustGetFatigueBase(pid)
7335    }
7336}
7337
7338///
7339///  Get the current fatigue of the player.
7340///
7341///  `pid` The player ID.
7342///
7343///  Returns the current fatigue.
7344///
7345pub fn get_fatigue_current(pid: u16) -> f64 {
7346    unsafe {
7347        raw::rustGetFatigueCurrent(pid)
7348    }
7349}
7350
7351///
7352///  Get the base value of a player's attribute.
7353///
7354///  `pid` The player ID.  
7355///  `attribute_id` The attribute ID.
7356///
7357///  Returns the base value of the attribute.
7358///
7359pub fn get_attribute_base(pid: u16, attribute_id: u16) -> i16 {
7360    unsafe {
7361        raw::rustGetAttributeBase(pid, attribute_id)
7362    }
7363}
7364
7365///
7366///  Get the modifier value of a player's attribute.
7367///
7368///  `pid` The player ID.  
7369///  `attribute_id` The attribute ID.
7370///
7371///  Returns the modifier value of the attribute.
7372///
7373pub fn get_attribute_modifier(pid: u16, attribute_id: u16) -> i16 {
7374    unsafe {
7375        raw::rustGetAttributeModifier(pid, attribute_id)
7376    }
7377}
7378
7379///
7380///  Get the amount of damage (as caused through the Damage Attribute effect)  
7381///         to a player's attribute.
7382///
7383///  `pid` The player ID.  
7384///  `attribute_id` The attribute ID.
7385///
7386///  Returns the amount of damage to the attribute.
7387///
7388pub fn get_attribute_damage(pid: u16, attribute_id: u16) -> f64 {
7389    unsafe {
7390        raw::rustGetAttributeDamage(pid, attribute_id)
7391    }
7392}
7393
7394///
7395///  Get the base value of a player's skill.
7396///
7397///  `pid` The player ID.  
7398///  `skill_id` The skill ID.
7399///
7400///  Returns the base value of the skill.
7401///
7402pub fn get_skill_base(pid: u16, skill_id: u16) -> i16 {
7403    unsafe {
7404        raw::rustGetSkillBase(pid, skill_id)
7405    }
7406}
7407
7408///
7409///  Get the modifier value of a player's skill.
7410///
7411///  `pid` The player ID.  
7412///  `skill_id` The skill ID.
7413///
7414///  Returns the modifier value of the skill.
7415///
7416pub fn get_skill_modifier(pid: u16, skill_id: u16) -> i16 {
7417    unsafe {
7418        raw::rustGetSkillModifier(pid, skill_id)
7419    }
7420}
7421
7422///
7423///  Get the amount of damage (as caused through the Damage Skill effect)  
7424///         to a player's skill.
7425///
7426///  `pid` The player ID.  
7427///  `skill_id` The skill ID.
7428///
7429///  Returns the amount of damage to the skill.
7430///
7431pub fn get_skill_damage(pid: u16, skill_id: u16) -> f64 {
7432    unsafe {
7433        raw::rustGetSkillDamage(pid, skill_id)
7434    }
7435}
7436
7437///
7438///  Get the progress the player has made towards increasing a certain skill by 1.
7439///
7440///  `pid` The player ID.  
7441///  `skill_id` The skill ID.
7442///
7443///  Returns the skill progress.
7444///
7445pub fn get_skill_progress(pid: u16, skill_id: u16) -> f64 {
7446    unsafe {
7447        raw::rustGetSkillProgress(pid, skill_id)
7448    }
7449}
7450
7451///
7452///  Get the bonus applied to a certain attribute at the next level up as a result  
7453///         of associated skill increases.
7454///
7455///  Although confusing, the term "skill increase" for this is taken from OpenMW itself.
7456///
7457///  `pid` The player ID.  
7458///  `skill_id` The attribute ID.
7459///
7460///  Returns the increase in the attribute caused by skills.
7461///
7462pub fn get_skill_increase(pid: u16, attribute_id: u16) -> i16 {
7463    unsafe {
7464        raw::rustGetSkillIncrease(pid, attribute_id)
7465    }
7466}
7467
7468///
7469///  Get the bounty of the player.
7470///
7471///  `pid` The player ID.
7472///
7473///  Returns the bounty.
7474///
7475pub fn get_bounty(pid: u16) -> i16 {
7476    unsafe {
7477        raw::rustGetBounty(pid)
7478    }
7479}
7480
7481///
7482///  Set the name of a player.
7483///
7484///  `pid` The player ID.  
7485///  `name` The new name of the player.
7486///
7487///  Returns void
7488///
7489pub fn set_name(pid: u16, name: &str) {
7490    unsafe {
7491        raw::rustSetName(pid, CString::new(name).unwrap_or_default().as_ptr())
7492    }
7493}
7494
7495///
7496///  Set the race of a player.
7497///
7498///  `pid` The player ID.  
7499///  `race` The new race of the player.
7500///
7501///  Returns void
7502///
7503pub fn set_race(pid: u16, race: &str) {
7504    unsafe {
7505        raw::rustSetRace(pid, CString::new(race).unwrap_or_default().as_ptr())
7506    }
7507}
7508
7509///
7510///  Set the head mesh used by a player.
7511///
7512///  `pid` The player ID.  
7513///  `head` The new head mesh of the player.
7514///
7515///  Returns void
7516///
7517pub fn set_head(pid: u16, head: &str) {
7518    unsafe {
7519        raw::rustSetHead(pid, CString::new(head).unwrap_or_default().as_ptr())
7520    }
7521}
7522
7523///
7524///  Set the hairstyle mesh used by a player.
7525///
7526///  `pid` The player ID.  
7527///  `hairstyle` The new hairstyle mesh of the player.
7528///
7529///  Returns void
7530///
7531pub fn set_hair(pid: u16, hairstyle: &str) {
7532    unsafe {
7533        raw::rustSetHair(pid, CString::new(hairstyle).unwrap_or_default().as_ptr())
7534    }
7535}
7536
7537///
7538///  Set whether a player is male or not.
7539///
7540///  `pid` The player ID.  
7541///  `state` Whether the player is male.
7542///
7543///  Returns void
7544///
7545pub fn set_is_male(pid: u16, state: i16) {
7546    unsafe {
7547        raw::rustSetIsMale(pid, state)
7548    }
7549}
7550
7551///
7552///  Set the birthsign of a player.
7553///
7554///  `pid` The player ID.  
7555///  `name` The new birthsign of the player.
7556///
7557///  Returns void
7558///
7559pub fn set_birthsign(pid: u16, name: &str) {
7560    unsafe {
7561        raw::rustSetBirthsign(pid, CString::new(name).unwrap_or_default().as_ptr())
7562    }
7563}
7564
7565///
7566///  Set whether the player's stats should be reset based on their  
7567///         current race as the result of a PlayerBaseInfo packet.
7568///
7569///  This changes the resetState for that player in the server memory, but does not by itself  
7570///  send a packet.
7571///
7572///  `pid` The player ID.  
7573///  `reset_stats` The stat reset state.
7574///
7575///  Returns void
7576///
7577pub fn set_reset_stats(pid: u16, reset_stats: bool) {
7578    unsafe {
7579        raw::rustSetResetStats(pid, reset_stats)
7580    }
7581}
7582
7583///
7584///  Set the character level of a player.
7585///
7586///  `pid` The player ID.  
7587///  `value` The new level of the player.
7588///
7589///  Returns void
7590///
7591pub fn set_level(pid: u16, value: i16) {
7592    unsafe {
7593        raw::rustSetLevel(pid, value)
7594    }
7595}
7596
7597///
7598///  Set the player's progress to their next character level.
7599///
7600///  `pid` The player ID.  
7601///  `value` The new level progress of the player.
7602///
7603///  Returns void
7604///
7605pub fn set_level_progress(pid: u16, value: i16) {
7606    unsafe {
7607        raw::rustSetLevelProgress(pid, value)
7608    }
7609}
7610
7611///
7612///  Set the base health of a player.
7613///
7614///  `pid` The player ID.  
7615///  `name` The new base health of the player.
7616///
7617///  Returns void
7618///
7619pub fn set_health_base(pid: u16, value: f64) {
7620    unsafe {
7621        raw::rustSetHealthBase(pid, value)
7622    }
7623}
7624
7625///
7626///  Set the current health of a player.
7627///
7628///  `pid` The player ID.  
7629///  `name` The new current health of the player.
7630///
7631///  Returns void
7632///
7633pub fn set_health_current(pid: u16, value: f64) {
7634    unsafe {
7635        raw::rustSetHealthCurrent(pid, value)
7636    }
7637}
7638
7639///
7640///  Set the base magicka of a player.
7641///
7642///  `pid` The player ID.  
7643///  `name` The new base magicka of the player.
7644///
7645///  Returns void
7646///
7647pub fn set_magicka_base(pid: u16, value: f64) {
7648    unsafe {
7649        raw::rustSetMagickaBase(pid, value)
7650    }
7651}
7652
7653///
7654///  Set the current magicka of a player.
7655///
7656///  `pid` The player ID.  
7657///  `name` The new current magicka of the player.
7658///
7659///  Returns void
7660///
7661pub fn set_magicka_current(pid: u16, value: f64) {
7662    unsafe {
7663        raw::rustSetMagickaCurrent(pid, value)
7664    }
7665}
7666
7667///
7668///  Set the base fatigue of a player.
7669///
7670///  `pid` The player ID.  
7671///  `name` The new base fatigue of the player.
7672///
7673///  Returns void
7674///
7675pub fn set_fatigue_base(pid: u16, value: f64) {
7676    unsafe {
7677        raw::rustSetFatigueBase(pid, value)
7678    }
7679}
7680
7681///
7682///  Set the current fatigue of a player.
7683///
7684///  `pid` The player ID.  
7685///  `name` The new current fatigue of the player.
7686///
7687///  Returns void
7688///
7689pub fn set_fatigue_current(pid: u16, value: f64) {
7690    unsafe {
7691        raw::rustSetFatigueCurrent(pid, value)
7692    }
7693}
7694
7695///
7696///  Set the base value of a player's attribute.
7697///
7698///  `pid` The player ID.  
7699///  `attribute_id` The attribute ID.  
7700///  `value` The new base value of the player's attribute.
7701///
7702///  Returns void
7703///
7704pub fn set_attribute_base(pid: u16, attribute_id: u16, value: i16) {
7705    unsafe {
7706        raw::rustSetAttributeBase(pid, attribute_id, value)
7707    }
7708}
7709
7710///
7711///  Clear the modifier value of a player's attribute.
7712///
7713///  There's no way to set a modifier to a specific value because it can come from  
7714///  multiple different sources, but clearing it is a straightforward process that  
7715///  dispels associated effects on a client and, if necessary, unequips associated  
7716///  items.
7717///
7718///  `pid` The player ID.  
7719///  `attribute_id` The attribute ID.
7720///
7721///  Returns void
7722///
7723pub fn clear_attribute_modifier(pid: u16, attribute_id: u16) {
7724    unsafe {
7725        raw::rustClearAttributeModifier(pid, attribute_id)
7726    }
7727}
7728
7729///
7730///  Set the amount of damage (as caused through the Damage Attribute effect) to  
7731///         a player's attribute.
7732///
7733///  `pid` The player ID.  
7734///  `attribute_id` The attribute ID.  
7735///  `value` The amount of damage to the player's attribute.
7736///
7737///  Returns void
7738///
7739pub fn set_attribute_damage(pid: u16, attribute_id: u16, value: f64) {
7740    unsafe {
7741        raw::rustSetAttributeDamage(pid, attribute_id, value)
7742    }
7743}
7744
7745///
7746///  Set the base value of a player's skill.
7747///
7748///  `pid` The player ID.  
7749///  `skill_id` The skill ID.  
7750///  `value` The new base value of the player's skill.
7751///
7752///  Returns void
7753///
7754pub fn set_skill_base(pid: u16, skill_id: u16, value: i16) {
7755    unsafe {
7756        raw::rustSetSkillBase(pid, skill_id, value)
7757    }
7758}
7759
7760///
7761///  Clear the modifier value of a player's skill.
7762///
7763///  There's no way to set a modifier to a specific value because it can come from  
7764///  multiple different sources, but clearing it is a straightforward process that  
7765///  dispels associated effects on a client and, if necessary, unequips associated  
7766///  items.
7767///
7768///  `pid` The player ID.  
7769///  `skill_id` The skill ID.
7770///
7771///  Returns void
7772///
7773pub fn clear_skill_modifier(pid: u16, skill_id: u16) {
7774    unsafe {
7775        raw::rustClearSkillModifier(pid, skill_id)
7776    }
7777}
7778
7779///
7780///  Set the amount of damage (as caused through the Damage Skill effect) to  
7781///         a player's skill.
7782///
7783///  `pid` The player ID.  
7784///  `skill_id` The skill ID.  
7785///  `value` The amount of damage to the player's skill.
7786///
7787///  Returns void
7788///
7789pub fn set_skill_damage(pid: u16, skill_id: u16, value: f64) {
7790    unsafe {
7791        raw::rustSetSkillDamage(pid, skill_id, value)
7792    }
7793}
7794
7795///
7796///  Set the progress the player has made towards increasing a certain skill by 1.
7797///
7798///  `pid` The player ID.  
7799///  `skill_id` The skill ID.  
7800///  `value` The progress value.
7801///
7802///  Returns void
7803///
7804pub fn set_skill_progress(pid: u16, skill_id: u16, value: f64) {
7805    unsafe {
7806        raw::rustSetSkillProgress(pid, skill_id, value)
7807    }
7808}
7809
7810///
7811///  Set the bonus applied to a certain attribute at the next level up as a result  
7812///         of associated skill increases.
7813///
7814///  Although confusing, the term "skill increase" for this is taken from OpenMW itself.
7815///
7816///  `pid` The player ID.  
7817///  `skill_id` The attribute ID.  
7818///  `value` The increase in the attribute caused by skills.
7819///
7820///  Returns void
7821///
7822pub fn set_skill_increase(pid: u16, attribute_id: u16, value: i16) {
7823    unsafe {
7824        raw::rustSetSkillIncrease(pid, attribute_id, value)
7825    }
7826}
7827
7828///
7829///  Set the bounty of a player.
7830///
7831///  `pid` The player ID.  
7832///  `value` The new bounty.
7833///
7834///  Returns void
7835///
7836pub fn set_bounty(pid: u16, value: i16) {
7837    unsafe {
7838        raw::rustSetBounty(pid, value)
7839    }
7840}
7841
7842///
7843///  Set the current and ending stages of character generation for a player.
7844///
7845///  This is used to repeat part of character generation or to only go through part of it.
7846///
7847///  `pid` The player ID.  
7848///  `current_stage` The new current stage.  
7849///  `end_stage` The new ending stage.
7850///
7851///  Returns void
7852///
7853pub fn set_char_gen_stage(pid: u16, current_stage: i16, end_stage: i16) {
7854    unsafe {
7855        raw::rustSetCharGenStage(pid, current_stage, end_stage)
7856    }
7857}
7858
7859///
7860///  Send a PlayerBaseInfo packet with a player's name, race, head mesh,  
7861///         hairstyle mesh, birthsign and stat reset state.
7862///
7863///  It is always sent to all players.
7864///
7865///  `pid` The player ID.
7866///
7867///  Returns void
7868///
7869pub fn send_base_info(pid: u16) {
7870    unsafe {
7871        raw::rustSendBaseInfo(pid)
7872    }
7873}
7874
7875///
7876///  Send a PlayerStatsDynamic packet with a player's dynamic stats (health,  
7877///         magicka and fatigue).
7878///
7879///  It is always sent to all players.
7880///
7881///  `pid` The player ID.
7882///
7883///  Returns void
7884///
7885pub fn send_stats_dynamic(pid: u16) {
7886    unsafe {
7887        raw::rustSendStatsDynamic(pid)
7888    }
7889}
7890
7891///
7892///  Send a PlayerAttribute packet with a player's attributes and bonuses  
7893///         to those attributes at the next level up (the latter being called  
7894///         "skill increases" as in OpenMW).
7895///
7896///  It is always sent to all players.
7897///
7898///  `pid` The player ID.
7899///
7900///  Returns void
7901///
7902pub fn send_attributes(pid: u16) {
7903    unsafe {
7904        raw::rustSendAttributes(pid)
7905    }
7906}
7907
7908///
7909///  Send a PlayerSkill packet with a player's skills.
7910///
7911///  It is always sent to all players.
7912///
7913///  `pid` The player ID.
7914///
7915///  Returns void
7916///
7917pub fn send_skills(pid: u16) {
7918    unsafe {
7919        raw::rustSendSkills(pid)
7920    }
7921}
7922
7923///
7924///  Send a PlayerLevel packet with a player's character level and  
7925///         progress towards the next level up
7926///
7927///  It is always sent to all players.
7928///
7929///  `pid` The player ID.
7930///
7931///  Returns void
7932///
7933pub fn send_level(pid: u16) {
7934    unsafe {
7935        raw::rustSendLevel(pid)
7936    }
7937}
7938
7939///
7940///  Send a PlayerBounty packet with a player's bounty.
7941///
7942///  It is always sent to all players.
7943///
7944///  `pid` The player ID.
7945///
7946///  Returns void
7947///
7948pub fn send_bounty(pid: u16) {
7949    unsafe {
7950        raw::rustSendBounty(pid)
7951    }
7952}
7953
7954///
7955///  Use the last object list received by the server as the one being read.
7956///
7957///
7958///  Returns void
7959///
7960pub fn read_received_object_list() {
7961    unsafe {
7962        raw::rustReadReceivedObjectList()
7963    }
7964}
7965
7966///
7967///  Clear the data from the object list stored on the server.
7968///
7969///
7970///  Returns void
7971///
7972pub fn clear_object_list() {
7973    unsafe {
7974        raw::rustClearObjectList()
7975    }
7976}
7977
7978///
7979///  Set the pid attached to the ObjectList.
7980///
7981///  `pid` The player ID to whom the object list should be attached.
7982///
7983///  Returns void
7984///
7985pub fn set_object_list_pid(pid: u16) {
7986    unsafe {
7987        raw::rustSetObjectListPid(pid)
7988    }
7989}
7990
7991///
7992///  Take the contents of the read-only object list last received by the  
7993///         server from a player and move its contents to the stored object list  
7994///         that can be sent by the server.
7995///
7996///
7997///  Returns void
7998///
7999pub fn copy_received_object_list_to_store() {
8000    unsafe {
8001        raw::rustCopyReceivedObjectListToStore()
8002    }
8003}
8004
8005///
8006///  Get the number of indexes in the read object list.
8007///
8008///
8009///  Returns the number of indexes.
8010///
8011pub fn get_object_list_size() -> u16 {
8012    unsafe {
8013        raw::rustGetObjectListSize()
8014    }
8015}
8016
8017///
8018///  Get the origin of the read object list.
8019///
8020///
8021///  Returns the origin (0 for CLIENT_GAMEPLAY, 1 for CLIENT_CONSOLE, 2 for  
8022///  CLIENT_DIALOGUE, 3 for CLIENT_SCRIPT_LOCAL, 4 for CLIENT_SCRIPT_GLOBAL,  
8023///  5 for SERVER_SCRIPT).
8024///
8025pub fn get_object_list_origin() -> u8 {
8026    unsafe {
8027        raw::rustGetObjectListOrigin()
8028    }
8029}
8030
8031///
8032///  Get the client script that the read object list originated from.
8033///
8034///  Note: This is not yet implemented.
8035///
8036///
8037///  Returns the ID of the client script.
8038///
8039pub fn get_object_list_client_script() -> String {
8040    unsafe {
8041        CStr::from_ptr(raw::rustGetObjectListClientScript())
8042            .to_str()
8043            .unwrap_or_default()
8044            .to_string()
8045    }
8046}
8047
8048///
8049///  Get the action type used in the read object list.
8050///
8051///
8052///  Returns the action type (0 for SET, 1 for ADD, 2 for REMOVE, 3 for REQUEST).
8053///
8054pub fn get_object_list_action() -> u8 {
8055    unsafe {
8056        raw::rustGetObjectListAction()
8057    }
8058}
8059
8060///
8061///  Get the container subaction type used in the read object list.
8062///
8063///
8064///  Returns the action type (0 for NONE, 1 for DRAG, 2 for DROP, 3 for TAKE_ALL).
8065///
8066pub fn get_object_list_container_sub_action() -> u8 {
8067    unsafe {
8068        raw::rustGetObjectListContainerSubAction()
8069    }
8070}
8071
8072///
8073///  Check whether the object at a certain index in the read object list is a  
8074///  player.
8075///
8076///  Note: Although most player data and events are dealt with in Player packets,  
8077///        object activation is general enough for players themselves to be included  
8078///        as objects in ObjectActivate packets.
8079///
8080///  `index` The index of the object.
8081///
8082///  Returns whether the object is a player.
8083///
8084pub fn is_object_player(index: u16) -> bool {
8085    unsafe {
8086        raw::rustIsObjectPlayer(index)
8087    }
8088}
8089
8090///
8091///  Get the player ID of the object at a certain index in the read object list,  
8092///  only valid if the object is a player.
8093///
8094///  Note: Currently, players can only be objects in ObjectActivate and ConsoleCommand  
8095///        packets.
8096///
8097///  `index` The index of the object.
8098///
8099///  Returns the player ID of the object.
8100///
8101pub fn get_object_pid(index: u16) -> i16 {
8102    unsafe {
8103        raw::rustGetObjectPid(index)
8104    }
8105}
8106
8107///
8108///  Get the refId of the object at a certain index in the read object list.
8109///
8110///  `index` The index of the object.
8111///
8112///  Returns the refId.
8113///
8114pub fn get_object_ref_id(index: u16) -> String {
8115    unsafe {
8116        CStr::from_ptr(raw::rustGetObjectRefId(index))
8117            .to_str()
8118            .unwrap_or_default()
8119            .to_string()
8120    }
8121}
8122
8123///
8124///  Get the refNum of the object at a certain index in the read object list.
8125///
8126///  `index` The index of the object.
8127///
8128///  Returns the refNum.
8129///
8130pub fn get_object_ref_num(index: u16) -> u16 {
8131    unsafe {
8132        raw::rustGetObjectRefNum(index)
8133    }
8134}
8135
8136///
8137///  Get the mpNum of the object at a certain index in the read object list.
8138///
8139///  `index` The index of the object.
8140///
8141///  Returns the mpNum.
8142///
8143pub fn get_object_mp_num(index: u16) -> u16 {
8144    unsafe {
8145        raw::rustGetObjectMpNum(index)
8146    }
8147}
8148
8149///
8150///  Get the count of the object at a certain index in the read object list.
8151///
8152///  `index` The index of the object.
8153///
8154///  Returns the object count.
8155///
8156pub fn get_object_count(index: u16) -> i16 {
8157    unsafe {
8158        raw::rustGetObjectCount(index)
8159    }
8160}
8161
8162///
8163///  Get the charge of the object at a certain index in the read object list.
8164///
8165///  `index` The index of the object.
8166///
8167///  Returns the charge.
8168///
8169pub fn get_object_charge(index: u16) -> i16 {
8170    unsafe {
8171        raw::rustGetObjectCharge(index)
8172    }
8173}
8174
8175///
8176///  Get the enchantment charge of the object at a certain index in the read object list.
8177///
8178///  `index` The index of the object.
8179///
8180///  Returns the enchantment charge.
8181///
8182pub fn get_object_enchantment_charge(index: u16) -> f64 {
8183    unsafe {
8184        raw::rustGetObjectEnchantmentCharge(index)
8185    }
8186}
8187
8188///
8189///  Get the soul of the object at a certain index in the read object list.
8190///
8191///  `index` The index of the object.
8192///
8193///  Returns the soul.
8194///
8195pub fn get_object_soul(index: u16) -> String {
8196    unsafe {
8197        CStr::from_ptr(raw::rustGetObjectSoul(index))
8198            .to_str()
8199            .unwrap_or_default()
8200            .to_string()
8201    }
8202}
8203
8204///
8205///  Get the gold value of the object at a certain index in the read object list.
8206///
8207///  This is used solely to get the gold value of gold. It is not used for other objects.
8208///
8209///  `index` The index of the object.
8210///
8211///  Returns the gold value.
8212///
8213pub fn get_object_gold_value(index: u16) -> i16 {
8214    unsafe {
8215        raw::rustGetObjectGoldValue(index)
8216    }
8217}
8218
8219///
8220///  Get the object scale of the object at a certain index in the read object list.
8221///
8222///  `index` The index of the object.
8223///
8224///  Returns the object scale.
8225///
8226pub fn get_object_scale(index: u16) -> f64 {
8227    unsafe {
8228        raw::rustGetObjectScale(index)
8229    }
8230}
8231
8232///
8233///  Get the object state of the object at a certain index in the read object list.
8234///
8235///  `index` The index of the object.
8236///
8237///  Returns the object state.
8238///
8239pub fn get_object_state(index: u16) -> bool {
8240    unsafe {
8241        raw::rustGetObjectState(index)
8242    }
8243}
8244
8245///
8246///  Get the door state of the object at a certain index in the read object list.
8247///
8248///  `index` The index of the object.
8249///
8250///  Returns the door state.
8251///
8252pub fn get_object_door_state(index: u16) -> i16 {
8253    unsafe {
8254        raw::rustGetObjectDoorState(index)
8255    }
8256}
8257
8258///
8259///  Get the lock level of the object at a certain index in the read object list.
8260///
8261///  `index` The index of the object.
8262///
8263///  Returns the lock level.
8264///
8265pub fn get_object_lock_level(index: u16) -> i16 {
8266    unsafe {
8267        raw::rustGetObjectLockLevel(index)
8268    }
8269}
8270
8271///
8272///  Check whether the object at a certain index in the read object list has been  
8273///  activated by a player.
8274///
8275///  `index` The index of the object.
8276///
8277///  Returns whether the object has been activated by a player.
8278///
8279pub fn does_object_have_player_activating(index: u16) -> bool {
8280    unsafe {
8281        raw::rustDoesObjectHavePlayerActivating(index)
8282    }
8283}
8284
8285///
8286///  Get the player ID of the player activating the object at a certain index in the  
8287///  read object list.
8288///
8289///  `index` The index of the object.
8290///
8291///  Returns the player ID of the activating player.
8292///
8293pub fn get_object_activating_pid(index: u16) -> i16 {
8294    unsafe {
8295        raw::rustGetObjectActivatingPid(index)
8296    }
8297}
8298
8299///
8300///  Get the refId of the actor activating the object at a certain index in the read  
8301///  object list.
8302///
8303///  `index` The index of the object.
8304///
8305///  Returns the refId of the activating actor.
8306///
8307pub fn get_object_activating_ref_id(index: u16) -> String {
8308    unsafe {
8309        CStr::from_ptr(raw::rustGetObjectActivatingRefId(index))
8310            .to_str()
8311            .unwrap_or_default()
8312            .to_string()
8313    }
8314}
8315
8316///
8317///  Get the refNum of the actor activating the object at a certain index in the read  
8318///  object list.
8319///
8320///  `index` The index of the object.
8321///
8322///  Returns the refNum of the activating actor.
8323///
8324pub fn get_object_activating_ref_num(index: u16) -> u16 {
8325    unsafe {
8326        raw::rustGetObjectActivatingRefNum(index)
8327    }
8328}
8329
8330///
8331///  Get the mpNum of the actor activating the object at a certain index in the read  
8332///  object list.
8333///
8334///  `index` The index of the object.
8335///
8336///  Returns the mpNum of the activating actor.
8337///
8338pub fn get_object_activating_mp_num(index: u16) -> u16 {
8339    unsafe {
8340        raw::rustGetObjectActivatingMpNum(index)
8341    }
8342}
8343
8344///
8345///  Get the name of the actor activating the object at a certain index in the read  
8346///  object list.
8347///
8348///  `index` The index of the object.
8349///
8350///  Returns the name of the activating actor.
8351///
8352pub fn get_object_activating_name(index: u16) -> String {
8353    unsafe {
8354        CStr::from_ptr(raw::rustGetObjectActivatingName(index))
8355            .to_str()
8356            .unwrap_or_default()
8357            .to_string()
8358    }
8359}
8360
8361///
8362///  Check whether the object at a certain index in the read object list is a  
8363///  summon.
8364///
8365///  Only living actors can be summoned.
8366///
8367///
8368///  Returns the summon state.
8369///
8370pub fn get_object_summon_state(index: u16) -> bool {
8371    unsafe {
8372        raw::rustGetObjectSummonState(index)
8373    }
8374}
8375
8376///
8377///  Get the summon duration of the object at a certain index in the read object list.
8378///
8379///  Note: Returns -1 if indefinite.
8380///
8381///  `index` The index of the object.
8382///
8383///  Returns the summon duration.
8384///
8385pub fn get_object_summon_duration(index: u16) -> f64 {
8386    unsafe {
8387        raw::rustGetObjectSummonDuration(index)
8388    }
8389}
8390
8391///
8392///  Check whether the object at a certain index in the read object list has a player  
8393///  as its summoner.
8394///
8395///  Only living actors can be summoned.
8396///
8397///  `index` The index of the object.
8398///
8399///  Returns whether a player is the summoner of the object.
8400///
8401pub fn does_object_have_player_summoner(index: u16) -> bool {
8402    unsafe {
8403        raw::rustDoesObjectHavePlayerSummoner(index)
8404    }
8405}
8406
8407///
8408///  Get the player ID of the summoner of the object at a certain index in the read object  
8409///  list.
8410///
8411///  `index` The index of the object.
8412///
8413///  Returns the player ID of the summoner.
8414///
8415pub fn get_object_summoner_pid(index: u16) -> i16 {
8416    unsafe {
8417        raw::rustGetObjectSummonerPid(index)
8418    }
8419}
8420
8421///
8422///  Get the refId of the actor summoner of the object at a certain index in the read object  
8423///  list.
8424///
8425///  `index` The index of the object.
8426///
8427///  Returns the refId of the summoner.
8428///
8429pub fn get_object_summoner_ref_id(index: u16) -> String {
8430    unsafe {
8431        CStr::from_ptr(raw::rustGetObjectSummonerRefId(index))
8432            .to_str()
8433            .unwrap_or_default()
8434            .to_string()
8435    }
8436}
8437
8438///
8439///  Get the refNum of the actor summoner of the object at a certain index in the read object  
8440///  list.
8441///
8442///  `index` The index of the object.
8443///
8444///  Returns the refNum of the summoner.
8445///
8446pub fn get_object_summoner_ref_num(index: u16) -> u16 {
8447    unsafe {
8448        raw::rustGetObjectSummonerRefNum(index)
8449    }
8450}
8451
8452///
8453///  Get the mpNum of the actor summoner of the object at a certain index in the read object list.
8454///
8455///  `index` The index of the object.
8456///
8457///  Returns the mpNum of the summoner.
8458///
8459pub fn get_object_summoner_mp_num(index: u16) -> u16 {
8460    unsafe {
8461        raw::rustGetObjectSummonerMpNum(index)
8462    }
8463}
8464
8465///
8466///  Get the X position of the object at a certain index in the read object list.
8467///
8468///  `index` The index of the object.
8469///
8470///  Returns the X position.
8471///
8472pub fn get_object_pos_x(index: u16) -> f64 {
8473    unsafe {
8474        raw::rustGetObjectPosX(index)
8475    }
8476}
8477
8478///
8479///  Get the Y position of the object at a certain index in the read object list.
8480///
8481///  `index` The index of the object.
8482///
8483///  Returns the Y position.
8484///
8485pub fn get_object_pos_y(index: u16) -> f64 {
8486    unsafe {
8487        raw::rustGetObjectPosY(index)
8488    }
8489}
8490
8491///
8492///  Get the Z position at a certain index in the read object list.
8493///
8494///  `index` The index of the object.
8495///
8496///  Returns the Z position.
8497///
8498pub fn get_object_pos_z(index: u16) -> f64 {
8499    unsafe {
8500        raw::rustGetObjectPosZ(index)
8501    }
8502}
8503
8504///
8505///  Get the X rotation of the object at a certain index in the read object list.
8506///
8507///  `index` The index of the object.
8508///
8509///  Returns the X rotation.
8510///
8511pub fn get_object_rot_x(index: u16) -> f64 {
8512    unsafe {
8513        raw::rustGetObjectRotX(index)
8514    }
8515}
8516
8517///
8518///  Get the Y rotation of the object at a certain index in the read object list.
8519///
8520///  `index` The index of the object.
8521///
8522///  Returns the Y rotation.
8523///
8524pub fn get_object_rot_y(index: u16) -> f64 {
8525    unsafe {
8526        raw::rustGetObjectRotY(index)
8527    }
8528}
8529
8530///
8531///  Get the Z rotation of the object at a certain index in the read object list.
8532///
8533///  `index` The index of the object.
8534///
8535///  Returns the Z rotation.
8536///
8537pub fn get_object_rot_z(index: u16) -> f64 {
8538    unsafe {
8539        raw::rustGetObjectRotZ(index)
8540    }
8541}
8542
8543///
8544///  Get the videoFilename of the object at a certain index in the read object list.
8545///
8546///
8547///  Returns the videoFilename.
8548///
8549pub fn get_video_filename(index: u16) -> String {
8550    unsafe {
8551        CStr::from_ptr(raw::rustGetVideoFilename(index))
8552            .to_str()
8553            .unwrap_or_default()
8554            .to_string()
8555    }
8556}
8557
8558pub fn get_script_variable_name(index: u16) -> String {
8559    unsafe {
8560        CStr::from_ptr(raw::rustGetScriptVariableName(index))
8561            .to_str()
8562            .unwrap_or_default()
8563            .to_string()
8564    }
8565}
8566
8567pub fn get_script_variable_short_value(index: u16) -> i16 {
8568    unsafe {
8569        raw::rustGetScriptVariableShortValue(index)
8570    }
8571}
8572
8573///
8574///  Get the number of container item indexes of the object at a certain index in the  
8575///  read object list.
8576///
8577///  `index` The index of the object.
8578///
8579///  Returns the number of container item indexes.
8580///
8581pub fn get_container_changes_size(object_index: u16) -> u16 {
8582    unsafe {
8583        raw::rustGetContainerChangesSize(object_index)
8584    }
8585}
8586
8587///
8588///  Get the refId of the container item at a certain itemIndex in the container changes  
8589///  of the object at a certain objectIndex in the read object list.
8590///
8591///  `object_index` The index of the object.  
8592///  `item_index` The index of the container item.
8593///
8594///  Returns the refId.
8595///
8596pub fn get_container_item_ref_id(object_index: u16, item_index: u16) -> String {
8597    unsafe {
8598        CStr::from_ptr(raw::rustGetContainerItemRefId(object_index, item_index))
8599            .to_str()
8600            .unwrap_or_default()
8601            .to_string()
8602    }
8603}
8604
8605///
8606///  Get the item count of the container item at a certain itemIndex in the container  
8607///  changes of the object at a certain objectIndex in the read object list.
8608///
8609///  `object_index` The index of the object.  
8610///  `item_index` The index of the container item.
8611///
8612///  Returns the item count.
8613///
8614pub fn get_container_item_count(object_index: u16, item_index: u16) -> i16 {
8615    unsafe {
8616        raw::rustGetContainerItemCount(object_index, item_index)
8617    }
8618}
8619
8620///
8621///  Get the charge of the container item at a certain itemIndex in the container changes  
8622///  of the object at a certain objectIndex in the read object list.
8623///
8624///  `object_index` The index of the object.  
8625///  `item_index` The index of the container item.
8626///
8627///  Returns the charge.
8628///
8629pub fn get_container_item_charge(object_index: u16, item_index: u16) -> i16 {
8630    unsafe {
8631        raw::rustGetContainerItemCharge(object_index, item_index)
8632    }
8633}
8634
8635///
8636///  Get the enchantment charge of the container item at a certain itemIndex in the container changes  
8637///  of the object at a certain objectIndex in the read object list.
8638///
8639///  `object_index` The index of the object.  
8640///  `item_index` The index of the container item.
8641///
8642///  Returns the enchantment charge.
8643///
8644pub fn get_container_item_enchantment_charge(object_index: u16, item_index: u16) -> f64 {
8645    unsafe {
8646        raw::rustGetContainerItemEnchantmentCharge(object_index, item_index)
8647    }
8648}
8649
8650///
8651///  Get the soul of the container item at a certain itemIndex in the container changes  
8652///  of the object at a certain objectIndex in the read object list.
8653///
8654///  `object_index` The index of the object.  
8655///  `item_index` The index of the container item.
8656///
8657///  Returns the soul.
8658///
8659pub fn get_container_item_soul(object_index: u16, item_index: u16) -> String {
8660    unsafe {
8661        CStr::from_ptr(raw::rustGetContainerItemSoul(object_index, item_index))
8662            .to_str()
8663            .unwrap_or_default()
8664            .to_string()
8665    }
8666}
8667
8668///
8669///  Get the action count of the container item at a certain itemIndex in the container  
8670///  changes of the object at a certain objectIndex in the read object list.
8671///
8672///  `object_index` The index of the object.  
8673///  `item_index` The index of the container item.
8674///
8675///  Returns the action count.
8676///
8677pub fn get_container_item_action_count(object_index: u16, item_index: u16) -> i16 {
8678    unsafe {
8679        raw::rustGetContainerItemActionCount(object_index, item_index)
8680    }
8681}
8682
8683///
8684///  Check whether the object at a certain index in the read object list has a container.
8685///
8686///  Note: Only ObjectLists from ObjectPlace packets contain this information. Objects from  
8687///        received ObjectSpawn packets can always be assumed to have a container.
8688///
8689///  `index` The index of the object.
8690///
8691///  Returns whether the object has a container.
8692///
8693pub fn does_object_have_container(index: u16) -> bool {
8694    unsafe {
8695        raw::rustDoesObjectHaveContainer(index)
8696    }
8697}
8698
8699///
8700///  Set the cell of the temporary object list stored on the server.
8701///
8702///  The cell is determined to be an exterior cell if it fits the pattern of a number followed  
8703///  by a comma followed by another number.
8704///
8705///  `cell_description` The description of the cell.
8706///
8707///  Returns void
8708///
8709pub fn set_object_list_cell(cell_description: &str) {
8710    unsafe {
8711        raw::rustSetObjectListCell(CString::new(cell_description).unwrap_or_default().as_ptr())
8712    }
8713}
8714
8715///
8716///  Set the action type of the temporary object list stored on the server.
8717///
8718///  `action` The action type (0 for SET, 1 for ADD, 2 for REMOVE, 3 for REQUEST).
8719///
8720///  Returns void
8721///
8722pub fn set_object_list_action(action: u8) {
8723    unsafe {
8724        raw::rustSetObjectListAction(action)
8725    }
8726}
8727
8728///
8729///  Set the console command of the temporary object list stored on the server.
8730///
8731///  When sent, the command will run once on every object added to the object list. If no objects  
8732///  have been added, it will run once without any object reference.
8733///
8734///  `console_command` The console command.
8735///
8736///  Returns void
8737///
8738pub fn set_object_list_console_command(console_command: &str) {
8739    unsafe {
8740        raw::rustSetObjectListConsoleCommand(CString::new(console_command).unwrap_or_default().as_ptr())
8741    }
8742}
8743
8744///
8745///  Set the refId of the temporary object stored on the server.
8746///
8747///  `ref_id` The refId.
8748///
8749///  Returns void
8750///
8751pub fn set_object_ref_id(ref_id: &str) {
8752    unsafe {
8753        raw::rustSetObjectRefId(CString::new(ref_id).unwrap_or_default().as_ptr())
8754    }
8755}
8756
8757///
8758///  Set the refNum of the temporary object stored on the server.
8759///
8760///  Every object loaded from .ESM and .ESP data files has a unique refNum which needs to be  
8761///  retained to refer to it in packets.
8762///
8763///  On the other hand, objects placed or spawned via the server should always have a refNum  
8764///  of 0.
8765///
8766///  `ref_num` The refNum.
8767///
8768///  Returns void
8769///
8770pub fn set_object_ref_num(ref_num: i16) {
8771    unsafe {
8772        raw::rustSetObjectRefNum(ref_num)
8773    }
8774}
8775
8776///
8777///  Set the mpNum of the temporary object stored on the server.
8778///
8779///  Every object placed or spawned via the server is assigned an mpNum by incrementing the last  
8780///  mpNum stored on the server. Scripts should take care to ensure that mpNums are kept unique  
8781///  for these objects.
8782///
8783///  Objects loaded from .ESM and .ESP data files should always have an mpNum of 0, because they  
8784///  have unique refNumes instead.
8785///
8786///  `mp_num` The mpNum.
8787///
8788///  Returns void
8789///
8790pub fn set_object_mp_num(mp_num: i16) {
8791    unsafe {
8792        raw::rustSetObjectMpNum(mp_num)
8793    }
8794}
8795
8796///
8797///  Set the object count of the temporary object stored on the server.
8798///
8799///  This determines the quantity of an object, with the exception of gold.
8800///
8801///  `count` The object count.
8802///
8803///  Returns void
8804///
8805pub fn set_object_count(count: i16) {
8806    unsafe {
8807        raw::rustSetObjectCount(count)
8808    }
8809}
8810
8811///
8812///  Set the charge of the temporary object stored on the server.
8813///
8814///  Object durabilities are set through this value.
8815///
8816///  `charge` The charge.
8817///
8818///  Returns void
8819///
8820pub fn set_object_charge(charge: i16) {
8821    unsafe {
8822        raw::rustSetObjectCharge(charge)
8823    }
8824}
8825
8826///
8827///  Set the enchantment charge of the temporary object stored on the server.
8828///
8829///  Object durabilities are set through this value.
8830///
8831///  `charge` The enchantment charge.
8832///
8833///  Returns void
8834///
8835pub fn set_object_enchantment_charge(enchantment_charge: f64) {
8836    unsafe {
8837        raw::rustSetObjectEnchantmentCharge(enchantment_charge)
8838    }
8839}
8840
8841///
8842///  Set the soul of the temporary object stored on the server.
8843///
8844///  `ref_id` The soul.
8845///
8846///  Returns void
8847///
8848pub fn set_object_soul(soul: &str) {
8849    unsafe {
8850        raw::rustSetObjectSoul(CString::new(soul).unwrap_or_default().as_ptr())
8851    }
8852}
8853
8854///
8855///  Set the gold value of the temporary object stored on the server.
8856///
8857///  This is used solely to set the gold value for gold. It has no effect on other objects.
8858///
8859///  `gold_value` The gold value.
8860///
8861///  Returns void
8862///
8863pub fn set_object_gold_value(gold_value: i16) {
8864    unsafe {
8865        raw::rustSetObjectGoldValue(gold_value)
8866    }
8867}
8868
8869///
8870///  Set the scale of the temporary object stored on the server.
8871///
8872///  Objects are smaller or larger than their default size based on their scale.
8873///
8874///  `scale` The scale.
8875///
8876///  Returns void
8877///
8878pub fn set_object_scale(scale: f64) {
8879    unsafe {
8880        raw::rustSetObjectScale(scale)
8881    }
8882}
8883
8884///
8885///  Set the object state of the temporary object stored on the server.
8886///
8887///  Objects are enabled or disabled based on their object state.
8888///
8889///  `object_state` The object state.
8890///
8891///  Returns void
8892///
8893pub fn set_object_state(object_state: bool) {
8894    unsafe {
8895        raw::rustSetObjectState(object_state)
8896    }
8897}
8898
8899///
8900///  Set the lock level of the temporary object stored on the server.
8901///
8902///  `lock_level` The lock level.
8903///
8904///  Returns void
8905///
8906pub fn set_object_lock_level(lock_level: i16) {
8907    unsafe {
8908        raw::rustSetObjectLockLevel(lock_level)
8909    }
8910}
8911
8912///
8913///  Set the disarm state of the temporary object stored on the server.
8914///
8915///  `disarm_state` The disarmState.
8916///
8917///  Returns void
8918///
8919pub fn set_object_disarm_state(disarm_state: bool) {
8920    unsafe {
8921        raw::rustSetObjectDisarmState(disarm_state)
8922    }
8923}
8924
8925///
8926///  Set the summon duration of the temporary object stored on the server.
8927///
8928///  `summon_duration` The summon duration.
8929///
8930///  Returns void
8931///
8932pub fn set_object_summon_duration(summon_duration: f32) {
8933    unsafe {
8934        raw::rustSetObjectSummonDuration(summon_duration)
8935    }
8936}
8937
8938///
8939///  Set the summon state of the temporary object stored on the server.
8940///
8941///  This only affects living actors and determines whether they are summons of another  
8942///  living actor.
8943///
8944///  `summon_state` The summon state.
8945///
8946///  Returns void
8947///
8948pub fn set_object_summon_state(summon_state: bool) {
8949    unsafe {
8950        raw::rustSetObjectSummonState(summon_state)
8951    }
8952}
8953
8954///
8955///  Set the position of the temporary object stored on the server.
8956///
8957///  `x` The X position.  
8958///  `y` The Y position.  
8959///  `z` The Z position.
8960///
8961///  Returns void
8962///
8963pub fn set_object_position(x: f64, y: f64, z: f64) {
8964    unsafe {
8965        raw::rustSetObjectPosition(x, y, z)
8966    }
8967}
8968
8969///
8970///  Set the rotation of the temporary object stored on the server.
8971///
8972///  `x` The X rotation.  
8973///  `y` The Y rotation.  
8974///  `z` The Z rotation.
8975///
8976///  Returns void
8977///
8978pub fn set_object_rotation(x: f64, y: f64, z: f64) {
8979    unsafe {
8980        raw::rustSetObjectRotation(x, y, z)
8981    }
8982}
8983
8984///
8985///  Set the player ID of the player activating the temporary object stored on the  
8986///         server. Currently only used for ObjectActivate packets.
8987///
8988///  `pid` The pid of the player.
8989///
8990///  Returns void
8991///
8992pub fn set_object_activating_pid(pid: u16) {
8993    unsafe {
8994        raw::rustSetObjectActivatingPid(pid)
8995    }
8996}
8997
8998///
8999///  Set the door state of the temporary object stored on the server.
9000///
9001///  Doors are open or closed based on their door state.
9002///
9003///  `door_state` The door state.
9004///
9005///  Returns void
9006///
9007pub fn set_object_door_state(door_state: i16) {
9008    unsafe {
9009        raw::rustSetObjectDoorState(door_state)
9010    }
9011}
9012
9013///
9014///  Set the teleport state of the temporary object stored on the server.
9015///
9016///  If a door's teleport state is true, interacting with the door teleports a player to its  
9017///  destination. If it's false, it opens and closes like a regular door.
9018///
9019///  `teleport_state` The teleport state.
9020///
9021///  Returns void
9022///
9023pub fn set_object_door_teleport_state(teleport_state: bool) {
9024    unsafe {
9025        raw::rustSetObjectDoorTeleportState(teleport_state)
9026    }
9027}
9028
9029///
9030///  Set the door destination cell of the temporary object stored on the server.
9031///
9032///  The cell is determined to be an exterior cell if it fits the pattern of a number followed  
9033///  by a comma followed by another number.
9034///
9035///  `cell_description` The description of the cell.
9036///
9037///  Returns void
9038///
9039pub fn set_object_door_destination_cell(cell_description: &str) {
9040    unsafe {
9041        raw::rustSetObjectDoorDestinationCell(CString::new(cell_description).unwrap_or_default().as_ptr())
9042    }
9043}
9044
9045///
9046///  Set the door destination position of the temporary object stored on the server.
9047///
9048///  `x` The X position.  
9049///  `y` The Y position.  
9050///  `z` The Z position.
9051///
9052///  Returns void
9053///
9054pub fn set_object_door_destination_position(x: f64, y: f64, z: f64) {
9055    unsafe {
9056        raw::rustSetObjectDoorDestinationPosition(x, y, z)
9057    }
9058}
9059
9060///
9061///  Set the door destination rotation of the temporary object stored on the server.
9062///
9063///  Note: Because this sets the rotation a player will have upon using the door, and rotation  
9064///        on the Y axis has no effect on players, the Y value has been omitted as an argument.
9065///
9066///  `x` The X rotation.  
9067///  `z` The Z rotation.
9068///
9069///  Returns void
9070///
9071pub fn set_object_door_destination_rotation(x: f64, z: f64) {
9072    unsafe {
9073        raw::rustSetObjectDoorDestinationRotation(x, z)
9074    }
9075}
9076
9077pub fn set_script_variable_name(var_name: &str) {
9078    unsafe {
9079        raw::rustSetScriptVariableName(CString::new(var_name).unwrap_or_default().as_ptr())
9080    }
9081}
9082
9083pub fn set_script_variable_short_value(short_val: i16) {
9084    unsafe {
9085        raw::rustSetScriptVariableShortValue(short_val)
9086    }
9087}
9088
9089///
9090///  Set a player as the object in the temporary object stored on the server.  
9091///         Currently only used for ConsoleCommand packets.
9092///
9093///  `pid` The pid of the player.
9094///
9095///  Returns void
9096///
9097pub fn set_player_as_object(pid: u16) {
9098    unsafe {
9099        raw::rustSetPlayerAsObject(pid)
9100    }
9101}
9102
9103///
9104///  Set the refId of the temporary container item stored on the server.
9105///
9106///  `ref_id` The refId.
9107///
9108///  Returns void
9109///
9110pub fn set_container_item_ref_id(ref_id: &str) {
9111    unsafe {
9112        raw::rustSetContainerItemRefId(CString::new(ref_id).unwrap_or_default().as_ptr())
9113    }
9114}
9115
9116///
9117///  Set the item count of the temporary container item stored on the server.
9118///
9119///  `count` The item count.
9120///
9121///  Returns void
9122///
9123pub fn set_container_item_count(count: i16) {
9124    unsafe {
9125        raw::rustSetContainerItemCount(count)
9126    }
9127}
9128
9129///
9130///  Set the charge of the temporary container item stored on the server.
9131///
9132///  `charge` The charge.
9133///
9134///  Returns void
9135///
9136pub fn set_container_item_charge(charge: i16) {
9137    unsafe {
9138        raw::rustSetContainerItemCharge(charge)
9139    }
9140}
9141
9142///
9143///  Set the enchantment charge of the temporary container item stored on the server.
9144///
9145///  `charge` The enchantment charge.
9146///
9147///  Returns void
9148///
9149pub fn set_container_item_enchantment_charge(enchantment_charge: f64) {
9150    unsafe {
9151        raw::rustSetContainerItemEnchantmentCharge(enchantment_charge)
9152    }
9153}
9154
9155///
9156///  Set the soul of the temporary container item stored on the server.
9157///
9158///  `ref_id` The soul.
9159///
9160///  Returns void
9161///
9162pub fn set_container_item_soul(soul: &str) {
9163    unsafe {
9164        raw::rustSetContainerItemSoul(CString::new(soul).unwrap_or_default().as_ptr())
9165    }
9166}
9167
9168///
9169///  Set the action count of the container item at a certain itemIndex in the container  
9170///  changes of the object at a certain objectIndex in the object list stored on the server.
9171///
9172///  When resending a received Container packet, this allows you to correct the amount of items  
9173///  removed from a container by a player when it conflicts with what other players have already  
9174///  taken.
9175///
9176///  `object_index` The index of the object.  
9177///  `item_index` The index of the container item.  
9178///  `action_count` The action count.
9179///
9180///  Returns void
9181///
9182pub fn set_container_item_action_count_by_index(object_index: u16, item_index: u16, action_count: i16) {
9183    unsafe {
9184        raw::rustSetContainerItemActionCountByIndex(object_index, item_index, action_count)
9185    }
9186}
9187
9188///
9189///  Add a copy of the server's temporary object to the server's currently stored object  
9190///  list.
9191///
9192///  In the process, the server's temporary object will automatically be cleared so a new  
9193///  one can be set up.
9194///
9195///
9196///  Returns void
9197///
9198pub fn add_object() {
9199    unsafe {
9200        raw::rustAddObject()
9201    }
9202}
9203
9204///
9205///  Add a copy of the server's temporary container item to the container changes of the  
9206///  server's temporary object.
9207///
9208///  In the process, the server's temporary container item will automatically be cleared so a new  
9209///  one can be set up.
9210///
9211///
9212///  Returns void
9213///
9214pub fn add_container_item() {
9215    unsafe {
9216        raw::rustAddContainerItem()
9217    }
9218}
9219
9220///
9221///  Send an ObjectActivate packet.
9222///
9223///  `send_to_other_players` Whether this packet should be sent to players other than the  
9224///                            player attached to the packet (false by default).  
9225///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9226///                            to the packet (false by default).
9227///
9228///  Returns void
9229///
9230pub fn send_object_activate(send_to_other_players: bool, skip_attached_player: bool) {
9231    unsafe {
9232        raw::rustSendObjectActivate(send_to_other_players, skip_attached_player)
9233    }
9234}
9235
9236///
9237///  Send an ObjectPlace packet.
9238///
9239///  `send_to_other_players` Whether this packet should be sent to players other than the  
9240///                            player attached to the packet (false by default).  
9241///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9242///                            to the packet (false by default).
9243///
9244///  Returns void
9245///
9246pub fn send_object_place(send_to_other_players: bool, skip_attached_player: bool) {
9247    unsafe {
9248        raw::rustSendObjectPlace(send_to_other_players, skip_attached_player)
9249    }
9250}
9251
9252///
9253///  Send an ObjectSpawn packet.
9254///
9255///  `send_to_other_players` Whether this packet should be sent to players other than the  
9256///                            player attached to the packet (false by default).  
9257///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9258///                            to the packet (false by default).
9259///
9260///  Returns void
9261///
9262pub fn send_object_spawn(send_to_other_players: bool, skip_attached_player: bool) {
9263    unsafe {
9264        raw::rustSendObjectSpawn(send_to_other_players, skip_attached_player)
9265    }
9266}
9267
9268///
9269///  Send an ObjectDelete packet.
9270///
9271///  `broadcast` Whether this packet should be sent only to the player for whom the current  
9272///                   object list was initialized or to everyone on the server.
9273///
9274///
9275///  Returns void
9276///
9277pub fn send_object_delete(send_to_other_players: bool, skip_attached_player: bool) {
9278    unsafe {
9279        raw::rustSendObjectDelete(send_to_other_players, skip_attached_player)
9280    }
9281}
9282
9283///
9284///  Send an ObjectLock packet.
9285///
9286///  `send_to_other_players` Whether this packet should be sent to players other than the  
9287///                            player attached to the packet (false by default).  
9288///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9289///                            to the packet (false by default).
9290///
9291///  Returns void
9292///
9293pub fn send_object_lock(send_to_other_players: bool, skip_attached_player: bool) {
9294    unsafe {
9295        raw::rustSendObjectLock(send_to_other_players, skip_attached_player)
9296    }
9297}
9298
9299///
9300///  Send an ObjectTrap packet.
9301///
9302///  `broadcast` Whether this packet should be sent only to the player for whom the current  
9303///                   object list was initialized or to everyone on the server.
9304///
9305///
9306///  Returns void
9307///
9308pub fn send_object_trap(send_to_other_players: bool, skip_attached_player: bool) {
9309    unsafe {
9310        raw::rustSendObjectTrap(send_to_other_players, skip_attached_player)
9311    }
9312}
9313
9314///
9315///  Send an ObjectScale packet.
9316///
9317///  `send_to_other_players` Whether this packet should be sent to players other than the  
9318///                            player attached to the packet (false by default).  
9319///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9320///                            to the packet (false by default).
9321///
9322///  Returns void
9323///
9324pub fn send_object_scale(send_to_other_players: bool, skip_attached_player: bool) {
9325    unsafe {
9326        raw::rustSendObjectScale(send_to_other_players, skip_attached_player)
9327    }
9328}
9329
9330///
9331///  Send an ObjectState packet.
9332///
9333///  `send_to_other_players` Whether this packet should be sent to players other than the  
9334///                            player attached to the packet (false by default).  
9335///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9336///                            to the packet (false by default).
9337///
9338///  Returns void
9339///
9340pub fn send_object_state(send_to_other_players: bool, skip_attached_player: bool) {
9341    unsafe {
9342        raw::rustSendObjectState(send_to_other_players, skip_attached_player)
9343    }
9344}
9345
9346///
9347///  Send a DoorState packet.
9348///
9349///  `send_to_other_players` Whether this packet should be sent to players other than the  
9350///                            player attached to the packet (false by default).  
9351///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9352///                            to the packet (false by default).
9353///
9354///  Returns void
9355///
9356pub fn send_door_state(send_to_other_players: bool, skip_attached_player: bool) {
9357    unsafe {
9358        raw::rustSendDoorState(send_to_other_players, skip_attached_player)
9359    }
9360}
9361
9362///
9363///  Send a DoorDestination packet.
9364///
9365///  `send_to_other_players` Whether this packet should be sent to players other than the  
9366///                            player attached to the packet (false by default).  
9367///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9368///                            to the packet (false by default).
9369///
9370///  Returns void
9371///
9372pub fn send_door_destination(send_to_other_players: bool, skip_attached_player: bool) {
9373    unsafe {
9374        raw::rustSendDoorDestination(send_to_other_players, skip_attached_player)
9375    }
9376}
9377
9378///
9379///  Send a Container packet.
9380///
9381///  `send_to_other_players` Whether this packet should be sent to players other than the  
9382///                            player attached to the packet (false by default).  
9383///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9384///                            to the packet (false by default).
9385///
9386///  Returns void
9387///
9388pub fn send_container(send_to_other_players: bool, skip_attached_player: bool) {
9389    unsafe {
9390        raw::rustSendContainer(send_to_other_players, skip_attached_player)
9391    }
9392}
9393
9394///
9395///  Send a VideoPlay packet.
9396///
9397///  `send_to_other_players` Whether this packet should be sent to players other than the  
9398///                            player attached to the packet (false by default).  
9399///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9400///                            to the packet (false by default).
9401///
9402///  Returns void
9403///
9404pub fn send_video_play(send_to_other_players: bool, skip_attached_player: bool) {
9405    unsafe {
9406        raw::rustSendVideoPlay(send_to_other_players, skip_attached_player)
9407    }
9408}
9409
9410pub fn send_script_global_short(send_to_other_players: bool, skip_attached_player: bool) {
9411    unsafe {
9412        raw::rustSendScriptGlobalShort(send_to_other_players, skip_attached_player)
9413    }
9414}
9415
9416///
9417///  Send a ConsoleCommand packet.
9418///
9419///  `send_to_other_players` Whether this packet should be sent to players other than the  
9420///                            player attached to the packet (false by default).  
9421///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
9422///                            to the packet (false by default).
9423///
9424///  Returns void
9425///
9426pub fn send_console_command(send_to_other_players: bool, skip_attached_player: bool) {
9427    unsafe {
9428        raw::rustSendConsoleCommand(send_to_other_players, skip_attached_player)
9429    }
9430}
9431
9432pub fn read_last_object_list() {
9433    unsafe {
9434        raw::rustReadLastObjectList()
9435    }
9436}
9437
9438pub fn read_last_event() {
9439    unsafe {
9440        raw::rustReadLastEvent()
9441    }
9442}
9443
9444pub fn initialize_object_list(pid: u16) {
9445    unsafe {
9446        raw::rustInitializeObjectList(pid)
9447    }
9448}
9449
9450pub fn initialize_event(pid: u16) {
9451    unsafe {
9452        raw::rustInitializeEvent(pid)
9453    }
9454}
9455
9456pub fn copy_last_object_list_to_store() {
9457    unsafe {
9458        raw::rustCopyLastObjectListToStore()
9459    }
9460}
9461
9462pub fn get_object_changes_size() -> u16 {
9463    unsafe {
9464        raw::rustGetObjectChangesSize()
9465    }
9466}
9467
9468pub fn get_event_action() -> u8 {
9469    unsafe {
9470        raw::rustGetEventAction()
9471    }
9472}
9473
9474pub fn get_event_container_sub_action() -> u8 {
9475    unsafe {
9476        raw::rustGetEventContainerSubAction()
9477    }
9478}
9479
9480pub fn get_object_ref_num_index(index: u16) -> u16 {
9481    unsafe {
9482        raw::rustGetObjectRefNumIndex(index)
9483    }
9484}
9485
9486pub fn get_object_summoner_ref_num_index(index: u16) -> u16 {
9487    unsafe {
9488        raw::rustGetObjectSummonerRefNumIndex(index)
9489    }
9490}
9491
9492pub fn set_event_cell(cell_description: &str) {
9493    unsafe {
9494        raw::rustSetEventCell(CString::new(cell_description).unwrap_or_default().as_ptr())
9495    }
9496}
9497
9498pub fn set_event_action(action: u8) {
9499    unsafe {
9500        raw::rustSetEventAction(action)
9501    }
9502}
9503
9504pub fn set_event_console_command(console_command: &str) {
9505    unsafe {
9506        raw::rustSetEventConsoleCommand(CString::new(console_command).unwrap_or_default().as_ptr())
9507    }
9508}
9509
9510pub fn set_object_ref_num_index(ref_num: i16) {
9511    unsafe {
9512        raw::rustSetObjectRefNumIndex(ref_num)
9513    }
9514}
9515
9516pub fn add_world_object() {
9517    unsafe {
9518        raw::rustAddWorldObject()
9519    }
9520}
9521
9522///
9523///  Use the last worldstate received by the server as the one being read.
9524///
9525///
9526///  Returns void
9527///
9528pub fn read_received_worldstate() {
9529    unsafe {
9530        raw::rustReadReceivedWorldstate()
9531    }
9532}
9533
9534///
9535///  Take the contents of the read-only worldstate last received by the  
9536///         server from a player and move its contents to the stored worldstate  
9537///         that can be sent by the server.
9538///
9539///
9540///  Returns void
9541///
9542pub fn copy_received_worldstate_to_store() {
9543    unsafe {
9544        raw::rustCopyReceivedWorldstateToStore()
9545    }
9546}
9547
9548///
9549///  Clear the kill count changes for the write-only worldstate.
9550///
9551///  This is used to initialize the sending of new WorldKillCount packets.
9552///
9553///
9554///  Returns void
9555///
9556pub fn clear_kill_changes() {
9557    unsafe {
9558        raw::rustClearKillChanges()
9559    }
9560}
9561
9562///
9563///  Clear the map changes for the write-only worldstate.
9564///
9565///  This is used to initialize the sending of new WorldMap packets.
9566///
9567///
9568///  Returns void
9569///
9570pub fn clear_map_changes() {
9571    unsafe {
9572        raw::rustClearMapChanges()
9573    }
9574}
9575
9576///
9577///  Get the number of indexes in the read worldstate's kill changes.
9578///
9579///
9580///  Returns the number of indexes.
9581///
9582pub fn get_kill_changes_size() -> u16 {
9583    unsafe {
9584        raw::rustGetKillChangesSize()
9585    }
9586}
9587
9588///
9589///  Get the number of indexes in the read worldstate's map changes.
9590///
9591///
9592///  Returns the number of indexes.
9593///
9594pub fn get_map_changes_size() -> u16 {
9595    unsafe {
9596        raw::rustGetMapChangesSize()
9597    }
9598}
9599
9600///
9601///  Get the refId at a certain index in the read worldstate's kill count changes.
9602///
9603///  `index` The index of the kill count.
9604///
9605///  Returns the refId.
9606///
9607pub fn get_kill_ref_id(index: u16) -> String {
9608    unsafe {
9609        CStr::from_ptr(raw::rustGetKillRefId(index))
9610            .to_str()
9611            .unwrap_or_default()
9612            .to_string()
9613    }
9614}
9615
9616///
9617///  Get the number of kills at a certain index in the read worldstate's kill count changes.
9618///
9619///  `index` The index of the kill count.
9620///
9621///  Returns the number of kills.
9622///
9623pub fn get_kill_number(index: u16) -> i16 {
9624    unsafe {
9625        raw::rustGetKillNumber(index)
9626    }
9627}
9628
9629///
9630///  Get the weather region in the read worldstate.
9631///
9632///
9633///  Returns the weather region.
9634///
9635pub fn get_weather_region() -> String {
9636    unsafe {
9637        CStr::from_ptr(raw::rustGetWeatherRegion())
9638            .to_str()
9639            .unwrap_or_default()
9640            .to_string()
9641    }
9642}
9643
9644///
9645///  Get the current weather in the read worldstate.
9646///
9647///
9648///  Returns the current weather.
9649///
9650pub fn get_weather_current() -> i16 {
9651    unsafe {
9652        raw::rustGetWeatherCurrent()
9653    }
9654}
9655
9656///
9657///  Get the next weather in the read worldstate.
9658///
9659///
9660///  Returns the next weather.
9661///
9662pub fn get_weather_next() -> i16 {
9663    unsafe {
9664        raw::rustGetWeatherNext()
9665    }
9666}
9667
9668///
9669///  Get the queued weather in the read worldstate.
9670///
9671///
9672///  Returns the queued weather.
9673///
9674pub fn get_weather_queued() -> i16 {
9675    unsafe {
9676        raw::rustGetWeatherQueued()
9677    }
9678}
9679
9680///
9681///  Get the transition factor of the weather in the read worldstate.
9682///
9683///
9684///  Returns the transition factor of the weather.
9685///
9686pub fn get_weather_transition_factor() -> f64 {
9687    unsafe {
9688        raw::rustGetWeatherTransitionFactor()
9689    }
9690}
9691
9692///
9693///  Get the X coordinate of the cell corresponding to the map tile at a certain index in  
9694///         the read worldstate's map tiles.
9695///
9696///  `index` The index of the map tile.
9697///
9698///  Returns the X coordinate of the cell.
9699///
9700pub fn get_map_tile_cell_x(index: u16) -> i16 {
9701    unsafe {
9702        raw::rustGetMapTileCellX(index)
9703    }
9704}
9705
9706///
9707///  Get the Y coordinate of the cell corresponding to the map tile at a certain index in  
9708///         the read worldstate's map tiles.
9709///
9710///  `index` The index of the map tile.
9711///
9712///  Returns the Y coordinate of the cell.
9713///
9714pub fn get_map_tile_cell_y(index: u16) -> i16 {
9715    unsafe {
9716        raw::rustGetMapTileCellY(index)
9717    }
9718}
9719
9720///
9721///  Set the region affected by the next WorldRegionAuthority packet sent.
9722///
9723///  `region` The region.
9724///
9725///  Returns void
9726///
9727pub fn set_authority_region(authority_region: &str) {
9728    unsafe {
9729        raw::rustSetAuthorityRegion(CString::new(authority_region).unwrap_or_default().as_ptr())
9730    }
9731}
9732
9733///
9734///  Set the weather region in the write-only worldstate stored on the server.
9735///
9736///  `region` The region.
9737///
9738///  Returns void
9739///
9740pub fn set_weather_region(region: &str) {
9741    unsafe {
9742        raw::rustSetWeatherRegion(CString::new(region).unwrap_or_default().as_ptr())
9743    }
9744}
9745
9746///
9747///  Set the weather forcing state in the write-only worldstate stored on the server.
9748///
9749///  Players who receive a packet with forced weather will switch to that weather immediately.
9750///
9751///  `force_state` The weather forcing state.
9752///
9753///  Returns void
9754///
9755pub fn set_weather_force_state(force_state: bool) {
9756    unsafe {
9757        raw::rustSetWeatherForceState(force_state)
9758    }
9759}
9760
9761///
9762///  Set the current weather in the write-only worldstate stored on the server.
9763///
9764///  `current_weather` The current weather.
9765///
9766///  Returns void
9767///
9768pub fn set_weather_current(current_weather: i16) {
9769    unsafe {
9770        raw::rustSetWeatherCurrent(current_weather)
9771    }
9772}
9773
9774///
9775///  Set the next weather in the write-only worldstate stored on the server.
9776///
9777///  `next_weather` The next weather.
9778///
9779///  Returns void
9780///
9781pub fn set_weather_next(next_weather: i16) {
9782    unsafe {
9783        raw::rustSetWeatherNext(next_weather)
9784    }
9785}
9786
9787///
9788///  Set the queued weather in the write-only worldstate stored on the server.
9789///
9790///  `queued_weather` The queued weather.
9791///
9792///  Returns void
9793///
9794pub fn set_weather_queued(queued_weather: i16) {
9795    unsafe {
9796        raw::rustSetWeatherQueued(queued_weather)
9797    }
9798}
9799
9800///
9801///  Set the transition factor for the weather in the write-only worldstate stored on the server.
9802///
9803///  `transition_factor` The transition factor.
9804///
9805///  Returns void
9806///
9807pub fn set_weather_transition_factor(transition_factor: f64) {
9808    unsafe {
9809        raw::rustSetWeatherTransitionFactor(transition_factor)
9810    }
9811}
9812
9813///
9814///  Set the world's hour in the write-only worldstate stored on the server.
9815///
9816///  `hour` The hour.
9817///
9818///  Returns void
9819///
9820pub fn set_hour(hour: f64) {
9821    unsafe {
9822        raw::rustSetHour(hour)
9823    }
9824}
9825
9826///
9827///  Set the world's day in the write-only worldstate stored on the server.
9828///
9829///  `day` The day.
9830///
9831///  Returns void
9832///
9833pub fn set_day(day: i16) {
9834    unsafe {
9835        raw::rustSetDay(day)
9836    }
9837}
9838
9839///
9840///  Set the world's month in the write-only worldstate stored on the server.
9841///
9842///  `month` The month.
9843///
9844///  Returns void
9845///
9846pub fn set_month(month: i16) {
9847    unsafe {
9848        raw::rustSetMonth(month)
9849    }
9850}
9851
9852///
9853///  Set the world's year in the write-only worldstate stored on the server.
9854///
9855///  `year` The year.
9856///
9857///  Returns void
9858///
9859pub fn set_year(year: i16) {
9860    unsafe {
9861        raw::rustSetYear(year)
9862    }
9863}
9864
9865///
9866///  Set the world's days passed in the write-only worldstate stored on the server.
9867///
9868///  `days_passed` The days passed.
9869///
9870///  Returns void
9871///
9872pub fn set_days_passed(days_passed: i16) {
9873    unsafe {
9874        raw::rustSetDaysPassed(days_passed)
9875    }
9876}
9877
9878///
9879///  Set the world's time scale in the write-only worldstate stored on the server.
9880///
9881///  `pid` The player ID.  
9882///  `time_scale` The time scale.
9883///
9884///  Returns void
9885///
9886pub fn set_time_scale(time_scale: f64) {
9887    unsafe {
9888        raw::rustSetTimeScale(time_scale)
9889    }
9890}
9891
9892///
9893///  Set the collision state for other players in the write-only worldstate stored  
9894///         on the server.
9895///
9896///  `state` The collision state.
9897///
9898///  Returns void
9899///
9900pub fn set_player_collision_state(state: bool) {
9901    unsafe {
9902        raw::rustSetPlayerCollisionState(state)
9903    }
9904}
9905
9906///
9907///  Set the collision state for actors in the write-only worldstate stored on the  
9908///         server.
9909///
9910///  `state` The collision state.
9911///
9912///  Returns void
9913///
9914pub fn set_actor_collision_state(state: bool) {
9915    unsafe {
9916        raw::rustSetActorCollisionState(state)
9917    }
9918}
9919
9920///
9921///  Set the collision state for placed objects in the write-only worldstate stored  
9922///         on the server.
9923///
9924///  `state` The collision state.
9925///
9926///  Returns void
9927///
9928pub fn set_placed_object_collision_state(state: bool) {
9929    unsafe {
9930        raw::rustSetPlacedObjectCollisionState(state)
9931    }
9932}
9933
9934///
9935///  Whether placed objects with collision turned on should use actor collision, i.e.  
9936///         whether they should be slippery and prevent players from standing on them.
9937///
9938///  `use_actor_collision` Whether to use actor collision.
9939///
9940///  Returns void
9941///
9942pub fn use_actor_collision_for_placed_objects(use_actor_collision: bool) {
9943    unsafe {
9944        raw::rustUseActorCollisionForPlacedObjects(use_actor_collision)
9945    }
9946}
9947
9948///
9949///  Add a new kill count to the kill count changes.
9950///
9951///  `ref_id` The refId of the kill count.  
9952///  `number` The number of kills in the kill count.
9953///
9954///  Returns void
9955///
9956pub fn add_kill(ref_id: &str, number: i16) {
9957    unsafe {
9958        raw::rustAddKill(CString::new(ref_id).unwrap_or_default().as_ptr(), number)
9959    }
9960}
9961
9962///
9963///  Add an ID to the list of script IDs whose variable changes should be sent to the  
9964///         the server by clients.
9965///
9966///  `script_id` The ID.
9967///
9968///  Returns void
9969///
9970pub fn add_synchronized_client_script_id(script_id: &str) {
9971    unsafe {
9972        raw::rustAddSynchronizedClientScriptId(CString::new(script_id).unwrap_or_default().as_ptr())
9973    }
9974}
9975
9976///
9977///  Add an ID to the list of global IDs whose value changes should be sent to the  
9978///         server by clients.
9979///
9980///  `global_id` The ID.
9981///
9982///  Returns void
9983///
9984pub fn add_synchronized_client_global_id(global_id: &str) {
9985    unsafe {
9986        raw::rustAddSynchronizedClientGlobalId(CString::new(global_id).unwrap_or_default().as_ptr())
9987    }
9988}
9989
9990///
9991///  Add a refId to the list of refIds for which collision should be enforced  
9992///         irrespective of other settings.
9993///
9994///  `ref_id` The refId.
9995///
9996///  Returns void
9997///
9998pub fn add_enforced_collision_ref_id(ref_id: &str) {
9999    unsafe {
10000        raw::rustAddEnforcedCollisionRefId(CString::new(ref_id).unwrap_or_default().as_ptr())
10001    }
10002}
10003
10004///
10005///  Clear the list of script IDs whose variable changes should be sent to the  
10006///         the server by clients.
10007///
10008///
10009///  Returns void
10010///
10011pub fn clear_synchronized_client_script_ids() {
10012    unsafe {
10013        raw::rustClearSynchronizedClientScriptIds()
10014    }
10015}
10016
10017///
10018///  Clear the list of global IDs whose value changes should be sent to the  
10019///         the server by clients.
10020///
10021///
10022///  Returns void
10023///
10024pub fn clear_synchronized_client_global_ids() {
10025    unsafe {
10026        raw::rustClearSynchronizedClientGlobalIds()
10027    }
10028}
10029
10030///
10031///  Clear the list of refIds for which collision should be enforced irrespective  
10032///         of other settings.
10033///
10034///
10035///  Returns void
10036///
10037pub fn clear_enforced_collision_ref_ids() {
10038    unsafe {
10039        raw::rustClearEnforcedCollisionRefIds()
10040    }
10041}
10042
10043///
10044///  Save the .png image data of the map tile at a certain index in the read worldstate's  
10045///         map changes.
10046///
10047///  `index` The index of the map tile.  
10048///  `file_path` The file path of the resulting file.
10049///
10050///  Returns void
10051///
10052pub fn save_map_tile_image_file(index: u16, file_path: &str) {
10053    unsafe {
10054        raw::rustSaveMapTileImageFile(index, CString::new(file_path).unwrap_or_default().as_ptr())
10055    }
10056}
10057
10058///
10059///  Load a .png file as the image data for a map tile and add it to the write-only worldstate  
10060///         stored on the server.
10061///
10062///  `cell_x` The X coordinate of the cell corresponding to the map tile.  
10063///  `cell_y` The Y coordinate of the cell corresponding to the map tile.  
10064///  `file_path` The file path of the loaded file.
10065///
10066///  Returns void
10067///
10068pub fn load_map_tile_image_file(cell_x: i16, cell_y: i16, file_path: &str) {
10069    unsafe {
10070        raw::rustLoadMapTileImageFile(cell_x, cell_y, CString::new(file_path).unwrap_or_default().as_ptr())
10071    }
10072}
10073
10074///
10075///  Send a ClientScriptSettings packet with the current client script settings in  
10076///         the write-only worldstate.
10077///
10078///  `pid` The player ID attached to the packet.  
10079///  `send_to_other_players` Whether this packet should be sent to players other than the  
10080///                            player attached to the packet (false by default).  
10081///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
10082///                            to the packet (false by default).
10083///
10084///  Returns void
10085///
10086pub fn send_client_script_settings(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
10087    unsafe {
10088        raw::rustSendClientScriptSettings(pid, send_to_other_players, skip_attached_player)
10089    }
10090}
10091
10092///
10093///  Send a WorldKillCount packet with the current set of kill count changes in the write-only  
10094///         worldstate.
10095///
10096///  `pid` The player ID attached to the packet.  
10097///  `send_to_other_players` Whether this packet should be sent to players other than the  
10098///                            player attached to the packet (false by default).  
10099///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
10100///                            to the packet (false by default).
10101///
10102///  Returns void
10103///
10104pub fn send_world_kill_count(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
10105    unsafe {
10106        raw::rustSendWorldKillCount(pid, send_to_other_players, skip_attached_player)
10107    }
10108}
10109
10110///
10111///  Send a WorldMap packet with the current set of map changes in the write-only  
10112///         worldstate.
10113///
10114///  `pid` The player ID attached to the packet.  
10115///  `broadcast` Whether this packet should be sent only to the attached player  
10116///                   or to all players on the server.
10117///
10118///  Returns void
10119///
10120pub fn send_world_map(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
10121    unsafe {
10122        raw::rustSendWorldMap(pid, send_to_other_players, skip_attached_player)
10123    }
10124}
10125
10126///
10127///  Send a WorldTime packet with the current time and time scale in the write-only  
10128///         worldstate.
10129///
10130///  `pid` The player ID attached to the packet.  
10131///  `send_to_other_players` Whether this packet should be sent to players other than the  
10132///                            player attached to the packet (false by default).  
10133///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
10134///                            to the packet (false by default).
10135///
10136///  Returns void
10137///
10138pub fn send_world_time(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
10139    unsafe {
10140        raw::rustSendWorldTime(pid, send_to_other_players, skip_attached_player)
10141    }
10142}
10143
10144///
10145///  Send a WorldWeather packet with the current weather in the write-only worldstate.
10146///
10147///  `pid` The player ID attached to the packet.  
10148///  `send_to_other_players` Whether this packet should be sent to players other than the  
10149///                            player attached to the packet (false by default).  
10150///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
10151///                            to the packet (false by default).
10152///
10153///  Returns void
10154///
10155pub fn send_world_weather(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
10156    unsafe {
10157        raw::rustSendWorldWeather(pid, send_to_other_players, skip_attached_player)
10158    }
10159}
10160
10161///
10162///  Send a WorldCollisionOverride packet with the current collision overrides in  
10163///         the write-only worldstate.
10164///
10165///  `pid` The player ID attached to the packet.  
10166///  `send_to_other_players` Whether this packet should be sent to players other than the  
10167///                            player attached to the packet (false by default).  
10168///  `skip_attached_player` Whether the packet should skip being sent to the player attached  
10169///                            to the packet (false by default).
10170///
10171///  Returns void
10172///
10173pub fn send_world_collision_override(pid: u16, send_to_other_players: bool, skip_attached_player: bool) {
10174    unsafe {
10175        raw::rustSendWorldCollisionOverride(pid, send_to_other_players, skip_attached_player)
10176    }
10177}
10178
10179///
10180///  Send a WorldRegionAuthority packet establishing a certain player as the only one who  
10181///         should process certain region-specific events (such as weather changes).
10182///
10183///  It is always sent to all players.
10184///
10185///  `pid` The player ID attached to the packet.
10186///
10187///  Returns void
10188///
10189pub fn send_world_region_authority(pid: u16) {
10190    unsafe {
10191        raw::rustSendWorldRegionAuthority(pid)
10192    }
10193}
10194
10195pub fn read_last_worldstate() {
10196    unsafe {
10197        raw::rustReadLastWorldstate()
10198    }
10199}
10200
10201pub fn copy_last_worldstate_to_store() {
10202    unsafe {
10203        raw::rustCopyLastWorldstateToStore()
10204    }
10205}
10206