I have added following Code to the go_scripts.cpp :
bool GOHello_go_alt_if(Player *pPlayer, GameObject* pGO)
{
pPlayer->TeleportTo(0, -4844.2915f,-1069.5511f,499.8508f,4.5595f);
return true;
}
bool GOHello_go_verlies_2(Player *pPlayer, GameObject* pGO)
{
pPlayer->TeleportTo(0, -8677.3896f,583.3628f,96.9404f,0.6911f);
return true;
}
This the first Lines i added.
Now next one, after all:
newscript = new Script;
newscript->Name = "go_alt_if";
newscript->pGOHello = &GOHello_go_alt_if;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "go_verlies_2";
newscript->pGOHello = &GOHello_go_verlies_2;
newscript->RegisterSelf();
And the SQL-Inserts are as follow:
INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES
(90900, 22, 4396, 'Keller von Eisenschmiede', '', '', '', 0, 0, 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, 'go_alt_if');
INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES
(90901, 22, 4396, 'Das alte Verlies', '', '', '', 0, 0, 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, 'go_verlies_2');
But if i do a ".gobject add 90901" it adds an portal, but if i klick on it, it wont work.
What did i forgot ?