• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

ElunaGate - A continuation of GATE by Kenuvis

Foereaper

Founder
Hello everyone, I'm sure a lot of us know about the GATE project, previously created by Kenuvis. His GATE project was the first of it's kind, primarily to be able to code Addons for private servers completely server side, by using a framework addon and server side scripts. Unfortunately his links for his last version, which had Eluna support, are no longer valid. Thus I decided to take up his older version and recode it to work with Eluna's new Addon Communication Support!

I have now got to the point where it's working perfectly fine, except a small few changes that'll happen very shortly Lua Engine side, however it will not involve any change of the Addon or server side script. Thus, the framework so far is ready for release!

How to install:

Below you will find two download links. One is for the Client Side Addon, and the other is for the Server Side Script. Remember, whoever will be using your server side addons will have to install the GATE addon.

Server side:
1. Download the ElunaGate Server Script
2. Place the above script inside your lua_scripts\extension folder! This is very important to ensure the server side framework is loaded before your addons!

Client side:
1. Download the ElunaGate Client Addon
2. Unpack the folder inside your World of Warcraft client's Addon directory.

Easy as that! You have now successfully installed ElunaGate and you can start using your ElunaGate addons!

As you can probably imagine, there are not a lot of ElunaGate Addons created yet. However, I have been working on a GM addon, which will be released in a separate thread, which you can find below:

ElunaGate GM Addon

Thank you very much for your continued support, we at EmuDevs and Eluna couldn't have done it without you all!

Special thanks to Kenuvis for his great work on GATE. Below I will quote his original thread, which contains some more information about GATE in general:

t3khyeje.jpg




8clv3klp.jpg

... Any many more!

Guide:
You had Frame, Button, CheckBox, RadioBox, EditBox, TextBox, StatusBar, Slider, Panel and ListBox as the Basic Objects.Everyone of this can create with CreateFrame, CreateButton and so on.
If you want, that a Object is a Child of another, you do call the create from the Parent-Object.
f = CreateFrame("FrameName")
btn = f:CreateButton("ButtonName)

f:Send(Player1, Player2, Player3, ...) will send the Object and all Childs of it to the Player(s).
Easy? Easy!

Special and prefinished Frames/Objects are: TabbedFrame, Timer, DropDownMenu, CursorKeys, DialogFrame, EditFrame, OKFrame, YesNoFrame, MinimapButton, SlashCommand, Action, KeyBind, Event

Now, you can modify Objects.
All Modification, you call over the Set-Command, like f:SetWidth(200).
The Basic-Modificator are Text, Width, Height, Parent, XOffset, YOffset, Offset, StatusLink, Event, Tooltip, Hidden, FadeIn, FadeOut, Red, Green, Blue, Alpha, Style, Cursor, SafetyStep, Trigger1 to 5.

Only for Frames:
CantClose, CantMove, InfoText, Front, Tabbed, LeaveOpen, Texture

Only for TabbedFrames:
Tab, SelectedTab

Only for Panels:
Border, Background

Only for Buttons:
Texture

Only for EditBox:
MultiLine, MinValue, MaxValue

Only for Radio-/CheckBox:
Checked

Only for YesNoFrames:
Yes[Shown Text], No[Shown Text]

Only for Statusbar/Slider:
MinValue, MaxValue, ValueStep, Value, Countdown, LowText, HighText, AutoReset, Flow, Invert, Vertical, Stop, Start, Runs

Only for Timer:
Countdown, Stop, Start, Runs

Only for Minimapbuttons:
Texture, Degree

Only for DropDownMenus:
DropDownItem(s), SelectedItem

Only for ListBox:
ListBoxItem, Lines, Rows, CanScroll, Margin

Only for InputFrames:
ButtonText, FrameText, DontCloseAfterSend

Only for TextBox:
TextHeight

Only for KeyBind:
Key

With SetEvent, you can set 9 diffent events:
OnClick, OnDoubleClick, OnHide, OnEnter, OnEnterPressed, OnKeyDown, OnEditFocusGained, OnEditFocusLost, OnLeave.

Button:SetEvent("OnClick", function(Object, Player, Event, More) ... end )

For Trigger, you use the same Events. If you do not said, what should trigger, it show/hide. Otherwise, you had FadeIn, FadeOut, Check, UnCheck, Tooltip.
btn1:SetTrigger(btn2, "OnClick") or btn1:SetTrigger(CheckBox, "OnClick", "Check")

So, this is it for the moment. If you had questions, feel free to ask. If you had idea, what Gate should do, say it.

Greeting from Berlin,
Kenuvis
 

Xaver

Respected Member
hi all

i have one problem this addon

i have gm level 4 in to account_access

i have no RBAC i have this removed

emm wen in game say gmaddon, messenge : You do not have the correct permissions to access this addon!

where define gm or not gm and level.

thx
 

Xaver

Respected Member
also i have gm on not working, is no problem

when they think comes first release whas working 100% ?
 

Rochet2

Moderator / Eluna Dev
Incase someone is interested, I worked on a similar server - client messaging api.
https://github.com/Rochet2/AIO

It basically has uses the same messaging type between server and client as GATE, however, it can send around functions, tables and so on.
Also the functions you can use are basically not limited - so it should work on all patches and if it doesnt work on one, it can be tweaked very little to make it work.
It should basically also work on any wow version, though it is only tested on 3.3.5a - This is because none of the functions are hardcoded and it doesnt by default use any templates.

When making it, I tried to comment on everything in english and made a few examples that try to explain the way it works.
Currently there is no way to directly call global functions though on client side : / (Make a function that calls them? Should be possible)

Since Eluna uses Lua 5.2 and WoW uses lua 5.1 or other (customizd too much?) I was not able to send functions directly, so I had to make a workaround sadly to force you to make a string that is interpreted as a function.

Almost all functions are handled automatically by the system. Get functions are sometimes an exception.
You can easily add your own custom functions to the client and server side, if necessary.

Read the issues page : )
 

NotHawthorne

Insane Member
How does one call the value inserted into an EditBox? I wish to basically do the following:
1. Get inputted values from 3 different editboxes when a button is pressed
2. Call those values in an INSERT INTO sql function
 

Rochet2

Moderator / Eluna Dev
For Gate it was quite painful with the Cache table keys
As seen here: http://pastebin.com/t1YAK79P you can do

Code:
local function OnClickButton(self, event, Player, Cache)
    for k,v in ipairs(Cache) do
        print(k, v)
    end
end

Button:SetEvent("OnClick", OnClickButton)

EditBox:SetStatusLink(Button:GetName()) -- unsure if GetName works, use the button name here anyways

In this code Button and self is the button frame event is the event that happened ("OnClick" most likely), Player is the player, Cache is a table filled with every other element being a frame name and every other it's value
Cache is like {[1] = "EditBoxName", [2] = "5"}, if EditBox has 5 in it
EditBox is the EditBox and SetStatusLink adds the edit box value to the Button's cache table when it is clicked.

Im unsure if this works, did not test, but it was what I interpreted from it and think was correct since I tried it out quite some time ago.



On AIO you would do it like this:
Code:
local function OnClickButton(Player, Event, EventParamsTable, ClientFuncRet)
    for k,v in pairs(ClientFuncRet) do
        print(k, v)
    end
end
Button:SetScript("OnClick", OnClickButton, AIO:ObjDo(TextField, ":GetText()", SliderFrame, ":GetValue()")) -- can specify as many as need
In this code Button is the button, Event is "OnClick", EventParamsTable is a table containing the params passed by the CLIENT to the OnClick when on click was called on client side (see wow addon API for values).
The first object there is "self", the frame, so in this case it is the button that caused the event.
ClientFuncRet is a table containing the values returned by the function ran on client side. In this case it contains {TextFieldText, SliderFrameValue}

Read more here:
https://github.com/Rochet2/AIO/blob/master/Examples/AIO_Example.lua#L93
https://github.com/Rochet2/AIO/blob/master/AIO_Server/AIO_Objects.lua#L1166
https://github.com/Rochet2/AIO/blob/master/AIO_Server/AIO_Objects.lua#L1206


For using them in an SQL, you should be cautious.
The values passed to server by client can be anything.
This is why you should check that for example they are actually numbers.
Or that the string is not harmful. (difficult sometimes : /)

Then you can just in the OnClickButton function use the WorldDBQuery or WorldDBExecute and other DB functions to execute the SQL code on server side.
Code:
local val = tonumber(ClientFuncRet[1])
if (not val) then return end
WorldDBExecute("DELETE FROM creature_template WHERE entry = "..val)
 
Last edited:

Xaver

Respected Member
hello

wen say gmaddon

come in consolle error :

lua_scripts/Examples/AIO_Example.lua:40: attempt to call global 'CreateFrame' (a
nil value)

and in game come no menu
 

NotHawthorne

Insane Member
hello

wen say gmaddon

come in consolle error :

lua_scripts/Examples/AIO_Example.lua:40: attempt to call global 'CreateFrame' (a
nil value)

and in game come no menu

If i were to guess, I'd say check to see if you put the Gate script in your /extensions folder.
 

Rochet2

Moderator / Eluna Dev
hello

wen say gmaddon

come in consolle error :

lua_scripts/Examples/AIO_Example.lua:40: attempt to call global 'CreateFrame' (a
nil value)

and in game come no menu

Hmm .. why is the file name AIO_Example ..?
And why is it calling a global function, when in the AIO_Example.lua it is not global, but inside AIO table?

Are you using GATE or AIO?
If you use GATE, you should try make sure GATE is loaded before the script of yours.
In this case you should probably either require the ElunaGate Server Script.lua or change the extension to ElunaGate Server Script.ext
 
Top