PVP token script [Need Altered] menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Etymology's Avatar Member
    Reputation
    1
    Join Date
    Feb 2007
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PVP token script [Need Altered]

    Hey, I have a server were people keep opening two WoW's and farming an account for the PvP tokens..

    I saw somewere that this can be edited, to reduce the farming..

    Basically, if a person is killed more than twice in a row by the same person it does not supply a reward..

    Anyone help me out?


    The Item ID is 29434

    /*
    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
    */
    #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);
    }
    Last edited by Etymology; 06-25-2008 at 06:39 PM.

    PVP token script [Need Altered]
  2. #2
    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)
    You just need to store for each player the last GUID he killed. Search for std maps.

Similar Threads

  1. PvP Token System!
    By Performer in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 02-03-2008, 03:42 PM
  2. ZulGurub PVP Realm! Ascent.. Need GM's
    By Pilely in forum WoW Emulator Server Listings
    Replies: 0
    Last Post: 12-27-2007, 08:00 AM
  3. Booty bay - Scripting **Need help**
    By Ganoran in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 11-05-2007, 04:26 PM
  4. GM - Command scripts -need help-
    By Ganoran in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 11-03-2007, 02:32 PM
  5. How do I change price from Gold to a Token? (scripting)
    By Teddy Bear Love in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 10-06-2007, 05:40 PM
All times are GMT -5. The time now is 09:56 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