Jump to content

ICC Teleporter freischalten


SkyAngel

Recommended Posts

Good day,

I have a problem with the ICC teleporter. With GM, I see all port status with no points and only the GM status of what are unlocked. I would like to have unlocked but also as a player once all port areas.

However, I do not know exactly what I used to bring pPlayer->isGameMaster need for Wed pPlayer->isPlayer only error

Here is the script

#include "precompiled.h"
#include "icecrown_citadel.h"

enum 
{
PORTALS_COUNT = 7
};

struct t_Locations
{
   int textNum;
   uint32 map_num;
   float x, y, z, o;
   uint32 spellID;
   bool state;
   bool active;
   uint32 encounter;
};

static t_Locations PortalLoc[]=
{
{-3631600,MAP_NUM,-17.1928f, 2211.44f, 30.1158f,3.14f,70856,true,true,TYPE_TELEPORT}, //
{-3631601,MAP_NUM,-503.62f, 2211.47f, 62.8235f,3.14f,70856,false,true,TYPE_MARROWGAR},  //
{-3631602,MAP_NUM,-615.145f, 2211.47f, 199.972f,0,70857,false,true,TYPE_DEATHWHISPER}, //
{-3631603,MAP_NUM,-549.131f, 2211.29f, 539.291f,0,70858,false,true,TYPE_FLIGHT_WAR}, //
{-3631604,MAP_NUM,4198.42f, 2769.22f, 351.065f,0,70859,false,true,TYPE_SAURFANG}, //
{-3631606,MAP_NUM,4356.580078f, 2565.75f, 220.401993f,4.90f,70861,false,true,TYPE_VALITHRIA}, //
{-3631607,MAP_NUM,528.767273f, -2124.845947f, 1043.1f,3.14f, 70860,false,true,TYPE_KINGS_OF_ICC}, //
};


bool GOGossipSelect_go_icecrown_teleporter(Player *pPlayer, GameObject* pGo, uint32 sender, uint32 action)
{
   if(sender != GOSSIP_SENDER_MAIN) return false;

   if(!pPlayer->getAttackers().empty()) return false;

   if(action >= 0 && action < PORTALS_COUNT)
   pPlayer->TeleportTo(PortalLoc[action].map_num, PortalLoc[action].x, PortalLoc[action].y, PortalLoc[action].z, PortalLoc[action].o);
   if (PortalLoc[action].spellID != 0 )
       pPlayer->_AddAura(PortalLoc[action].spellID, 2000);

   pPlayer->CLOSE_GOSSIP_MENU();
   return true;
}

bool GOGossipHello_go_icecrown_teleporter(Player *pPlayer, GameObject* pGo)
{
   ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData();

   if (!pInstance || !pPlayer) return false;
   if (pPlayer->isInCombat()) return true;

   for(uint8 i = 0; i < PORTALS_COUNT; i++) {
   if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(PortalLoc[i].encounter) == DONE || pPlayer->isGameMaster()))
            pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_TAXI, PortalLoc[i].textNum, GOSSIP_SENDER_MAIN, i);
   };
   pPlayer->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID());
   return true;
}

bool GOHello_go_plague_sigil(Player *player, GameObject* pGo)
{
   instance_icecrown_spire* pInstance = (instance_icecrown_spire*)pGo->GetInstanceData();
   if(!pInstance) return false;

   if (pInstance->GetData(TYPE_FESTERGUT) == DONE
       && pInstance->GetData(TYPE_ROTFACE) == DONE)
       {
           pInstance->DoOpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_ORANGE));
           pInstance->DoOpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_GREEN));
           pInstance->DoOpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_COLLISION));
       };
   return true;
}

bool GOHello_go_bloodwing_sigil(Player *player, GameObject* pGo)
{
   instance_icecrown_spire* pInstance = (instance_icecrown_spire*)pGo->GetInstanceData();
   if(!pInstance) return false;

   if (pInstance->GetData(TYPE_SAURFANG) == DONE)
           pInstance->DoOpenDoor(pInstance->GetData64(GO_BLOODWING_DOOR));

   return true;
}

bool GOHello_go_frostwing_sigil(Player *player, GameObject* pGo)
{
   instance_icecrown_spire* pInstance = (instance_icecrown_spire*)pGo->GetInstanceData();
   if(!pInstance) return false;

   if (pInstance->GetData(TYPE_SAURFANG) == DONE)
       pInstance->DoOpenDoor(pInstance->GetData64(GO_FROSTWING_DOOR));

   return true;
}


void AddSC_icecrown_teleporter()
{
   Script *newscript;

   newscript = new Script;
   newscript->Name = "go_icecrown_teleporter";
   newscript->pGossipHelloGO  = &GOGossipHello_go_icecrown_teleporter;
   newscript->pGossipSelectGO = &GOGossipSelect_go_icecrown_teleporter;
   newscript->RegisterSelf();

   newscript = new Script;
   newscript->Name = "go_plague_sigil";
   newscript->pGOUse  = &GOHello_go_plague_sigil;
   newscript->RegisterSelf();

   newscript = new Script;
   newscript->Name = "go_bloodwing_sigil";
   newscript->pGOUse  = &GOHello_go_bloodwing_sigil;
   newscript->RegisterSelf();

   newscript = new Script;
   newscript->Name = "go_frostwing_sigil";
   newscript->pGOUse  = &GOHello_go_frostwing_sigil;
   newscript->RegisterSelf();
}

I hope you can help me further

Thank you very much

SkyAngel

PS: No I have not written the script itself:)

Link to comment
Share on other sites

Hello,

i think thats a question for scriptdev2 forum. The Mangos Core have many functions for all gameobject handling. The error is in your script. A good teleport system is in ulduar scripts. The best is, when you take a look in this scripts, maybe you can fix then the ICC teleporter. Pls remind the forum language is english and scripts support is in scriptdev2 forum.

In German:

hallo,

ich denke deine frage wäre im scriptdev2 Forum besser gestellt. Der Core liefert in Bezug auf gameobjects fast alles. Es handelt sich nur noch um dein Script welches anscheinend fehlerhaft ist. Ein funktionierdes teleportersystem gibt es in diversen ulduar scripts. Am besten schaust du dir diese an um die teleporter in ICC funktionsfähig zu machen. Bitte denke daran, das die forumsprache englisch ist.

Der deutsche Teil ist nur für dich, da du ja wohl mit englisch Probleme hast.(siehe deine threadbezeichnung)

wenn du englisch so gut kannst wie hilft auch am Ende eines post

sry, for my english, i know thats bad

and sry for the German Part, but I hope that skyangel unterstand my post better.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use