This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Basic Client / Server Communications with Addons  (Read 1326 times)

deep6ixed

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 189
    • View Profile
[QUESTION] Basic Client / Server Communications with Addons
« on: November 12, 2014, 07:46:55 pm »
Is there a place where I could go to learn to create basic addons that can interface with the server, or modify the basic interface to add new mostly small features?

What I'm looking to do is for example is add a tab to the player page that would open a window and then get some info from the server and display it neatly.

If someone knows some tools that would help, or even knows of an addon that would be a good place to start looking to see how to do this, I'd be grateful for a hint or two.

I have no issues about wanting to learn this, just don't know where to start.  I'd be happy with a simple start of click a button and then the server sends a message back to you of "Hello World" and go from there.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Basic Client / Server Communications with Add
« Reply #1 on: November 12, 2014, 09:09:16 pm »
Quote from: "deep6ixed"
Is there a place where I could go to learn to create basic addons that can interface with the server, or modify the basic interface to add new mostly small features?

What I'm looking to do is for example is add a tab to the player page that would open a window and then get some info from the server and display it neatly.

If someone knows some tools that would help, or even knows of an addon that would be a good place to start looking to see how to do this, I'd be grateful for a hint or two.

I have no issues about wanting to learn this, just don't know where to start.  I'd be happy with a simple start of click a button and then the server sends a message back to you of "Hello World" and go from there.

Doing it through addons/FrameXML edits you want to be using addon messages. If you want to extend the WoW API using a module or modification of the binary (which is entirely feasible) then you can create your own Lua funcitons too.

Client side I'll do something like this:

Code: [Select]
SendAddonMessage("SelectTalents", "My Message", "WHISPER", UnitName("player"))
So that sends an addon to the player in the format:

"SelectTalentstMy Message"

So the players sends it to himself. The server listens for this happening and reacts depending on the string data found. It's as simple as that.

Here's where I've answered this question before: viewtopic.php?p=39807#p39807
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

deep6ixed

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 189
    • View Profile
Re: [QUESTION] Basic Client / Server Communications with Add
« Reply #2 on: November 13, 2014, 11:47:53 pm »
thanks harry, I appreciate it.

First thing I'm gonna attempt is a simple text box addon with a button, click the button, it sends a command to the server and gets a simple message back to display i the text box and go from there.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »