-
Notifications
You must be signed in to change notification settings - Fork 9
/
Imports.cs
404 lines (362 loc) · 32.8 KB
/
Imports.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
using System;
using System.Runtime.InteropServices;
namespace FFACETools
{
public partial class FFACE
{
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int CreateInstance (UInt32 PID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void DeleteInstance (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetLoginStatus (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool Access (int instanceID);
#region Navigator Imports
/*
* FFACE 4.2.0.0+ imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern void StartRunning(int Instance, float X, float Z);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void StopRunning(int Instance);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool IsRunning(int Instance);
#endregion
#region Player Imports
/// <summary>
/// FFACE 4.0.0.9+ import for player information
/// </summary>
/// <param name="instance">Instance id generated by FFACE</param>
/// <param name="playerInfo">Reference to playerinfo struct to be returned by function</param>
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetPlayerInfo (int instanceID, ref PLAYERINFO playerInfo);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern Status GetPlayerStatus (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetPlayerServerID (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern ViewMode GetViewMode (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetCastMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetCastCountDown (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetCastPercent (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short GetCastPercentEx (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetWeatherType (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool HasKeyItem (int instanceID, uint ID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool HasSpell (int instanceID, uint ID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool GetAbilityAvailable (int instanceID, uint ID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool GetTraitAvailable (int instanceID, uint ID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool GetPetCommandAvailable (int instanceID, uint ID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool GetWeaponSkillAvailable (int instanceID, uint ID);
#endregion
#region Party Member Imports
/// <summary>
/// FFACE 4.0.0.9 import to get a party members information
/// </summary>
/// <param name="instance">Instance ID generated by FFACE</param>
/// <param name="index">Index of party member</param>
/// <param name="partyMember">Information returned by reference about party member</param>
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetPartyMember (int instanceID, byte index, ref PARTYMEMBER partyMember);
#endregion
#region Chat Imports
/*
* FFACE 4.0.0.9 Imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool IsNewLine (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetChatLine (int instanceID, short index, byte[] buffer, ref int size);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetChatLineCount (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetChatLineEx (int instanceID, short index, byte[] buffer, ref int size, ref ChatMode extra);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetChatLineR (int instanceID, short index, byte[] buffer, ref int size);
#endregion
#region Timer Imports
/*
* FFACE 4.0.0.9 Imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short GetSpellRecast (int instanceID, SpellList index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern AbilityList GetAbilityID (int instanceID, byte index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetAbilityRecast (int instanceID, byte index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetVanaUTC (int instanceID);
#endregion
#region Inventory Imports
/*
* FFACE 4.0.0.9 Imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetInventoryMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetSafeMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetStorageMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetTempMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetLockerMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetSatchelMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetSackMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetCaseMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetInventoryItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetSafeItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetStorageItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetTempItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetLockerItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetSatchelItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetSackItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetCaseItem (int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern INVENTORYITEM GetWardrobeItem(int instanceID, int index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetSelectedItemName (int instanceID, byte[] buffer, ref int size);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetSelectedItemNum (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetSelectedItemIndex (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern TREASUREITEM GetTreasureItem (int instanceID, byte index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetEquippedItemIndex(int instanceID, EquipSlot slot);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetEquippedItemLocation(int instanceID, EquipSlot slot);
#endregion
#region NPC/PC Imports
/*
* FFACE 4.0.0.9 Imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetNPCBit (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern NPCType GetNPCType (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool IsNPCclaimed (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetNPCclaimID (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool NPCIsActive (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetNPCName (int instanceID, int npcID, byte[] buffer, ref int size);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetNPCPosX (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetNPCPosY (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetNPCPosZ (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetNPCPosH (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetNPCHPP (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern Status GetNPCStatus (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetNPCPetID (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short GetNPCTP (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float GetNPCDistance (int instanceID, int npcID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern double GetNPCHeadingToNPC (int instanceID, int npcIDStart, int npcIDEnd);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool SetNPCTradeInfo (int InstanceID, int Zero, ushort ItemID, byte Index, byte Count, byte Box, UInt32 Gil);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetNPCTradeInfo (int instanceID, ref TRADEINFO info);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool IsSynthesis (int InstanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern float SetNPCPosH (int InstanceID, int index, float value);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void ReadRawNPCData (int InstanceID, int index, int start, byte[] buffer, ref int length);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool WriteRawNPCData (int InstanceID, int index, int start, byte[] buffer, int length);
/*
* FFACE paid functions
*
* BOOL SetNPCTradeInfo(void* inst, int Code, unsigned short ItemID, char Index, char Count, char Box, unsigned int Gil)
* void GetNPCTradeInfo(void* inst, TRADEINFO* TI)
* BOOL IsSynthesis(void* inst)
*/
[DllImport("FFACE.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = false, EntryPoint = "SetCraftItem", CallingConvention = CallingConvention.Cdecl)]
private static extern bool SetCraftItem (int instanceID, int Zero, ushort ItemID, byte Index, byte Count, byte Box);
#endregion
#region Target Imports
/// <summary>
/// FFACE 4.0.0.9 import to get information about the target
/// </summary>
/// <param name="instance">Instance ID generated by FFACE</param>
/// <param name="targetInfo">Information returned by reference about the target</param>
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetTargetInfo (int instanceID, ref TARGETINFO targetInfo);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool SetTarget (int instanceID, int index);
#endregion
#region Windower Imports
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CKHSendString (int instanceID, string data);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CKHSetKey (int instanceID, KeyCode key, bool down);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHCreateTextObject (int instanceID, string name);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetText (int instanceID, string name, string data);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetColor (int instanceID, string name, byte transparent, byte red, byte green, byte blue);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetLocation (int instanceID, string name, float vertical, float horizontal);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetVisibility (int instanceID, string name, bool visible);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHFlushCommands (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHDeleteTextObject (int instanceID, string name);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetBold (int instanceID, string name, bool bold);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetItalic (int instanceID, string name, bool italic);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetBGColor (int instanceID, string name, byte transparent, byte red, byte green, byte blue);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetBGBorderSize (int instanceID, string name, float pixels);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetBGVisibility (int instanceID, string name, bool visible);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetRightJustified (int instanceID, string name, bool justified);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CTHSetFont (int instanceID, string name, string font, short height);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CKHBlockInput (int instanceID, bool block);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short CCHGetArgCount (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void CCHGetArg (int instanceID, short index, ref string buffer);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int CCHIsNewCommand (int instanceID);
#endregion
#region Fish Imports
/*
* FFACE 4.0.0.9 imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool FishOnLine (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern RodAlign GetRodPosition (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetFishHPMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetFishHP (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short GetFishOnlineTime (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short GetFishTimeout (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetFishID1 (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetFishID2 (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetFishID3 (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetFishID4 (int instanceID);
/*
* FFACE paid functions
*
* bool SetFishHP(void* inst, int value)
* bool FightFish(void* inst)
* bool SetTimeOut(void* inst, short value)
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool SetFishHP (int InstanceID, int value);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool SetTimeOut (int InstanceID, short value);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool FightFish (int InstanceID);
#endregion
#region Alliance Imports
/// <summary>
/// FFACE 4.0.0.9 import to get information about the alliance
/// </summary>
/// <param name="instance">Instance ID generated by FFACE</param>
/// <param name="allianceInfo">Information returned by reference about the alliance</param>
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetAllianceInfo (int instance, ref ALLIANCEINFO allianceInfo);
#endregion
#region Menu Imports
/*
* FFACE 4.0.0.10 imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool MenuIsOpen (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void MenuName (int instanceID, byte[] buffer, ref int size);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void MenuSelection (int instanceID, byte[] buffer, ref int size);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void MenuHelp (int instanceID, byte[] buffer, ref int size);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte ShopQuantityMax (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte ShopQuantity (int instanceID);
/* FFACE 4.1.0.14 Exports */
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetDialogStrings (int instanceID, byte[] buffer, ref int size);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short GetDialogIndex (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetDialogIndexCount (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern short GetDialogID (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetMenuIndex (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern bool SetMenuIndex (int instanceID, int index);
#endregion
#region Search Imports
/*
* FFACE v4.0.0.10 imports
*/
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern int GetSearchTotalCount (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetSearchPageCount (int instanceID);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern Zone GetSearchZone (int instanceID, short index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern Job GetSearchMainJob (int instanceID, short index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern Job GetSearchSubJob (int instanceID, short index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetSearchMainlvl (int instanceID, short index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern byte GetSearchSublvl (int Instance, short index);
[DllImport(FFACE_LIBRARY, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
private static extern void GetSearchName (int instanceID, short index, byte[] buffer, ref int size);
#endregion
} // @ public partial class FFACE
}