wc3edit.net

United Warcraft 3 map hacking!
It is currently July 11th, 2020, 1:52 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: MemoryHackAPI
PostPosted: June 1st, 2020, 5:31 pm 
Offline
Member
User avatar

Joined: October 21st, 2013, 4:18 pm
Posts: 69
Information
First things first, I would like to thank quq_CCCP from xgm for moral support and for advices, if not for him, I would probably not have completed this map.

Additional thanks to Dracol1ch, Karaul0v, ENAlexey and leafdropn for their input in developing MemHack and for all the work they have done.

I am glad to share with you, the "fruit" of my 2 week work on WE-openable and editable MemHack map, which fully supports 1.26a and 1.27a. In this API map you will find nearly all functions that exist in other MemHack as well as a lot of new functions that I have added myself or have “borrowed” from YDWE (translating C++ to Jass), for which I want to give them additional thanks.


API

Spoiler for Unit Base API:
Code:
      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

      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
   


Spoiler for Unit Normal API:
Code:
      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
   


Spoiler for Ability Base API:
Code:
      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
   


Spoiler for Ability Unit API:
Code:
      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
   


Spoiler for Ability Normal API:
Code:
      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
   


Spoiler for Cast Ability API:
Code:
      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
   


Spoiler for Effect API:
Code:
      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
   


Spoiler for Trackable API:
Code:
      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
   


Spoiler for Item API:
Code:
      function StartItemCooldown takes unit u, item it, real cd returns nothing
      function ChangeItemId takes item it, integer id returns nothing
   


Spoiler for Mouse API:
Code:
      function GetMouseWorldX takes nothing returns real
      function GetMouseWorldY takes nothing returns real
      function GetMouseWorldZ takes nothing returns real
   


Spoiler for File API:
Code:
      function FileExists takes string s returns boolean
      function GetFileSizeFromMpq takes string source returns integer
      function ExportFileFromMpq takes string source, string dest returns boolean
   


Spoiler for Injector API:
Code:
      function LoadDllFromMPQ takes string source, string dest, string dllname returns boolean
   


Spoiler for WinAPI:
Code:
      // 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
   


Enjoy


You do not have the required permissions to view the files attached to this post.


Last edited by Unryze on June 6th, 2020, 12:36 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: MemoryHackAPI
PostPosted: June 1st, 2020, 11:21 pm 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1402
Title: Just Another S.Mod
That's so much useful, but I'm not sure if someone from here will understand that. Anyway, thanks for sharing that, Unryze.


Top
 Profile  
 
 Post subject: Re: MemoryHackAPI
PostPosted: June 2nd, 2020, 8:24 am 
Offline
Member
User avatar

Joined: October 21st, 2013, 4:18 pm
Posts: 69
nuzamacuxe wrote:
That's so much useful, but I'm not sure if someone from here will understand that. Anyway, thanks for sharing that, Unryze.

API explanation will come soon, hopefully, since there is a ton of functions to write out and some need explanation, I will probably not explain the functions that are in the core, but I will go over user-friendly functions that use the core with addresses and offsets, since 99.99% will only use things that are convenient and closer to original natives, aka just use normal WC3 variables.

The point is, for people that lack some of the functions in 1.26a that are in refunded to be able to immitate it or even make more things rather than refunded can.

o/

Edit: Thread has been updated, I have added all of the user-friendly API, all functions have their names and parameters along with variables as close to what they do as possible, so you are safe to assume what each function does and what variables it accepts.


Top
 Profile  
 
 Post subject: Re: MemoryHackAPI
PostPosted: June 2nd, 2020, 10:35 pm 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1402
Title: Just Another S.Mod
Nice. Thanks for doing such hard work for free. We appreciate it.


Top
 Profile  
 
 Post subject: Re: MemoryHackAPI
PostPosted: June 6th, 2020, 12:36 pm 
Offline
Member
User avatar

Joined: October 21st, 2013, 4:18 pm
Posts: 69
MemHackAPI v1.1 Changelog:

1. Fixed OPLimit removal method.
2. Fixed OPLimit removal on 1.27a (did not fully work).
3. Returned I2T/T2I and I2U/U2I typecasts (HandleId to trigger/unit and back).
4. Changed ConvertUnitAddressToHandleID function name to ObjectToHandleId.
5. Added ObjectToUnit function, which is 2 times faster than ObjectToHandleId, only works for units.
6. Fixed SetObjectScaleEx function.
7. Added new function SetObjectSpaceRotation takes integer pObject, real yaw, real pitch, real roll returns nothing, allows object's 3D rotation.
8. Added category MemHackGroupAPI.
9. Added function GetAddressGroupUnitCount takes integer pObj returns integer.
10. Added function GetAddressGroupAddressUnitByIndex takes integer pObj, integer index returns integer.
11. Added function GetGroupUnitCount takes group g returns integer.
12. Added function GetUnitFromGroupByIndex takes group g, integer index returns unit.
13. Added function GetRandomUnitFromGroup takes group g returns unit.
14. Added function ForEach takes group g returns unit.
15. Added additional options to GetLocalTime.
16. Added benchmarking test examples to Testing trigger.
17. Added MemHackConstantsAPI category.
18. Added function EnableOPLimit takes flag returns nothing.
19. Added function IsOPLimitEnabled takes nothing returns boolean.


Top
 Profile  
 
 Post subject: Re: MemoryHackAPI
PostPosted: June 6th, 2020, 1:11 pm 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1402
Title: Just Another S.Mod
Good job! It's getting even better.


Top
 Profile  
 
 Post subject: Re: MemoryHackAPI
PostPosted: June 6th, 2020, 9:57 pm 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2346
This sounds insanely powerful. Nice job.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)