i wrote this guild house portal script for my server and i liked it cause it was nothing but a simple portal they click if they dont have a guild house then it will send a message to them
Code:
class PortalGuild : public GameObjectAIScript
{
public:
PortalGuild(GameObject* goinstance) : GameObjectAIScript(goinstance) {}
void OnActivate(Player * pPlayer)
{
if(pPlayer->GetGuildId() == 1)
{
pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
}
elseif (pPlayer->GetGuildId() == 2)
{
pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
}
else
{
pPlayer->BroadcastMessage("You or a guild member must donate for this function. Speak to a Admin if you wish to purchase");
}
}
static GameObjectAIScript *Create(GameObject * GO) { returnnew PortalGuild(GO); }
};
GameObjectAIScript * create_go100005(GameObject * GO) { returnnew PortalGuild(GO); }
void SetupPortalHandlers(ScriptMgr * mgr)
{
mgr->register_gameobject_script(100005, &PortalGuild::Create);
}
all you have to do is this to add another to it
Code:
elseif (pPlayer->GetGuildId() == 3)
{
pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
}
put it before the plain else and after
Code:
elseif (pPlayer->GetGuildId() == 2)
{
pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
}
you get the point ok well have fun with this guys