[DiscordArchive] hey, i want to make a "Teleport Npc" (gossip np...
[DiscordArchive] hey, i want to make a "Teleport Npc" (gossip np...
Archived author: Needle • Posted: 2025-06-03T21:13:03.733000+00:00
Original source
Archived author: Needle • Posted: 2025-06-03T21:13:04.244000+00:00
Original source
Thread automatically created by Dyor in <#415944535718494208>
![[Image: image.png?ex=690c6a88&is=690b1908&hm=55a...f0303c2f9&]](https://cdn.discordapp.com/attachments/1379568591833268385/1379572790767783936/image.png?ex=690c6a88&is=690b1908&hm=55a528ffaa3cd5e99104ee47c72d83202aee4bbd0fba1209894c503f0303c2f9&)
![[Image: image.png?ex=690c6a88&is=690b1908&hm=515...da3da41a7&]](https://cdn.discordapp.com/attachments/1379568591833268385/1379572791430615050/image.png?ex=690c6a88&is=690b1908&hm=5159abc58236db3bf7c5769c1b8a4f9e6137c2c243196c24903f3a3da3da41a7&)
![[Image: image.png?ex=690c6a88&is=690b1908&hm=565...03bd7204b&]](https://cdn.discordapp.com/attachments/1379568591833268385/1379572791879143434/image.png?ex=690c6a88&is=690b1908&hm=565f559be438278a30c93d0e2a0df2961be9007fcc817b53263ce6c03bd7204b&)
Archived author: Dyor • Posted: 2025-06-03T21:29:44.874000+00:00
Original source
![[Image: image.png?ex=690c6a88&is=690b1908&hm=55a...f0303c2f9&]](https://cdn.discordapp.com/attachments/1379568591833268385/1379572790767783936/image.png?ex=690c6a88&is=690b1908&hm=55a528ffaa3cd5e99104ee47c72d83202aee4bbd0fba1209894c503f0303c2f9&)
![[Image: image.png?ex=690c6a88&is=690b1908&hm=515...da3da41a7&]](https://cdn.discordapp.com/attachments/1379568591833268385/1379572791430615050/image.png?ex=690c6a88&is=690b1908&hm=5159abc58236db3bf7c5769c1b8a4f9e6137c2c243196c24903f3a3da3da41a7&)
![[Image: image.png?ex=690c6a88&is=690b1908&hm=565...03bd7204b&]](https://cdn.discordapp.com/attachments/1379568591833268385/1379572791879143434/image.png?ex=690c6a88&is=690b1908&hm=565f559be438278a30c93d0e2a0df2961be9007fcc817b53263ce6c03bd7204b&)
Archived author: Dyor • Posted: 2025-06-03T21:29:49.311000+00:00
Original source
i cannot even delete the npc then
Archived author: Dyor • Posted: 2025-06-03T21:29:58.251000+00:00
Original source
till i restart the server & he dissapear himself
Archived author: Conastro • Posted: 2025-06-03T21:38:31.017000+00:00
Original source
Do you want lua, c++ or sql and what do you run? Tc, Ac?
Archived author: Conastro • Posted: 2025-06-03T21:49:43.484000+00:00
Original source
```class npc_custom_teleporter : public CreatureScript
{
public:
npc_custom_teleporter () : CreatureScript("npc_custom_teleporter") {}
struct npc_custom_teleporterAI : public ScriptedAI
{
npc_custom_teleporterAI(Creature* creature) : ScriptedAI(creature) {}
};
bool OnGossipHello(Player* player, Creature* creature) override
{
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Teleport me to Stormwind", GOSSIP_SENDER_MAIN, 1);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Close", GOSSIP_SENDER_MAIN, 2);
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override
{
switch(action)
{
case 1:
player->TeleportTo(0, -8833.38f, 626.358f, 94.0066f, 0.0f); // Stormwind
break;
case 2:
CloseGossipMenuFor(player);
break;
}
return true;
}
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_custom_teleporterAI(creature);
}
};```
smth like this can work
Archived author: Krutok • Posted: 2025-06-04T11:02:27.188000+00:00
Original source
https://github.com/TrinityCore/TrinityCo...npc_3.diff from here: https://github.com/TrinityCore/TrinityCo...anges/wiki
Archived author: Dyor • Posted: 2025-06-04T12:24:07.265000+00:00
Original source
i would prefere sql cuz i dont really know lua or c++ much, TC
Archived author: Krutok • Posted: 2025-06-04T16:48:53.232000+00:00
Original source
only SQL then use SmartAI its only SQL