Help with creating custom warper. menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Shao111's Avatar Active Member
    Reputation
    33
    Join Date
    Jul 2007
    Posts
    281
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with creating custom warper.

    I've been trying to get this working for a while now with no success. Considering i don't know much if anything when it comes to C++, i wanted to see if someone would be willing to help me get a working compile.

    I'm trying to create an item with the warper gossip script along with the option to browse and buy PvP Rewards through a vendor window. This is what i've come up with so far.


    Code:
                    case 59:
                        {    //PvP Vendor
                            Plr->GetSession()->SendInventoryList(pCreature);
                        }break;
                        
       
    
                        {if(AutoSend)
                Menu->SendTo(Plr);
    {
    if(!unit->HasItems())
    {
    sChatHandler.BlueSystemMessageToPlr(_player, "No sell template found. Report this to devs: %d (%s)", unit->GetEntry(), unit->GetCreatureName()->Name);
    return;
    }
    
    WorldPacket data(((unit->GetSellItemCount() * 28) + 9)); // allocate
    
    data.SetOpcode( SMSG_LIST_INVENTORY );
    data << unit->GetGUID(30090);
    data << uint8(); // placeholder for item count
    
    ItemPrototype * curItem;
    uint32 counter = 0;
    
    for(std::vector<CreatureItem>::iterator itr = unit->GetSellItemBegin(); itr != unit->GetSellItemEnd(); ++itr)
    {
    if(itr->itemid)
    {
    if((curItem = ItemPrototypeStorage.LookupEntry(itr->itemid)))
    {
    data << (counter + 1);
    data << curItem->ItemId;
    data << curItem->DisplayInfoID;
    data << (int32)(-1); //we dont suport this kind of buy, make them infinite
    data << GetBuyPriceForItem(curItem, abs(itr->amount), abs(itr->amount));
    data << uint32(0x00);
    data << (int16)itr->amount;
    data << uint16(0x00);
    
    ++counter;
    }
    }
    }
    
    const_cast<uint8*>(data.contents())[8] = (uint8)counter; // set count
    
    SendPacket( &data );
    sLog.outDetail( "WORLD: Sent SMSG_LIST_INVENTORY" );
    }
    
        void Warper::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
        void SetupWarper(ScriptMgr * mgr)
        {
        GossipScript * gs = (GossipScript*) new Warper();
        mgr->register_item_gossip_script(60001,gs);
        }
    Thanks in advance.

    Help with creating custom warper.
  2. #2
    Le Froid's Avatar Contributor
    Reputation
    172
    Join Date
    Mar 2007
    Posts
    1,327
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it is an item you can't use
    Code:
    Plr->GetSession()->SendInventoryList(pCreature);

  3. #3
    Xeneth's Avatar Member
    Reputation
    157
    Join Date
    Oct 2007
    Posts
    534
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd be better off just going to a topic about this and following the instructions closely instead of posting a topic asking for help


  4. #4
    Shao111's Avatar Active Member
    Reputation
    33
    Join Date
    Jul 2007
    Posts
    281
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Le Froid View Post
    If it is an item you can't use
    Code:
    Plr->GetSession()->SendInventoryList(pCreature);
    Not necessarily an item, i want the same window that you see when you talk to a vendor to pop up.

  5. #5
    kreven's Avatar Member
    Reputation
    55
    Join Date
    Nov 2007
    Posts
    84
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx........

  6. #6
    Shao111's Avatar Active Member
    Reputation
    33
    Join Date
    Jul 2007
    Posts
    281
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea... MMowned=not much help with C++. =P

    EDIT: For those interested in this, the updated topic is here:

    Board Message
    Last edited by Shao111; 01-22-2008 at 07:12 AM.

Similar Threads

  1. Need help with creating a account creation website for mangos!
    By Insanity in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 07-13-2008, 04:58 AM
  2. Help with executing custom item batch file to heidi sql?
    By Drelanarus in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 04-27-2008, 11:47 AM
  3. [HELP] got some issues with creating custom model
    By paniccoo in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 04-04-2008, 08:15 PM
  4. Need some help with creating a GM macro
    By Crypted in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 04-02-2008, 03:30 PM
  5. Replies: 4
    Last Post: 10-03-2007, 12:34 PM
All times are GMT -5. The time now is 06:58 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search