-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdota2.d.ts
2056 lines (2022 loc) · 69.9 KB
/
dota2.d.ts
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
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// made by 12548
// modified and decorated by snajdovski
declare var $: $;
declare var panorama: $;
declare var GameEvents: CDOTA_PanoramaScript_GameEvents;
declare var GameUI: CDOTA_PanoramaScript_GameUI;
declare var CustomNetTables: CDOTA_PanoramaScript_CustomNetTables;
declare var Players: CScriptBindingPR_Players;
declare var Entities: CScriptBindingPR_Entities;
declare var Abilities: CScriptBindingPR_Abilities;
declare var Items: CScriptBindingPR_Items;
declare var Game: CScriptBindingPR_Game;
declare var Buffs: Buffs;
declare var Particles: Particles
type js_raw_args = any;
type unknown_variant_type = any;
type js_value = any;
type js_object = Object;
interface Particles {
/**
* Creates a new particle effect for local player
*/
CreateParticle(particleName: string, particleAttach: number, entityIndex: number): number
/**
* Frees the specified particle index
*/
ReleaseParticleIndex(particleId: number)
/**
* Destroys particle.
*/
DestroyParticleEffect(particleID: number, immediately: boolean)
/**
* Set the control point data for a control on a particle effect
*/
SetParticleControl(particleId: number, controlIndex: number, controlData: number[])
SetParticleControlEnt(particleId: number, controlIndex: number, entityIndex: number, int_4: number, attach_name: string, Vector_6: number[], bool_7: boolean)
SetParticleControlForward(particleId: number, controlIndex: number, vForward: number[])
SetParticleAlwaysSimulate(particleId: number)
}
interface Buffs {
GetName(nEntityOwner, nBuffID): string
GetClass(nEntityOwner, nBuffID): string
GetTexture(nEntityOwner, nBuffID): string
GetDuration(nEntityOwner, nBuffID): number
GetDieTime(nEntityOwner, nBuffID): number
GetRemainingTime(nEntityOwner, nBuffID): number
GetElapsedTime(nEntityOwner, nBuffID): number
GetCreationTime(nEntityOwner, nBuffID): number
GetStackCount(nEntityOwner, nBuffID): number
IsDebuff(nEntityOwner, nBuffID): boolean
IsHidden(nEntityOwner, nBuffID): boolean
/**
* Get the owner of the ability responsible for the modifier.
*/
GetCaster(nEntityOwner, nBuffID)
/**
* Get the unit the modifier is parented to.
*/
GetParent(nEntityOwner, nBuffID)
/**
* Get the ability that generated the modifier.
*/
GetAbility(nEntityOwner, nBuffID)
}
interface CDOTA_PanoramaScript_GameEvents{
/**
* Subscribe to a game event
*/
Subscribe(pEventName: string, funcVal: Function): number
/**
* Unsubscribe from a game event
*/
Unsubscribe(nCallbackHandle: number)
/**
* Send a custom game event
*/
SendCustomGameEventToServer(pEventName: string, eventArgs: Object)
/**
* Send a client-side event using gameeventmanager (only useful for a few specific events)
*/
SendEventClientSide(pEventName: string, eventArgs: Object)
}
interface CDOTA_PanoramaScript_GameUI{
/**
* Control whether the default UI is enabled
*/
SetDefaultUIEnabled(nElementType: number, bVisible: boolean): void
/**
* Get the current UI configuration
*/
CustomUIConfig(): any
/**
* Create a minimap ping at the given location
*/
PingMinimapAtLocation(vec3: [number, number, number]): void
/**
* Install a mouse input filter
*/
SetMouseCallback(callbackFn: Function): void
EnableAliMode(bEnable: boolean, nPort: number, offsetVal: number, nScale: number)
/**
* Get the current mouse position.
*/
GetCursorPosition(): [number, number]
/**
* Return the entity index of the entity under the given screen position.
*/
FindScreenEntities(screenLocVec2: [number, number]): Array<any>
/**
* Get the world position of the screen position, or null if the cursor is out of the world.
*/
GetScreenWorldPosition(screenLocVec2: [number, number]): [number, number, number]
/**
* Install a mouse input filter
*/
WasMousePressed(nButtonNum: number): boolean
/**
* Install a mouse input filter
*/
WasMouseDoublePressed(nButtonNum: number): boolean
/**
* Install a mouse input filter
*/
IsMouseDown(nButtonNum: number): boolean
/**
* Is the shift button pressed?
*/
IsShiftDown(): boolean
/**
* Is the alt button pressed?
*/
IsAltDown(): boolean
/**
* Is the control button pressed?
*/
IsControlDown(): boolean
/**
* Get the current UI click interaction mode.
*/
GetClickBehaviors(): CLICK_BEHAVIORS
/**
* DEPRECATED: usually you don't need this.
* Select a unit, adding it to the group or replacing the current selection.
*/
SelectUnit(nEntityIndex: number, bAddToGroup: boolean)
/**
* Set the minimum camera pitch angle.
*/
SetCameraPitchMin(flPitchMin: number): void
/**
* Set the maximum camera pitch angle.
*/
SetCameraPitchMax(flPitchMax: number): void
/**
* Set the camera's yaw.
*/
SetCameraYaw(flCameraYaw: number): void
/**
* Offset the camera's look at point.
*/
SetCameraLookAtPositionHeightOffset(flCameraLookAtHeightOffset: number): void
/**
* Set the camera distance from the look at point.
*/
SetCameraDistance(flDistance: number): void
/**
* Set the gap between the bottom of the screen and the game rendering viewport. (Value expressed as pixels in a normalized 1024x768 viewport.)
*/
SetRenderBottomInsetOverride(nInset: number): void
/**
* Set the gap between the top of the screen and the game rendering viewport. (Value expressed as pixels in a normalized 1024x768 viewport.)
*/
SetRenderTopInsetOverride(nInset: number): void
/**
* Set the camera target for the local player, or -1 to clear.
*/
SetCameraTarget(nTargetEntIndex: number): void
}
interface CDOTA_PanoramaScript_CustomNetTables{
/**
* Get a key from a custom net table
*/
GetTableValue(pTableName: string, pKeyName: string)
/**
* Get all values from a custom net table
*/
GetAllTableValues(pTableName: string)
/**
* Register a callback when a particular custom net table changes
*/
SubscribeNetTableListener(tableName: string, callback:Function): any
/**
* Unsubscribe from a game event
*/
UnsubscribeNetTableListener(nCallbackHandle: number): any
}
interface CScriptBindingPR_Players {
/**
* Get the maximum number of players in the game.
*/
GetMaxPlayers(): number
/**
* Get the maximum number of players on teams.
*/
GetMaxTeamPlayers(): number
/**
* Get the local player ID.
*/
GetLocalPlayer(): number
/**
* Is the nth player a valid player?
*/
IsValidPlayerID(iPlayerID: number): boolean
/**
* Return the name of a player.
*/
GetPlayerName(iPlayerID: number): string
/**
* Get the entity index of the hero controlled by this player.
*/
GetPlayerHeroEntityIndex(iPlayerID: number): number
/**
* Get the entities this player has selected.
*/
GetSelectedEntities(iPlayerID: number): number[]
/**
* Get the entities this player is querying.
*/
GetQueryUnit(iPlayerID: number): number
/**
* Get local player current portrait unit. (ie. Player's hero or primary selected unit.)
*/
GetLocalPlayerPortraitUnit(): number
/**
* Can the player buy back?
*/
CanPlayerBuyback(iPlayerID: number): boolean
/**
* Does this player have a custom game ticket?
*/
HasCustomGameTicketForPlayerID(iPlayerID: number): boolean
/**
* The number of assists credited to a player.
*/
GetAssists(iPlayerID: number): number
GetClaimedDenies(iPlayerID: number): number
GetClaimedMisses(iPlayerID: number): number
/**
* The number of deaths a player has suffered.
*/
GetDeaths(iPlayerID: number): number
/**
* The number of denies credited to a player.
*/
GetDenies(iPlayerID: number): number
/**
* The amount of gold a player has.
*/
GetGold(iPlayerID: number): number
/**
* The number of kills credited to a player.
*/
GetKills(iPlayerID: number): number
GetLastBuybackTime(iPlayerID: number): number
GetLastHitMultikill(iPlayerID: number): number
/**
* The number of last hits credited to a player.
*/
GetLastHits(iPlayerID: number): number
GetLastHitStreak(iPlayerID: number): number
/**
* The current level of a player.
*/
GetLevel(iPlayerID: number): number
GetMisses(iPlayerID: number): number
GetNearbyCreepDeaths(iPlayerID: number): number
/**
* Total reliable gold for this player.
*/
GetReliableGold(iPlayerID: number): number
GetRespawnSeconds(iPlayerID: number): number
GetStreak(iPlayerID: number): number
/**
* Total gold earned in this game by this player.
*/
GetTotalEarnedGold(iPlayerID: number): number
/**
* Total xp earned in this game by this player.
*/
GetTotalEarnedXP(iPlayerID: number): number
/**
* Total unreliable gold for this player.
*/
GetUnreliableGold(iPlayerID: number): number
/**
* Get the team this player is on.
*/
GetTeam(iPlayerID: number): number
/**
* Average gold earned per minute for this player.
*/
GetGoldPerMin(iPlayerID: number): number
/**
* Average xp earned per minute for this player.
*/
GetXPPerMin(iPlayerID: number): number
/**
* Return the name of the hero a player is controlling.
*/
GetPlayerSelectedHero(iPlayerID: number): string
/**
* Get the player color.
* @returns raw number (RGB), you need to turn it into HEX
*/
GetPlayerColor(iPlayerID: number): number
/**
* Is this player a spectator.
*/
IsSpectator(iPlayerID: number): boolean
PlayerPortraitClicked(nClickedPlayerID: number, bHoldingCtrl: boolean, bHoldingAlt: boolean)
BuffClicked(nEntity: number, nBuffSerial: number, bAlert: boolean)
}
interface CScriptBindingPR_Entities {
GetHealthBarOffset(nEntityIndex: number): number
IsMoving(nEntityIndex: number): boolean
/**
* Get the world origin of the entity.
*/
GetAbsOrigin(nEntityIndex: number): [number, number, number]
/**
* Get the forward vector of the entity.
*/
GetForward(nEntityIndex: number): [number, number, number]
/**
* Get the right vector of the entity.
*/
GetRight(nEntityIndex: number): [number, number, number]
/**
* Get the up vector of the entity.
*/
GetUp(nEntityIndex: number): [number, number, number]
/**
* Get all the building
*/
GetAllBuildingEntities(): number[]
/**
* Get all the hero
*/
GetAllHeroEntities(): number[]
/**
* Get all the entities with a given name.
*/
GetAllEntitiesByName(pszName: string): number[]
/**
* Get all the entities with a given classname.
*/
GetAllEntitiesByClassname(pszName: string): number[]
/**
* Get all the creature
*/
GetAllCreatureEntities(): number[]
/**
* Get all the
*/
GetAllEntities(): number[]
CanBeDominated(nEntityIndex: number): boolean
HasAttackCapability(nEntityIndex: number): boolean
HasCastableAbilities(nEntityIndex: number): boolean
HasFlyingVision(nEntityIndex: number): boolean
HasFlyMovementCapability(nEntityIndex: number): boolean
HasGroundMovementCapability(nEntityIndex: number): boolean
HasMovementCapability(nEntityIndex: number): boolean
HasScepter(nEntityIndex: number): boolean
HasUpgradeableAbilities(nEntityIndex: number): boolean
HasUpgradeableAbilitiesThatArentMaxed(nEntityIndex: number): boolean
IsAlive(nEntityIndex: number): boolean
IsAncient(nEntityIndex: number): boolean
IsAttackImmune(nEntityIndex: number): boolean
IsBarracks(nEntityIndex: number): boolean
IsBlind(nEntityIndex: number): boolean
IsBoss(nEntityIndex: number): boolean
IsRoshan(nEntityIndex: number): boolean
IsBuilding(nEntityIndex: number): boolean
IsCommandRestricted(nEntityIndex: number): boolean
IsConsideredHero(nEntityIndex: number): boolean
IsControllableByAnyPlayer(nEntityIndex: number): boolean
IsCourier(nEntityIndex: number): boolean
IsCreature(nEntityIndex: number): boolean
IsCreep(nEntityIndex: number): boolean
IsCreepHero(nEntityIndex: number): boolean
IsDeniable(nEntityIndex: number): boolean
IsDominated(nEntityIndex: number): boolean
IsEnemy(nEntityIndex: number): boolean
IsEvadeDisabled(nEntityIndex: number): boolean
IsFort(nEntityIndex: number): boolean
IsFrozen(nEntityIndex: number): boolean
IsGeneratedByEconItem(nEntityIndex: number): boolean
IsHallofFame(nEntityIndex: number): boolean
IsDisarmed(nEntityIndex: number): boolean
IsHero(nEntityIndex: number): boolean
IsHexed(nEntityIndex: number): boolean
IsIllusion(nEntityIndex: number): boolean
IsInRangeOfFountain(nEntityIndex: number): boolean
IsInventoryEnabled(nEntityIndex: number): boolean
IsInvisible(nEntityIndex: number): boolean
IsInvulnerable(nEntityIndex: number): boolean
IsLaneCreep(nEntityIndex: number): boolean
IsLowAttackPriority(nEntityIndex: number): boolean
IsMagicImmune(nEntityIndex: number): boolean
IsMechanical(nEntityIndex: number): boolean
IsMuted(nEntityIndex: number): boolean
IsNeutralUnitType(nEntityIndex: number): boolean
IsNightmared(nEntityIndex: number): boolean
IsOther(nEntityIndex: number): boolean
IsOutOfGame(nEntityIndex: number): boolean
IsOwnedByAnyPlayer(nEntityIndex: number): boolean
IsPhantom(nEntityIndex: number): boolean
IsRangedAttacker(nEntityIndex: number): boolean
IsRealHero(nEntityIndex: number): boolean
IsRooted(nEntityIndex: number): boolean
IsSelectable(nEntityIndex: number): boolean
IsShop(nEntityIndex: number): boolean
IsSilenced(nEntityIndex: number): boolean
IsSpeciallyDeniable(nEntityIndex: number): boolean
IsStunned(nEntityIndex: number): boolean
IsSummoned(nEntityIndex: number): boolean
IsTower(nEntityIndex: number): boolean
IsUnselectable(nEntityIndex: number): boolean
IsWard(nEntityIndex: number): boolean
IsZombie(nEntityIndex: number): boolean
NoHealthBar(nEntityIndex: number): boolean
NoTeamMoveTo(nEntityIndex: number): boolean
NoTeamSelect(nEntityIndex: number): boolean
NotOnMinimap(nEntityIndex: number): boolean
NotOnMinimapForEnemies(nEntityIndex: number): boolean
NoUnitCollision(nEntityIndex: number): boolean
PassivesDisabled(nEntityIndex: number): boolean
ProvidesVision(nEntityIndex: number): boolean
UsesHeroAbilityNumbers(nEntityIndex: number)
GetAbilityCount(nEntityIndex: number) :number
GetCombatClassAttack(nEntityIndex: number): any
GetCombatClassDefend(nEntityIndex: number) :any
GetCurrentVisionRange(nEntityIndex: number): number
GetDamageBonus(nEntityIndex: number): number
GetDamageMax(nEntityIndex: number): number
GetDamageMin(nEntityIndex: number): number
GetDayTimeVisionRange(nEntityIndex: number): number
GetHealth(nEntityIndex: number): number
GetHealthPercent(nEntityIndex: number): number
GetHealthThinkRegen(nEntityIndex: number): number
GetLevel(nEntityIndex: number): number
GetMaxHealth(nEntityIndex: number): number
GetNightTimeVisionRange(nEntityIndex: number): number
GetStates(nEntityIndex: number): number
GetTotalPurchasedUpgradeGoldCost(nEntityIndex: number): number
GetTeamNumber(nEntityIndex: number): number
GetAttackRange(nEntityIndex: number): number
GetAttackSpeed(nEntityIndex: number): number
GetAttacksPerSecond(nEntityIndex: number): number
GetBaseAttackTime(nEntityIndex: number): number
GetBaseMagicalResistanceValue(nEntityIndex: number): number
GetBaseMoveSpeed(nEntityIndex: number): number
GetBonusPhysicalArmor(nEntityIndex: number): number
GetCollisionPadding(nEntityIndex: number): number
GetEffectiveInvisibilityLevel(nEntityIndex: number): number
GetHasteFactor(nEntityIndex: number): number
GetHullRadius(nEntityIndex: number): number
GetIdealSpeed(nEntityIndex: number): number
GetIncreasedAttackSpeed(nEntityIndex: number): number
GetMana(nEntityIndex: number): number
GetManaThinkRegen(nEntityIndex: number): number
GetMaxMana(nEntityIndex: number): number
GetMagicalArmorValue(nEntityIndex: number): number
GetPaddedCollisionRadius(nEntityIndex: number): number
GetPercentInvisible(nEntityIndex: number): number
GetPhysicalArmorValue(nEntityIndex: number): number
GetProjectileCollisionSize(nEntityIndex: number): number
GetRingRadius(nEntityIndex: number): number
GetSecondsPerAttack(nEntityIndex: number): number
ManaFraction(nEntityIndex: number): number
GetClassname(nEntityIndex: number): string
GetDisplayedUnitName(nEntityIndex: number): string
GetSelectionGroup(nEntityIndex: number): string
GetSoundSet(nEntityIndex: number): string
GetUnitLabel(nEntityIndex: number): string
GetUnitName(nEntityIndex: number): string
GetTotalDamageTaken(nEntityIndex: number): number
IsControllableByPlayer(nEntityIndex: number, nPlayerIndex: number): boolean
GetChosenTarget(nEntityIndex: number): number
HasItemInInventory(nEntityIndex: number, pItemName: string): boolean
GetRangeToUnit(nEntityIndex: number, nEntityIndex2: number): number
IsEntityInRange(nEntityIndex: number, nEntityIndex2: number, flRange: number): boolean
GetMoveSpeedModifier(nEntityIndex: number, flBaseSpeed: number): any
CanAcceptTargetToAttack(nEntityIndex: number, nEntityIndex2: number): boolean
InState(nEntityIndex: number, nState: number)
GetArmorForDamageType(nEntityIndex: number, iDamageType: number)
GetArmorReductionForDamageType(nEntityIndex: number, iDamageType: number)
IsInRangeOfShop(nEntityIndex: number, iShopType: number, bSpecific: boolean): boolean
GetNumItemsInStash(nEntityIndex: number)
GetNumItemsInInventory(nEntityIndex: number)
GetItemInSlot(nEntityIndex: number, nSlotIndex: number)
GetAbility(nEntityIndex: number, nSlotIndex: number)
GetAbilityByName(nEntityIndex: number, pszAbilityName: string)
GetNumBuffs(nEntityIndex: number)
GetBuff(nEntityIndex: number, nBufIndex: number)
GetAbilityPoints(nEntityIndex: number)
GetCurrentXP(nEntityIndex: number)
GetNeededXPToLevel(nEntityIndex: number)
/**
* Get the currently selected entities
*/
GetSelectionEntities(nEntityIndex: number)
/**
* Is this a valid entity index?
*/
IsValidEntity(nEntityIndex: number): boolean
/**
* Is this entity an item container in the world?
*/
IsItemPhysical(nEntityIndex: number): boolean
/**
* Get the item contained in this physical item container.
*/
GetContainedItem(nEntityIndex: number)
}
interface CScriptBindingPR_Abilities {
LocalPlayerActiveAbility(): number
GetAbilityName(nEntityIndex: number)
GetAbilityTextureName(nEntityIndex: number)
GetAssociatedPrimaryAbilities(nEntityIndex: number)
GetAssociatedSecondaryAbilities(nEntityIndex: number)
GetHotkeyOverride(nEntityIndex: number)
GetIntrinsicModifierName(nEntityIndex: number)
GetSharedCooldownName(nEntityIndex: number)
AbilityReady(nEntityIndex: number)
/**
* Returns an AbilityLearnResult_t
*/
CanAbilityBeUpgraded(nEntityIndex: number): number
CanBeExecuted(nEntityIndex: number): boolean
GetAbilityDamage(nEntityIndex: number)
GetAbilityDamageType(nEntityIndex: number)
GetAbilityTargetFlags(nEntityIndex: number)
GetAbilityTargetTeam(nEntityIndex: number)
GetAbilityTargetType(nEntityIndex: number)
GetAbilityType(nEntityIndex: number)
GetBehavior(nEntityIndex: number)
GetCastRange(nEntityIndex: number)
GetChannelledManaCostPerSecond(nEntityIndex: number)
GetCurrentCharges(nEntityIndex: number)
GetEffectiveLevel(nEntityIndex: number)
GetHeroLevelRequiredToUpgrade(nEntityIndex: number)
GetLevel(nEntityIndex: number)
GetManaCost(nEntityIndex: number)
GetMaxLevel(nEntityIndex: number)
AttemptToUpgrade(nEntityIndex: number)
CanLearn(nEntityIndex: number)
GetAutoCastState(nEntityIndex: number)
GetToggleState(nEntityIndex: number)
HasScepterUpgradeTooltip(nEntityIndex: number)
IsActivated(nEntityIndex: number): boolean
IsActivatedChanging(nEntityIndex: number): boolean
IsAttributeBonus(nEntityIndex: number): boolean
IsAutocast(nEntityIndex: number): boolean
IsCooldownReady(nEntityIndex: number): boolean
IsDisplayedAbility(nEntityIndex: number): boolean
IsHidden(nEntityIndex: number): boolean
IsHiddenWhenStolen(nEntityIndex: number): boolean
IsInAbilityPhase(nEntityIndex: number): boolean
IsItem(nEntityIndex: number): boolean
IsMarkedAsDirty(nEntityIndex: number): boolean
IsMuted(nEntityIndex: number): boolean
IsOnCastbar(nEntityIndex: number): boolean
IsOnLearnbar(nEntityIndex: number): boolean
IsOwnersGoldEnough(nEntityIndex: number): boolean
IsOwnersGoldEnoughForUpgrade(nEntityIndex: number): boolean
IsOwnersManaEnough(nEntityIndex: number): boolean
IsPassive(nEntityIndex: number): boolean
IsRecipe(nEntityIndex: number): boolean
IsSharedWithTeammates(nEntityIndex: number): boolean
IsStealable(nEntityIndex: number): boolean
IsStolen(nEntityIndex: number): boolean
IsToggle(nEntityIndex: number): boolean
GetAOERadius(nEntityIndex: number)
GetBackswingTime(nEntityIndex: number)
GetCastPoint(nEntityIndex: number)
GetChannelStartTime(nEntityIndex: number)
GetChannelTime(nEntityIndex: number)
GetCooldown(nEntityIndex: number)
GetCooldownLength(nEntityIndex: number)
GetCooldownTime(nEntityIndex: number)
GetCooldownTimeRemaining(nEntityIndex: number)
GetDuration(nEntityIndex: number)
GetUpgradeBlend(nEntityIndex: number)
/**
* Get the local player's current active ability. (Pre-cast targetting state.)
*/
GetLocalPlayerActiveAbility()
GetCaster(nAbilityIndex: number)
GetCustomValueFor(nAbilityIndex: number, pszAbilityVarName: string)
GetLevelSpecialValueFor(nAbilityIndex: number, szName: string, nLevel: number)
GetSpecialValueFor(nAbilityIndex: number, szName: string)
IsCosmetic(nAbilityIndex: number, nTargetEntityIndex: number): boolean
/**
* Attempt to execute the specified ability (Equivalent to clicking the ability in the HUD action bar)
*/
ExecuteAbility(nAbilityEntIndex: number, nCasterEntIndex: number, bIsQuickCast: boolean): void
/**
* Attempt to double-tap (self-cast) the specified ability (Equivalent to double-clicking the ability in the HUD action bar)
*/
CreateDoubleTapCastOrder(nAbilityEntIndex: number, nCasterEntIndex: number): void
/**
* Ping the specified ability (Equivalent to alt-clicking the ability in the HUD action bar)
*/
PingAbility(nAbilityIndex: number): void
/**
* Returns the keybind (as a String) for the specified ability.
*/
GetKeybind(nAbilityEntIndex: number): string
}
interface CScriptBindingPR_Items extends CScriptBindingPR_Abilities{
ShouldDisplayCharges(nEntityIndex: number)
AlwaysDisplayCharges(nEntityIndex: number)
ShowSecondaryCharges(nEntityIndex: number)
CanBeSoldByLocalPlayer(nEntityIndex: number)
CanDoubleTapCast(nEntityIndex: number)
ForceHideCharges(nEntityIndex: number)
IsAlertableItem(nEntityIndex: number): boolean
IsCastOnPickup(nEntityIndex: number): boolean
IsDisassemblable(nEntityIndex: number): boolean
IsDroppable(nEntityIndex: number): boolean
IsInnatelyDisassemblable(nEntityIndex: number): boolean
IsKillable(nEntityIndex: number): boolean
IsMuted(nEntityIndex: number): boolean
IsPermanent(nEntityIndex: number): boolean
IsPurchasable(nEntityIndex: number): boolean
IsRecipe(nEntityIndex: number): boolean
IsRecipeGenerated(nEntityIndex: number): boolean
IsSellable(nEntityIndex: number): boolean
IsStackable(nEntityIndex: number): boolean
ProRatesChargesWhenSelling(nEntityIndex: number)
RequiresCharges(nEntityIndex: number)
CanBeExecuted(nEntityIndex: number)
GetCost(nEntityIndex: number)
GetCurrentCharges(nEntityIndex: number)
GetSecondaryCharges(nEntityIndex: number)
GetDisplayedCharges(nEntityIndex: number)
GetInitialCharges(nEntityIndex: number)
GetItemColor(nEntityIndex: number)
GetShareability(nEntityIndex: number)
GetAbilityTextureSF(nEntityIndex: number)
GetAssembledTime(nEntityIndex: number)
GetPurchaseTime(nEntityIndex: number)
GetPurchaser(nItemID: number)
/**
* Attempt to have the local player disassemble the specified item. Returns false if the order wasn't issued.
*/
LocalPlayerDisassembleItem(nItem: number)
/**
* Attempt to have the local player drop the specified item from its stash. Returns false if the order wasn't issued.
*/
LocalPlayerDropItemFromStash(nItem: number)
/**
* Attempt to have the local player alert allies about the specified item. Returns false if the order wasn't issued.
*/
LocalPlayerItemAlertAllies(nItem: number)
/**
* Attempt to have the local player move the specified item to its stash. Returns false if the order wasn't issued.
*/
LocalPlayerMoveItemToStash(nItem: number)
/**
* Attempt to have the local player sell the specified item. Returns false if the order wasn't issued.
*/
LocalPlayerSellItem(nItem: number)
}
interface CScriptBindingPR_Game{
IsGamePaused(): boolean
Time(): number
GetGameTime(): number
GetDOTATime(bIncludePreGame: boolean, bIncludeNegativeTime: boolean)
/**
* Return the team id of the winning team.
*/
GetGameWinner(): number
GetStateTransitionTime(): number
/**
* Get the difficulty setting of the
*/
GetCustomGameDifficulty(): number
/**
* Returns true if the user has enabled flipped HUD
*/
IsHUDFlipped(): boolean
/**
* Returns the width of the display.
*/
GetScreenWidth()
/**
* Returns the height of the display.
*/
GetScreenHeight()
/**
* Converts the specified x,y,z world co-ordinate into an x screen coordinate. Returns -1 if behind the camera
*/
WorldToScreenX(x: number, y: number, z: number)
/**
* Converts the specified x,y,z world co-ordinate into a y screen coordinate. Returns -1 if behind the camera
*/
WorldToScreenY(x: number, y: number, z: number)
/**
* Converts the specified x, y screen coordinates into a x, y, z world coordinates.
*/
ScreenXYToWorld(nX: number, nY: number)
/**
* Returns the keybind (as a String) for the requested ability slot.
*/
GetKeybindForAbility(iSlot: number)
GetNianFightTimeLeft()
GetState(): DOTA_GameState
GameStateIs(nState: number): boolean
GameStateIsBefore(nState: number): boolean
GameStateIsAfter(nState: number): boolean
AddCommand(pszCommandName: string, callback: Function, pszDescription: string, nFlags: number)
GetLocalPlayerID()
/**
* Assign the local player to the specified team
*/
PlayerJoinTeam(nTeamID: number)
/**
* Assign the currently unassigned players to teams
*/
AutoAssignPlayersToTeams()
/**
* Shuffle the team assignments of all of the players currently assigned to a team.
*/
ShufflePlayerTeamAssignments()
/**
* Set the remaining seconds in team setup before the game starts. -1 to stop the countdown timer
*/
SetRemainingSetupTime(flSeconds: number): void
/**
* Set the amount of time in seconds that will be set as the remaining time when all players are assigned to a team.
*/
SetAutoLaunchDelay(flSeconds: number): void
/**
* Enable or disable automatically starting the game once all players are assigned to a team
*/
SetAutoLaunchEnabled(bEnable: boolean): void
/**
* Return true of false indicating if automatically starting the game is enabled.
*/
GetAutoLaunchEnabled()
/**
* Lock the team selection preventing players from swiching teams.
*/
SetTeamSelectionLocked(bLockTeams: boolean): void
/**
* Returns true or false to indicate if team selection is locked
*/
GetTeamSelectionLocked()
/**
* Get all team IDs
*/
GetAllTeamIDs()
/**
* Get all player IDs
*/
GetAllPlayerIDs()
/**
* Get unassigned player IDs
*/
GetUnassignedPlayerIDs()
/**
* Get info about the player hero ultimate ability
*/
GetPlayerUltimateStateOrTime(nPlayerID: number)
/**
* Whether the local player has muted text and voice chat for the specified player id
*/
IsPlayerMuted(nPlayerID: number): boolean
/**
* Set whether the local player has muted text and voice chat for the specified player id
*/
SetPlayerMuted(nPlayerID: number, bMuted: boolean): void
/**
* Get detailed information for the given team
*/
GetTeamDetails(nTeam: number)
/**
* Get details for the local player
*/
GetLocalPlayerInfo()
/**
* Get info about the player items.
*/
GetPlayerItems(nPlayerID: number)
/**
* Get info about the given player
*/
GetPlayerInfo(nPlayerID: number)
/**
* Get player IDs for the given team
*/
GetPlayerIDsOnTeam(nTeam: number)
ServerCmd(pMsg: string)
FinishGame()
/**
* Emit a sound for the local player. Returns an number handle that can be passed to StopSound. (Returns 0 on failure.)
*/
EmitSound(pSoundEventName: string)
/**
* Stop a current playing sound on the local player. Takes handle from a call to EmitSound.
*/
StopSound(nHandle: number)
/**
* Return information about the current map.
*/
GetMapInfo()
/**
* Orders from the local player - takes a single arguments object that supports: dotaunitorder_t OrderType, ent_index TargetIndex, vector Position, ent_index AbilityIndex, OrderIssuer_t OrderIssuer, ent_index UnitIndex, OrderQueueBehavior_t QueueBehavior, bool ShowEffects.
*/
PrepareUnitOrders(args: js_raw_args)
/**
* Order a unit to drop the specified item at the current cursor location.
*/
DropItemAtCursor(nControlledUnitEnt: number, nItemEnt: number)
EnterAbilityLearnMode()
EndAbilityLearnMode()
IsInAbilityLearnMode(): boolean
}
interface $ {
(idSelector: string): Panel
/**
* Log a message
*/
Msg(...args: any[]): void
/**
* Dispatch an event
*/
DispatchEvent(eventName: string, eventArgs: any): void
/**
* Dispatch an event to occur later
*/
DispatchEventAsync(delay:number, eventName: string, eventArgs: any): void
/**
* Register an event handler
*/
RegisterEventHandler(eventName: string, context: Panel, callback: Function): void
/**
* Register a handler for an event that is not otherwise handled
*/
RegisterForUnhandledEvent(eventName: string, callback: Function)
/**
* Remove an unhandled event handler
*/
UnregisterForUnhandledEvent(eventNameUnconfirmYet: string)
/**
* Find an element
*/
FindChildInContext(idSelector: string): Panel
/**
* Make a web request
*/
AsyncWebRequest(url: string, args:Object)
/**
* Create a new panel
*/
CreatePanel(panelType:String, parent:Panel, id:String): Panel
/**
* Localize a String
*/
Localize(js_raw_args_1: js_raw_args): string
/**
* Get the current language
*/
Language(): string
/**
* Schedule a function to be called later
*/
Schedule(delay: number, callback: Function): number
/**
* Cancelse a scheduled function
*/
CancelScheduled(scheduleID: number)
/**
* Get the current panel context
*/
GetContextPanel(): Panel
/**
* Register a key binding
*/
RegisterKeyBind(context:Panel, keyName:String, callback:Function)
/**
* Call a function on each given item
*/
Each(table:Object, callback:Function)
}
interface Panel {
visible: boolean
enabled: boolean
checked: boolean
defaultfocus: boolean
inputnamespace: boolean
hittest: boolean
hittestchildren: boolean
tabindex: number
selectionpos_x: number
selectionpos_y :number
id: string
layoutfile: string
contentwidth: number
contentheight: number
desiredlayoutwidth: number
desiredlayoutheight: number
actuallayoutwidth: number
actuallayoutheight: number
actualxoffset: number
actualyoffset: number
scrolloffset_y: number
scrolloffset_x: number
style: any
rememberchildfocus: boolean
paneltype: string
text: string
html: boolean
heroname: string
itemname: string
abilityname: string
AddClass(className: string): void
RemoveClass(className: string): void
BHasClass(className: string): boolean
SetHasClass(className: string, onoff: boolean): void
ToggleClass(className: string)
ClearPanelEvent(eventName: string)
SetDraggable(draggable: boolean): void
IsDraggable(): boolean
GetChildCount(): number
GetChild(childIndex: number): Panel
GetChildIndex(unknown_variant_type_1: unknown_variant_type)
Children(): Array<Panel>
FindChildrenWithClassTraverse(className: string): Array<Panel>
GetParent(): Panel
SetParent(parent: Panel): void
FindChild(id: string): Panel
FindChildTraverse(id: string): Panel
FindChildInLayoutFile(id: string): Panel
RemoveAndDeleteChildren(): void
MoveChildBefore(panel1: Panel, panel2: Panel)
MoveChildAfter(panel1: Panel, panel2: Panel)
GetPositionWithinWindow()
ApplyStyles(boolean_1: boolean)
ClearPropertyFromCode(unknown_variant_type_1: unknown_variant_type)
DeleteAsync(delay: number)
BIsTransparent(): boolean
BAcceptsInput(): boolean
BAcceptsFocus(): boolean
SetFocus(): void
UpdateFocusInContext()
BHasHoverStyle(): boolean
SetAcceptsFocus(boolean_1: boolean): void
SetDisableFocusOnMouseDown(boolean_1: boolean): void
BHasKeyFocus(): boolean
SetScrollParentToFitWhenFocused(boolean_1: boolean): void
BScrollParentToFitWhenFocused(): boolean
IsSelected(): boolean
BHasDescendantKeyFocus()
BLoadLayout(layoutFilePath: string, boolean_2: boolean, boolean_3: boolean): boolean
BLoadLayoutSnippet(SnippetName: string): boolean
BLoadLayoutFromString(cString_1: string, boolean_2: boolean, boolean_3: boolean): boolean
LoadLayoutFromStringAsync(String_1: string, boolean_2: boolean, boolean_3: boolean)
LoadLayoutAsync(String_1: string, boolean_2: boolean, boolean_3: boolean)
BCreateChildren(String_1: string): boolean
SetTopOfInputContext(boolean_1: boolean): void