Looking for a C++ expert menu

Shout-Out

User Tag List

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

    Looking for a C++ expert

    I want to use this script but I don't know what to save it as. If you can tell me I can complie.

    Always +rep for helping



    /*
    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/>.
    Credits to NCDB for original Source
    Credits to me for modifying it
    */
    #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, "[PVP]%s has killed %s", plr->GetName(), victim->GetName());
    sWorld.SendWorldWideScreenText(onkill);

    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);
    }

    Looking for a C++ expert
  2. #2
    Sylex's Avatar Active Member
    Reputation
    101
    Join Date
    May 2007
    Posts
    141
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Save as pvpscript.cpp =)

Similar Threads

  1. [Selling] Looking for opinions from experts/reputable people about the worth of my account
    By karrie in forum WoW-EU Account Buy Sell Trade
    Replies: 0
    Last Post: 04-02-2016, 02:47 AM
  2. Looking for a good PHP coder/website expert.
    By Gegon in forum Programming
    Replies: 0
    Last Post: 04-15-2009, 06:32 AM
  3. looking for expert dbc editor for help plz and thank you
    By jacob4313 in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 07-05-2008, 06:22 AM
  4. Looking For Expert Movie Editor
    By Aliv3 in forum Art & Graphic Design
    Replies: 5
    Last Post: 10-11-2007, 12:00 AM
  5. looking for expert model editor
    By Archelf in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 02-16-2007, 02:01 AM
All times are GMT -5. The time now is 11:14 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