ArcEmu: [lua] Gate Project - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[lua] Gate Project Custom Interface

#1 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 09 May 2012 - 04:52 PM

Little History:
Spoiler


So, lets start!

What is Gate?
Gate is a combination of a Clientaddon and a Serverscript. With this strong combination, we can create our own Frames with Buttons and so on in Serverscripts without change something in your Client (especially the Gate Addon you have to "install" one time).

What possibilities I have?
Spoiler


Client-Addon
Serverscript

and since some days, I had a ingame frame creator (Addon):
Builder

https://www.youtube....nYcIZYAKO0&hd=1
Little comment to this: All in this Video is created with Gate. The String, we got from "Output" can easily use for your Serverscript.
The Builder will open after /gate .


So, if you have some questions, comments, "Like", feel free to post it.

Kenuvis

PS: Next days, if you are honest and likalbe, I will explain you, how a DropDownMenu or a ListBox work, what Changesets are and what the hell is a StatusLink. Or maybe, how to use the Builder or how you can react on a ButtonClick. ^^

2

#2 User is offline   Magnifikator 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 398
  • Joined: 05-October 11
  • Gender:Male
  • Location:Switzerland
  • Server OS:Windows

Posted 10 May 2012 - 04:43 AM

So the client addon works like a framework for the custom Lua commands.

That's really cool. Because wow client addons are a pain to create ;)


Edit:
Ohh, after watching the video I have to say it's more like a visual IDE. That's outstanding. :D
Try out the LoE ArcEmu World database. Please visit dev.LandOfElves.net.

Posted Image


0

#3 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 10 May 2012 - 12:44 PM

@magnifikator: auf yias ist ne deutsche Beschreibung, da ich dem Deutschen besser mächtig bin, poste ich sie dir einfach mal: http://yias.org/foru...te-project.html

So, now I want to explain, how to use the Builder: (if this interested someone ^^)

In the Video, you see many things.
You start with tiping "/gate"

Select now "Frame" to create a Frame. This could be a good start. ^^
Now, you can create more Objects like Buttons or so.

A rightclick on an Object start the Editmode and a new Window open, where you can rename it, move it or set different settings.

At this window, at the bottom, you see an Editbox call "Output". If you think, you are finish, copy the information in it and go to your Serverscript.
e.g.
You copy the Output from a Frame (e.g. {Name="NewFrame1",Width=350})
local frame = CreateFrame("The_name_doesnt_matter", {Name="NewFrame1",Width=350})
frame:Send(player)

You see, you do not need to set any settings. Easy? Easy!
More Objects? No Problem:
local f = CreateFrame("TestFrame", {Name="NewFrame1",XOffset=36,Text="NewFrame1",YOffset=6,})
local b = CreateButton("TestButton", {Height=30,Name="NewButton1",Width=170,XOffset=2,Text="Klick mich !",Parent="NewFrame1",YOffset=44,})
local e = CreateEditBox("TestEdit", {Name="NewEditBox1",XOffset=-27,Text="NewEditBox1",Parent="NewFrame1",})
local c = CreateCheckBox("TestCheck", {Name="NewCheckButton1",XOffset=-72,Text="NewCheckButton1",Parent="NewFrame1",YOffset=-47,})

b:SetEvent("OnClick", print)

f:Send(Player)

All of these Objects are childs of the Frame and do not need to send individually.

1

#4 User is offline   Mordred 

  • Member
  • Pip
  • Group: Members
  • Posts: 12
  • Joined: 22-February 10
  • Gender:Male

Posted 11 May 2012 - 08:50 AM

Love it so much!

Recently I created a Challenge Instance script and with Gate I created the frame for selecting the difficulty <3
LINK

Now with the Gate Builder it's way easier creating simple frames fast.

~Mordred
0

#5 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 14 May 2012 - 06:17 PM

Looks very nice!
Good job!
"The demand for free goods is infinite."
0

#6 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 15 May 2012 - 03:33 PM

@dfighter: It's no job, it's more than a job, it's fate! ^^ Really, I see it like my personal destiny.

Today, I will show, how you can react on a Click or Enter or so. (I call it "Event")

Maybe, in my introducing, you just saw it.

Object:SetEvent(Event, func)


Events can be:
"OnClick"
"OnDoubleClick"
"OnHide"
"OnEnter"
"OnEnterPressed"
"OnKeyDown"

and for deleting all Events from an Object:
"NoEvents"

The function results:
EventFunction(Object, Event, Player, Arg-Table)

I think, the first three results are clear.
The Arg-Table is Event-specific.
e.g. for "OnClick" Arg-Table[1] = Name of the mouse button responsible for the click action

That's part one of knowing about Events in Gate.

Part two, I will beginn with a Problem. (yeah!)
Imagination a Frame with 3 CheckBoxes and one "OK" Button at the bottom.
Your plan is, that your Serverscript know, which Checkbuttons the User checked and which the user unchecked. Yes, you can give every CheckBox an "OnClick" Event and the first index of Arg-Table will become the status of the CheckButton... But this will trigger every click your function and if the user can't decide... you see, this is a problem and error pool.

For this, Gate has a possibility to solve this problem, I call it "StatusLink", because you can link the Status to an Event of another object. (in this example, the "OK" Button)
CheckBox:SetStatusLink("Button")


And now, if the Button has an Event on "OnClick" the Arg-Table will result as index 2 the object checkbox and in index 3 the status, if checked or not. if you set the other Checkboxes to the Button, the Arg-Table will grow up, because index 4 is another checkbox, 5 the status of it, 6 checkbox, 7 status,... and so on.

So, hopefully, you understood, what I want to explain.^^

Kenuvis

PS:
If you have an idea, how things should work, feel free to post it.

0

#7 User is offline   Loken 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 186
  • Joined: 19-July 11
  • Gender:Male
  • Location:Lordaeron
  • Interests:Arcemu, WOW.
  • Server OS:Windows

Posted 03 October 2012 - 10:04 AM

mmh i have some problems with this. I was making some "test" and decided to open a slider... then i was unable to remove it or close it...
Posted Image
Posted Image
0

#8 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 03 October 2012 - 10:57 AM

Slider:Hide() ^^

0

#9 User is offline   Loken 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 186
  • Joined: 19-July 11
  • Gender:Male
  • Location:Lordaeron
  • Interests:Arcemu, WOW.
  • Server OS:Windows

Posted 03 October 2012 - 11:07 AM

View Postkenuvis, on 03 October 2012 - 10:57 AM, said:

Slider:Hide() ^^

But im kinda stocked... cant even chat or go to wow option menu...
Posted Image
Posted Image
0

#10 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 03 October 2012 - 11:35 AM

here is my realy simple script to test it, and it work.

function OnChat(Event, Player, Message, Type, Language, Misc)
	if Message == "show" then
		local sl = CreateSlider("TestSlider")
		sl:Send(Player)
	elseif Message == "hide" then
		GetObject("TestSlider"):Hide(Player)
	end
end

RegisterServerHook(16, OnChat) 


0

#11 User is offline   Loken 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 186
  • Joined: 19-July 11
  • Gender:Male
  • Location:Lordaeron
  • Interests:Arcemu, WOW.
  • Server OS:Windows

Posted 03 October 2012 - 12:04 PM

View Postkenuvis, on 03 October 2012 - 11:35 AM, said:

here is my realy simple script to test it, and it work.

function OnChat(Event, Player, Message, Type, Language, Misc)
	if Message == "show" then
		local sl = CreateSlider("TestSlider")
		sl:Send(Player)
	elseif Message == "hide" then
		GetObject("TestSlider"):Hide(Player)
	end
end

RegisterServerHook(16, OnChat) 


Yeap, that way works nicely :D but how can remove him if i call him clicking in slider button from the addon?

Also, use /gate show, later i close it clicking in the (X)... then type /gate show again and it wont be displayed... this is a normal behavior? :S
Posted Image
Posted Image
0

#12 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 03 October 2012 - 01:26 PM

yeah, the builder addon has no remove button, its quite harder, than you know ^^. the builder is therefor in the beta phase. And yes, always /gate show call a new project. like microsoft say "its not a bug, its a feature" :D

0

#13 User is offline   Loken 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 186
  • Joined: 19-July 11
  • Gender:Male
  • Location:Lordaeron
  • Interests:Arcemu, WOW.
  • Server OS:Windows

Posted 04 October 2012 - 05:30 PM

View Postkenuvis, on 03 October 2012 - 01:26 PM, said:

yeah, the builder addon has no remove button, its quite harder, than you know ^^. the builder is therefor in the beta phase. And yes, always /gate show call a new project. like microsoft say "its not a bug, its a feature" :D


Yay! I didnt see Client Trap in the feature list :lol:
Posted Image
Posted Image
0

#14 User is offline   kenuvis 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 27-July 08

Posted 05 October 2012 - 06:09 PM

yeah, i know i have to make it better, but i not to be keen on doing it.
so, if you want to do it, please. :)
tomorrow, it should be rain the day long, so, maybe, in case of....... i can do sth. on it.

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users