Welcome to the MMOtop - Arcemu, Mangos, Trinity.
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Jerry's Avatar
    Status : Jerry is offline
    Join Date : Mar 2009
    Location : Serbia
    Posts : 2,321
    Thanks: 223
    Thanked 501 Times in 286 Posts
    Rep Power : 10
    Reputation:2077Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute

    Default [Lua Engine] LuaHypArc

    Credits: nutcase560

    Hi guys I saw this on Arcemu forums orginally posted by Hypersniper and thought it'd be very useful for some people. I did not make this nor taking credit for it. Just simply posting it here.

    I'll try to keep it updated..."try"...

    Welcome to LuaHypArc

    "BlackBoy0 tested, HalestormXV approved."


    1. What is it?

    LuaHypArc is a new Lua scripting engine for ArcEmu. It is based off the strong foundation provided by LUAppArc. It boasts over 50 brand new and unique functions that are usable in your Lua bosses, events, items and game objects. Prepare to extend yourself more than ever before. It contains features for advanced and new scripters alike. Additionally, LuaHypArc contains all of the old LUAppArc functions, as well as broken functions now fixed (Yes, CastSpellOnTarget is here.) Consider it an extension on your old favourite.


    2. Features


    * Over 50 new and fixed commands, usable in all Lua scripts.
    * Easier installation than any other engine currently available.
    * An updated and more comprehensive "Defined Variables.lua".
    * Access to new features for veteran scripters and new:
    * Phasing
    * Weather manipulation
    * Revamped packets system
    * GetDistanceYards
    * CastSpellOnTarget
    * Comprehensive commands list that explains all added functions.
    * Room for future expansion - I'll listen to your suggestions.
    * Proper, wholesome updates - no need to "SVN Update" 5 times a day.




    3. Download & Setup

    Couldn't be easier. (However, before installing I suggest you compile your ArcEmu at least once without the Lua engine.)

    * 1. Head to the simple, HTTP download link listed below.
    * 2. Extract it to your server's \trunk\ folder.
    * 3. Run 'install.bat'.


    DOWNLOAD LINKS
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    The SVN is: [Only registered and activated users can see links. ]

    4. Commands

    A full command command listing can be found with your download, however it is also available: here.
    Please find a brand new Defined Variables.lua here.

    In Detail - Command Features
    Packet System - New Advanced System
    The packet system has been completely revamped. The previous packet functions were completely useless, so developers should be very excited with the following changes.
    Packet Buffers: You are given 17 packet buffers (0-16) that can all hold different data. You should INITIALISE packets using Unit:InitPacket(buffer_index,packet_type). This sets up the packet on the specified buffer. Once that's done, you can add data to it using Unit:AddDataToPacket(buffer_index,data_type,data). Once you've added your data, you can send your packet using one of the sending commands provided. Once a packet is sent, the buffer is cleared and can be used again.
    Phasing Commands
    Yep, you can now phase game objects and players using Lua at your will. Phases use a "bitmask system". This means that each phase is labelled by a power of 2. This means that each phase is: 1 (2^0), 2 (2^1), 4(2^2), 8(2^3) and so on. If you set an object to be of phase value 3, this means it is a member of both phases 1 and 2 (1+2=3). Phase 1 is the default phase.


    5. Things to get you excited

    Unit:SetZoneWeather(zone_id,type,density) - Sets the weather of zone_id to type, and density (0.3-2.0).
    Plyr:SetPlayerWeather(type,density) - Same as above, but only Plyr sees the weather change!
    Plyr:PlayerSendChatMessage(type,lang,msg) - Just like the normal SendChatMessage, but this one forces a player to say something.
    Unit:GetDistanceYards(target) - Returns the distance in Yards.
    Plyr:PlaySoundToPlayer(sound_id) - Just like PlaySoundToSet but only plays the sound to Plyr.
    Unit:CastSpellOnTarget(spell_id,target) - Enough said.
    Unit:VendorAddItem(item_id,amount,extcost) - Adds amount items with entry item_id and extended cost extcost to Unit.


    6. Examples

    I recommend you use this script with an NPC with display id same as [Only registered and activated users can see links. ]

    Code:
    --[[
          __                        __  __                  ______                 
         /\ \                      /\ \/\ \                /\  _  \                 
         \ \ \      __  __     __  \ \ \_\ \  __  __  _____\ \ \_\ \  _____  ___   
          \ \ \  __/\ \/\ \  /'__`\ \ \  _  \/\ \/\ \/\ '__`\ \  __ \/\`'__\/'___\  
           \ \ \_\ \ \ \_\ \/\ \_\.\_\ \ \ \ \ \ \_\ \ \ \_\ \ \ \/\ \ \ \//\ \__/  
            \ \____/\ \____/\ \__/ \_\\ \_\ \_\/`____ \ \  __/\ \_\ \_\ \_\\ \____\ 
             \/___/  \/___/  \/__/\/_/ \/_/\/_/`/___// \ \ \/  \/_/\/_/\/_/ \/____/ 
                                                  /\___/\ \_\                       
                                                  \/__/  \/_/   .zapto.org 
    Example 1: Statue activation
    Utilises "GetInventoryItemById", "GetDistanceYards"
    ]]--
    
    EMOTE_STATE_SUBMERGED = 429
    local PLAYER_ITEM
    local INCARCERA
    local REACTED = {}
    local NPC_ENTRY = 74000
    local ITEM_ENTRY = 74000
    
    function Incarcera_onload(pUnit)
            INCARCERA = pUnit
            pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
            pUnit:SetCombatCapable(1)
            pUnit:SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED)
            pUnit:RegisterEvent("Incarcera_SearchPlayers", 1000, 0)
            pUnit:RegisterEvent("Incarcera_ClearReacted", 1000, 0)
    end
    
    function Incarcera_SearchPlayers(pUnit)
            for k,v in pairs(pUnit:GetInRangePlayers()) do
                    if (v:GetItemCount(ITEM_ENTRY) > 0 and REACTED[v] ~= true and pUnit:GetDistanceYards(v) < 30) then
                            PLAYER_ITEM = v:GetInventoryItemById(ITEM_ENTRY)
                            PLAYER_ITEM:GossipCreateMenu(ITEM_ENTRY, v, 0)
                            PLAYER_ITEM:GossipMenuAddItem(9, "Activate Uther's Light", 0, 0)
                            PLAYER_ITEM:GossipMenuAddItem(9, "Ignore the statue...", 1, 0)
                            PLAYER_ITEM:GossipSendMenu(v)
                            REACTED[v] = true
                    end
            end
    end
    
    function Incarcera_ClearReacted(pUnit)
            for k,v in pairs(REACTED) do
                    if (v ~= nil and k ~= nil) then
                            if (pUnit:GetDistanceYards(k) > 30) then
                                    REACTED[k] = false
                                    k:GossipComplete()
                            end
                    end
            end
    end
    
    function Incarcera_ItemOnGossipSelect(item, event, player, id, intid, code)
            if (intid == 1) then
                    player:GossipComplete()
            elseif (intid == 0) then
                    if (INCARCERA:GetUInt64Value(UNIT_FIELD_FLAGS) == UNIT_FLAG_NOT_SELECTABLE) then
                            player:GossipComplete()
                            INCARCERA:RemoveEvents()
                            INCARCERA:SendChatMessage(42, 0, "The statue reacts to the revealing light...")
                            INCARCERA:CastSpell(46821) --light visual
                            INCARCERA:RegisterEvent("Incarcera_BattleBegin", 5000, 1)
                    else
                            player:GossipComplete()
                    end
            end
    end
    
    function Incarcera_BattleBegin(pUnit)
            pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, 0)
            pUnit:SetCombatCapable(0)
            pUnit:RemoveAllAuras()
            pUnit:CastSpell(61463) --shadowfury
            pUnit:SendChatMessage(14, 0, "I will not fail the dark master!")
            --Register any boss phases here.
    end
    
    function Incarcera_OnLeaveCombat(pUnit)
            pUnit:RemoveEvents()
            REACTED = {}
            Incarcera_onload(pUnit) --Calling onload function. Just like copying and pasting it's contents to here.
    end
    
    function Incarcera_OnDeath(pUnit)
            pUnit:RemoveEvents()
            REACTED = {}
    end
    
    --Registering events
    if (GetLuaEngine() ~= "LuaHypArc") then --we gotta make sure they're using LuaHypArc!
            print("LuaEngine: Did not load 'Incarcera - Statue Activation' script - LuaHypArc not installed.")
            print("LuaEngine: Please visit http://luahyparc.zapto.org/ for more information.")
    else
            RegisterUnitEvent(NPC_ENTRY, 18, "Incarcera_onload")
            RegisterUnitEvent(NPC_ENTRY, 4, "Incarcera_OnDeath")
            RegisterUnitEvent(NPC_ENTRY, 2, "Incarcera_OnLeaveCombat")
            RegisterItemGossipEvent(ITEM_ENTRY, 2, "Incarcera_ItemOnGossipSelect")
    end
    [Only registered and activated users can see links. ]

    Code:
    --[[
          __                        __  __                  ______                 
         /\ \                      /\ \/\ \                /\  _  \                 
         \ \ \      __  __     __  \ \ \_\ \  __  __  _____\ \ \_\ \  _____  ___   
          \ \ \  __/\ \/\ \  /'__`\ \ \  _  \/\ \/\ \/\ '__`\ \  __ \/\`'__\/'___\  
           \ \ \_\ \ \ \_\ \/\ \_\.\_\ \ \ \ \ \ \_\ \ \ \_\ \ \ \/\ \ \ \//\ \__/  
            \ \____/\ \____/\ \__/ \_\\ \_\ \_\/`____ \ \  __/\ \_\ \_\ \_\\ \____\ 
             \/___/  \/___/  \/__/\/_/ \/_/\/_/`/___// \ \ \/  \/_/\/_/\/_/ \/____/ 
                                                  /\___/\ \_\                       
                                                  \/__/  \/_/   .zapto.org 
    Example 2: Personal weather effects
    Utilises "SetPlayerWeather"
    ]]--
    local ITEMID = 75000
    
    function Snowglobe_OnGossipTalk(pUnit, event, player)
            player:SetPlayerWeather(8, 1.5) --snow, 70% intensity
    end
    
    --Registering events
    if (GetLuaEngine() ~= "LuaHypArc") then --we gotta make sure they're using LuaHypArc!
            print("LuaEngine: Did not load 'Titan's Snowglobe - Personal Weather' script - LuaHypArc not installed.")
            print("LuaEngine: Please visit http://luahyparc.zapto.org/ for more information.")
    else
            RegisterItemGossipEvent(ITEMID, 1, "Snowglobe_OnGossipTalk")
    end
    7. Final words



    This has been a completely solo project except for the suggestions and testing by BlackBoy0. Thank you very much, man.

    In the future Halestorm's custom functions will also be published to the public through LuaHypArc.

  2. #2
    Status : aptiva is offline
    Join Date : Nov 2009
    Posts : 21
    Thanks: 0
    Thanked 0 Times in 0 Posts
    Rep Power : 3
    Reputation:30aptiva is on a distinguished road

    Default k slight update...

    :) since links are down, i figured i would through out a reply on the subject and last link for lua++ (LuaHypArc)

    *OLD* Luapparc - Revision 36 arcemu/Asp.HS
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ] //confirmed working Rev. 2809 //
    [Only registered and activated users can see links. ] //confirmed working Rev. 1676 //
    figured i would add that for those of the community
    still running older game patches or wanted
    LUA support for hearthstone, after you adjust it ofc.

    latest LuaHypArc that has been released is Rev 26
    and u can find it here: [Only registered and activated users can see links. ]

    unfortunately, Luapparc / LuaHypArc has ended:
    hopefully more will pick up and continue development of the luaplusplus
    for other core support, like it was before...
    mangos/aspireHS/ascent etc.

    Revision 26, 158 bytes (checked in by hypersniper, 2 days ago)

    * Goodbye old SVN.
    Line
    1 This SVN is no longer active.
    2 LuaHypArc became part of the default ArcEmu package on 10th Nov 2009.
    3 Please simply SVN update your ArcEmu core.
    4
    5 Thank you.

    other LUA scripting links:
    lua educational rabble rabble cheese...
    • below are for those that wish to learn, or learn further...
    • just alil spoon fat to chew on...
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]

  3. #3
    Jerry's Avatar
    Status : Jerry is offline
    Join Date : Mar 2009
    Location : Serbia
    Posts : 2,321
    Thanks: 223
    Thanked 501 Times in 286 Posts
    Rep Power : 10
    Reputation:2077Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute

    Default

    Thanks dude +rep :)

  4. #4
    Status : Kilgun is offline
    Join Date : Feb 2011
    Posts : 1
    Thanks: 0
    Thanked 0 Times in 0 Posts
    Rep Power : 0
    Reputation:10Kilgun is on a distinguished road

    Default

    what do you mena with the "trunk" folder??


 

Similar Threads

  1. Cheat Engine 5.4
    By Jerry in forum WoW Hacks
    Replies: 4
    Last Post: 05-31-2010, 01:17 AM
  2. [Web] C.S Wowd - Thottbot like database engine
    By Jerry in forum Emulator Website / Script's Releases
    Replies: 14
    Last Post: 03-10-2010, 02:04 AM
  3. [Release-LuaHypArc] LunarSCR ChatCommands v2.1
    By Onlykl in forum LUA / C++ Scripts
    Replies: 4
    Last Post: 12-26-2009, 03:07 PM

Visitors found this page by searching for:

luahyparc

Trinity lua engine

LuaHypArc download

ArcEmu Default Lua Command List

LUA engine for trinity

ascent lua engine

ArcEmu Default Lua Command List.

Mangos LUA engine

wow luahyparc

arcemu luahyparc

hyparc arcemu

lua event script engine

arcemu Defined Variables.lua

arcemu phasinglua engine ascentlua phasing systemdownload LuaHypArcLua engine mangosLua Engine Trinitylua engine in trinitylua hyp arcluahyparc functionslua engine on trinitylua engine commands arcemugossip script luahyparc
SEO Blog

Tags for this Thread

Bookmarks

Posting Permissions

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