PVP Token Question menu

User Tag List

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

    PVP Token Question

    Using this code, what values do I change to make this script give out tokens of my choosing, where do I put the token id at? Token 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() >= 19 && victim->getLevel() >= 19 && 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);
    }

    PVP Token Question
  2. #2
    soul02's Avatar Active Member
    Reputation
    33
    Join Date
    Mar 2008
    Posts
    168
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    u dont need to change anything in there just put this in ascent-world.conf <NCDB PvPToken="1" PvPTokenID="29434">
    -·=»‡«=·- Soul02 -·=»‡«=·-


  3. #3
    punnchy's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can someone please modify this into a dll for me/lua, I added the line in the config file ,but don't have the ability to modify dll's but i'm pretty sure i can impliment it with access to the server.

  4. #4
    Trippy000's Avatar Member
    Reputation
    18
    Join Date
    May 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We said you don't have to modify the the source just compile it how it is!!

  5. #5
    soul02's Avatar Active Member
    Reputation
    33
    Join Date
    Mar 2008
    Posts
    168
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol he doesnt know how to compile..

    well them tell us what rev is ur core and we compile the script for u..

    remember if ur rev is very old and outdated = sory cant help ya
    -·=»‡«=·- Soul02 -·=»‡«=·-


Similar Threads

  1. [HELP]Item cost PvP Tokens
    By jackdaripper in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 04-19-2008, 06:48 PM
  2. [HELP] PvP Tokens
    By jackdaripper in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 04-13-2008, 02:43 PM
  3. PvP Token System
    By reconz in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 02-13-2008, 01:40 PM
  4. PvP Token System!
    By Performer in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 02-03-2008, 03:42 PM
  5. Warlock PvP Spec Question
    By bloodbattalion in forum WoW PvP & Battlegrounds
    Replies: 6
    Last Post: 12-24-2007, 03:57 PM
All times are GMT -5. The time now is 08:34 PM. 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