30 apr
2022
MemoryHackAPI
Added by Unryze,
published
Внимание!
Все версии доступны на GitHub.
Информация:
Благодарности
Для начала, хочу поблагодарить quq_CCCP за как моральную поддержку, так и за советы, скорее всего без него, я бы не взялся доделать эту карту.
Отдельное спасибо: Dracol1ch, Karaul0v, ENAlexey и leafdropn за их вклад в целом развитие как Мемхака, так и в целом за всю работу проделанную ими.
Ознакомление
Рад представить вам "плод" двух-недельной работы над WE-открываемой и редактируемой MemHack карты, которая полностью поддерживает 1.26а и 1.27а. В данной API карте присутствуют почти все функции из уже существующих МемХаков, а так же много нового, которое добавил лично я и часть, что я позаимствовал из YDWE, за что им отдельное спасибо.
Описание дальнейшее будет заполнено позже, в самой карте есть комментарии где они необходимы и в целом описано, что и как стоит делать (внимание, комментарии по понятным причинам в карте на английском!).
Список API:
Unit Base API
Ниже предоставлены все доступные функции, внимание, эти функции модифицируют непосредственно структуру, а потому изменения могут потребовать вызова перерисовки юнита, а также эти изменения повлияют на будущих юнитов, которые основаны на модифицированной структуре.
Более простым языком - все изменения из этого API редактируют "slk таблицы" то бишь те мета-данные, которые берутся при создании юнита.
Более простым языком - все изменения из этого API редактируют "slk таблицы" то бишь те мета-данные, которые берутся при создании юнита.
function GetUnitBaseModelById takes integer uid returns string
function SetUnitBaseModelById takes integer uid, string model returns nothing
function GetUnitBasePortraitById takes integer uid returns string
function SetUnitBasePortraitById takes integer uid, string model returns nothing
function GetUnitBaseMissileArtById takes integer uid, string path returns string
function SetUnitBaseMissileArtById takes integer uid, string model returns nothing
function GetUnitBaseMissileSpeedById takes integer uid, integer index returns real
function SetUnitBaseMissileSpeedById takes integer uid, integer index, real speed returns nothing
function GetUnitBaseColorById takes integer uid returns integer
function GetHeroBasePrimaryAttributeById takes integer uid returns integer
function SetHeroBasePrimaryAttributeById takes integer uid, integer index returns nothing
function GetUnitBaseTipById takes integer uid returns string
function SetUnitBaseTipById takes integer uid, string text returns nothing
function GetUnitBaseUbertipById takes integer uid returns string
function SetUnitBaseUbertipById takes integer uid, string text returns nothing
function GetUnitBaseHotkeyById takes integer uid returns integer
function SetUnitBaseHotkeyById takes integer uid, integer key returns nothing
// Делают всё тоже самое, что и функции выше, но принимают напрямую юнита, а не его TypeId
function GetUnitBaseModel takes unit u returns string
function SetUnitBaseModel takes unit u, string model returns nothing
function GetUnitBasePortrait takes unit u returns string
function SetUnitBasePortrait takes unit u, string model returns nothing
function GetUnitBaseMissileArt takes unit u, string model returns string
function SetUnitBaseMissileArt takes unit u, string model returns nothing
function GetUnitBaseMissileSpeed takes unit u, integer index returns real
function SetUnitBaseMissileSpeed takes unit u, integer index, real speed returns nothing
function GetUnitBaseColor takes unit u returns integer
function GetHeroBasePrimaryAttribute takes unit u returns integer
function SetHeroBasePrimaryAttribute takes unit u, integer index returns nothing
function GetUnitBaseTip takes unit u returns string
function SetUnitBaseTip takes unit u, string text returns nothing
function GetUnitBaseUbertip takes unit u returns string
function SetUnitBaseUbertip takes unit u, string text returns nothing
function GetUnitBaseHotkey takes unit u returns integer
function SetUnitBaseHotkey takes unit u, integer key returns nothing
Unit Normal API
Ниже предоставлены все доступные функции, отличие от Unit Base API в том, что эти функции работают именно с юнитом, которого мы хотим модифицировать, а не вносит изменения в структуру, на базе которой основан юнит.
Более простым языком - это уникальное изменение непосредственно для модифицируемого юнита, не затронет других юнитов с идентичным TypeId.
Более простым языком - это уникальное изменение непосредственно для модифицируемого юнита, не затронет других юнитов с идентичным TypeId.
function SetUnitTypeId takes unit u, integer i returns nothing
function GetUnitTypeIdReal takes unit u returns integer
function GetUnitVertexColour takes unit u returns integer
function GetUnitVertexColourA takes unit u returns integer
function GetUnitVertexColourR takes unit u returns integer
function GetUnitVertexColourG takes unit u returns integer
function GetUnitVertexColourB takes unit u returns integer
function SetUnitModel takes unit u, string model returns nothing
function RedrawUnit takes unit u returns nothing
function IsAttackDisabled takes unit u returns boolean
function UnitDisableAttack takes unit u returns nothing
function UnitEnableAttack takes unit u returns nothing
function GetUnitCritterFlag takes unit u returns integer
function SetUnitCritterFlag takes unit u, integer id returns nothing
function GetUnitTimedLife takes unit u returns real
function SetUnitTimedLife takes unit u, real dur returns nothing
function SetUnitPhased takes unit u returns nothing
function CommonSilenceApply takes unit u, boolean flag returns nothing
function DisableAllUnitsAbilities takes unit u, boolean flag returns nothing
function SetStunToUnit takes unit u, boolean add returns nothing
function UnStunUnit takes unit u returns nothing //unsafe, do not use unless you tested it through
function IsUnitStunned2 takes unit u returns boolean
function SetUnitControl takes unit u, integer flagval, integer moveval, integer atackval, integer invval returns nothing
function DisableUnitControl takes unit u returns nothing
function EnableUnitControl takes unit u returns nothing
function RemoveAllUnitMovementDisables takes unit u returns nothing
function IsUnitMovementDisabled takes unit u returns boolean
function SetUnitMovement takes integer pdata, integer d returns nothing
function DisableUnitMovement takes unit u returns nothing
function EnableUnitMovement takes unit u returns nothing
function DisableUnitsMovement takes unit u, boolean disable returns nothing
function UnitCanUseInventoryModify takes unit u, integer mod returns nothing
function GetSomeAddressForLocustFlags takes integer pAddr1, integer pAddr2 returns integer
function SetLocustFlags takes unit u, integer i returns nothing //These flags can make unit immune to truesight
function EnableTruesightImmunity takes unit u returns nothing
function DisableTruesightImmunity takes unit u returns nothing
function GetUnitFlags takes unit u returns integer
function SetUnitFlags takes unit u, integer i returns nothing
function AddUnitFlags takes unit u, integer i returns nothing
function GetUnitFlags_2 takes unit u returns integer
function SetUnitFlags_2 takes unit u, integer i returns nothing
function AddUnitFlags_2 takes unit u, integer i returns nothing
function GetUnitVisibilityClass takes unit u returns integer
function SetUnitVisibleByPlayer takes unit u, player p, integer c returns nothing
function IsUnitInvulnerable takes unit u returns boolean
function GetUnitInvulnerableCounter takes unit u returns integer
function SetUnitInvulnerableCounter takes unit u, integer i returns nothing
function ModifyInvulnerableCounter takes unit u, integer diff returns nothing
function IsUnitInvulnerable2 takes unit u returns boolean
function SetUnitFacingInstant takes unit u, real a returns nothing
function GetUnitMoveType takes unit u returns integer
function SetUnitMoveType takes unit u, integer m_type returns nothing
function GetHeroPrimaryAttribute takes unit u returns integer //1 = str, 2 = int, 3 = agi
function SetHeroPrimaryAttribute takes unit u, integer i returns nothing
function GetUnitNextAttackTimestamp takes unit u returns real
function ResetAttackCooldown takes unit u returns boolean
function NullifyCurrentAttack takes unit u returns string
function AddExtraAttack takes unit u returns boolean
function GetUnitAttackAbility takes unit u returns integer
function SetUnitAttackAbility takes unit u, integer pAddr returns nothing
function GetUnitAttackOffsetValue takes unit u, integer pOff returns integer
function GetUnitAttackTypeByIndex takes unit u, integer index returns integer
function GetUnitAttackType1 takes unit u returns integer
function GetUnitAttackType2 takes unit u returns integer
function SetUnitAttackOffsetValue takes unit u, integer offset, integer val returns nothing
function SetUnitAttackTypeByIndex takes unit u, integer i, integer attacknum returns nothing
function SetUnitAttackType1 takes unit u, integer i returns nothing
function SetUnitAttackType2 takes unit u, integer i returns nothing
function GetUnitWeaponSound takes unit u returns integer
function SetUnitWeaponSound takes unit u, integer i returns nothing
function GetUnitWeaponType takes unit u returns integer
function SetUnitWeaponType takes unit u, integer i returns nothing
function GetUnitBaseDamage takes unit u returns integer
function SetUnitBaseDamage takes unit u, integer i returns nothing
function AddUnitBaseDamage takes unit u, integer bonus returns nothing
function GetUnitGreenBonusDamage takes unit u returns integer
function SetUnitGreenBonusDamage takes unit u, integer i returns nothing
function AddUnitGreenBonusDamage takes unit u, integer i returns nothing
function GetUnitTotalDamage takes unit u returns integer
function GetUnitBaseAttributeDamage takes unit u returns integer
function SetUnitBaseAttributeDamage takes unit u, integer i returns nothing
function GetUnitDamageDicesSideCount takes unit u returns integer
function SetUnitDamageDicesSideCount takes unit u, integer i returns nothing
function GetUnitDamageDicesCount takes unit u returns integer
function SetUnitDamageDicesCount takes unit u, integer i returns nothing
function GetUnitAttackRangeByIndex takes unit u, integer index returns real
function SetUnitAttackRangeByIndex takes unit u, integer index, real r returns nothing
function GetUnitAttackRange1 takes unit u returns real
function SetUnitAttackRange1 takes unit u, real r returns nothing
function GetUnitAttackRange2 takes unit u returns real
function SetUnitAttackRange2 takes unit u, real r returns nothing
function GetUnitBATByIndex takes unit u, integer index returns real
function SetUnitBATByIndex takes unit u, integer index, real r returns nothing
function GetUnitBAT1 takes unit u returns real
function SetUnitBAT1 takes unit u, real r returns nothing
function GetUnitBAT2 takes unit u returns real
function SetUnitBAT2 takes unit u, real r returns nothing
function GetUnitAttackPointByIndex takes unit u, integer index returns real
function SetUnitAttackPointByIndex takes unit u, integer index, real r returns nothing
function GetUnitAttackPoint1 takes unit u returns real
function SetUnitAttackPoint1 takes unit u, real r returns nothing
function GetUnitAttackPoint2 takes unit u returns real
function SetUnitAttackPoint2 takes unit u, real r returns nothing
function GetUnitAttackEnabledIndex takes unit u returns integer
function GetUnitAttackBackswing takes unit u returns real
function SetUnitAttackBackswing takes unit u, real r returns nothing
function GetUnitAttackSpeed takes unit u returns real
function SetUnitAttackSpeed takes unit u, real r returns nothing
function AddUnitAttackSpeed takes unit u, real r returns nothing
function GetUnitAttackDamage takes unit u returns real
function GetUnitArmourType takes unit u returns integer
function SetUnitArmourType takes unit u, integer id returns nothing
function GetUnitArmour takes unit u returns real
function SetUnitArmour takes unit u, real r returns nothing
function AddUnitArmour takes unit u, real value returns nothing
function GetUnitTimeScale takes unit u returns real
function GetUnitBaseMoveSpeed takes unit u returns real
function GetUnitBonusMoveSpeed takes unit u returns real
function SetUnitBonusMoveSpeed takes unit u, real r returns boolean
function AddUnitBonusMovespeed takes unit u, real r returns nothing
function SetUnitMaxLife takes unit u, real newhp returns nothing
function AddUnitMaxLife takes unit u, real value returns nothing
function SetUnitMaxMana takes unit u, real newmp returns nothing
function AddUnitMaxMana takes unit u, real value returns nothing
function GetWidgetLifeRegen takes widget u returns real
function GetUnitLifeRegen takes unit u returns real
function SetUnitLifeRegen takes unit u, real r returns nothing
function AddUnitLifeRegen takes unit u, real r returns nothing
function GetUnitManaRegen takes unit u returns real
function SetUnitManaRegen takes unit u, real r returns nothing
function AddUnitManaRegen takes unit u, real r returns nothing
Ability Base API
Данный API редактирует структуру, то бишь базу способностей, изменив которые, все способности с совпадающим Id будут затронуты!
function GetAbilityBaseMaxLevel takes integer aid returns integer
function GetAbilityBaseId takes ability a returns integer
function GetAbilityBaseManaCost takes integer aid, integer level returns integer
function SetAbilityBaseManaCost takes integer aid, integer level, integer cost returns nothing
function GetAbilityBaseCooldown takes integer aid, integer level returns real
function SetAbilityBaseCooldown takes integer aid, integer level, real cool returns nothing
function GetAbilityBaseEffectSound takes integer aid returns string
function SetAbilityBaseEffectSound takes integer aid, string s returns nothing
function GetAbilityBaseGlobalMessage takes integer aid returns string
function SetAbilityBaseGlobalMessage takes integer aid, string s returns nothing
function GetAbilityBaseGlobalSound takes integer aid returns string
function SetAbilityBaseGlobalSound takes integer aid, string s returns nothing
function GetAbilityBaseButtonX takes integer aid returns integer
function SetAbilityBaseButtonX takes integer aid, integer newX returns nothing
function GetAbilityBaseButtonY takes integer aid returns integer
function SetAbilityBaseButtonY takes integer aid, integer newY returns nothing
function GetAbilityBaseUnButtonX takes integer aid returns integer
function SetAbilityBaseUnButtonX takes integer aid, integer newX returns nothing
function GetAbilityBaseUnButtonY takes integer aid returns integer
function SetAbilityBaseUnButtonY takes integer aid, integer newY returns nothing
function GetAbilityBaseResearchButtonX takes integer aid returns integer
function SetAbilityBaseResearchButtonX takes integer aid, integer newX returns nothing
function GetAbilityBaseResearchButtonY takes integer aid returns integer
function SetAbilityBaseResearchButtonY takes integer aid, integer newY returns nothing
function GetAbilityBaseMissileSpeed takes integer aid returns real
function SetAbilityBaseMissileSpeed takes integer aid, real speed returns nothing
function GetAbilityBaseMissileArc takes integer aid returns real
function SetAbilityBaseMissileArc takes integer aid, real arc returns nothing
function IsAbilityMissileHoming takes integer aid returns boolean
function SetAbilityBaseMissileHoming takes integer aid, boolean homing returns nothing
function GetAbilityBaseSpellDetails takes integer aid returns integer
function SetAbilityBaseSpellDetails takes integer aid, integer det returns nothing
function GetAbilityBaseHotkeyId takes integer aid returns integer
function SetAbilityBaseHotkeyId takes integer aid, integer newVal returns nothing
function GetAbilityBaseUnHotkeyId takes integer aid returns integer
function SetAbilityBaseUnHotkeyId takes integer aid, integer newVal returns nothing
function GetAbilityBaseResearchHotkeyId takes integer aid returns integer
function SetAbilityBaseResearchHotkeyId takes integer aid, integer newVal returns nothing
function GetAbilityBaseTip takes integer aid, integer lvl returns string
function SetAbilityBaseTip takes integer aid, integer lvl, string s returns nothing
function GetAbilityBaseUbertip takes integer aid, integer lvl returns string
function SetAbilityBaseUbertip takes integer aid, integer lvl, string s returns nothing
function SetAbilityBaseHotkeyCommon takes integer aid, integer newVal returns nothing
Ability Unit API
Принимает в параметры юнита и Id способности, для более простого пользования.
function GetUnitAbilityOrderId takes unit u, integer aid returns integer
function IsUnitAbilityOnCooldown takes unit u, integer aid returns boolean
function IsUnitAbilitySafe takes unit u, integer aid returns boolean
function IsUnitAbilityUsable takes unit u, integer aid returns boolean
function GetUnitAbilityCastpoint takes unit u, integer aid returns real
function SetUnitAbilityCastpoint takes unit u, integer aid, real dur returns nothing
function GetUnitAbilityBackswing takes unit u, integer aid returns real
function SetUnitAbilityBackswing takes unit u, integer aid, real dur returns nothing
function GetUnitAbilityManaCost takes unit u, integer aid, integer level returns integer
function SetUnitAbilityManaCost takes unit u, integer aid, integer level, integer mc returns nothing
function GetUnitAbilityCooldownStamp takes unit u, integer aid returns real
function GetUnitAbilityCurrentCooldown takes unit u, integer aid returns real
function SetUnitAbilityCooldown takes unit u, integer aid, real seconds, string mode returns nothing
function AddUnitAbilityCooldown takes unit u, integer aid, real seconds returns nothing
function ReduceUnitAbilityCooldown takes unit u, integer aid, real seconds returns nothing
function ResetUnitAbilityCooldown takes unit u, integer aid returns nothing
function StartUnitAbilityCooldown takes unit u, integer aid, real cd returns nothing
function GetUnitAbilityCastTime takes unit u, integer aid returns real
function SetUnitAbilityCastTime takes unit u, integer aid, real r returns nothing
function SetUnitAbilityDisabled takes unit u, integer aid, integer count returns nothing
function GetUnitAbilityDisabled takes unit u, integer aid returns integer
function SetUnitAbilityHidden takes unit u, integer aid, integer count returns nothing
function AddUnitAbilityHidden takes unit u, integer aid, integer count returns nothing
function GetUnitAbilityDisabledEx takes unit u, integer aid returns integer
function SetUnitAbilityDisabledEx takes unit u, integer aid, integer count returns nothing
function SilenceUnitAbility takes unit u, integer aid returns nothing
function UnsilenceUnitAbility takes unit u, integer aid returns nothing
function HideUnitAbilityButton takes unit u, integer aid, boolean hide returns nothing
Ability Normal API
Эти функции идентичны по работе Ability Unit API, однако принимают ability, то бишь GetSpellAbility( ), для тех кому это будет удобнее.
function GetAbilityOrderId takes ability a returns integer
function IsAbilityOnCooldown takes ability a returns boolean
function IsAbilitySafe takes ability a returns boolean
function IsAbilityUsable takes ability a returns boolean
function GetAbilityCastpoint takes ability a returns real
function SetAbilityCastpoint takes ability a, real dur returns nothing
function GetAbilityBackswing takes ability a returns real
function SetAbilityBackswing takes ability a, real dur returns nothing
function GetAbilityManaCost takes ability a, integer level returns integer
function SetAbilityManaCost takes ability a, integer level, integer mc returns nothing
function GetAbilityCooldownStamp takes ability a returns real
function GetAbilityCurrentCooldown takes ability a returns real
function SetAbilityCooldown takes ability a, real seconds, string mode returns nothing
function AddAbilityCooldown takes ability a, real seconds returns nothing
function ReduceAbilityCooldown takes ability a, real seconds returns nothing
function ResetAbilityCooldown takes ability a returns nothing
function StartAbilityCooldown takes ability a, real cd returns nothing
function GetAbilityCastTime takes ability a returns real
function SetAbilityCastTime takes ability a, real r returns nothing
function SetAbilityDisabled takes ability a, integer count returns nothing
function GetAbilityDisabled takes ability a returns integer
function SetAbilityHidden takes ability a, integer count returns nothing
function AddAbilityHidden takes ability a, integer count returns nothing
function GetAbilityDisabledEx takes ability a returns integer
function SetAbilityDisabledEx takes ability a, integer count returns nothing
function SilenceAbility takes ability a returns nothing
function UnsilenceAbility takes ability a returns nothing
function HideAbilityButton takes ability a, boolean hide returns nothing
Cast Ability API
Данный код позволяет не только имитировать "дамми каст", также можно избегать возню с приказами и заставлять юнита применять указанное нами заклинание.
Настоятельно рекомендую посмотреть в карте эти функции подробнее!
Настоятельно рекомендую посмотреть в карте эти функции подробнее!
function CastAbilityPosition takes integer aid, unit source, real targX, real targY returns nothing
function CastAbilityTarget takes integer aid, unit source, widget target returns nothing
function CastAbilityTargetGround takes integer aid, unit source, integer lvl, real targX, real targY, boolean remove returns nothing
function CastAbilityTargetWidget takes integer aid, unit source, widget target, integer lvl, boolean remove returns nothing
function CastAbilityTargetSelf takes integer aid, unit source, integer lvl returns nothing
Effect API
Внимание! Все углы принимаются в ГРАДУСАХ, это сделано для удобства пользования.
function IsEffectHidden takes effect e returns boolean
function ShowEffect takes effect e, boolean flag returns nothing
function SetEffectAlpha takes effect e, integer alpha returns nothing
function GetEffectColour takes effect e returns integer
function SetEffectColour takes effect e, integer colour returns nothing
function SetEffectColourEx takes effect e, integer red, integer green, integer blue, integer alpha returns nothing
function SetEffectVertexColour takes effect e, integer red, integer green, integer blue, integer alpha returns nothing
function GetEffectColourA takes effect e returns integer
function SetEffectColourA takes effect e, integer alpha returns nothing
function GetEffectColourR takes effect e returns integer
function SetEffectColourR takes effect e, integer red returns nothing
function GetEffectColourG takes effect e returns integer
function SetEffectColourG takes effect e, integer green returns nothing
function GetEffectColourB takes effect e returns integer
function SetEffectColourB takes effect e, integer blue returns nothing
function SetEffectAnimationByIndex takes effect e, integer index returns nothing
function SetEffectModel takes effect e, string model returns nothing
function GetEffectX takes effect e returns real
function SetEffectX takes effect e, real x returns nothing
function GetEffectY takes effect e returns real
function SetEffectY takes effect e, real y returns nothing
function GetEffectZ takes effect e returns real
function SetEffectZ takes effect e, real z returns nothing
function SetEffectPosition takes effect e, real x, real y, real z returns nothing
function GetEffectTimeScale takes effect e returns real
function SetEffectTimeScale takes effect e, real speed returns nothing
function GetEffectScale takes effect e returns real
function SetEffectScale takes effect e, real scale returns nothing
function SetEffectScaleEx takes effect e, real x, real y, real z returns nothing
function GetEffectRoll takes effect e returns real // X
function SetEffectRoll takes effect e, real angle returns nothing // X
function GetEffectPitch takes effect e returns real // Y
function SetEffectPitch takes effect e, real angle returns nothing // Y
function GetEffectFacing takes effect e returns real // Z
function SetEffectFacing takes effect e, real angle returns nothing // Z
function ResetEffectMatrix takes effect e returns nothing
Trackable API
Внимание! Все углы принимаются в ГРАДУСАХ, это сделано для удобства пользования.
Структура эффектов и трекейблов идентична, более опытные пользователи могут переделать параметр в handle, если хочется сократить количество кода.
Структура эффектов и трекейблов идентична, более опытные пользователи могут переделать параметр в handle, если хочется сократить количество кода.
function IsTrackableHidden takes trackable track returns boolean
function ShowTrackable takes trackable track, boolean flag returns nothing
function SetTrackableAlpha takes trackable track, integer alpha returns nothing
function GetTrackableColour takes trackable track returns integer
function SetTrackableColour takes trackable track, integer colour returns nothing
function SetTrackableColourEx takes trackable track, integer red, integer green, integer blue, integer alpha returns nothing
function SetTrackableVertexColour takes trackable track, integer red, integer green, integer blue, integer alpha returns nothing
function GetTrackableColourA takes trackable track returns integer
function SetTrackableColourA takes trackable track, integer alpha returns nothing
function GetTrackableColourR takes trackable track returns integer
function SetTrackableColourR takes trackable track, integer red returns nothing
function GetTrackableColourG takes trackable track returns integer
function SetTrackableColourG takes trackable track, integer green returns nothing
function GetTrackableColourB takes trackable track returns integer
function SetTrackableColourB takes trackable track, integer blue returns nothing
function SetTrackableAnimationByIndex takes trackable track, integer index returns nothing
function SetTrackableModel takes trackable track, string model returns nothing
function GetTrackableX takes trackable track returns real
function SetTrackableX takes trackable track, real x returns nothing
function GetTrackableY takes trackable track returns real
function SetTrackableY takes trackable track, real y returns nothing
function GetTrackableZ takes trackable track returns real
function SetTrackableZ takes trackable track, real z returns nothing
function SetTrackablePosition takes trackable track, real x, real y, real z returns nothing
function GetTrackableTimeScale takes trackable track returns real
function SetTrackableTimeScale takes trackable track, real speed returns nothing
function GetTrackableScale takes trackable track returns real
function SetTrackableScale takes trackable track, real scale returns nothing
function SetTrackableScaleEx takes trackable track, real x, real y, real z returns nothing
function GetTrackableRoll takes trackable track returns real // X
function SetTrackableRoll takes trackable track, real angle returns nothing // X
function GetTrackablePitch takes trackable track returns real // Y
function SetTrackablePitch takes trackable track, real angle returns nothing // Y
function GetTrackableFacing takes trackable track returns real // Z
function SetTrackableFacing takes trackable track, real angle returns nothing // Z
function ResetTrackableMatrix takes trackable track returns nothing
Item API
Функции ниже работают на каждый предмет уникально, функционала пока что мало, ибо структура типа Item очень бедная.
Возможно в будущем будут добавлены ещё функции.
Примечание: если Вы хотите изменить модель предмету, то просто вызовите SetObjectModel( ConvertHandle( it ), "..." )
Возможно в будущем будут добавлены ещё функции.
Примечание: если Вы хотите изменить модель предмету, то просто вызовите SetObjectModel( ConvertHandle( it ), "..." )
function StartItemCooldown takes unit u, item it, real cd returns nothing
function ChangeItemId takes item it, integer id returns nothing
Mouse API
Получает координаты мышки в мире, не на экране. Функционал в идеале будет дополнен позже, хочется добавить чтение координат окна, а также синхронизацию этих координат.
function GetMouseWorldX takes nothing returns real
function GetMouseWorldY takes nothing returns real
function GetMouseWorldZ takes nothing returns real
File API
Функционал предназначенный для работы с файлами, однако ввиду вопросительной полезности не был расширен.
Эти функции были добавлены исключительно для галочки, они работают, но пользоваться ими будет меньшинство.
Эти функции были добавлены исключительно для галочки, они работают, но пользоваться ими будет меньшинство.
function FileExists takes string s returns boolean
function GetFileSizeFromMpq takes string source returns integer
function ExportFileFromMpq takes string source, string dest returns boolean
Injector API
Функционал для инжекта .dll из MPQ архива, если же файл лежит где-то в директории Warcraft 3, то используйте call LoadLibrary( dllpath )
function LoadDllFromMPQ takes string source, string dest, string dllname returns boolean
WinAPI
Функционал вызывающий функции из Kernel, из всевозможных Windows API dll, позволяет получать много чего полезного.
Однако, пользоваться всем этим НЕ РЕКОМЕНДУЕТСЯ без понимания в целом что это API из себя представляет!
Однако, пользоваться всем этим НЕ РЕКОМЕНДУЕТСЯ без понимания в целом что это API из себя представляет!
// 1 - Sec, 2 - Minutes, 3 - Hours, 4 - Day, 5 - Month, 6 - Year
function GetLocalTime takes integer timeId returns integer
function VirtualProtect takes integer pRealOffset, integer pMemSize, integer pProtectFlag returns integer
function ReadStringFromFile takes string sfile, string ssection, string skey, string sdefval returns string
function WriteStringToFile takes string sfile, string ssection, string skey, string sval returns nothing
function GetFileAttributes takes string s returns integer
function LoadLibrary takes string nDllName returns integer
function MessageBox takes string message, string caption returns nothing
function FindWindow takes string name, string class returns integer
function PostMessage takes integer hwnd, integer msg, integer wparam, integer lparam returns nothing
function ShellExecute takes string command, string path, string args returns nothing // call ShellExecute( "open", url, "" )
function GetAsyncKeyState takes integer vk_key_code returns integer
function IsKeyPressed takes integer vk_key_code returns boolean
Заключение:
Буду признателен, если на время отсутствия полноценного описания, кто-либо проведёт тесты и сообщит о найденных недоработках, если такие будут.
П.С. Был бы очень рад если Драколич бы связался со мной и подкинул бы нехватающего функционала, чтобы я его добавил сюда, то бишь фреймы, синхронизация данных и в целом, что из полезного функционала ещё не попало в свет.
Всем спасибо за внимание и наслаждайтесь!
To leave a comment please sign in to the site.
Проекты :
Unryze Jass API
set t = CreateTimer()
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",GetUnitX(u),GetUnitY(u))
call TimerStart(t,0.01,true,function MoveEffect)
function
function MoveEffect takes nothing returns nothing
call SetEffectPosition(e,GetUnitX(u),GetUnitY(u),150)
function
Проекты :
Unryze Jass API
Edited by Unryze
Edited by pengyi
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",28008.,-29145.)
call SetEffectPosition(ef,GetUnitX(u),GetUnitY(u),100)
↑ the effect is visible
set e = AddSpecialEffect("Units\\Human\\Footman\\Footman.mdx",16652.,-16652.)
call SetEffectPosition(ef,GetUnitX(u),GetUnitY(u),100)
↑ the effect is invisible
Проекты :
Unryze Jass API
Edited by Unryze
Is the official representative of the site Administration
Блог
Проекты :
ТТМФ
Space Engineers
Проекты :
Unryze Jass API
Edited by Unryze
Проекты :
Unryze Jass API
Edited by Unryze
Проекты :
Unryze Jass API
call UnitDisableControl(Hero)
call UnitEnableControl(Hero)
Проекты :
Unryze Jass API
Проекты :
Unryze Jass API
Note: this is fixed due to the usage of SetSmartPositionEx, so don't touch it, even though it will "hinder" the performance slightly.