Development Preview of LUA-Engine menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Development Preview of LUA-Engine

    Ahoy everyone

    Ive been now in the emulation world since a while (lets say about 4 years) and a lot people asked me before if id make a lua engine for mangos or trinity. So far i wasnt interested at all but yesterday i thought it might be a funny thing working once again with LUA as i remembered some fun times working with luabind in my own emulator years ago. So i started this morning implementing the stuff in trinity (after struggling with trinity yesterday evening till 3am...) and things go pretty fast.

    Currently exported are about 400 functions from the player class, all the stuff that the server calls in PlayerScript's and WorldScript's can be registered from LUA as well as the whole gossip system.

    Here is just an example script which shows some functions:
    Code:
    function OnMotdChanged(motd)
    	print("New motd: " .. motd)
    end
    
    function OnHandleChat(plr, type, lang, message)
    	print("A wild chat message appears: " .. message)
    end
    
    function GossipHello(plr, creature)
    	menu = GossipMenu(creature, plr, 1)
    	menu:AddMenuItem(GossipMenu.IconTaxi, 1, "A wild gossip menu appears")
    	menu:AddMenuItem(GossipMenu.IconBattle, 2, "Another wild gossip menu appears")
    	menu:Send()
    end
    
    function GossipSelect(plr, creature, id)
    	if(id == 1) then
    		plr:Say("I have selected item 1", 0)
    	end
    	if(id == 2) then
    		plr:Yell("I have selected item2", 0)
    	end
    
    	plr:Yell("Im at " .. plr.X .. "/" .. plr.Y .. "/" .. plr.Z, 0)
    	plr:CloseGossip()
    end
    
    RegisterMotdChanged("OnMotdChanged")
    RegisterOnChat("OnHandleChat")
    RegisterGossipScript("testGossipLUA", "GossipHello", "GossipSelect")
    Ill keep you up to date in this thread and i guess i can make a first release this weekend with already a lot of stuff implemented.

    Greetings
    Cromon

    Development Preview of LUA-Engine
  2. #2
    Chrispee's Avatar The True Repacker


    Reputation
    686
    Join Date
    Mar 2007
    Posts
    931
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OMG nice work bro +rep from me




  3. #3
    Toshix's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where to see what you promised?

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You should have used the same function names/syntax as the ArcEmu Lua for the sake of consistency and cross-platform support.
    Last edited by stoneharry; 01-22-2012 at 11:48 AM.

  5. #5
    myran2's Avatar Contributor

    Reputation
    130
    Join Date
    Dec 2008
    Posts
    475
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    You should have used the same function names/syntax as the ArcEmu Lua for the sake of consistency and cross-platform support.
    I'm not sure that would work because arcemu and trinity have different functions that do the same things.
    Also, is this project still being worked on? It could be really neat to see a finished product.

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by myran2 View Post
    I'm not sure that would work because arcemu and trinity have different functions that do the same things.
    Also, is this project still being worked on? It could be really neat to see a finished product.
    What difference does that make? The core functions are still manipulating the same game. When you call a Lua method all it does is call a C++ function that has been defined within the Lua engine, so just have the C++ call the appropriate values/functions to create the desired effect.

    There was another two people working on a Lua engine for TrinityCore, but abandoned it due to a lack of time. They mirror'd the ArcEmu method list and had most unit methods done.

  7. #7
    myran2's Avatar Contributor

    Reputation
    130
    Join Date
    Dec 2008
    Posts
    475
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    What difference does that make? The core functions are still manipulating the same game. When you call a Lua method all it does is call a C++ function that has been defined within the Lua engine, so just have the C++ call the appropriate values/functions to create the desired effect.

    There was another two people working on a Lua engine for TrinityCore, but abandoned it due to a lack of time. They mirror'd the ArcEmu method list and had most unit methods done.
    I guess that's true, but the way I understand it is that both Cromon and Pradox (Not sure if I got his name right, the guy who made the new Lua engine for arc) are just mirroring C++ functions in Lua.
    Say arc has a function called "SummonNPC(int id, int x, int y, int z)". Trinity also has a function for summoning NPCs, but it's SummonNPC(int x, int y, int z, int orientation, int id, int phase, char scriptName).
    You can't really port over a script that is using SummonNPC(int id, int x, int y, int z) to trinity's version without adding more data.

    I might be completely wrong, but this is how I understood it when I looked into it.

  8. #8
    matin2gray's Avatar Private
    Reputation
    1
    Join Date
    Apr 2012
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So...good luck for you!!

  9. #9
    Raz3rr's Avatar Corporal
    Reputation
    8
    Join Date
    Apr 2012
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds amazing! Good luck!

Similar Threads

  1. [Game Development] Unreal Tournament 3 Engine
    By The-Eradicator in forum Community Chat
    Replies: 13
    Last Post: 11-09-2009, 05:33 PM
  2. [GuaEngine] New Custom Lua Engine
    By Gastricpenguin in forum WoW EMU General Releases
    Replies: 158
    Last Post: 09-30-2009, 07:14 PM
  3. Gastric's Lua Engine
    By Gastricpenguin in forum World of Warcraft Emulator Servers
    Replies: 62
    Last Post: 04-22-2009, 08:11 PM
  4. Custom LUA engine
    By flameworker in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 04-19-2009, 04:07 PM
  5. Request - Working x64 Lua Engine
    By c1nco in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 10-28-2008, 02:57 PM
All times are GMT -5. The time now is 07:31 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search