DarkMessiah
-
Posts
29 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by DarkMessiah
-
-
How did you make the gossip menu?
This is what i have atm.
#include "precompiled.h" void SendDefaultMenu_MorphStone(Player* pPlayer, Item* pItem, uint32 action) { pPlayer->MonsterSay("SendDefaultMenu", LANG_UNIVERSAL, NULL); // Not allow in combat if (pPlayer->isInCombat()) { pPlayer->CLOSE_GOSSIP_MENU(); pPlayer->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL); return; } switch(action) { case 1: // Demorph pPlayer->DeMorph(); break; case 2: //Illidan pPlayer->SetDisplayId(21135); break; pPlayer->CLOSE_GOSSIP_MENU(); pPlayer->MonsterSay("End of Switch", LANG_UNIVERSAL, NULL); } // end of switch } //end of function bool GossipHello_MorphStone(Player* pPlayer, Item* pItem) { { pPlayer->ADD_GOSSIP_ITEM( 7, "Demorph" , GOSSIP_SENDER_MAIN, 1); pPlayer->ADD_GOSSIP_ITEM( 9, "Illidan" , GOSSIP_SENDER_MAIN, 2); pPlayer->MonsterSay("Menu Shown", LANG_UNIVERSAL, NULL); } pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pItem->GetGUID()); return true; } bool ItemUse_item_custom_MorphStone(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) { if ( (pPlayer->isInCombat()) || (pPlayer->isInFlight()) || (pPlayer->isDead())) { pPlayer->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT,pItem,NULL ); return false; } pPlayer->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED); { pPlayer->MonsterSay("ItemUse", LANG_UNIVERSAL, NULL); GossipHello_MorphStone(pPlayer, pItem); } return true; } bool GossipSelect_MorphStone(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action) { // Main menu if (sender == GOSSIP_SENDER_MAIN) //Item* pItem = (Item) pCreature; //SendDefaultMenu_MorphStone(pPlayer, pItem, action); return true; } void AddSC_item_custom_MorphStone() { Script *newscript; newscript = new Script; newscript->Name="item_custom_MorphStone"; newscript->pItemUse = &ItemUse_item_custom_MorphStone; //newscript->pGossipSelect = &GossipSelect_MorphStone; newscript->RegisterSelf(); }
-
Post patch?
You need GossipSelect for selecting gossip items.
I understand, but this is not possible with items since it is asking for pCreature hehe.
-
Hello guys,
Is it possible for the dev-team to build in some way so items can have a gossip menu that works? i made a gossipmenu out of an item but when u click something just nothing happens (i use SD2 also but they told me MaNGOS does not allow to use item menus).
Thanks,
DarkMessiah
[REQUEST]Item Menu
in OldGeneral discussion
Posted
This is what i have now but it gives me this error:
NOTE: i ripped out some code because this forum only allows 20000 chars: