[DLL] New PvpSystem menu

User Tag List

Page 1 of 5 12345 LastLast
Results 1 to 15 of 64
  1. #1
    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)

    [DLL] New PvpSystem

    All new Pvp System
    Version 1


    After checking out a thread on AscentEmu, i decided to post the results here. The idea came from Monta, with help from Domi. What this DLL does, is inputs a whole new PvpSystem onto a server. So far what is contained is that whenever a player kills an opponent in PVP, he/she will gain 5 gold. The victim (player who died) will lose 2 gold. This is the README.txt file i placed in the source:

    Community Release

    There is an all new source out for the public! This will give a "pvptoken" to the attacker, and a message will be displayed on screen! You have to compile this release though.

    PvpSystem.cpp
    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/>.
    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] (&#37;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);
    }
    Setup.cpp
    Code:
    SetupPvPToken(mgr);
    Setup.h
    Code:
    void SetupPvPToken(ScriptMgr * mgr);
    Add this anywhere in Ascent.conf:
    Code:
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
    # NCDB-Moon++ Scripts Config (1 = enabled, 0 = disabled)
    #
    #    PvPToken
    #        This directive enables  item rewards when there is a PvP Kill and players are level 70
    #
    #    PvPTokenID
    #        If PvPToken is enabled, specify the item ID of your custom Token ID, or any other item
    #
    #
    #
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
     
    <NCDB PvPToken="1" PvPTokenID="itemid">
    Modified Release
    Compiled Releases
    Download

    * With these modified Systems, the attacker will gain a buff according to the folder you take the DLL out of. For example, the DLL in the agility folder will grant an agility buff on the attacker in pvp!
    Last edited by Gastricpenguin; 01-27-2008 at 07:21 PM.
    Life Puzzler WoW - Website | Forums

    [DLL] New PvpSystem
  2. #2
    Tom_2001's Avatar Member
    Reputation
    177
    Join Date
    Oct 2007
    Posts
    609
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i really like this system but im currently not using a server for hosting ill give yoou some repy rep rep!

  3. #3
    Hellgawd's Avatar Account not activated by Email
    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)
    Nice, although it isn't yours, so no repz. :P
    I don't believe in sharing for rep.
    But nice find.

  4. #4
    Illidan1's Avatar Banned
    Reputation
    244
    Join Date
    Jul 2007
    Posts
    2,251
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol i was ganna post this, in till i say it was some on from here who made it lol

  5. #5
    Le Froid's Avatar Contributor
    Reputation
    172
    Join Date
    Mar 2007
    Posts
    1,327
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I compiled it but the amount of gold lost is 13.3g and amount gained is 13.2g i thought..ill check my source code

  6. #6
    Le Froid's Avatar Contributor
    Reputation
    172
    Join Date
    Mar 2007
    Posts
    1,327
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I put in
    Code:
    attacker->ModUInt32Value(PLAYER_FIELD_COINAGE, 122000);
    victim->ModUInt32Value(PLAYER_FIELD_COINAGE, -123000);

  7. #7
    JulianX's Avatar Contributor
    Reputation
    106
    Join Date
    Jun 2007
    Posts
    177
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is really nice for a Blizz server nice Job GP

    I would give rep but cant

  8. #8
    Illidan1's Avatar Banned
    Reputation
    244
    Join Date
    Jul 2007
    Posts
    2,251
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, and for that guy who wonted it lol

  9. #9
    Skuxta's Avatar Banned
    Reputation
    12
    Join Date
    Aug 2007
    Posts
    211
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice thanks for posting. Ill have a look at the source code and try compile a version with pvp tokens and release that with pvp sets and a vendor . And the same kinda system If you die you lose tokens you kill someone you gain tokens

  10. #10
    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)
    attacker->GetItemInterface()->SafeAddItem(510020, INVENTORY_SLOT_NOT_SET, 23);


    That should help
    Life Puzzler WoW - Website | Forums

  11. #11
    Skuxta's Avatar Banned
    Reputation
    12
    Join Date
    Aug 2007
    Posts
    211
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    K thanks Gastricpenguin

  12. #12
    ~SaiLyn~'s Avatar Contributor
    Reputation
    280
    Join Date
    Aug 2007
    Posts
    546
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Further more , Gastric added this to the FunServer Core

  13. #13
    Dalamar's Avatar Active Member
    Reputation
    26
    Join Date
    Feb 2007
    Posts
    388
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't think I'm going to use this on my server but it's a very nice share as always Gastric. +rep.

  14. #14
    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)
    Updated the source code.
    Life Puzzler WoW - Website | Forums

  15. #15
    The Kingofbeast's Avatar Active Member
    Reputation
    38
    Join Date
    Oct 2007
    Posts
    306
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, nice!
    Got a question about your server? Message me!

    Don't forget +Rep when someone helps you

Page 1 of 5 12345 LastLast

Similar Threads

  1. [Guide] Compiling a DLL Without making a new Project , Take 5 minutes!
    By mafiaboy in forum WoW EMU Guides & Tutorials
    Replies: 4
    Last Post: 08-13-2008, 03:05 PM
  2. [help] about warpnpc.dll for new ascent rev
    By ion564 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 02-13-2008, 07:18 PM
  3. Are the new ads obtrusive?
    By Matt in forum Community Chat
    Replies: 30
    Last Post: 05-11-2006, 08:34 PM
  4. My new Avatar!
    By janzi9 in forum World of Warcraft General
    Replies: 40
    Last Post: 04-28-2006, 03:04 PM
All times are GMT -5. The time now is 11:35 PM. 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