-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPawn.cs
667 lines (594 loc) · 23.5 KB
/
Pawn.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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
using System;
using LavishScriptAPI;
namespace Vanguard.ISXVG
{
/// <summary>
///
/// </summary>
public enum PawnType
{
/// <summary>
///
/// </summary>
NULL = -1,
/// <summary>
///
/// </summary>
Me,
/// <summary>
///
/// </summary>
PC,
/// <summary>
///
/// </summary>
NPC,
/// <summary>
///
/// </summary>
AggroNPC,
/// <summary>
///
/// </summary>
Pet,
/// <summary>
///
/// </summary>
MyPet,
/// <summary>
///
/// </summary>
GroupMember,
/// <summary>
///
/// </summary>
Trainer,
/// <summary>
///
/// </summary>
Merchant,
/// <summary>
///
/// </summary>
Resource,
/// <summary>
///
/// </summary>
CraftingStation,
/// <summary>
///
/// </summary>
Corpse,
/// <summary>
///
/// </summary>
Clickable,
/// <summary>
///
/// </summary>
Attackable,
/// <summary>
///
/// </summary>
Mailbox,
/// <summary>
///
/// </summary>
AssemblyStation,
/// <summary>
///
/// </summary>
Taskmaster,
/// <summary>
///
/// </summary>
Banker,
/// <summary>
///
/// </summary>
Broker,
/// <summary>
///
/// </summary>
Altar,
/// <summary>
///
/// </summary>
Uknown
}
/// <summary>
/// This DataType includes all of the data available to ISXVG that is related to entities within the world.
/// </summary>
public class Pawn : LavishScriptObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Pawn"/> class.
/// </summary>
/// <param name="Args">The args.</param>
public Pawn(params string[] Args) : base(LavishScript.Objects.GetObject("Pawn", Args)) {}
/// <summary>
/// Initializes a new instance of the <see cref="Pawn"/> class.
/// </summary>
/// <param name="Copy"></param>
public Pawn(LavishScriptObject Copy) : base(Copy) {}
/// <summary>
/// Initializes a new instance of the <see cref="Pawn"/> class.
/// </summary>
/// <param name="index">The index.</param>
public Pawn(int index) : this(index.ToString()) {}
/// <summary>
/// Gets the name of this <see cref="Pawn"/>.
/// </summary>
/// <value>The name.</value>
public string Name { get { return GetMember<string>("Name"); } }
/// <summary>
/// Gets the ID of this <see cref="Pawn"/>.
/// </summary>
/// <value>The ID.</value>
public Int64 ID { get { return GetMember<Int64>("ID"); } }
/// <summary>
/// Gets the type of the pawn.
/// </summary>
/// <value>The type of the pawn.</value>
public PawnType PawnType
{
get
{
switch (Type)
{
case "Me":
return PawnType.Me;
case "PC":
return PawnType.PC;
case "NPC":
return PawnType.NPC;
case "AggroNPC":
return PawnType.AggroNPC;
case "Pet":
return PawnType.Pet;
case "MyPet":
return PawnType.MyPet;
case "Group Member":
return PawnType.GroupMember;
case "Trainer":
return PawnType.Trainer;
case "Merchant":
return PawnType.Merchant;
case "Resource":
return PawnType.Resource;
case "Crafting Station":
return PawnType.CraftingStation;
case "Corpse":
return PawnType.Corpse;
case "Clickable":
return PawnType.Clickable;
case "Attackable":
return PawnType.Attackable;
case "Mailbox":
return PawnType.Mailbox;
case "Assembly Station":
return PawnType.AssemblyStation;
case "Taskmaster":
return PawnType.Taskmaster;
case "Banker":
return PawnType.Banker;
case "Broker":
return PawnType.Broker;
case "Altar":
return PawnType.Altar;
case "Unknown":
return PawnType.Uknown;
default:
return PawnType.NULL;
}
}
}
/// <summary>
/// Gets the type of this <see cref="Pawn"/>.
/// </summary>
/// <value>The type.</value>
public string Type { get { return GetMember<string>("Type"); } }
/// <summary>
/// Gets the location of this <see cref="Pawn"/>.
/// </summary>
/// <value>The location.</value>
public Point3f Location { get { return GetMember<Point3f>("Location"); } }
/// <summary>
/// Gets the velocity of this <see cref="Pawn"/>.
/// </summary>
/// <value>The velocity.</value>
public Point3f Velocity { get { return GetMember<Point3f>("Velocity"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is moving.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is moving; otherwise, <c>false</c>.
/// </value>
public bool IsMoving { get { return GetMember<bool>("IsMoving"); } }
/// <summary>
/// Gets the X of this <see cref="Pawn"/>.
/// </summary>
/// <value>The X.</value>
public float X { get { return GetMember<float>("X"); } }
/// <summary>
/// Gets the Y of this <see cref="Pawn"/>.
/// </summary>
/// <value>The Y.</value>
public float Y { get { return GetMember<float>("Y"); } }
/// <summary>
/// Gets the Z of this <see cref="Pawn"/>.
/// </summary>
/// <value>The Z.</value>
public float Z { get { return GetMember<float>("Z"); } }
/// <summary>
/// Gets the level of this <see cref="Pawn"/>.
/// </summary>
/// <value>The level.</value>
public int Level { get { return GetMember<int>("Level"); } }
/// <summary>
/// This is the heading that the pawn is currently facing and/or heading. Not to be confused with "HeadingTo", which
/// is the heading YOU would take to reach the pawn.
/// </summary>
public int Heading { get { return GetMember<int>("Heading"); } }
/// <summary>
/// Gets the pitch of this <see cref="Pawn"/>.
/// </summary>
/// <value>The pitch.</value>
public int Pitch { get { return GetMember<int>("Pitch"); } }
/// <summary>
/// Gets the yaw of this <see cref="Pawn"/>.
/// </summary>
/// <value>The yaw.</value>
public int Yaw { get { return GetMember<int>("Yaw"); } }
/// <summary>
/// Gets the roll of this <see cref="Pawn"/>.
/// </summary>
/// <value>The roll.</value>
public int Roll { get { return GetMember<int>("Roll"); } }
/// <summary>
/// Gets the distance of this <see cref="Pawn"/>.
/// </summary>
/// <value>The distance.</value>
public float Distance { get { return GetMember<float>("Distance"); } }
/// <summary>
/// Gets the two dem distance of this <see cref="Pawn"/>.
/// </summary>
/// <value>The two dem distance.</value>
public float TwoDemDistance { get { return GetMember<float>("TwoDemDistance"); } }
/// <summary>
/// Gets the heading to of this <see cref="Pawn"/>.
/// </summary>
/// <value>The heading to.</value>
public float HeadingTo { get { return GetMember<float>("HeadingTo"); } }
/// <summary>
/// Gets the gender of this <see cref="Pawn"/>.
/// </summary>
/// <value>The gender.</value>
public string Gender { get { return GetMember<string>("Gender"); } }
/// <summary>
/// Gets the true gender of this <see cref="Pawn"/>.
/// </summary>
/// <value>The true gender.</value>
public string TrueGender { get { return GetMember<string>("TrueGender"); } }
/// <summary>
/// Gets the race ID of this <see cref="Pawn"/>.
/// </summary>
/// <value>The race ID.</value>
public int RaceID { get { return GetMember<int>("RaceID"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is mounted.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is mounted; otherwise, <c>false</c>.
/// </value>
public bool IsMounted { get { return GetMember<bool>("IsMounted"); } }
/// <summary>
/// Gets the race of this <see cref="Pawn"/>.
/// </summary>
/// <value>The race.</value>
public string Race { get { return GetMember<string>("Race"); } }
/// <summary>
/// Gets the race abr of this <see cref="Pawn"/>.
/// </summary>
/// <value>The race abr.</value>
public string RaceAbr { get { return GetMember<string>("RaceAbr"); } }
/// <summary>
/// Gets the posture of this <see cref="Pawn"/>.
/// </summary>
/// <value>The posture.</value>
public string Posture { get { return GetMember<string>("Posture"); } }
/// <summary>
/// Gets the state of the combat.
/// </summary>
/// <value>The state of the combat.</value>
public int CombatState { get { return GetMember<int>("CombatState"); } }
/// <summary>
/// Gets the guild ID of this <see cref="Pawn"/>.
/// </summary>
/// <value>The guild ID.</value>
public int GuildID { get { return GetMember<int>("GuildID"); } }
/// <summary>
/// works for PCs only
/// </summary>
public int PVPPoints { get { return GetMember<int>("PVPPoints"); } }
/// <summary>
/// Gets the faction ID of this <see cref="Pawn"/>.
/// </summary>
/// <value>The faction ID.</value>
public int FactionID { get { return GetMember<int>("FactionID"); } }
/// <summary>
/// Gets the speed of this <see cref="Pawn"/>.
/// </summary>
/// <value>The speed.</value>
public float Speed { get { return GetMember<float>("Speed"); } }
/// <summary>
/// Gets the max speed of this <see cref="Pawn"/>.
/// </summary>
/// <value>The max speed.</value>
public float MaxSpeed { get { return GetMember<float>("MaxSpeed"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> can see me if in range.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> can see me if in range; otherwise, <c>false</c>.
/// </value>
public bool CanSeeMeIfInRange { get { return GetMember<bool>("CanSeeMeIfInRange"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> can see me if stealthed.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> can see me if stealthed; otherwise, <c>false</c>.
/// </value>
public bool CanSeeMeIfStealthed { get { return GetMember<bool>("CanSeeMeIfStealthed"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> can fly.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> can fly; otherwise, <c>false</c>.
/// </value>
public bool CanFly { get { return GetMember<bool>("CanFly"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> can swim.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> can swim; otherwise, <c>false</c>.
/// </value>
public bool CanSwim { get { return GetMember<bool>("CanSwim"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is dead.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is dead; otherwise, <c>false</c>.
/// </value>
public bool IsDead { get { return GetMember<bool>("IsDead"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is stealthed.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is stealthed; otherwise, <c>false</c>.
/// </value>
public bool IsStealthed { get { return GetMember<bool>("IsStealthed"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is LFG.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is LFG; otherwise, <c>false</c>.
/// </value>
public bool IsLFG { get { return GetMember<bool>("IsLFG"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is in offensive form.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is in offensive form; otherwise, <c>false</c>.
/// </value>
public bool IsInOffensiveForm { get { return GetMember<bool>("IsInOffensiveForm"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is outside.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is outside; otherwise, <c>false</c>.
/// </value>
public bool IsOutside { get { return GetMember<bool>("IsOutside"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is indoors.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is indoors; otherwise, <c>false</c>.
/// </value>
public bool IsIndoors { get { return GetMember<bool>("IsIndoors"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is aggro.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is aggro; otherwise, <c>false</c>.
/// </value>
public bool IsAggro { get { return GetMember<bool>("IsAggro"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is group member.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is group member; otherwise, <c>false</c>.
/// </value>
public bool IsGroupMember { get { return GetMember<bool>("IsGroupMember"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is in my group.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is in my group; otherwise, <c>false</c>.
/// </value>
public bool IsInMyGroup { get { return GetMember<bool>("IsInMyGroup"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is attackable.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is attackable; otherwise, <c>false</c>.
/// </value>
public bool IsAttackable { get { return GetMember<bool>("IsAttackable"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is clickable.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is clickable; otherwise, <c>false</c>.
/// </value>
public bool IsClickable { get { return GetMember<bool>("IsClickable"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is A pet.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is A pet; otherwise, <c>false</c>.
/// </value>
public bool IsAPet { get { return GetMember<bool>("IsAPet"); } }
/// <summary>
/// Gets the cull distance of this <see cref="Pawn"/>.
/// </summary>
/// <value>The cull distance.</value>
public float CullDistance { get { return GetMember<float>("CullDistance"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> has quest flag.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> has quest flag; otherwise, <c>false</c>.
/// </value>
public bool HasQuestFlag { get { return GetMember<bool>("HasQuestFlag"); } }
/// <summary>
/// Gets the color of the quest flag.
/// </summary>
/// <value>The color of the quest flag.</value>
public string QuestFlagColor { get { return GetMember<string>("QuestFlagColor"); } }
/// <summary>
/// Gets a value indicating whether [contains loot].
/// </summary>
/// <value><c>true</c> if [contains loot]; otherwise, <c>false</c>.</value>
public bool ContainsLoot { get { return GetMember<bool>("ContainsLoot"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is harvestable.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is harvestable; otherwise, <c>false</c>.
/// </value>
public bool IsHarvestable { get { return GetMember<bool>("IsHarvestable"); } }
/// <summary>
/// Gets the title of this <see cref="Pawn"/>.
/// </summary>
/// <value>The title.</value>
public string Title { get { return GetMember<string>("Title"); } }
/// <summary>
/// Gets the title pre of this <see cref="Pawn"/>.
/// </summary>
/// <value>The title pre.</value>
public string TitlePre { get { return GetMember<string>("TitlePre"); } }
/// <summary>
/// Gets the title post of this <see cref="Pawn"/>.
/// </summary>
/// <value>The title post.</value>
public string TitlePost { get { return GetMember<string>("TitlePost"); } }
/// <summary>
/// Gets a value indicating whether [have LOS to].
/// </summary>
/// <value><c>true</c> if [have LOS to]; otherwise, <c>false</c>.</value>
public bool HaveLOSTo { get { return GetMember<bool>("HaveLOSTo"); } }
/// <summary>
/// Gets a value indicating whether [owned by me].
/// </summary>
/// <value><c>true</c> if [owned by me]; otherwise, <c>false</c>.</value>
public bool OwnedByMe { get { return GetMember<bool>("OwnedByMe"); } }
/// <summary>
/// Gets a value indicating whether [owner is me].
/// </summary>
/// <value><c>true</c> if [owner is me]; otherwise, <c>false</c>.</value>
public bool OwnerIsMe { get { return GetMember<bool>("OwnerIsMe"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is stunned.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is stunned; otherwise, <c>false</c>.
/// </value>
public bool IsStunned { get { return GetMember<bool>("IsStunned"); } }
/// <summary>
/// Gets a value indicating whether this <seealso cref="Pawn"/> is ready.
/// </summary>
/// <value>
/// <c>true</c> if this <seealso cref="Pawn"/> is ready; otherwise, <c>false</c>.
/// </value>
public bool IsReady { get { return GetMember<bool>("IsReady"); } }
/// <summary>
/// Gets the owner of this <see cref="Pawn"/>.
/// </summary>
/// <value>The owner.</value>
public Pawn Owner
{
get
{
LavishScriptObject Obj = GetMember("Owner");
return new Pawn(Obj);
}
}
/// <summary>
/// Gets to actor of this <see cref="Pawn"/>.
/// </summary>
/// <value>To actor.</value>
public Actor ToActor { get { return GetMember<Actor>("ToActor"); } }
/// <summary>
/// Checks the collision.
/// </summary>
/// <returns></returns>
public Actor CheckCollision()
{
LavishScriptObject Obj = GetMember("CheckCollision");
return new Actor(Obj);
}
/// <summary>
/// Checks the collision.
/// </summary>
/// <param name="x">The X.</param>
/// <param name="y">The Y.</param>
/// <param name="z">The Z.</param>
/// <returns></returns>
public Actor CheckCollision(float x, float y, float z)
{
LavishScriptObject Obj = GetMember("CheckCollision", x.ToString(), y.ToString(), z.ToString());
return new Actor(Obj);
}
/// <summary>
/// Loots this <see cref="Pawn"/>.
/// </summary>
/// <returns></returns>
public bool Loot()
{
return ExecuteMethod("Loot");
}
/// <summary>
/// Loots all.
/// </summary>
/// <returns></returns>
public bool LootAll()
{
return ExecuteMethod("LootAll");
}
/// <summary>
/// Targets this <see cref="Pawn"/>.
/// </summary>
/// <returns></returns>
public bool Target()
{
return ExecuteMethod("Target");
}
/// <summary>
/// Faces this <see cref="Pawn"/>.
/// </summary>
/// <returns></returns>
public bool Face()
{
return ExecuteMethod("Face");
}
/// <summary>
/// As of 3.31.2007, this method works for the following pawn types: Banker, Broker, Taskmaster, Merchant, Trainer, QuestNPC,
/// Corpse, Mailbox, Crafting Station, and Resource.
/// </summary>
/// <returns></returns>
public bool DoubleClick()
{
return ExecuteMethod("DoubleClick");
}
}
}