Warcraft Lua Engine 2.1.2

This is a discussion on Warcraft Lua Engine 2.1.2 within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; W arcraft L ua E ngine v2.1.2 Hello, I'm finally back with the new version of Warcraft Lua Engine. So, ...

Page 1 of 10 123 ... LastLast
Results 1 to 10 of 99
  1. #1
    Sosha is offline Banned User

    Array
    Join Date
    Oct 2011
    Location
    Iran
    Posts
    524
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    1043

    Warcraft Lua Engine 2.1.2

    Warcraft Lua Engine v2.1.2


    Hello,

    I'm finally back with the new version of Warcraft Lua Engine.

    So, what has changed ?

    • re written the engine in a complete new way which leads to performance improvements
    • now we support every single jass native ! there is no native that you can't call.
    • you can hook every jass native you want once before they get called and once after they got called so you can change the native parameters and the return value !
    • added the functionality to get the handle of other loaded plugins so you can unload them or get their name and their author name if you want to.
    • added support of LuaSocket.
    • added a tool that plugin writers can use to compile their plugins.(it's not necessary to compile a plugin but we give this tool in case that someone wants to protect their code before releasing.)
    • and lots of new features that we will discuss about ...


    Now every plugin should have a function named "Initialize" so we can call it as soon as the game opens.
    The "Initialize" function has 1 parameter which is the handle of current plugin.
    See the sample below:

    Code:
    function Initialize(plugin)
        plugin:SetName("Test Plugin")
        plugin:SetVersion("1.0")
        plugin:SetAuthor("Shahriyar")
        plugin:SetDescription("Lua Engine Test Plugin")
        
        plugin:RegisterGameEvent(EVENT.GAME_STARTED, "OnGameStarted")
    end
    As you can see we can do some initializations in this function with the given plugin handle.
    Here's the full function list of plugin class:

    Code:
    plugin:RegisterGameEvent(EVENT event, string funcName) -- Events are stated below
    plugin:RegisterNativeHook(string native, string funcName_pre, string funcname_post) -- The engine will call the pre function once before the native getting called so you can use or even edit the naive parameters and once after the native got called so you can use the return value and even change it to another value !
    plugin:RegisterChatEvent(string chat, string funcName) -- The function will get called when the local user send a chat message containing the string you stated (If the chat matches any event the game won't send the chat message to other clients)
    plugin:SetName(string name)
    plugin:SetVersion(string version)
    plugin:SetAuthor(string author)
    plugin:SetDescription(string description)
    plugin:GetName()
    plugin:GetVersion()
    plugin:GetAuthor()
    plugin:GetDescription()
    plugin:Unload()
    RegisterNativeHook example:
    Code:
    
    
    function MultiboardSetTitleText_Pre(multiboard, text)
        local str = jParamStr2cStr(text)
        str = "Lua Engine - " .. str
        
        return {multiboard, cStr2jParamStr(str)}
    end
    
    
    function Initialize(plugin)
        plugin:SetName("Jass Hooking Test")
        plugin:SetVersion("1.0")
        plugin:SetAuthor("Shahriyar")
        plugin:SetDescription("Lua Engine Sample Plugin")
        
        plugin:RegisterNativeHook("MultiboardSetTitleText", "MultiboardSetTitleText_Pre", "")
    end
    If you want to change any of the parameters, at the end you should return a table containing all the params in the correct order and if you don't want to change the params just return nil at the end.

    Events :
    Code:
    EVENT.ENTER_LOBBY
    EVENT.ENTER_LOADING
    EVENT.GAME_STARTED
    EVENT.GAME_PAUSED
    EVENT.GAME_RESUMED
    EVENT.GAME_FINISHED
    EVENT.GAME_TICK -- If you register this event the engine will call the function you given every 100 milliseconds.
    EVENT.PLUGIN_UNLOAD -- The engine will call this function as the last function before the plugin unloads
    If you want to call a jass native you no longer need to create a jass class and initialize it, instead do as the following way :

    Code:
    Jass.GetLocalPlayer() -- Simple as that ;)
    Also the game class that was in the first version of the engine changed the same way that the jass class did.
    Example :

    Code:
    Game.GetMapName()
    the functions that are in Game namespace are some custom made functions that we found necessary too add and here is the list :

    bool Game.IsInGame(bool bPaused) -- If you pass false to this functions the function will return false if you are in game but the game is paused if you pass true the function will return true if you are in game (doesn't matter if the game is paused or not)
    void Game.WriteText(string text, FRAME frame, float duration) -- Frames are stated below
    void Game.ExecuteCmd(unit Unit, COMMAND cmd, float x, float y, unit target) -- Commands are stated below
    string Game.GetMapName()
    AbilityState Game.GetAbilityState(unit Unit, integer abilityID) -- Ability states are stated below
    bool Game.SendChat(string message, bool bSendToAll, bool bForceMaximizeGame)
    Frames :
    Code:
    FRAME.MESSAGE
    FRAME.UNIT
    FRAME.CHAT
    FRANE.TOP
    Commands :
    Code:
    CMD.MOVE
    CMD.ATTACK
    CMD.HOLD
    CMD.STOP
    
    You can also pass custom codes as integers (you can get code of spells by extracting maps and reading from war3map.j file)
    AbilityState:
    Code:
    ABILITY_STATE.READY
    ABILITY_STATE.COOLDOWN
    ABILITY_STATE.INVALID
    There are also some general functions that you can use :
    Code:
    Sleep(integer milliseconds) -- Same as WinAPI Sleep function
    GetPlugins() -- Return a table containing handle of all loaded plugins
    GetVersion() -- Return the version of the lua engine you're currently using as string
    jParamStr2cStr(jParmStr) -- Get a readble string from the jass string handle in native parameters (only usable in hooked native functions)
    jHandleStr2cStr(jHandleStr) -- Get a readble string from the jass string handle in native return values (only usable in hooked native functions)
    cStr2jParamStr(cStr) -- Convert an string to jass param string handle (only usable in hooked native functions)
    GetFloat(jFloat) -- Convert jass floating points handles to readble floating point (only usable in hooked native functions)
    MakeFloat(float) -- Convert floating point to jass floating point handle  (only usable in hooked native functions)
    Here are some complete plugins that you can explore for a better underestanding.
    Warcraft 3 Lua Scripts

    Some sample plugins can also be found in the Plugins folder. Change their extension to lua to enable them.



    Credits :

    • kolkoo for ExecuteCmd function
    • YourName for the chat event stuff


    Changelogs :
    Code:
    Version 2.1.2
    -Removed some unneccessery plugins from the Plugins folder. (But they still can be found at here)
    -Added new function in game namespace. 'SendChat'
    -Added new general function. 'GetVersion'
    
    Version 2.1.1
    -Fixed a crash after closing the game.
    -In order to use lua socket library there is no longer need to set package.path and package.cpath
    -Added new function in game namespace. 'GetAbilityState'
    
    Version 2.1.0 MAJOR UPDATE (The previous plugins may need an edit to work in this update)
    -Now it's possible to hook every jass netive before and after they get called. (check above to see how)
    
    Version 2.0.2
     -Now it is allowed to call natives in loading screen*
     -Fixed a bug with chat events
    
     *-When you hook events related to natives the game may call some of them in loading screen and you will be notified as soon that game calls them so you can now work with that handles even before the game starts
    
    Version 2.0.1
     -Fixed a possible crash
     -Fixed WLE Compiler not working on x64 systems
    
    Version 2.0.0
     -Initial release
    Souce Code :
    https://github.com/ShahriyarB/Warcraft-Lua-Engine-2
    Attached Files
    Last edited by Sosha; 10-04-2015 at 07:45 PM.

  2. The Following 13 Users Say Thank You to Sosha For This Useful Post:


  3. #2
    XD_imbaGaming's Avatar
    XD_imbaGaming is offline Advanced Hacker
    Array
    Join Date
    Nov 2010
    Location
    Germany Hamburg
    Posts
    297
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    154
    wow thanks for your work

  4. #3
    Sosha is offline Banned User

    Array
    Join Date
    Oct 2011
    Location
    Iran
    Posts
    524
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    1043
    Quote Originally Posted by XD_imbaGaming View Post
    wow thanks for your work
    Thanks, It's nice to see you liked it.
    And btw I'm waiting for feedbacks

  5. #4
    Tracky's Avatar
    Tracky is offline Administrator

    Array
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    9,965
    Mentioned
    176 Post(s)
    Tagged
    4 Thread(s)
    Rep Power
    44
    Reputation
    5675
    Warcraft 3 Lua Scripts

    Make sure to post your releases in here

  6. The Following 3 Users Say Thank You to Tracky For This Useful Post:


  7. #5
    ehsan...p is offline Addict
    Array
    Join Date
    Feb 2013
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    hi sosha and tracky, you know we are in same countries plz help me about LUA engine. what is purpose of this software?
    i mean zodcraft for hack and lua engine for waht?
    i see your perviuse post if you can plz describe for me in Persian.

    i see this error when i open WLE Compiler.exe:
    the application was unable to start corectly(0x000007b),click ok to close the aplication

  8. #6
    Tracky's Avatar
    Tracky is offline Administrator

    Array
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    9,965
    Mentioned
    176 Post(s)
    Tagged
    4 Thread(s)
    Rep Power
    44
    Reputation
    5675
    Quote Originally Posted by ehsan...p View Post
    hi sosha and tracky, you know we are in same countries plz help me about LUA engine. what is purpose of this software?
    i mean zodcraft for hack and lua engine for waht?
    i see your perviuse post if you can plz describe for me in Persian.

    i see this error when i open WLE Compiler.exe:
    the application was unable to start corectly(0x000007b),click ok to close the aplication
    You could write scripts/bots for Warcraft III with the inbuilt methods provided by Warcraft III. For example you could create some kind of lasthit bot in DotA.

  9. #7
    Sosha is offline Banned User

    Array
    Join Date
    Oct 2011
    Location
    Iran
    Posts
    524
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    1043
    Quote Originally Posted by ehsan...p View Post
    hi sosha and tracky, you know we are in same countries plz help me about LUA engine. what is purpose of this software?
    i mean zodcraft for hack and lua engine for waht?
    i see your perviuse post if you can plz describe for me in Persian.

    i see this error when i open WLE Compiler.exe:
    the application was unable to start corectly(0x000007b),click ok to close the aplication
    You don't need to open 'WLE Compiler.exe' unless you want to compile your plugins.
    All you have to do is to copy all files in your warcraft3 directory, go to 'Plugins' folder and put the plugins you want in there or just write your own plugin then start the game, you're good to go.

    If you had any problem with writing plugins feel free to ask your problems here: http://www.d3scene.com/forum/warcraft-3-lua-scripts/

    About the error
    I'm checking the issue that caused the error and will post an update soon

  10. #8
    ehsan...p is offline Addict
    Array
    Join Date
    Feb 2013
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    Quote Originally Posted by Tracky View Post
    You could write scripts/bots for Warcraft III with the inbuilt methods provided by Warcraft III. For example you could create some kind of lasthit bot in DotA.
    great, but i cant create such this bot!!!!
    i cant create lua file!!!!!!

    Quote Originally Posted by Sosha View Post
    You don't need to open 'WLE Compiler.exe' unless you want to compile your plugins.
    All you have to do is to copy all files in your warcraft3 directory, go to 'Plugins' folder and put the plugins you want in there or just write your own plugin then start the game, you're good to go.

    If you had any problem with writing plugins feel free to ask your problems here: http://www.d3scene.com/forum/warcraft-3-lua-scripts/

    About the error
    I'm checking the issue that caused the error and will post an update soon
    good, can you share your own lua file with me??? for example you made lua file for yourself, like lasthit,and .........................
    plz share this file with me. plz dont tell me you just create "axe culling blade promt"
    i need all lua file that you made for lua engine for dota for enjoying game ty
    Axe Culling Blade Prompt 1.0


  11. #9
    Sosha is offline Banned User

    Array
    Join Date
    Oct 2011
    Location
    Iran
    Posts
    524
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    1043
    Quote Originally Posted by ehsan...p View Post
    great, but i cant create such this bot!!!!
    i cant create lua file!!!!!!



    good, can you share your own lua file with me??? for example you made lua file for yourself, like lasthit,and .........................
    plz share this file with me. plz dont tell me you just create "axe culling blade promt"
    i need all lua file that you made for lua engine for dota for enjoying game ty
    Axe Culling Blade Prompt 1.0
    Why can't you write your plugins ?
    Learn lua over the internet you you will find it extremely easy to write a plugin.
    And yes, this is the only plugin that is currently made for the lua engine, Soon there will be more plugins.

  12. #10
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    449
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    323
    I get this error once I create a game:
    vf8dexhyg1m9.png

Page 1 of 10 123 ... LastLast

Similar Threads

  1. [Release] Warcraft Lua Engine [1.0.4]
    By Sosha in forum Warcraft 3 Hacks, bots and tools
    Replies: 83
    Last Post: 01-15-2016, 12:42 PM
  2. [Help] WarCraft III Battle Net Cheat Engine need help
    By Edward_ in forum Warcraft 3 Hacks, bots and tools
    Replies: 3
    Last Post: 01-10-2011, 05:04 AM
  3. Cheat engine highest version and hundreads of cheats if u have cheat engine
    By kabarastar in forum WoW Private Server Hacks
    Replies: 22
    Last Post: 12-31-2008, 03:44 AM
  4. Need help with Cheat Engine + Warcraft 3
    By Tonyt32136 in forum Warcraft 3 forum
    Replies: 0
    Last Post: 09-27-2007, 09:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •