Tommy
Founder
I don't know, this is different rather than looking at creature scripts all the time, lol. I'm going to get more into the spell stuff now, as it seems that it is the most popular system at the moment.
.: Features :.
.: Video :.
.: SOURCE :.
EmuDevs:
Enjoy!
.: Features :.
[*=1]Spell: 36006 has been altered (custom) to just randomly port you around
.: Video :.
.: SOURCE :.
[*=1]EmuDevs - Random AuraScript - Pastebin
[*=1]Other scripts you may be interested in - Pastebin
EmuDevs:
Code:
[/B][/COLOR]/*
*╔═╦═╦═╦╦╦══╦═╦╗─╔╦══╗
*║╦╣║║║║║╠╗╗║╦╣╚╦╝║══╣
*║╩╣║║║║║╠╩╝║╩╬╗║╔╬══║
*╚═╩╩═╩╩═╩══╩═╝╚═╝╚══╝
* EmuDevs - (http://emudevs.com)
*/
enum SpellIds
{
SPELL_AURA = 36006,
};
class spell_script_aura_move : public SpellScriptLoader
{
public:
spell_script_aura_move() : SpellScriptLoader("spell_script_aura_move") { }
class spell_script_aura_move_AuraScript : public AuraScript
{
PrepareAuraScript(spell_script_aura_move_AuraScript);
bool Load()
{
if (Unit* caster = GetCaster())
if (caster->GetTypeId() == TYPEID_PLAYER)
return true;
return false;
}
void OnApply(AuraEffect const* /* auraEffect */, AuraEffectHandleModes /* handleModes */)
{
Player* caster = GetCaster()->ToPlayer();
float x, y, z;
caster->GetPosition(x, y, z);
// Magic
caster->MonsterYell("Can't catch me!", LANG_UNIVERSAL, 0);
caster->TeleportTo(caster->GetMapId(), x+rand()%8, y+rand()%-7, z+2, 1.0f, 0);
}
void Register()
{
OnEffectApply += AuraEffectApplyFn(spell_script_aura_move_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
AuraScript* GetAuraScript() const
{
return new spell_script_aura_move_AuraScript();
}
};
void AddSC_tutorial_aura()
{
new spell_script_aura_move;
}
Enjoy!