• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

C++, TrinityCore teleporter and more.

MilboW

Respected Member
Hello, Guys i've been working on my Teleporter for Trinity, and wanted to share my work with you!,


This is for the lastest Rev "4ecc68d3a5d2+"

Pictures:
Coming Soon


Features:
Teleport Menu
Buff Option
Heal Option
Repair Option
Guribashi Arena teleport.

GM island -> Option only for GM lvl 2+
Horde and Ally Cities configured,

This Script is written by Me!


C++ Script:
http://pastebin.com/S8MbLGf8
NPC SQL:
http://pastebin.com/k0Pi1Z2s
DO NOT SHARE OR RERELEASE!
 

Parranoia

Insane Member
Just a suggestion. When you choose "Teleport Service" It would be easier to add all the locations except for GM island then check to see if they are a GM. If they are, add the GM menu as well. Just to tidy things up a bit :)

You might also want to check if the player has the Gamemaster's Items before adding them since it will add them each time you visit the island. Could be a bit of a hassle.

Code:
for(int i = 0; i < 10; i++)
      plr->AddAura(aurass[i], plr);

This little bit of code works, but it does not give you the last buff. Since you actually have 11 buffs, it should read i < 11 rather than 10

Code:
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));

And before this you should check if the player actually uses mana first



Just adding all this for constructive criticism and hopefully improve your skills
 
Last edited:

MilboW

Respected Member
Thanks for the suggestion,

I don't know the checkitem function, and tried to look everywhere, can't find it.

Could you tell me what the function is?
 
Last edited:

MilboW

Respected Member
Updates coming soon, Adding more teleport locations, and Teleporter Checks if GM's already have the GM outfit, Thanks to Para for that :),
 

Jameyboor

Retired Staff
hmm, is it just me or is there something wrong with the action of the dungeon menu options, talking about these :
Code:
 plr->ADD_GOSSIP_ITEM(2, "Classic Dungeons", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+23);
plr->ADD_GOSSIP_ITEM(2, "BC Dungeons", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+24);
plr->ADD_GOSSIP_ITEM(2, "Wrath Dungeons", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25);
Their actions are +23, +24 and +25 respectively, so I took a look what those actions do:
Code:
 case GOSSIP_ACTION_INFO_DEF+24: // Repair
                                plr->DurabilityRepairAll(false, 0, false);
                plr->GetSession()->SendNotification("Your items got repaired!");
                                plr->ModifyMoney(-10000);
                        break;
                case GOSSIP_ACTION_INFO_DEF+23: // Heal me
                                plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
                                plr->SetHealth(plr->GetMaxHealth());
                plr->SendTalentsInfoData(false);
                plr->GetSession()->SendNotification("|cffFFC125Your Health And Mana, Is being refilled.");
                                break;
                case GOSSIP_ACTION_INFO_DEF+25:// Gurubashi Arena Teleport
                                plr->TeleportTo(0, -13288.905273f, 109.301590f, 23.305859f, 1.078724f);
                                break;
Apparently +23 heals the player, +24 repairs the player's durability and +25 teleports you to gurubashi, I have a feeling you used actions +23, +24 and +25 for 2 different options.
 

UniverseGaming

Enthusiast
hey u guys got any idea why im getting this?

9>..\..\..\..\trinitycore\src\server\scripts\Custom\GossipNpc.cpp(26): error C2664: 'void WorldObject::MonsterWhisper(int32,const Player *,bool)' : cannot convert argument 2 from 'Language' to 'const Player *'
9> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast


using latest trinity core for 3.3.5a
 

Rochet2

Moderator / Eluna Dev
hey u guys got any idea why im getting this?

9>..\..\..\..\trinitycore\src\server\scripts\Custom\GossipNpc.cpp(26): error C2664: 'void WorldObject::MonsterWhisper(int32,const Player *,bool)' : cannot convert argument 2 from 'Language' to 'const Player *'
9> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast


using latest trinity core for 3.3.5a

Use the universal guide to fixing custom script errors:
Remove erroring line.

It will fix this issue as well, without breaking anything or disabling anything.
 
Top