Our Emulation Experts is doing monthly updates on what is going on in the emulation environment on MMOwned.
This months’ update is sort of a big one because of the new patch and it being the first “release” if you can call it that. Maybe – and highly likely - we will change the way it is done along the way, but lets see if it’s a success first and then decide on what should be changed. Since the posts have quite a lot of info, we will be linking to each of the “articles” in the main post.
Patch 3.1 The race to finish – Hellgawd is talking about the new patch that hit World of Warcraft and the emulation environment, patch 3.1 and what impact it had in the emulation scene. Patch 3.1 The race to finish
lua – Laughing under anna?? – Stoneharrys article is about lua, what it is and what it can be used for when it comes to emulator servers, what he thinks is so good about it and generally why he uses it. Lua
Beyond the teleporter – teleporter? But I am not an engineer… - Gastricpenguin has written an article about Gossip/C++ scripts and what they can be used for, “What about an NPC that heals you when you shout “Help!”?” Beyond the Teleporter
New Emulation experts requirements – 2dgreengiant is informing you about the new requirements that are put in place if you are interested in being a part of the Emulator experts group. New Emulation Experts requirements
I hope you will enjoy the articles and hopefully eagerly await the next issue of "The Emulation Scene"
Yours truly
KuRIoS – on behalf of the MMOwned staff and the Emulator Experts group
With Blizzard's highly anticipated patch, 3.1 (bringing Ulduar, many UI changes, and so much more fun stuff) revolutionized itself across the Emulation world. As always with every new patch, the Emulator to first support the new patch wins a lot of user support until the next patch rolls around. This time, the 'up and coming' Emulator, AspireDev's very own Hearthstone Emulator, managed to crank out 3.1 support before anyone else, which satiated many appetites. However, writhed with glitches and other downfalls, many users looked for an alternative which was found later with Mangos, the longest running single Emulator, who released 3.1 about a week after Hearthstone did.
ArcEmu, which many here at MMOwned prefer for their emulation purposes, still to this date hasn't released their 3.1 core yet, however their 3.0.9 core could possibly be said to be the best 3.0.9 open sourced emulator available at the moment. Internal developers of ArcEmu have leaked that they will be supporting 3.1 sometime in the coming week(s), so your wait will be almost over! AspireDev still hasn't updated their 3.1 branch, leaving it sit in their SVN repository. All of their efforts are aimed at their 3.0.9 branch, and it is unsure when they will fix up the many bugs of their 3.1 core. And don't forget - Blizzard has already revealed their patch 3.2 plans, so private servers will be going through a hard patch soon.
What does this mean for MMOwned members? In general, just expect a few more bugs and not so much from your core developers. Perhaps some more patience with those that give their free time to work on the core you prefer? Maybe donate to those projects you already support with comments and feedback? I have a hunch that some projects might just close their doors in the following few weeks, so hasten on, it's going to be a rough ride!
__________________
[Only registered and activated users can see links. ] <|> [Only registered and activated users can see links. ]
Lua is a powerful, fast, lightweight, embeddable scripting language.
Where does the name originate from and how do you pronounce it?
Quote:
"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!
What are the different Lua engines?
GuaEngine:
GuaEngine (Gastricpenguin's Lua Engine) is a custom Lua engine designed to integrate more lua commands and add support for new features. There are only a few custom lua engines out there; the sad part is that they are updated once in a millennium or are outdated. The GuaEngine is compatible with the latest Ascent-Branch emulators and is updated frequently. http://www.mmowned.com/forums/emulat...ua-engine.html ([GuaEngine] New Custom Lua Engine)
LuAppArc is a Lua engine focused on ArcEmu trying to get every single default command working. They are constantly trying to provide the service for the community and rarely have problems.
Sun++ is a Lua engine and scripting project which has been around far longer than the others. They are often outdated but they try there best and focus on support for Aspire. AspireDev.org - Login sunplusplus - Revision 854: /
So how does Lua work exactly?
Lua works in functions. Each function must start by defining what it is and then doing what you want to do, and to finnaly end it. This is similer to many other sytems you may have heard of, such as "Input, proccess and output".
With each function you must tell the Lua engine when you want to do it. You do this by registering it, you can register each function outside the script (by on combat etc) or inside the script (continuing on from the current object).
If something is not functioned, the Lua engine will try to load it when the script loads. For example if you just put in a print function:
Quote:
print("Hello World")
Then all you will get is when the console gets to the script it will tell you it loaded then display:
Quote:
Hello World
People use this to display trademarks and instructions.
Also note that Lua loads in alphabetical order, meaning that if a script is named zzzHello it will be one of the last ones to load, or if it is called aaaHi, it will be one of the first to load. This helps when debugging.
-You can use it to create items, creatures, gameobjects and anything really in the database using the execute query function.
-You can create simple or advanced boss fights.
-You can spawn creatures, make traps, and gossip npcs ranging from vendors to flight paths for the more advanced.
-You can use items and gameobjects to teleport you and cast spells.
-You, can do almost anything at the end of the day.
Of course this is just for in-game.
Outside it is used in almost every addon you find, and real life matters.
Blizzard even use Lua as it is one of the requirements for some of their jobs involving WoW. Why use Lua over C++?
Well to be quite frank, Lua is easier. With Lua you can edit a script and put it on the server with two clicks of a button. With C++ you will need to recompile it. With Lua everything can be done in one file, and anyone can view and edit it easily. With C++ everything is saved into a dll and the solution is multiple files, which makes editing quite hard. Lua is far more easier than C++ to script in for begginers. You can make a script for a simple npc that you want to talk in five minutes in Lua, for C++ it would take at least double that time. Lua makes your life easy, good for the lazy.
__________________
[Only registered and activated users can see links. ] <|> [Only registered and activated users can see links. ]
Beyond the Teleporter A look at C++ scripting Written by GastricPenguin
Gossip scripts here on MMOwned are everywhere. There are plenty of guides and releases that detail how you can create your very own NPC
teleporter. The thing they don't tell you is that teleporters are not the only thing that can be accomplished by writing a C++ script. Why, a
gossip script can be used for anything you can think of. How does an Item that checks your current position, and if you are within a certain
pre-defined range launches you up into the air, sound? What about an NPC that heals you when you shout "Help!"? There's hardly a limit you
could reach (within reason) when creating a C++ script. Enough of the talk however, let's see some demonstrations!
Demonstration of a non-teleporter item script
IMPORTANT NOTICE: No media files are hosted on these forums. By clicking the link below you agree to view content from an external website. We can not be held responsible for the suitability or legality of this material.
IMPORTANT NOTICE: No media files are hosted on these forums. By clicking the link below you agree to view content from an external website. We can not be held responsible for the suitability or legality of this material.
Pretty cool, huh? The best part is that these scripts are very small and easy to write. Let's take a look at the first script.
Code:
//COMPATIBLE WITH THE ASPIRE CORE ONLY
#include "StdAfx.h"
#include "Setup.h"
#define BLIGHT_EXPLOSION 61126
#define LAUNCH 16716
#define SUICIDE 7
//This is a class that is called after the item is activated
//We have it at the top so the shared_ptr<Aftermath> can be used without errors
//'public EventableObject' is also needed for the shared_ptr
class Aftermath : public EventableObject
{
public:
void Explode(PlayerPointer Plr)
{
Plr->CastSpell(Plr, BLIGHT_EXPLOSION, 0);
//Fun spell for visuals (does cause high damage to opponents if in combat)
Plr->CastSpell(Plr, SUICIDE, 0);
//Kills the player (for lack of a better way)
}
};
class SCRIPT_DECL Launcher : public GossipScript
{
public:
void GossipHello(ObjectPointer pObject, PlayerPointer Plr, bool AutoSend)
{
shared_ptr<Aftermath> am;
//opens a shared ptr for the Aftermath class
Plr->CastSpell(Plr, LAUNCH, 0);
//Launch the player sky-high
TimedEvent *te = TimedEvent::Allocate(am, new CallbackP1<Aftermath, PlayerPointer>(am, &Aftermath::Explode, Plr), 0, 2950, 1);
sWorld.event_AddEvent(te);
//Add a timed event to kill the player 3 seconds later. This TimedEvent calls void Explode() in the Aftermath class after (roughly) 3 seconds
}
void GossipEnd(ObjectPointer pObject, PlayerPointer Plr)
{
GossipScript::GossipEnd(pObject, Plr);
}
void Destroy()
{
delete this;
}
};
void SetupLauncher(ScriptMgr * mgr)
{
GossipScript * gs = (GossipScript*) new Launcher();
mgr->register_item_gossip_script(44560, gs);
}
It may be intimidating to look at, but I assure you it is a very simple concept. Just read the commented lines for more information about what is
going on in the script. The second script looks as such: (again, refer to the comments for more information)
Code:
//COMPATIBLE WITH THE ASPIRE CORE ONLY
#include "StdAfx.h"
#include "Setup.h"
#define ETERNAL_AFFECTION 30878
using namespace std;
//Why use the std namespace? We are working with strings, that's why!
bool OnChat(PlayerPointer pPlayer, uint32 Type, uint32 Lang, string Message, string Misc)
{
string input = Message;
//Here we make a copy of the chat message so we can mess with it
transform(input.begin(), input.end(), input.begin(), tolower);
//This function takes the new copy and converts all characters to lowercase
if(strstr(input.c_str(), "i need healing"))
//if "i need healing" has been said, we continue!
{
CreaturePointer Healer =
pPlayer->GetMapMgr()->GetInterface()->SpawnCreature(50016, pPlayer->GetPositionX(),
pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 0, true, false, 0, 0);
//Let's spawn us a healer! The next 4 lines are easy to understand
Healer->SendChatMessage(12, 0, "I'm here to help!");
Healer->CastSpell(pPlayer, ETERNAL_AFFECTION, 0);
Healer->Despawn(5000, 0);
}
return true;
}
void SetupChatHealer(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, OnChat);
}
Why do people neglect writing scripts in C++?
For some reason, people believe that their precious Lua script can do anything they want. Although
that is entirely false, I believe that the main reason why people do not prefer a C++ script is the fact they are introduced to the language
incorrectly. Most C++ guides here on MMOwned are directed towards writing teleporters (aside from mager who released that lovely creature
structure here). Teleporters may be fun and all, but gossip scripts are intimidating. An average C++ Gossip Script ranges from 100 to 150 lines
of code! That is way too much to be looking at for a novice, no matter how well you write the guide. My advice for those out there who have
been introduced to C++ in the wrong light, start off with something small like a simple hook. C++ is a very versatile language that can be your best
friend when you get the hang of things!
__________________
[Only registered and activated users can see links. ] <|> [Only registered and activated users can see links. ]
New Emulation Expert requirements
Written by 2dgreengiant
Ok well for this article i would like to add the new emulation expert requirements. This counts for ALL people unless a big exception is made.
Requirements:
You have a minimum of 20 reputation.
Have a method of communication (msn/aim).
Must be mature
Proper use of grammar and Mechanics.
You show commitment to the team e.g. you don't just get the title and laze off.
You own, or have created a private server.
Been apart of a database, core or addon development team (proof required).
You know the basics of the following languages: SQL : C++ : LUA
Must be active in the following emulation sections.: questions, discussion and releases
Do not apply to be in the Emu Expert group if you do not meet these requirements. Be honest to yourself.
Samples of what you know will be required such as a C++ spel lfix script or a LUA script (not a teleporter or simpel boss fight). You will under go a range of extensive questions between both GastricPenguin and 2dgreengiant when a final vote will be cast between the current emulation experts.
__________________
[Only registered and activated users can see links. ] <|> [Only registered and activated users can see links. ]