[HELP]Warsong Glutch Tokens give players a custom token menu

User Tag List

Results 1 to 7 of 7
  1. #1
    jackdaripper's Avatar Banned
    Reputation
    36
    Join Date
    Apr 2008
    Posts
    463
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP]Warsong Glutch Tokens give players a custom token

    i need to know how to make the Warsong glutch battleground give the winning/ losing team my custom token i went in the WarsongGlutch.cpp and i dont know what to edit can someone help me -.-

    [HELP]Warsong Glutch Tokens give players a custom token
  2. #2
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The marks in WSG are added by using this spell

    Create Warsong Mark of Honor (WInner) - Spell - World of Warcraft

    So to fix this for new items, you must edit the script, not just change the ID in the script.
    One way would to remake the DBC, edit the item recived by this spell. I think...

    Else, the part where this can be found look like this in ArcEmu

    Code:
    /* add the marks of honor to all players */
                SpellEntry * winner_spell = dbcSpell.LookupEntry(24950);
                SpellEntry * loser_spell = dbcSpell.LookupEntry(24951);
                for(uint32 i = 0; i < 2; ++i)
                {
                    for(set<Player*>::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
                    {
                        (*itr)->Root();
                        if(i == m_winningteam)
                            (*itr)->CastSpell((*itr), winner_spell, true);
                        else
                            (*itr)->CastSpell((*itr), loser_spell, true);
                    }
                }
    I'm sure you can edit the code instead of
    CastSpell((*itr), loser_spell, true); to give the item... but to bad I'm suck at c++ atm =P
    Last edited by Power of Illuminati; 06-24-2008 at 02:55 PM.

  3. #3
    jackdaripper's Avatar Banned
    Reputation
    36
    Join Date
    Apr 2008
    Posts
    463
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how can i edit the Dbc?

  4. #4
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, wasn't able to find anything in the DBC now when I looked.. damn =P Only way would be to edit the script, so it gives the item instead of casting a spell... trying to find the command right now

  5. #5
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (*itr)->GetItemInterface()->AddItemToFreeSlot(Item);

    Of course, that will not deal with cases where the player already has a stack of tokens and you want to add to it.

  6. #6
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Found where to edit the item given by the spell now.

    You open your DBC file spell.dbc by using a DBC editor.. search on the forums, there is some somewhere.

    This is laggy, real laggy =P

    Then you scroll down to the IDs 24950 and 24951. These are the spell IDs...

    Now go to the right till you comes to field 108. On these lines you see a number, 20558. This is the ItemID (atleast what it looks like as this is the WSG mark itemID )

    Change that to your customitem... and atleast give it a test

  7. #7
    Ballwinkle's Avatar Contributor Authenticator enabled
    Reputation
    124
    Join Date
    Mar 2007
    Posts
    662
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ItemPrototype *winneritem = ItemPrototypeStorage.LookupEntry(29024);
    ItemPrototype *loseritem = ItemPrototypeStorage.LookupEntry(29024);
    //SpellEntry * winner_spell = dbcSpell.LookupEntry(24953);
    //SpellEntry * loser_spell = dbcSpell.LookupEntry(24952);
    for(uint32 i = 0; i < 2; ++i)
    {
    for(set<Player*>::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
    {
    (*itr)->Root();
    if(i == m_winningteam)
    {
    SlotResult slotresult;
    slotresult = (*itr)->GetItemInterface()->FindFreeInventorySlot(winneritem);
    if(!slotresult.Result)
    {
    (*itr)->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, INV_ERR_INVENTORY_FULL);
    }
    else
    {
    Item *itm = objmgr.CreateItem(29024, (*itr));
    itm->SetUInt32Value(ITEM_FIELD_STACK_COUNT, 3);
    (*itr)->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot);
    (*itr)->SaveToDB(false);
    }
    }
    else
    {
    SlotResult slotresult;
    slotresult = (*itr)->GetItemInterface()->FindFreeInventorySlot(loseritem);
    if(!slotresult.Result)
    {
    (*itr)->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, INV_ERR_INVENTORY_FULL);
    }
    else
    {
    Item *itm = objmgr.CreateItem(29024, (*itr));
    itm->SetUInt32Value(ITEM_FIELD_STACK_COUNT, 1);
    (*itr)->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot);
    (*itr)->SaveToDB(false);
    }
    }
    }
    }
    what i wrote for EOTS

Similar Threads

  1. [HELP!!] Warsong Gulch not WORKING!!!
    By Darksid in forum World of Warcraft Emulator Servers
    Replies: 37
    Last Post: 06-30-2008, 04:28 PM
  2. [HELP] Makeing Warsong Glutch tokens drop custom token
    By jackdaripper in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 06-15-2008, 06:02 AM
  3. [World Building] Warsong Glutch Trenchs
    By Skull in forum World of Warcraft Model Editing
    Replies: 7
    Last Post: 10-30-2007, 11:13 AM
  4. Replies: 4
    Last Post: 10-03-2007, 12:34 PM
  5. if-you-help-me-i-will-give-you-tons-of-rep!@#$
    By foxfire60 in forum World of Warcraft General
    Replies: 3
    Last Post: 01-18-2007, 04:58 PM
All times are GMT -5. The time now is 04:16 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