LF C++ Skillz - PVPToken menu

Shout-Out

User Tag List

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

    LF C++ Skillz - PVPToken

    i want to remove the part of the script that makes both players have to be 70 from this script because im getting the error 'Both players arnt 70 not giving pvptoken' error and they are so i just want to remove it. I tried the moonplusplus extra scripts but they arnt working for me atm...

    any help is appriecated and useful help is +Rep

    Code:
    #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());
       char onkill[1024];
       snprintf((char*)onkill, 1024, "|cffFFFF00[PVP]|r |cff00FF00%s|r
    |cffFFFF00has killed|r |cff00FF00%s|r", plr->GetName(),
    victim->GetName());
       sWorld.SendWorldWideScreenText(onkill);
       if(plr->getLevel() >= 1 && 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);
    }
    i changed it to this... idk what i was doing but all it did was dc the killer and victim..
    Code:
    #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());
           char onkill[1024];
           snprintf((char*)onkill, 1024, "|cffFFFF00[PVP]|r |cff00FF00%s|r
    |cffFFFF00has killed|r |cff00FF00%s|r", plr->GetName(),
    victim->GetName());
           sWorld.SendWorldWideScreenText(onkill);
           {
                   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);
                   }
           }
    }
    void SetupPvPToken(ScriptMgr * mgr)
    {
           mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, onPvpKill);
    }

    LF C++ Skillz - PVPToken

Similar Threads

  1. ZOMG GLIDER LEET SKILLZ reduce chance of being banned by zomg alot!
    By 30480 in forum World of Warcraft Guides
    Replies: 7
    Last Post: 11-14-2007, 01:37 AM
  2. Gief me ze skillz
    By TriNeaX in forum Screenshot & Video Showoff
    Replies: 2
    Last Post: 11-02-2007, 03:34 AM
  3. Jump-Skillz bY {ò.ó}
    By allesist in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 09-24-2007, 10:40 AM
  4. Jump-Skillz bY {ò.ó}
    By allesist in forum Screenshot & Video Showoff
    Replies: 4
    Last Post: 09-24-2007, 10:40 AM
  5. My VIdeo skillz
    By Niko33 in forum Community Chat
    Replies: 9
    Last Post: 11-16-2006, 09:00 PM
All times are GMT -5. The time now is 05:10 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