[Showoff] XP for PVP kill (It works, and tested) menu

User Tag List

Results 1 to 7 of 7
  1. #1
    peet117's Avatar Member
    Reputation
    6
    Join Date
    Oct 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Script: XP for PVP Trinity

    This script made for TC2 by me.
    The new revs bring so many changes, I rewrote the script and make support for rates in worldserver.conf.

    Step I.
    In World.h find this about line 380:
    Code:
    RATE_MOVESPEED,
    MAX_RATES,
    Change like this:
    Code:
    RATE_MOVESPEED,
    MAX_RATES,
    CONFIG_XP_FOR_PVP_LOW_RATE,
    CONFIG_XP_FOR_PVP_HIGH_RATE
    Step II.
    In world.cpp find this about line 1156.
    Code:
    m_int_configs[CONFIG_MAX_RESULTS_LOOKUP_COMMANDS] = sConfig->GetIntDefault("Command.LookupMaxResults", 0);
    Put theese lines:
    Code:
    // custom
    	rate_values[CONFIG_XP_FOR_PVP_LOW_RATE]     = sConfig->GetFloatDefault("Xp.For.Pvp.Low.Rate", 1.0f);
    	rate_values[CONFIG_XP_FOR_PVP_HIGH_RATE]     = sConfig->GetFloatDefault("Xp.For.Pvp.High.Rate", 1.0f);
    Step III.
    Find this line in ScriptMgr.h about line 656
    Code:
     virtual void OnPVPKill(Player* /*killer*/, Player* /*killed*/) { }
    Change to this
    Code:
    virtual void OnPVPKill(Player* killer, Player* killed) 
    		{
    	uint32 LowRate = sWorld->getRate(CONFIG_XP_FOR_PVP_LOW_RATE);
    	uint32 HighRate = sWorld->getRate(CONFIG_XP_FOR_PVP_HIGH_RATE);
    	uint32 killerlvl = killer->getLevel();
    	uint32 killedlvl = killed->getLevel();
    	int32 diff = killerlvl-killedlvl;
    	uint32 XPLow = (killedlvl*5+45)*(1+0.05*diff)*LowRate;
    	uint32 XPHigh = (killedlvl*5+45)*(1+0.05*diff)*HighRate;
    	uint32 minusgold = killer->GetMoney()-(diff*10000);
    	uint32 plusgold = killed->GetMoney()+(diff*10000);
    	uint32 killergold = killer->GetMoney();
    	uint32 killedgold = killed->GetMoney();
    	uint32 plusgold2= killedgold+killergold;	
    
    		if (killerlvl < killedlvl +1)
    		killer->GiveXP(XPHigh , killed);
    		else 
    		if (diff > 10)
    			if (killergold > minusgold)
    			{
    			killer->SetMoney(minusgold);
    			killed->SetMoney(plusgold);
    			}
    			else 
    			{
    			killed->SetMoney(plusgold2);
    			killer->SetMoney(0);
    			}
    		else 
    			if(0  < diff && diff <10) 
    			killer->GiveXP(XPLow , killed);
    return;
    
    }
    Step IV.
    In wordserver.conf find the rates lines an put theese lines
    Code:
    Xp.For.Pvp.Low.Rate = X
    Xp.For.Pvp.High.Rate = X
    X means number.

    I don't write down again how it works, if anybody try this pls write down
    Bye, enjoy
    Last edited by peet117; 04-24-2013 at 04:43 AM.

    [Showoff] XP for PVP kill (It works, and tested)
  2. #2
    peet117's Avatar Member
    Reputation
    6
    Join Date
    Oct 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Come on 100 views and no comment?
    Somebody try this ?
    Any Questions?

  3. #3
    drewen's Avatar Member
    Reputation
    3
    Join Date
    May 2008
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dude just remove this leachers are gonna take it
    On-Topic - i got the lua version so am not gonna use this one my server only uses lua because there nubs and find out how to compile c++ while am giving them spell fixes

  4. #4
    Fumi's Avatar Contributor CoreCoins Purchaser
    Reputation
    207
    Join Date
    Feb 2008
    Posts
    561
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you explain what it does i dont understand Lua/C++

  5. #5
    Claiver's Avatar Member
    Reputation
    138
    Join Date
    Mar 2009
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Fumi View Post
    Can you explain what it does i dont understand Lua/C++
    It looks at the difference in level beteen Killer and the killed PvP target. Based on this difference the killer is either rewarded EXP and Gold or deducted gold if the difference is too high (higher than 10).
    Last edited by Claiver; 08-15-2010 at 05:55 PM.

  6. #6
    peet117's Avatar Member
    Reputation
    6
    Join Date
    Oct 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now works wiith new revs 3.3.5a

  7. #7
    dRACE's Avatar Active Member
    Reputation
    21
    Join Date
    May 2008
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does it still work? :-) LOL.

Similar Threads

  1. [Selling] WoW Scripts for PvP and PvE. Works on ALL servers.
    By Pqrdealer in forum WoW Private Server Buy Sell Trade
    Replies: 51
    Last Post: 12-21-2018, 09:51 PM
  2. [Selling] WoW Scripts for PvP and PvE. Works on ALL servers.
    By Pqrdealer in forum World of Warcraft Buy Sell Trade
    Replies: 22
    Last Post: 08-23-2015, 01:58 AM
  3. Replies: 0
    Last Post: 04-02-2010, 07:19 AM
  4. Replies: 6
    Last Post: 07-15-2006, 01:31 AM
All times are GMT -5. The time now is 03:04 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