PvPToken System! (Need Script Edited) menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PvPToken System! (Need Script Edited)

    Hey all,

    I would like someone to modify my PvPToken script for my level 19 twink repack!

    Things you need to know!

    Token id = 70000
    set everything that is to do with level 70 to level 19!

    here is source!:

    Code:
    /*
    PvP Token Plug-in, this plug in will add a token of your choice to the killer of the opposite faction.
    Copyright (C) 2008  Plexor/zxc
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */
    #include "StdAfx.h"
    #include "Setup.h"
    
    void onPvpKill(Player* plr, Player* victim)
    {
        int itemID;
        uint32 tokenItem = Config.MainConfig.GetInt("NCDB", "PvPTokenID", &itemID);
    
        sLog.outColor(TGREEN,"\n[NCDB] (%u)%s killed (%u)%s", plr->getLevel(), plr->GetName(), victim->getLevel(), victim->GetName());
    
        if(plr->getLevel() >= 70 && victim->getLevel() >= 70 && plr->GetTeam() != victim->GetTeam())
        {
            sLog.outColor(TGREEN,"\n[NCDB] Adding token to %s", plr->GetName());
            sLog.outColor(TNORMAL,"\n");
            ItemPrototype *proto = ItemPrototypeStorage.LookupEntry(itemID);
            SlotResult slotresult;
            slotresult = plr->GetItemInterface()->FindFreeInventorySlot(proto);
    
            if(!slotresult.Result)
            {
                plr->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, INV_ERR_INVENTORY_FULL);
            }
            else
            {
                Item *itm = objmgr.CreateItem(itemID, plr);
                itm->SetUInt32Value(ITEM_FIELD_STACK_COUNT, 1);
                plr->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot);
                plr->SaveToDB(false);
            }
        }
        else
        {
            sLog.outColor(TGREEN,"\n[NCDB] Not adding token since they both are not level 70");
            sLog.outColor(TNORMAL,"\n");
        }
    }
    
    void SetupPvPToken(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, onPvpKill);
    }


    PvPToken System! (Need Script Edited)
  2. #2
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone please? Need it done badly =P


  3. #3
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everything needed was posted in my thread.
    Life Puzzler WoW - Website | Forums

  4. #4
    Hellgawd's Avatar Member
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Search and Replace - 70001 -> your id
    Search and Replace - 70 -> 19

Similar Threads

  1. Need Script Verified
    By methos0072001 in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 08-02-2008, 04:35 PM
  2. [WIP] Need help editing Hyena.M2!
    By Elthea in forum World of Warcraft Model Editing
    Replies: 2
    Last Post: 05-14-2008, 07:48 AM
  3. Need Scripts
    By pytos in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-13-2007, 12:39 AM
  4. Need help editing itemcache.wdb and sword position
    By Kaiderai in forum World of Warcraft General
    Replies: 2
    Last Post: 09-06-2007, 05:28 PM
  5. I need this edited for background
    By DJ Zodiac in forum Art & Graphic Design
    Replies: 0
    Last Post: 08-07-2007, 02:50 PM
All times are GMT -5. The time now is 09:29 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search