Bastoco Posted January 25, 2016 Share Posted January 25, 2016 (edited) Hey Community.After some versions later of the teleport script, i try to write my "Mister Teleporter" script. But in the end, i have the problem: The NPC dont touch my script! Somebody can say, what i've do wrong? (Code in the spoiler). The script is included in the custom folder and also included in the scriptloader-textfile.(Trinity-Core, Rev. actual) /* * Written by (C) 2015-2016 Basto * Side: wow-titan.eu * Project: World of Warcraft - Titan - Die Nebelinsel */ class mr_teleporter : public CreatureScript { public: mr_teleporter() : CreatureScript("mr_teleporter") { } // CreatureScript("mr_teleporter") = Name of database entry bool OnGossipHello(Player* player, Creature* creature) override { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ich bin bereit um die Inselwelt zu betreten!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ich bin bereit um das OOC Gebiet zu betreten!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nein noch nicht bereit!!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); player->SEND_GOSSIP_MENU(1, creature->GetGUID()); return true; } bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 uiAction) override { switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: player->TeleportTo(805, 2129.701904f, 546.950012f, 6.881708f, 4.168441f); //Koordinaten zum Teleportieren. (Map, X-Cord, Y-Cord, Z-Cord, Orientation)|The coordinates to the destination break; case GOSSIP_ACTION_INFO_DEF+2: player->TeleportTo(805, 2129.701904f, 546.950012f, 6.881708f, 4.168441f); //Koordinaten zum Teleportieren. (Map, X-Cord, Y-Cord, Z-Cord, Orientation)|The coordinates to the destination break; case GOSSIP_ACTION_INFO_DEF+3: player->CLOSE_GOSSIP_MENU(); break; } return true; } }; void AddSC_mr_teleporter() // Add this to the ScriptLoader { new mr_teleporter(); } The function that i need: A script, that i have only to bind on a NPC (irrelevant wich one) who give some options about location teleportation. For example: "Port me please to XYZ1" -> PortLocation1, "Port me please to XYZ2" -> PortLocation2, "Port me please to XYZ3" -> PortLocation3, "Nah, dont get ported, thanks" -> CloseAny solutions? Greets,Basto Edited January 30, 2016 by Basto&co Link to comment Share on other sites More sharing options...
[Solved][335a Script] Mister Teleporter [Help]
By Bastocoin Serverside
Recommended Posts