Code:
//Title of Script: My Morpher
//Description of Script: Morphs the player into The Specified Display
//Author of this script: 1ns0mnia
#include "StdAfx.h"
#include "Setup.h"
#ifdef WIN32
#pragma warning(disable:4305)
#endif
class SCRIPT_DECL Morpher : public GossipScript
{
public:
void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
void GossipEnd(Object * pObject, Player* Plr);
void Destroy()
{
delete this;
}
};
void Morpher::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
Menu->AddItem(0, "Illidan", 0);
Menu->AddItem(0, "Dark Illidan", 2);
Menu->AddItem(0, "Spirit Healer", 3);
Menu->AddItem(0, "Kael'thas", 4);
Menu->AddItem(0, "Lady Vashj", 5);
Menu->AddItem(0, "Skeleton", 6);
Menu->AddItem(0, "Broken", 7);
Menu->AddItem(0, "Infernal", 8);
Menu->AddItem(0, "Amani War-Bear", 9);
Menu->AddItem(0, "Felguard", 10);
Menu->AddItem(0, "Vazruden The Herald", 11);
Menu->AddItem(0, "Super Cow", 12);
Menu->AddItem(0, "Panda", 13);
Menu->AddItem(2, "Demorph", 30);
if(AutoSend)
Menu->SendTo(Plr);
}
//Defining Cases
void Morpher::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
{
GossipMenu * Menu;
switch(IntId)
{
//Illidan
case 0:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21135);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Dark Illidan
case 2:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21322);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Spirit Healer
case 3:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 5233);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//kael'thas
case 4:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 20023);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Lady Vashj
case 5:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 20748);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Skeleton
case 6:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 17970);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Broken
case 7:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 17833);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Infernal
case 8:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 169);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Amani Bear
case 9:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 22467);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Felguard
case 10:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 14152);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Vazruden The Herald
case 11:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 18944);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Super Cow
case 12:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 1060);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Panda
case 13:
{
Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 10990);
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->Gossip_Complete();
}break;
//Demorph
case 30:
{
Plr->Emote(EMOTE_ONESHOT_CHEER);
Plr->DeMorph();
Plr->Gossip_Complete();
}break;
}
};
void Morpher::GossipEnd(Object * pObject, Player* Plr)
{
GossipScript::GossipEnd(pObject, Plr);
}
void SetupMorpher(ScriptMgr * mgr)
{
GossipScript * gs = (GossipScript*) new Morpher();
mgr->register_item_gossip_script(91000,gs);
}
Code:
INSERT INTO `items` VALUES ('91000', '8', '-1', '-1', 'My Portable Morpher', 'My Portable Morpher', 'My Portable Morpher', 'My Portable Morpher', '38160', '6', '0', '0', '0', '0', '1503', '1791', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '33208', '0', '579', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '3', 'I Can Morph Now!', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', null, '0', null, '0', '0', '0', '0', '0', '0', '0', null, '-1', '0');